:py:mod:`FELiCS.Equation.MixtureClass` ====================================== .. py:module:: FELiCS.Equation.MixtureClass Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: FELiCS.Equation.MixtureClass.MixtureClass Attributes ~~~~~~~~~~ .. autoapisummary:: FELiCS.Equation.MixtureClass.logger .. py:data:: logger .. py:class:: 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** :param mixFilePath: Relative path to the mixture JSON file (e.g., 'Mixture.json'). :type mixFilePath: :py:class:`str` :param speciesFilePath: Relative path to the species JSON file (not used in the constructor but stored). :type speciesFilePath: :py:class:`str` :ivar __Species__: Dictionary of species involved in the mixture. :vartype __Species__: :py:class:`dict` :ivar __Reaction_mechanism__: Dictionary describing the type of reaction mechanism used. :vartype __Reaction_mechanism__: :py:class:`dict` :ivar __Pr__: Prandtl number of the mixture. :vartype __Pr__: :py:class:`float` :ivar __Viscosity__: Dictionary containing the viscosity model and its parameters. :vartype __Viscosity__: :py:class:`dict` .. admonition:: 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. :raises Info: If the file is not found and defaults are used. .. py:property:: reactionMechanism Get the reaction mechanism definition. :returns: Dictionary describing the reaction mechanism. :rtype: :py:class:`dict` .. py:property:: Pr Get the Prandtl number of the mixture. :returns: Prandtl number value. :rtype: :py:class:`float` .. py:property:: Viscosity Get the viscosity model and its parameters. :returns: Dictionary containing the viscosity model (e.g., constant) and its parameters. :rtype: :py:class:`dict` .. py:property:: species Get the species dictionary (alias to `Species`). :returns: Dictionary of species in the mixture. :rtype: :py:class:`dict` .. py:property:: Species Get the species dictionary. :returns: Dictionary of species in the mixture. :rtype: :py:class:`dict` .. py:method:: getReactionMechanism() Return the dictionary describing the reaction mechanism. :returns: Dictionary containing the type and details of the reaction mechanism. :rtype: :py:class:`dict` .. py:method:: getSpeciesList(keyword='all') Return a list of species based on a specified category. :param keyword: 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. :type keyword: ``{'all', 'transported', 'constraint'}``, *optional* :returns: List of species names matching the specified keyword. :rtype: :py:class:`list` of :py:class:`str` .. py:method:: readSpeciesDict(filename) Read species data from a dictionary file and store relevant transport properties. :param filename: Path to the file containing a dictionary of species and their properties. :type filename: :py:class:`str` .. admonition:: 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. .. py:method:: Sc(specie) Return the Schmidt number for a specific species. :param specie: Name of the species. :type specie: :py:class:`str` :returns: Schmidt number of the species. :rtype: :py:class:`float` :raises KeyError: If the species is not defined in the species dictionary. .. py:method:: getSpeciesDict() Return the dictionary of species in the mixture. :returns: Dictionary with species names as keys and their properties as values. :rtype: :py:class:`dict`