libICEpost.src.thermophysicalModels.specie.reactions.ReactionModel.DissociationModel ==================================================================================== .. py:module:: libICEpost.src.thermophysicalModels.specie.reactions.ReactionModel.DissociationModel .. autoapi-nested-parse:: @author: F. Ramognino Last update: 01/02/2024 Defines classes to handel dissociation of specie in a mixture. Used in the Stoichiometry reaction model to impose dissociation of molecules. Content of the package: DissociationModel (module) Base class ConstantDissociationFraction (module) Dissociation of a molacule with constant dissociation fraction Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/libICEpost/src/thermophysicalModels/specie/reactions/ReactionModel/DissociationModel/ConstantDissociationFraction/index /autoapi/libICEpost/src/thermophysicalModels/specie/reactions/ReactionModel/DissociationModel/DissociationModel/index Classes ------- .. autoapisummary:: libICEpost.src.thermophysicalModels.specie.reactions.ReactionModel.DissociationModel.DissociationModel libICEpost.src.thermophysicalModels.specie.reactions.ReactionModel.DissociationModel.ConstantDissociationFraction Package Contents ---------------- .. py:class:: DissociationModel(*, state: libICEpost.src.thermophysicalModels.thermoModels.ThermoState.ThermoState = None) Bases: :py:obj:`libICEpost.src.base.BaseClass.BaseClass` Defines classes to describe dissociation of some species in a mixture. .. py:attribute:: _state :type: libICEpost.src.thermophysicalModels.thermoModels.ThermoState.ThermoState | None The last thermodynamic state used to update the model .. py:property:: state The last thermodynamic state used to update the reaction model .. py:method:: update(*, state: libICEpost.src.thermophysicalModels.thermoModels.ThermoState.ThermoState = None) -> bool Method to update model (interface). :param state: Thermodynamic state to update the model. :type state: ThermoState, optional :returns: if something changed :rtype: bool .. py:method:: _update(*, state: libICEpost.src.thermophysicalModels.thermoModels.ThermoState.ThermoState = None) -> bool :abstractmethod: Method to update the model (implementation). :param state: Thermodynamic state to update the model. :type state: ThermoState :returns: if something changed :rtype: bool .. py:method:: apply(mixture: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture, *, inplace: bool = True) -> libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture | None Apply the dissociation model to the mixture. In-place update the mixture composition. If inplace=False, return the changed mixture. VIRTUAL METHOD :param mixture: The mixture to manipulate to impose the dissociation :type mixture: Mixture :param inplace: If inplace is True, change mixture and return None, else update mixture compositon. Defaults to True. :type inplace: bool, optional .. py:class:: ConstantDissociationFraction(molecule: libICEpost.src.thermophysicalModels.specie.specie.Molecule.Molecule, products: Iterable[libICEpost.src.thermophysicalModels.specie.specie.Molecule.Molecule], fraction: float, *, fracType: Literal['mass', 'mole'] = 'mass', state: libICEpost.src.thermophysicalModels.thermoModels.ThermoState.ThermoState = None) Bases: :py:obj:`libICEpost.src.thermophysicalModels.specie.reactions.ReactionModel.DissociationModel.DissociationModel.DissociationModel` Dissociation of a molecule based on a constant mass/mole fraction of the dissociated specie. .. py:attribute:: _fraction :type: float The mass/mole fraction to dissociate .. py:attribute:: _fracType :type: str The method to compure the fraction to dissociate (mass or mole) .. py:attribute:: _molecule :type: libICEpost.src.thermophysicalModels.specie.specie.Molecule.Molecule The molecule to dissociate .. py:attribute:: _reaction :type: libICEpost.src.thermophysicalModels.specie.reactions.Reaction.StoichiometricReaction.StoichiometricReaction The reaction used to compute the dissociation .. py:property:: fraction :type: float The mass/mole fraction to dissociate .. py:property:: fracType :type: str The method to compure the fraction to dissociate (mass or mole) .. py:property:: molecule :type: libICEpost.src.thermophysicalModels.specie.specie.Molecule.Molecule The molecule to dissociate .. py:property:: reaction :type: libICEpost.src.thermophysicalModels.specie.reactions.Reaction.StoichiometricReaction.StoichiometricReaction The reaction used to compute the dissociation .. py:method:: fromDictionary(dictionary: dict) :classmethod: Construct from dictionary :param dictionary: Dictionary containing: molecule (Molecule): The molecule to dissociate. products (Iterable[Molecule]): The molecules in which this dissociates (balance automatically computed). fraction (float): The mass/mole fraction of this molecule that dissociates. fracType (Literal["mass", "mole"], optional): How to compute the dissociation fraction. Defaults to "mass". :type dictionary: dict :returns: Instance of this class. :rtype: ConstantDissociationFraction .. py:method:: _update(*, state: libICEpost.src.thermophysicalModels.thermoModels.ThermoState.ThermoState = None) -> bool Method to update the model (implementation). :param state: Thermodynamic state to update the model. :type state: ThermoState :returns: if something changed :rtype: bool .. py:method:: apply(mixture: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture, *, inplace: bool = True) -> libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture | None Apply the dissociation model to the mixture. In-place update the mixture composition. If inplace=False, return the changed mixture. :param mixture: The mixture to manipulate to impose the dissociation :type mixture: Mixture :param inplace: If inplace is True, change mixture and return None, else update mixture compositon. Defaults to True. :type inplace: bool, optional