:py:mod:`FELiCS.Equation.Reactions.reactionMechanism` ===================================================== .. py:module:: FELiCS.Equation.Reactions.reactionMechanism Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: FELiCS.Equation.Reactions.reactionMechanism.reactionClass FELiCS.Equation.Reactions.reactionMechanism.reactionMechanismClass .. py:class:: reactionClass(educts, products, reactionMechanism, fluc, mean) Represents a chemical reaction with educts, products, and mechanism. This class manages the definition, discretization, and evaluation of a chemical reaction, including educt and product species, and provides access to reaction rates and equations. **Initialize the reactionClass object** :param educts: List of educt species. :type educts: :py:class:`list` or :py:class:`str` :param products: List of product species. :type products: :py:class:`list` or :py:class:`str` :param reactionMechanism: Name of the reaction mechanism. :type reactionMechanism: :py:class:`str` :param fluc: Fluctuation field (optional). :type fluc: :py:class:`object` :param mean: Mean field (optional). :type mean: :py:class:`object` :ivar __educts: Educt species. :vartype __educts: :py:class:`list` or :py:class:`str` :ivar __products: Product species. :vartype __products: :py:class:`list` or :py:class:`str` :ivar __isDiscretized: Flag indicating if the reaction is discretized. :vartype __isDiscretized: :py:class:`bool` :ivar __name: Reaction equation string. :vartype __name: :py:class:`str` :ivar __rr: Reaction rate (if discretized). :vartype __rr: :py:class:`object` .. py:property:: educts Returns the educt species. :returns: **educts** -- Educt species. :rtype: :py:class:`list` or :py:class:`str` .. py:property:: products Returns the product species. :returns: **products** -- Product species. :rtype: :py:class:`list` or :py:class:`str` .. py:property:: reactionEquation Returns the reaction equation string. :returns: **equation** -- Reaction equation. :rtype: :py:class:`str` .. py:property:: rr Returns the reaction rate. :returns: **rr** -- Reaction rate. :rtype: :py:class:`object` .. py:method:: consumption(specie) Returns the reaction rate for a consumed educt species. :param specie: Name of the educt species. :type specie: :py:class:`str` :returns: **rr** -- Reaction rate for the educt. :rtype: :py:class:`object` :raises Prints error if the species is not an educt.: .. py:method:: discretizeReaction(mean, fluc) Discretizes the reaction using the provided mean and fluctuation fields. :param mean: Mean field. :type mean: :py:class:`object` :param fluc: Fluctuation field. :type fluc: :py:class:`object` .. admonition:: Notes Sets the reaction rate according to the specified mechanism. .. py:method:: production(specie) Returns the reaction rate for a produced product species. :param specie: Name of the product species. :type specie: :py:class:`str` :returns: **rr** -- Reaction rate for the product. :rtype: :py:class:`object` :raises Prints error if the species is not a product.: .. py:class:: reactionMechanismClass(reactionMechanism, fluc=None, mean=None) Represents a collection of chemical reactions for a given mechanism. This class manages a list of reactions, species, and additional mean field quantities for a specified reaction mechanism. **Initialize the reactionMechanismClass object** :param reactionMechanism: Name of the reaction mechanism. :type reactionMechanism: :py:class:`str` :param fluc: Fluctuation field. :type fluc: :py:class:`object`, *optional* :param mean: Mean field. :type mean: :py:class:`object`, *optional* :ivar __numberOfSpecies: Number of species in the mechanism. :vartype __numberOfSpecies: :py:class:`int` :ivar __numberOfReactions: Number of reactions in the mechanism. :vartype __numberOfReactions: :py:class:`int` :ivar __reactionList: List of reactionClass instances. :vartype __reactionList: :py:class:`list` :ivar __additionalMeanFieldQuantities: List of additional mean field quantities. :vartype __additionalMeanFieldQuantities: :py:class:`list` :ivar __reactionMechanism: Name of the reaction mechanism. :vartype __reactionMechanism: :py:class:`str` .. py:property:: numberOfReactions Returns the number of reactions in the mechanism. :returns: **numberOfReactions** -- Number of reactions. :rtype: :py:class:`int` .. py:property:: numberOfSpecies Returns the number of species in the mechanism. :returns: **numberOfSpecies** -- Number of species. :rtype: :py:class:`int` .. py:property:: reactionMechanism Returns the name of the reaction mechanism. :returns: **reactionMechanism** -- Name of the reaction mechanism. :rtype: :py:class:`str` .. py:property:: reactions Returns the list of reactions. :returns: **reactions** -- List of reactionClass instances. :rtype: :py:class:`list` .. py:property:: additionalMeanFieldQuantities Returns the list of additional mean field quantities. :returns: **additionalMeanFieldQuantities** -- List of additional mean field quantities. :rtype: :py:class:`list`