FELiCS.Equation.MixtureClass#
Module Contents#
Classes#
Defines a thermochemical mixture for reactive flow simulations. |
Attributes#
- FELiCS.Equation.MixtureClass.logger#
- class FELiCS.Equation.MixtureClass.MixtureClass(mixFilePath, speciesFilePath)#
Defines a thermochemical mixture for reactive flow simulations.
This class manages properties of a mixture defined in an external JSON file, including species, reaction mechanisms, transport properties, and viscosity.
Initialize the MixtureClass object
- Parameters:
mixFilePath (
str) – Relative path to the mixture JSON file (e.g., ‘Mixture.json’).speciesFilePath (
str) – Relative path to the species JSON file (not used in the constructor but stored).
- Variables:
__Species__ (
dict) – Dictionary of species involved in the mixture.__Reaction_mechanism__ (
dict) – Dictionary describing the type of reaction mechanism used.__Pr__ (
float) – Prandtl number of the mixture.__Viscosity__ (
dict) – Dictionary containing the viscosity model and its parameters.
Notes
If the mixture file is missing, default values are used.
A warning is issued if the mixture file is not a .json file.
The species data should be read later using readSpeciesDict.
- Raises:
Warning – If the mixture file format is incorrect.
Info – If the file is not found and defaults are used.
- property reactionMechanism#
Get the reaction mechanism definition.
- Returns:
Dictionary describing the reaction mechanism.
- Return type:
dict
- property Pr#
Get the Prandtl number of the mixture.
- Returns:
Prandtl number value.
- Return type:
float
- property Viscosity#
Get the viscosity model and its parameters.
- Returns:
Dictionary containing the viscosity model (e.g., constant) and its parameters.
- Return type:
dict
- property species#
Get the species dictionary (alias to Species).
- Returns:
Dictionary of species in the mixture.
- Return type:
dict
- property Species#
Get the species dictionary.
- Returns:
Dictionary of species in the mixture.
- Return type:
dict
- getReactionMechanism()#
Return the dictionary describing the reaction mechanism.
- Returns:
Dictionary containing the type and details of the reaction mechanism.
- Return type:
dict
- getSpeciesList(keyword='all')#
Return a list of species based on a specified category.
- Parameters:
keyword (
{'all', 'transported', 'constraint'}, optional) – Filter for returned species: - ‘all’: return all species. - ‘transported’: return only species for which a transport equation is solved. - ‘constraint’: return only passive (non-transported) species.- Returns:
List of species names matching the specified keyword.
- Return type:
listofstr
- readSpeciesDict(filename)#
Read species data from a dictionary file and store relevant transport properties.
- Parameters:
filename (
str) – Path to the file containing a dictionary of species and their properties.
Notes
The file is expected to define a dictionary with entries for each species, each containing keys: ‘mol_weight’, ‘Sc’, and ‘Sc_t’. Only species classified as ‘transported’ will be processed.
- Sc(specie)#
Return the Schmidt number for a specific species.
- Parameters:
specie (
str) – Name of the species.- Returns:
Schmidt number of the species.
- Return type:
float- Raises:
KeyError – If the species is not defined in the species dictionary.
- getSpeciesDict()#
Return the dictionary of species in the mixture.
- Returns:
Dictionary with species names as keys and their properties as values.
- Return type:
dict