FELiCS.Equation.dependentVariables.reactionHandler#

Module Contents#

Classes#

reactionClass

Represents a chemical reaction and computes associated reaction rates and source terms.

reactionHandler

Manages and initializes chemical reactions and computes source terms for species.

class FELiCS.Equation.dependentVariables.reactionHandler.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

Parameters:
  • reactionData (dict) – A dictionary containing the educts, products, and their stoichiometric coefficients.

  • reactionType (str) – The type of the reaction mechanism, e.g., ‘KaiserCnF2023’.

  • mean (object) – The mean flow field object.

  • fluc (object) – The fluctuation field object.

Variables:
  • _educts (list) – List of educt species in the reaction.

  • _stochiometricCoefficientsEducts (list) – Stoichiometric coefficients corresponding to the educts.

  • _products (list) – List of product species in the reaction.

  • _stochiometricCoefficientsProducts (list) – Stoichiometric coefficients corresponding to the products.

  • _reactionType (str) – Type of the reaction mechanism.

  • _RR (float) – Computed reaction rate based on mean and fluctuating fields.

RR()#

Returns the computed reaction rate.

Returns:#

float

The reaction rate.

species()#

Returns the list of species involved in the reaction.

Returns:#

list

Combined list of educt and product species.

sourceTerm(specie)#

Computes the source term for a specific species based on its role in the reaction.

Parameters:

specie (str) – The species for which the source term is calculated.

Returns:

The source term corresponding to the input species.

Return type:

float

Raises:

Exception – If the species is not part of the reaction.

class FELiCS.Equation.dependentVariables.reactionHandler.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

Parameters:

None

omega(specie)#

Computes the net source term (omega) for a given species by aggregating contributions from all reactions.

Parameters:

specie (str) – The species for which omega is computed.

Returns:

The total omega value for the given species.

Return type:

float

RR(index)#

Retrieves the reaction rate for a specified reaction.

Parameters:

index (int) – Index of the reaction.

Returns:

The reaction rate for the specified reaction.

Return type:

float