libICEpost.src.thermophysicalModels.specie.reactions.functions ============================================================== .. py:module:: libICEpost.src.thermophysicalModels.specie.reactions.functions .. autoapi-nested-parse:: @author: F. Ramognino Last update: 10/06/2024 Functions --------- .. autoapisummary:: libICEpost.src.thermophysicalModels.specie.reactions.functions.computeAlphaSt libICEpost.src.thermophysicalModels.specie.reactions.functions.computeAlpha libICEpost.src.thermophysicalModels.specie.reactions.functions.makeEquilibriumMechanism libICEpost.src.thermophysicalModels.specie.reactions.functions.computeLHV libICEpost.src.thermophysicalModels.specie.reactions.functions.computeMixtureEnergy Module Contents --------------- .. py:function:: computeAlphaSt(air: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture, fuel: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture, *, oxidizer: libICEpost.src.thermophysicalModels.specie.specie.Molecule.Molecule = database.chemistry.specie.Molecules.O2) -> float Compute the stoichiometric air-fuel ratio given air and fuel mixture compositions. :param air: The air mixture composition :type air: Mixture :param fuel: The fuel mixture composition :type fuel: Mixture :param oxidizer: The oxidizing molecule. Defaults to database.chemistry.specie.Molecules.O2. :type oxidizer: Molecule, optional :returns: float .. py:function:: computeAlpha(air: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture, fuel: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture, reactants: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture, *, oxidizer: libICEpost.src.thermophysicalModels.specie.specie.Molecule.Molecule = database.chemistry.specie.Molecules.O2) -> float Compute the air-fuel ratio given air, fuel, and reactants mixture compositions. :param air: The air mixture composition :type air: Mixture :param fuel: The fuel mixture composition :type fuel: Mixture :param reactants: The reactants mixture composition :type reactants: Mixture :param oxidizer: The oxidizing molecule. Defaults to database.chemistry.specie.Molecules.O2. :type oxidizer: Molecule, optional :returns: float .. py:function:: makeEquilibriumMechanism(path: str, species: Iterable[str], *, overwrite: bool = False) -> None Create a mechanism (in yaml format) for computation of chemical equilibrium (with cantera) with the desired specie. The thermophysical properties are based on NASA polinomials, which are looked-up in the corresponding database. File structure: phases: - name: gas thermo: ideal-gas elements: [C, H, N, ...] species: [AR, N2, HE, H2, ...] kinetics: gas state: {T: 300.0, P: 1 atm} species: - name: CO2 composition: {C: 1, O:2} thermo: model: NASA7 temperature-ranges: [200.0, 1000.0, 6000.0] data: - [...] #Low coefficients - [...] #High coefficients - ... :param path: The path where to save the mechanism in .yaml format. :type path: str :param species: The list of specie to use in the mechanism. :type species: Iterable[Molecule] :param overwrite: Overwrite if found? Defaults to False. :type overwrite: bool, optional .. py:function:: computeLHV(fuel: libICEpost.src.thermophysicalModels.specie.specie.Molecule.Molecule | str | libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture, *, fatal=True) -> float Compute the lower heating value (LHV) of a molecule. This must be stored in the database of fuels (database.chemistry.specie.Fuels), so that it has an oxidation reaction in the corresponding database (database.chemistry.reactions.StoichiometricReaction). :param fuel: Either the molecule, the name of the molecule, or a Mixture in case of multi-component fuel. :type fuel: Molecule|str|Mixture :param fatal: Raise error if fuel not found in database? Defaults to True. :type fatal: bool, optional :returns: The LHV [J/kg] :rtype: float .. py:function:: computeMixtureEnergy(mixture: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture, oxidizer: libICEpost.src.thermophysicalModels.specie.specie.Molecule.Molecule = database.chemistry.specie.Molecules.O2) -> float Compute the energy of a mixture based on the LHV of fuels contained. Computes stoichiometric combustion based on the fuels in the database (database.chemistry.specie.Fuels). .. attribute:: mixture The mixture. :type: Mixture .. attribute:: oxidizer The oxidizing agend. Defaults to database.chemistry.specie.Molecules.O2. :type: Molecule, optional :returns: The avaliable chemical energy of the mixture [J/kg] :rtype: float