Metadata-Version: 2.4
Name: ms_thermo
Version: 1.0.0
Summary: Utilities to work on 2D and 3D structured grids
Author-email: CoopTeam-CERFACS <coop@cerfacs.fr>
License: CeCILL-B License
        
        Copyright (c) [2020] [CERFACS]
        Contact: coop@cerfacs.fr
         
        This software is a computer program whose purpose is to ensure technology
        transfer between academia and industry.
         
        This software is governed by the CeCILL-B license under French law and
        abiding by the rules of distribution of free software.  You can  use, 
        modify and/ or redistribute the software under the terms of the CeCILL-B
        license as circulated by CEA, CNRS and INRIA at the following URL
        "http://www.cecill.info". 
         
        As a counterpart to the access to the source code and  rights to copy,
        modify and redistribute granted by the license, users are provided only
        with a limited warranty  and the software's author,  the holder of the
        economic rights,  and the successive licensors  have only  limited
        liability. 
         
        In this respect, the user's attention is drawn to the risks associated
        with loading,  using,  modifying and/or developing or reproducing the
        software by the user in light of its specific status of free software,
        that may mean  that it is complicated to manipulate,  and  that  also
        therefore means  that it is reserved for developers  and  experienced
        professionals having in-depth computer knowledge. Users are therefore
        encouraged to load and test the software's suitability as regards their
        requirements in conditions enabling the security of their systems and/or 
        data to be ensured and,  more generally, to use and operate it in the 
        same conditions as regards security. 
         
        The fact that you are presently reading this means that you have had
        knowledge of the CeCILL-B license and that you accept its terms.
        
        
Project-URL: Homepage, https://gitlab.com/cerfacs/ms_thermo
Project-URL: Documentation, https://ms_thermo.readthedocs.io/en/latest/
Project-URL: Issues, https://gitlab.com/cerfacs/ms_thermo/-/issues
Project-URL: Changelog, https://gitlab.com/cerfacs/ms_thermo/-/blob/master/CHANGELOG.md
Keywords: MS THERMO API
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=2.0
Requires-Dist: scipy
Requires-Dist: h5py
Requires-Dist: PyYAML
Requires-Dist: click
Requires-Dist: h5cross
Provides-Extra: docs
Requires-Dist: myst-parser; extra == "docs"
Requires-Dist: sphinx_rtd_theme; extra == "docs"
Requires-Dist: recommonmark; extra == "docs"
Provides-Extra: tests
Requires-Dist: pytest; extra == "tests"
Requires-Dist: pytest-coverage; extra == "tests"
Requires-Dist: pytest-allclose; extra == "tests"
Dynamic: license-file

# ms_thermo

![logo_msthermo](https://cerfacs.fr/coop/images/logo_msthermo.gif)

This is a small package from Cerfacs dedicated to multispecies thermodynamics operations.

*It is available on [PyPI](https://pypi.org/project/ms-thermo/),
documentation is on [readtthedocs](https://ms-thermo.readthedocs.io/en/latest/), sources are mirrored on [gitlab.com](https://gitlab.com/cerfacs/ms_thermo)*

## Installation

Install from Python Package index:

```shell
pip install ms_thermo
```

## Features

### Command line tools

Once the package is installed, you have access in your terminal to a CLI from the command `ms_thermo`:

```bash
Usage: ms_thermo [OPTIONS] COMMAND [ARGS]...

  ---------------    MS-THERMO  --------------------

  You are now using the Command line interface of MS-Thermo, a Python3
  helper for reactive multispecies computation, created at CERFACS
  (https://cerfacs.fr).

  This is a python package currently installed in your python environement.
  See the full documentation at : https://ms-
  thermo.readthedocs.io/en/latest/.

Options:
  --help  Show this message and exit.

Commands:
  fresh-gas       (Deprecated) Renamed as kero-prim2cons
  gasout          Apply GASOUT actions to a mixture.
  hp-equil        HP equilibrium using Cantera.
  kero-prim2cons  Primitive to conservative variable conversion...
  kero-tadia      Adiabatic flame temperature for a kerosene-air...
  tadia           (Deprecated) Renamed as kero-tadia
  yk-from-phi     Mass fractions of a fuel-air mixture.
```

Details on the commands are available in the [documentation](https://ms-thermo.readthedocs.io/en/latest/explanations/cli.html#command-line-tools).

### The `State` class

The `State` class describes the full thermodynamic state of a gas mixture.
As an example, the following script creates an initial mixture of fresh gases, then changes a subset of the field into hot gases.

```
>>> from ms_thermo.state import State
>>> case = State()
>>> print(case)

Current primitive state of the mixture

		        | Most Common |    Min    |    Max
----------------------------------------------------
             rho| 1.17192e+00 | 1.172e+00 | 1.172e+00
          energy| 2.16038e+05 | 2.160e+05 | 2.160e+05
     temperature| 3.00000e+02 | 3.000e+02 | 3.000e+02
        pressure| 1.01325e+05 | 1.013e+05 | 1.013e+05
            Y_O2| 2.32500e-01 | 2.325e-01 | 2.325e-01
            Y_N2| 7.67500e-01 | 7.675e-01 | 7.675e-01

>>> case.temperature = 1200
>>> print(case)

Current primitive state of the mixture
			   	| Most Common |    Min    |    Max
----------------------------------------------------
             rho| 2.92980e-01 | 2.930e-01 | 2.930e-01
          energy| 9.41143e+05 | 9.411e+05 | 9.411e+05
     temperature| 1.20000e+03 | 1.200e+03 | 1.200e+03
        pressure| 1.01325e+05 | 1.013e+05 | 1.013e+05
            Y_O2| 2.32500e-01 | 2.325e-01 | 2.325e-01
            Y_N2| 7.67500e-01 | 7.675e-01 | 7.675e-01
```

Additional details on the commands are provided in the [documentation](https://ms-thermo.readthedocs.io/en/latest/explanations/state.html#).
