IPIM
 All Classes Files Functions Variables Pages
Public Member Functions | List of all members
m_reac Module Reference

Module containing the objects and methods to process chemical reactions. More...

Public Member Functions

subroutine read_reactions_file ()
 Interface to initialize spec type from element type (species). Then call reac_readreac routine and create reac type called reactions. More...
 
subroutine reac_readreac (wkdir, reacfile, sp, re)
 Read the input reactions.dat file and parse each reaction. More...
 
subroutine reac_reacinfo (re)
 Print information on the reactions. More...
 
subroutine reac_testreac (sp, re)
 Tests if the reaction is kept or not by comparing the reactants and the species list. More...
 
subroutine old_reac_rrate (rtype, ncoeff, coeff, T, P, T_o, N_o, k_r)
 Calculates the reaction rate for a given reaction type. More...
 
subroutine old_reac_getthirdspec (sp, ptr, nnr, nr, nnu, nu, nc, idx)
 Gives the concentration of the third reactant in a 3-species reaction. More...
 
subroutine reac_fillmatrix (sp, re, nr, nu, T, P)
 Fills the reaction matrix Mij and the reaction explicit vector Si. More...
 
subroutine reac_photodiss (sp, re, flux)
 
subroutine reac_printinfo (re, unb)
 

Detailed Description

Module containing the objects and methods to process chemical reactions.

Defines the types and the data structure containing the list of the reactions and their properties. Reactions module.

Todo:
Add nreactants to the type one_reaction

Member Function/Subroutine Documentation

subroutine m_reac::old_reac_getthirdspec ( type(spec)  sp,
type(one_reaction), pointer  ptr,
  nnr,
  nr,
  nnu,
  nu,
  nc,
  idx 
)

Gives the concentration of the third reactant in a 3-species reaction.

If there is no third reactant, the output is 1. If the 3rd reactant is a catalytic species "M" then the concentration of species N2 and O2 are added and the resulting value is returned.
Parameters
spPointer to the current species list
ptrPointer to the current reaction
ptrNumber of reactants in the reaction
ptrNumber of species resolved in the code
ptrNumber of species non-resolved (given by a model)
ptrConcentations of the resolved species
ptrConcentration of the non-resolved species
ptrOuput value [ 1:No 3rd reactant | nc:concentration of the 3rd reactant ]
ptrIndex of the 3rd reactant

Here is the caller graph for this function:

subroutine m_reac::old_reac_rrate (   rtype,
  ncoeff,
  coeff,
  T,
  P,
real  T_o,
real  N_o,
  k_r 
)

Calculates the reaction rate for a given reaction type.

The following are the reactions available:

\begin{eqnarray*} A &:&k_r=A*10^{B} \\\ B &:&k_r=A*10^{B}\left(\frac{C}{T}\right)^D \\\ B2&:&k_r=A*10^{B}\left(\frac{C}{T}\right)^D \\\ C &:&k_r=A*10^{B}e^{\frac{C}{T}} \\\ D &:&k_r=A*10^{B}T^Ce^{\frac{D}{T}} \\\ E &:&k_r=A*10^{B}\left(\frac{C}{T}\right)^De^{\frac{E}{T}} \\\ F &:&k_r=A*10^{B}(1+C.P) \\\ G &:&k_r=A*10^{B}\left(\frac{T}{C}\right)^D \\\ G2&:&k_r=A*10^{B}\left(\frac{T}{C}\right)^D \end{eqnarray*}

Additional included functions:
  • H: Is the same as 'B' but for two temperature ranges. The first coefficient corresponds to the threshold temperature.
  • I: Is the same as 'G' but for two temperature ranges. The first coefficient corresponds to the threshold temperature.
  • P#: Correspond to specially included polynomials for specific reactions. The first coefficient corresponds to the activation temperature of the reaction.
Todo:
Find a better generic way to treat polynomials with temperature ranges
Parameters
n_oReaction rate
n_oAuxiliar variable

Here is the caller graph for this function:

subroutine m_reac::reac_fillmatrix ( type(spec)  sp,
type(reac)  re,
  nr,
  nu,
  T,
  P 
)

Fills the reaction matrix Mij and the reaction explicit vector Si.

Gives the reaction matrix Mij, the explicit production vector Pi, and the explicit loss vector Lini. The total explicit chemical vector is: Si = Pi - Lini. In addition the subroutine computes the vectors lij and pij containing the contribution of each species to the production or loss of other species. This is usefull for the analysis of the kinetic scheme.
Todo:
This procedure must be made only once. Create a structure and a subroutine that associates directly i,j,m,k in order to make only a multiplication!
Parameters
reLocal temperature
reLocal pressure
reConcentrations of the resolved species
reConcentrations of the non resolved species

Here is the call graph for this function:

subroutine m_reac::reac_reacinfo ( type(reac)  re)

Print information on the reactions.

Author
subroutine m_reac::reac_readreac (   wkdir,
  reacfile,
type(spec)  sp,
type(reac)  re 
)

Read the input reactions.dat file and parse each reaction.

Author
Todo:
What happens when ions have multiple charges? e.g. NO^++ ?

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine m_reac::reac_testreac ( type(spec)  sp,
type(reac)  re 
)

Tests if the reaction is kept or not by comparing the reactants and the species list.

Author
If one of the reactants corresponds to a catalyst "M", the subroutine checks if one of the two catalytic species (O2, N2) is given in the list.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine m_reac::read_reactions_file ( )

Interface to initialize spec type from element type (species). Then call reac_readreac routine and create reac type called reactions.

Author

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this module was generated from the following file: