libICEpost.src.thermophysicalModels.specie.reactions.ReactionModel.DissociationModel
@author: F. Ramognino <federico.ramognino@polimi.it> 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
Classes
Defines classes to describe dissociation of some species in a mixture. |
|
Dissociation of a molecule based on a constant mass/mole fraction of the dissociated specie. |
Package Contents
- class libICEpost.src.thermophysicalModels.specie.reactions.ReactionModel.DissociationModel.DissociationModel(*, state: libICEpost.src.thermophysicalModels.thermoModels.ThermoState.ThermoState = None)[source]
Bases:
libICEpost.src.base.BaseClass.BaseClassDefines classes to describe dissociation of some species in a mixture.
- _state: libICEpost.src.thermophysicalModels.thermoModels.ThermoState.ThermoState | None
The last thermodynamic state used to update the model
- property state
The last thermodynamic state used to update the reaction model
- update(*, state: libICEpost.src.thermophysicalModels.thermoModels.ThermoState.ThermoState = None) bool[source]
Method to update model (interface).
- Parameters:
state (ThermoState, optional) – Thermodynamic state to update the model.
- Returns:
if something changed
- Return type:
bool
- abstractmethod _update(*, state: libICEpost.src.thermophysicalModels.thermoModels.ThermoState.ThermoState = None) bool[source]
Method to update the model (implementation).
- Parameters:
state (ThermoState) – Thermodynamic state to update the model.
- Returns:
if something changed
- Return type:
bool
- apply(mixture: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture, *, inplace: bool = True) libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture | None[source]
Apply the dissociation model to the mixture. In-place update the mixture composition. If inplace=False, return the changed mixture.
VIRTUAL METHOD
- Parameters:
mixture (Mixture) – The mixture to manipulate to impose the dissociation
inplace (bool, optional) – If inplace is True, change mixture and return None, else update mixture compositon. Defaults to True.
- class libICEpost.src.thermophysicalModels.specie.reactions.ReactionModel.DissociationModel.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)[source]
-
Dissociation of a molecule based on a constant mass/mole fraction of the dissociated specie.
- _fraction: float
The mass/mole fraction to dissociate
- _fracType: str
The method to compure the fraction to dissociate (mass or mole)
- _molecule: libICEpost.src.thermophysicalModels.specie.specie.Molecule.Molecule
The molecule to dissociate
- _reaction: libICEpost.src.thermophysicalModels.specie.reactions.Reaction.StoichiometricReaction.StoichiometricReaction
The reaction used to compute the dissociation
- property fraction: float
The mass/mole fraction to dissociate
- property fracType: str
The method to compure the fraction to dissociate (mass or mole)
- property molecule: libICEpost.src.thermophysicalModels.specie.specie.Molecule.Molecule
The molecule to dissociate
- property reaction: libICEpost.src.thermophysicalModels.specie.reactions.Reaction.StoichiometricReaction.StoichiometricReaction
The reaction used to compute the dissociation
- classmethod fromDictionary(dictionary: dict)[source]
Construct from dictionary
- Parameters:
dictionary (dict) – 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”.
- Returns:
Instance of this class.
- Return type:
- _update(*, state: libICEpost.src.thermophysicalModels.thermoModels.ThermoState.ThermoState = None) bool[source]
Method to update the model (implementation).
- Parameters:
state (ThermoState) – Thermodynamic state to update the model.
- Returns:
if something changed
- Return type:
bool
- apply(mixture: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture, *, inplace: bool = True) libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture | None[source]
Apply the dissociation model to the mixture. In-place update the mixture composition. If inplace=False, return the changed mixture.
- Parameters:
mixture (Mixture) – The mixture to manipulate to impose the dissociation
inplace (bool, optional) – If inplace is True, change mixture and return None, else update mixture compositon. Defaults to True.