libICEpost.src.thermophysicalModels.specie.reactions.Reaction

@author: F. Ramognino <federico.ramognino@polimi.it> Last update: 01/02/2024

Classes and packages for handling reactions in gaseous mixtures

Content of the package:
Reaction (class)

Defines classes to model reactions

StoichiometricReaction (class)

Class handling chemical reactions (transformation of reactants into products) through balancing of stoichiometry.

Submodules

Classes

Reaction

Base class for handling chemical reactions (transformation of reactants into products).

StoichiometricReaction

Class handling chemical reactions (transformation of reactants into products) through

Package Contents

class libICEpost.src.thermophysicalModels.specie.reactions.Reaction.Reaction(reactants: Iterable[libICEpost.src.thermophysicalModels.specie.specie.Molecule.Molecule], products: Iterable[libICEpost.src.thermophysicalModels.specie.specie.Molecule.Molecule], name: str = '')[source]

Bases: libICEpost.src.base.BaseClass.BaseClass

Base class for handling chemical reactions (transformation of reactants into products).


reactants

Mixture The reactants

products

Mixture The products

name: str

Name of the reaction

property reactants
property products
property moleRatio

The ratio of number of moles between products and reactants

_reactants
_products
__repr__()[source]
checkAtomicSpecie()[source]

Checks that the atomic composition of the specie are consistent

update(mix: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture = None)[source]

Method to update the composition of reactants and products (interface).

abstractmethod _update(mix: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture = None)[source]

Method to update the composition of reactants and products (implementation).

releasedEnergy() float[source]

Compute the released energy from the reaction per unit mass.

Returns:

[J/kg]

Return type:

float

class libICEpost.src.thermophysicalModels.specie.reactions.Reaction.StoichiometricReaction(reactants: Iterable[libICEpost.src.thermophysicalModels.specie.specie.Mixture.Molecule], products: Iterable[libICEpost.src.thermophysicalModels.specie.specie.Mixture.Molecule], name: str = '')[source]

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

Class handling chemical reactions (transformation of reactants into products) through balancing of stoichiometry. Reaction happens infinitely fast with instantaneous conversion of reactants into products.


reactants

Mixture The reactants

products

Mixture The products

classmethod fromDictionary(dictionary)[source]

Create from dictionary. {

“reactants”: list<Molecules>

The molecules in the reactants

“products”: list<Molecules>

The molecules in the products

}

classmethod fromFuelOxidation(fuel: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Molecule, oxidizer: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Molecule = database.chemistry.specie.Molecules.O2)[source]

Create oxidation reactions for a fuel. Can handle oxidizers with H, N, O

Parameters:

fuel (Molecule) – The fuel molecule.

classmethod fromOxidizerReduction(oxidizer: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Molecule)[source]

Create a reduction reaction of an oxidizer that is not in pure form (example NO2)

Parameters:

oxidizer (Molecule) – The oxidizer molecule.

__str__()[source]
Print the formula of the reaction (coefficient in mole fractions):

reactants => products

_update(mix: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture = None)[source]
mix: Mixture (None)

The new mixture of reactants (if needs to be changed)

Computes the composition of reactants and products through mass balance of each atomic specie.

If system is not solvable, raises ValueError.

If there are molecules that remain inhert across the reaction raises a ValueError.