:py:mod:`FELiCS.Equation.dependentVariables.reactionHandler` ============================================================ .. py:module:: FELiCS.Equation.dependentVariables.reactionHandler Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: FELiCS.Equation.dependentVariables.reactionHandler.reactionClass FELiCS.Equation.dependentVariables.reactionHandler.reactionHandler .. py:class:: reactionClass(reactionData, reactionType, mean, fluc) Represents a chemical reaction and computes associated reaction rates and source terms. The class supports the KaiserCnF2023 reaction mechanism and uses mean and fluctuating fields to evaluate the reaction rate. It also determines the reaction formula and provides access to species involved in the reaction and source terms. **Initialize the reactionClass object** :param reactionData: A dictionary containing the educts, products, and their stoichiometric coefficients. :type reactionData: :py:class:`dict` :param reactionType: The type of the reaction mechanism, e.g., 'KaiserCnF2023'. :type reactionType: :py:class:`str` :param mean: The mean flow field object. :type mean: :py:class:`object` :param fluc: The fluctuation field object. :type fluc: :py:class:`object` :ivar _educts: List of educt species in the reaction. :vartype _educts: :py:class:`list` :ivar _stochiometricCoefficientsEducts: Stoichiometric coefficients corresponding to the educts. :vartype _stochiometricCoefficientsEducts: :py:class:`list` :ivar _products: List of product species in the reaction. :vartype _products: :py:class:`list` :ivar _stochiometricCoefficientsProducts: Stoichiometric coefficients corresponding to the products. :vartype _stochiometricCoefficientsProducts: :py:class:`list` :ivar _reactionType: Type of the reaction mechanism. :vartype _reactionType: :py:class:`str` :ivar _RR: Computed reaction rate based on mean and fluctuating fields. :vartype _RR: :py:class:`float` .. py:method:: RR() Returns the computed reaction rate. Returns: ------- float The reaction rate. .. py:method:: species() Returns the list of species involved in the reaction. Returns: ------- list Combined list of educt and product species. .. py:method:: sourceTerm(specie) Computes the source term for a specific species based on its role in the reaction. :param specie: The species for which the source term is calculated. :type specie: :py:class:`str` :returns: The source term corresponding to the input species. :rtype: :py:class:`float` :raises Exception: If the species is not part of the reaction. .. py:class:: reactionHandler Manages and initializes chemical reactions and computes source terms for species. This class is responsible for setting up reaction objects, managing reaction data, and computing omega values for species. It is intended to be used after all other flow-related variables have been established. **Initialize the reactionHandler object** :param None: .. py:method:: omega(specie) Computes the net source term (omega) for a given species by aggregating contributions from all reactions. :param specie: The species for which omega is computed. :type specie: :py:class:`str` :returns: The total omega value for the given species. :rtype: :py:class:`float` .. py:method:: RR(index) Retrieves the reaction rate for a specified reaction. :param index: Index of the reaction. :type index: :py:class:`int` :returns: The reaction rate for the specified reaction. :rtype: :py:class:`float`