libICEpost.src.thermophysicalModels.specie.reactions.ReactionModel.Equilibrium

@author: F. Ramognino <federico.ramognino@polimi.it> Last update: 12/06/2023

Classes

_equilibriumComputationMethods

Create a collection of name/value pairs.

Equilibrium

Reaction model based on computation of chemical equilibrium which CANTERA.

Module Contents

class libICEpost.src.thermophysicalModels.specie.reactions.ReactionModel.Equilibrium._equilibriumComputationMethods(*args, **kwds)[source]

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

>>> Color.RED
<Color.RED: 1>
  • value lookup:

>>> Color(1)
<Color.RED: 1>
  • name lookup:

>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

average = 'average'
burntGas = 'burntGas'
adiabatiFlame = 'adiabaticFlame'
class libICEpost.src.thermophysicalModels.specie.reactions.ReactionModel.Equilibrium.Equilibrium(reactants: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture, mechanism: str, *, method: Literal['average', 'adiabatiFlame', 'burntGas'], state: libICEpost.src.thermophysicalModels.thermoModels.ThermoState.ThermoState)[source]

Bases: libICEpost.src.thermophysicalModels.specie.reactions.ReactionModel.ReactionModel.ReactionModel

Reaction model based on computation of chemical equilibrium which CANTERA.

oxidiser

The oxidiser

Type:

Molecule

reactants

The mixture of the reactants

Type:

Mixture

products

The mixture of products of the reaction

Type:

Mixture

specie

The molecules to consider in the equilibrium

Type:

list[Molecule]

mechanism

The path where the mechanism in yaml is stored

Type:

str

_ReactionType: str = None

The type for reactions to lookup for in the database

_reactor: cantera.composite.Solution

The ractor used to compute equilibrium in CANTERA

_mechamism: str

The path of the mechanism

classmethod fromDictionary(dictionary: dict)[source]

Constructs from dictionary

Parameters:

dictionary (dict) – The dictionary from which constructing: reactants (Mixture): the mixture of reactants mechanism (str): The path where is stored the chemical mechanism to use (yaml)

property mechanism: str

The path where the mechanism is stored.

property method

The method used to compute the equilibrium.

_mechanism
_method
_update(reactants: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture = None, *, state: libICEpost.src.thermophysicalModels.thermoModels.ThermoState.ThermoState) bool[source]

Method to update the products.

Parameters:
  • reactants (Mixture, optional) – Update mixture of reactants. Defaults to None.

  • state (ThermoState) – Thermodynamic state to update the reaction model.

Returns:

wether the system was updated

Return type:

bool