These guidelines are based on the working folder located here.

Chemistry modelling


1) Multi-species flow

1.1 The chemDicts/ folder

In the constant/ directory, the chemDicts/ folder is storing default chemistry dictionaries. It is advised not to modify the original files for future reference. Thus, a copy of the most appropriate hTCReactions#name dictionary can be made into the constant/ folder.

The path to the hTCReactions#name dictionary needs to be edited accordingly in thermophysicalProperties. This done using the foamChemistryFile entry as

    foamChemistryFile        "$FOAM_CASE/constant/hTCReactions#name";

Available hTCReactions#name dictionaries are

Chemistry dict name Reference
hTCReactionsEarth93 Park et al., 1993
hTCReactionsMars74 Evans, Schexnayder & Grose, 1974
hTCReactionsMars94 Park et al., 1994
hTCReactionsDK Dunn & Kang, 1973
hTCReactionsES Evans & Schexnayder, 1980
hTCReactionsJ92 Jachimowski, 1992
hTCReactionsJ92_fwd Jachimowski, forward reactions only, 1992
hTCReactionsQK Quantum-kinetics, Scanlon et al., 2015

 

1.2 Adding/deleting species

In the hTCReactions#name dictionary, the species composing the gas mixture need to be uncommented in species(). For a 5-species air mixture

    species
    (
        N2
        O2
        NO
      //N2+
      //O2+
      //NO+
        N
        O
      //N+
      //O+
      //e-
    );

As shown in this example, a specific order must be respected

  1. molecules
  2. charged molecules
  3. atoms
  4. charged atoms
  5. electrons

All species listed in the hTCReactions#name dictionary should also be present in thermoDEM and the 0/ directory. This is discussed in G. Initial conditions.

1.3 Printing species quantities

In the hTCProperties dictionary, switch on/off any of these booleans to print the desired fields

mixtureOutputs
{
    molarFraction       off;
    numberDensity       off;
    partialDensity      off;
    partialPressure     off;
    degreesOfFreedom    off;
    vibrationalEnergy   off;
}



2) Non-reacting flow

2.1 Disable chemistry

In the hTCProperties dictionary, switch off the active boolean as follows

     active          off;



3) Chemically-reacting flow

3.1 Enable chemistry

In the hTCProperties dictionary, switch on the active boolean as follows

     active          on;

In the chemistryProperties dictionary, the same operation must be repeated with the chemistry switch

     chemistry          on;
     initialChemicalTimeStep          1e-09;

where the initialChemicalTimeStep entry sets the initial chemical time-step.

3.2 Implementing a chemical reaction

3.2.1 Forward reaction

In the hTCReactions#name dictionary, the reactions subdictionary is enumerating the different chemical reactions to consider. The modified Arrhenius law coefficients are given in the table below

Coefficient Meaning Units
A pre-exponential factor m³/kmol/s
beta temperature exponent -
Ta temperature of activation K

NB: Please pay attention to the units of the pre-exponential factor, A, when customising your own hTCReactions#name dictionary.

The reaction type is defined as irreversibleArrheniusReaction.

reactions
{
    // Reaction no 1
    oxygenAtomicNitrogenReaction
    {
        type     irreversibleArrheniusReaction;
        reaction "O2 + N = 2O + N";
        A        1.0e19;
        beta     -1.5;
        Ta       59500; 
    }
}

 

3.2.2 Reverse reaction

Additional coefficients entering into the calculation of the reverse reaction rate constant [1], k_rev, are given below

Extra coefficient Meaning Units
ni() mixture number density list m⁻³
A0() - A4() Park’s coefficients for k_rev -

In the hTCReactions#name/reactions dictionary, the reaction type can either be reversibleArrheniusReaction or nonEquilibriumReversibleArrheniusReaction. Their implementation is exemplified hereafter

reactions
{
    // Reaction no 1
    oxygenAtomicNitrogenReaction
    {
        type     reversibleArrheniusReaction;
        reaction "O2 + N = 2O + N";
        A        1.0e19;
        beta     -1.5;
        Ta       59500;
        
        ni       (1e20 1e21 1e22 1e23 1e24 1e25);
        A0       (1.8103 0.91354 0.64183 0.55388 0.52455 0.50989);
        A1       (8.8685 9.2238 9.3331 9.3678 9.3793 9.3851);
        A2       (3.5716 2.2885 1.9026 1.7763 1.7342 1.7132);
        A3       (-7.3623 -6.7969 -6.6277 -6.572 -6.5534 -6.5441);
        A4       (0.083861 0.046338 0.035151 0.031445 0.030209 0.029591);  
    }

    // Reaction no 2
    hydrogenAtomOxygenReaction
    {
        type     nonEquilibriumReversibleArrheniusReaction;
        reaction "H + O2 = OH + O";
        forward
        {
            A        2.2e11;
            beta     0;
            Ta       8454;
        }
        reverse
        {
            A        1.42e4;
            beta     0;
            Ta       1664;
        }
    }
}

[1] C. Park. Nonequilibrium Hypersonic Aerothermodynamics, Wiley International, New York, 1990

 

3.2.3 Third-body interaction

In the hTCReactions#name/reactions dictionary, the type of the reaction is modified to either irreversiblethirdBodyArrheniusReaction, reversiblethirdBodyArrheniusReaction, or nonEquilibriumReversiblethirdBodyArrheniusReaction. An example is given below and many more can be found in the chemDicts/ folder.

reactions
{
    // Reaction no 1
    oxygenTBReaction
    {
        type     reversiblethirdBodyArrheniusReaction;
        reaction "O2 + M = 2O + M";
        A        2.0e18;
        beta     -1.5;
        Ta       59500;
        coeffs
        (
            ("N2" 1.0)
            ("O2" 1.0)
            ("NO" 1.0)
          //("N2+" 1.0)
          //("O2+" 1.0)
          //("NO+" 1.0)
            ("N" 5.0)
            ("O" 5.0)
          //("N+" 5.0)
          //("O+" 5.0)
          //("e-" 0.0)
        );
        
        ni       (1e20 1e21 1e22 1e23 1e24 1e25);
        A0       (1.8103 0.91354 0.64183 0.55388 0.52455 0.50989);
        A1       (8.8685 9.2238 9.3331 9.3678 9.3793 9.3851);
        A2       (3.5716 2.2885 1.9026 1.7763 1.7342 1.7132);
        A3       (-7.3623 -6.7969 -6.6277 -6.572 -6.5534 -6.5441);
        A4       (0.083861 0.046338 0.035151 0.031445 0.030209 0.029591);  
    }
}

NB: All species present in the species() list must be present in the coeff() list, no more, no less.

3.3 Increase robustness

Backward reaction rates may sometimes cause problems in low-temperature regions and yield the simulation to crash. A minimum temperature value, Tmin, can be introduced into the rate calculations to increase robustness [1]. A switch called modifiedTemperature located in the chemistryProperties dictionary is there for this purpose.

modifiedTemperature on;
modifiedTemperatureCoeffs
{
    Tmin      800.0;
    epsilon   80.0;
}

[1] L. C. Scalabrin, "Numerical Simulation of Weakly Ionized Hypersonic Flow over Reentry Capsules," PhD thesis, University of Michigan, Ann Arbor (US), 2007   [PDF→]



4) To go further: chemistry-vibration coupling

This aspect is detailed in D. Nonequilibrium.