FELiCS.Equation.Reactions.reactionMechanism#

Module Contents#

Classes#

reactionClass

Represents a chemical reaction with educts, products, and mechanism.

reactionMechanismClass

Represents a collection of chemical reactions for a given mechanism.

class FELiCS.Equation.Reactions.reactionMechanism.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

Parameters:
  • educts (list or str) – List of educt species.

  • products (list or str) – List of product species.

  • reactionMechanism (str) – Name of the reaction mechanism.

  • fluc (object) – Fluctuation field (optional).

  • mean (object) – Mean field (optional).

Variables:
  • __educts (list or str) – Educt species.

  • __products (list or str) – Product species.

  • __isDiscretized (bool) – Flag indicating if the reaction is discretized.

  • __name (str) – Reaction equation string.

  • __rr (object) – Reaction rate (if discretized).

property educts#

Returns the educt species.

Returns:

educts – Educt species.

Return type:

list or str

property products#

Returns the product species.

Returns:

products – Product species.

Return type:

list or str

property reactionEquation#

Returns the reaction equation string.

Returns:

equation – Reaction equation.

Return type:

str

property rr#

Returns the reaction rate.

Returns:

rr – Reaction rate.

Return type:

object

consumption(specie)#

Returns the reaction rate for a consumed educt species.

Parameters:

specie (str) – Name of the educt species.

Returns:

rr – Reaction rate for the educt.

Return type:

object

Raises:

Prints error if the species is not an educt.

discretizeReaction(mean, fluc)#

Discretizes the reaction using the provided mean and fluctuation fields.

Parameters:
  • mean (object) – Mean field.

  • fluc (object) – Fluctuation field.

Notes

Sets the reaction rate according to the specified mechanism.

production(specie)#

Returns the reaction rate for a produced product species.

Parameters:

specie (str) – Name of the product species.

Returns:

rr – Reaction rate for the product.

Return type:

object

Raises:

Prints error if the species is not a product.

class FELiCS.Equation.Reactions.reactionMechanism.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

Parameters:
  • reactionMechanism (str) – Name of the reaction mechanism.

  • fluc (object, optional) – Fluctuation field.

  • mean (object, optional) – Mean field.

Variables:
  • __numberOfSpecies (int) – Number of species in the mechanism.

  • __numberOfReactions (int) – Number of reactions in the mechanism.

  • __reactionList (list) – List of reactionClass instances.

  • __additionalMeanFieldQuantities (list) – List of additional mean field quantities.

  • __reactionMechanism (str) – Name of the reaction mechanism.

property numberOfReactions#

Returns the number of reactions in the mechanism.

Returns:

numberOfReactions – Number of reactions.

Return type:

int

property numberOfSpecies#

Returns the number of species in the mechanism.

Returns:

numberOfSpecies – Number of species.

Return type:

int

property reactionMechanism#

Returns the name of the reaction mechanism.

Returns:

reactionMechanism – Name of the reaction mechanism.

Return type:

str

property reactions#

Returns the list of reactions.

Returns:

reactions – List of reactionClass instances.

Return type:

list

property additionalMeanFieldQuantities#

Returns the list of additional mean field quantities.

Returns:

additionalMeanFieldQuantities – List of additional mean field quantities.

Return type:

list