7.1.6. Detailed Chemical Kinetic Modeling
GASFLOW-MPI 2.0 Revision 4772 or newer
Last updated
Was this helpful?
GASFLOW-MPI 2.0 Revision 4772 or newer
Last updated
Was this helpful?
GASFLOW-MPI can import files in the CHEMKIN format which allows it to perform combustion simulations using a wide range of detailed or simplified finite-rate chemical mechanisms when the effect of turbulence-chemistry interaction is negligible.
This approach is recommended for two main scenarios:
Laminar flames with negligible turbulence-chemistry interactions. Examples of such laminar flame scenarios include: bunsen burner flames, laminar jet diffusion flames, laminar counterflow flames, laminar premixed flat flames.
Combustion in high-speed compressible flows with minimal turbulence effect on reaction rates. Despite the limitations of the finite-rate chemistry model for turbulent flames, it may still provide accurate results in certain situations where the turbulence fluctuations are relatively small compared to the chemical timescales. In supersonic flow environments, the timescales of the turbulent fluctuations are significantly faster than the chemical reaction timescales. As a result, the influence of the turbulence on the reaction rates can be considered negligible, and the finite-rate chemistry approach can be used effectively to capture the detailed chemical kinetics without the need to model the turbulence-chemistry interactions. Examples of supersonic flame scenarios where the finite-rate chemistry approach would be applicable is detonation in premixed mixtures, such as deflagration-to-detonation transition (DDT), pulse detonation engines for propulsion applications, detonation-based combustion systems, detonation waves in shock tubes or other specialized facilities.
Users should carefully consider the applicability of this finite-rate chemistry approach to their specific research or engineering problems, particularly when dealing with turbulent flows and complex chemical kinetics.
GASFLOW-MPI utilizes the TChem [1] toolkit to parse CHEMKIN data files, calculate the right-hand side function and its Jacobian for a system of reaction ordinary differential equations (ODEs) at each physical node point. The system is then solved using the ODE solvers in PETSc (Portable, Extensible Toolkit for Scientific Computation) [2,3]. PETSc is also used to manage communication between the algebraic structures, such as vectors and matrix, and mesh data structures in parallel computing of the fluid dynamics.
TChem is a software toolkit designed specifically for computing thermodynamic properties, source terms, and the corresponding Jacobian matrix for chemical kinetic models involving both gas and surface reactions. It offers comprehensive support for a wide range of functionalities, including:
complex kinetic models for gas-phase and surface chemistry,
thermodynamic properties based on NASA polynomials,
parser for Chemkin/Cantera-YAML input files,
species production/consumption rates,
canonical reactor models such as constant pressure homogeneous gas-phase ignition, constant volume homogeneous gas-phase ignition, transient continuously stirred tank reactor, and plug-flow reactor,
automatic evaluation of source term's Jacobian matrix using either finite difference schemes or automatic differentiation via the SACADO library.
PETSc is a suite of data structures and routines developed by Argonne National Laboratory for the scalable (parallel) solution of scientific applicationsa. Sundials is a family of software packages developed by Lawrence Livermore National Laboratory which provids robust and efficient time integrators and nonlinear solvers that can easily be incorporated into existing simulation codes. These ODE solvers are utilized to solve the system of reaction ordinary differential equations (ODEs) that arise from the detailed chemical kinetics in each fluid cell.
The integration of the TChem toolkit with ODE solvers from PETSc empowers efficient numerical simulations that incorporate complex chemistry using the GASFLOW-MPI code. This integration facilitates comprehensive analysis of chemical kinetic models, enhancing predictive capabilities of a wide range of detailed/simplified chemistry applications.
GASFLOW-MPI 2.0 Revision 4772 or a more recent revision which allows to read general reaction mechanisms in CHEMKIN format.
ingf: input file for GASFLOW-MPI.
chemfile: data file in chemkin format which contains species and reactions for the reaction mechanisms. The name of the file must be chemfile.
The units of the activation energy in the chemfile are cal/mol.
thermofile: data file contains coefficients for computing thermodynamic properties based on NASA polynomials. The name of the file must be thermofile.
periodictable.dat: data file contains the names of elements and their corresponding atomic masses. The name of the file must be periodictable.dat.
Input parameter, iburn, has to be defined in $xput in the ingf file.
iburn = 6, ; activation of direct use of reaction mechanisms in CHEMKIN format
To ensure consistency between the CHEMKIN-formatted input file and the GASFLOW-MPI input file, it is important that the species are defined in the same order across both files. For example, if the CHEMKIN file specifies 10 species for a hydrogen oxidation mechanism:
species
h h2 o o2 oh h2o ho2 n2 h2o2 ar end
Then the corresponding material specification in the GASFLOW-MPI input file (ingf) should list the species in the same order:
mat = 'h', 'h2', 'o', 'o2', 'oh', 'h2o', 'ho2', 'n2', 'h2o2', 'ar',
This consistency is crucial because the GASFLOW-MPI input file (ingf) serves as the primary input for the GASFLOW-MPI code, while the CHEMKIN file provides the necessary chemical kinetics data to the TChem library used within GASFLOW-MPI.
The amount of energy added or temperature increase over a time step due to the combustion has to be limited for each fluid cell to ensure the numerical stability. The input parameter, dcdtemp, should be defined in $xput in the ingf file to limit the temperature change due to chemical kinetics in one time step.The time step size allowed in the chemical kinetics modeling is then under control. This parameter works only combined with iburn = 6.
dcdtemp = 1, ; maximum temperature change over one time step is 1 K
The default value of the "dcdtemp" parameter is set to 1 K. However, users have the flexibility to increase this value, such as to 10 K or even 50 K, to obtain a larger time step and subsequently reduce the overall computational time. It is crucial to exercise caution when making such adjustments, as there is a potential risk of compromising numerical stability. Users should proceed with increased values of "dcdtemp" thoughtfully and be mindful of the potential implications on the accuracy of the results.
The reaction rate is highly dependent on temperature. At low temperatures, the reaction rate is relatively small and can be neglected. In the GASFLOW-MPI code, the chemistry reaction rate is set to zero in computational cells where the gas temperature is below the user-specified temperature threshold, tdcthres, used by the stiff chemistry solver. The default value of tdcthres is 300 K.
The input parameters, idcodesol, should be defined $xput in the ingf file to select the class of ODE solver. It is recommended to use two combinations below
idcodesol = 1, ; Rosenbrock W-scheme
idcodetype = 4, ; Four stage third order L-stable Rosenbrock-W scheme
or
idcodesol = 2, ; Implicit-Explicit Runge-Kutta Scheme
idcodetype = 9, ; Third order L-stable ARK IMEX scheme with one explicit stage and three implicit stages.
Note: It is recommended to explore alternative options when the computational efficiency is noticeably low or for the purpose of performance testing.
idcodesol: Input option for ODE solvers
1 (default)
Rosenbrock W-schemes
Linearly implicit
2
Implicit-Explicit (IMEX) Runge-Kutta schemes
Implicit-Explicit
3
Backward Differentiation Formulas from Sundials’ CVODE
Implicit
idcodetype: Input option for Rosenbrock W-schemes (applicable when idcodesol = 1)
1 (default)
2m
Two stage second order L-stable Rosenbrock-W scheme. Only an approximate Jacobian is needed.
2
2p
Two stage second order L-stable Rosenbrock-W scheme. Only an approximate Jacobian is needed.
3
ra3pw
Three stage third order Rosenbrock-W scheme for PDAE of index 1 [5]. Only an approximate Jacobian is needed.
4
ra34pw2
Four stage third order L-stable Rosenbrock-W scheme for PDAE of index 1 [5]. Only an approximate Jacobian is needed.
5
rodas3
Four stage third order L-stable Rosenbrock scheme [6].
6
sandu3
Three stage third order L-stable Rosenbrock scheme [6].
7
assp3p3s1c
A-stable Rosenbrock-W method with SSP explicit part, third order, three stages.
8
lassp3p4s2c
L-stable Rosenbrock-W method with SSP explicit part, third order, four stages.
9
llssp3p4s2c
L-stable Rosenbrock-W method with SSP explicit part, third order, four stages.
10
ark3
11
theta1
One stage first order L-stable Rosenbrock-W scheme (aka theta method).
12
theta2
One stage second order A-stable Rosenbrock-W scheme (aka theta method).
13
grk4t
Four stage, fourth order Rosenbrock (not W) method from Kaps and Rentrop [7].
14
shamp4
Four stage, fourth order Rosenbrock (not W) method from Shampine [8].
15
veldd4
Four stage, fourth order Rosenbrock (not W) method from van Veldhuizen.
16
4L
Four stage, fourth order Rosenbrock (not W) method.
idcodetype: Input option for Implicit-Explicit Runge-Kutta Schemes (applicable when idcodesol = 2)
1
1bee
First order backward Euler represented as an ARK IMEX scheme with extrapolation as error estimator. This is a 3-stage method. This method is aimed at starting the integration of implicit DAEs when explicit first-stage ARK methods are used.
2 (default)
a2
Second order ARK IMEX scheme with A-stable implicit part. This method has an explicit stage and one implicit stage, and has an A-stable implicit scheme.
3
L2
Second order ARK IMEX scheme with L-stable implicit part, [10]. This method has two implicit stages, and L-stable implicit scheme.
4
ars122
Second order ARK IMEX scheme, [11]. This method has one explicit stage and one implicit stage.
5
2c
Second order ARK IMEX scheme with L-stable implicit part. This method has one explicit stage and two implicit stages. The implicit part is the same as in TSARKIMEX2D and TSARKIMEX2E, but the explicit part has a larger stability region on the negative real axis.
6
2d
Second order ARK IMEX scheme with L-stable implicit part. This method has one explicit stage and two implicit stages. The stability function is independent of the explicit part in the infinity limit of the implicit component.
7
2e
Second order ARK IMEX scheme with L-stable implicit part. This method has one explicit stage and two implicit stages.
8
prssp2
Second order SSP ARK IMEX scheme, [10]. This method has three implicit stages.
9
3
Third order ARK IMEX scheme with L-stable implicit part, [12]. This method has one explicit stage and three implicit stages.
10
bpr3
Third order ARK IMEX scheme [13]. This method has one explicit stage and four implicit stages.
11
ars443
Third order ARK IMEX scheme, [11]. This method has one explicit stage and four implicit stages.
12
4
Fourth order ARK IMEX scheme with L-stable implicit part, [12]. This method has one explicit stage and four implicit stages.
13
5
Fifth order ARK IMEX scheme with L-stable implicit part, [12]. This method has one explicit stage and five implicit stages.
Example 1
Example 2
Below, we provide several typical reaction mechanisms in the CHEMKIN format. It is important to note that for GASFLOW-MPI simulations, the name of the chemical kinetics file should be changed to "chemfile", and the name of the thermodynamic property file should be changed to "thermofile".
The GASFLOW-MPI software currently includes a built-in library that provides properties for 169 different chemical species, as detailed in the following table. This built-in library is included to improve the computational efficiency of the software. Users have the flexibility to select which specific species they wish to include in their calculations from this available library. Additionally, It is should be noted that additional species can be easily incorporated into GASFLOW-MPI, should users require them or make such requests.
[1] Kyungjoo Kim, Oscar Diaz-Ibarra, Cosmin Safta, and Habib Najm, TChem v3.0 - A Software Toolkit for the Analysis of Complex Kinetic Models, Sandia National Laboratories, SAND 2021-14064, 2021.
[3] Shrirang Abhyankar, Jed Brown, Emil M. Constantinescu, Debojyoti Ghosh, Barry F. Smith, Hong Zhang, PETSc/TS: A Modern Scalable ODE/DAE Solver Library,https://doi.org/10.48550/arXiv.1806.01437
[4] J. Rang and L. Angermann. New Rosenbrock W-methods of order 3 for partial differential algebraic equations of index 1. BIT Numerical Mathematics, 45(4):761–787, 2005.
[5] A. Sandu, J.G. Verwer, J.G. Blom, E.J. Spee, G.R. Carmichael, and F.A. Potra. Benchmarking stiff ODE solvers for atmospheric chemistry problems II: Rosenbrock solvers. Atmospheric Environment, 31(20):3459–3472, 1997.
[6] Peter Kaps and Peter Rentrop. Generalized Runge–Kutta methods of order four with stepsize control for stiff ordinary differential equations. Numerische Mathematik, 33:55–68, 1979.
[7] Lawrence F Shampine. Implementation of Rosenbrock methods. ACM Transactions on Mathematical Software (TOMS), 8(2):93–113, 1982.
[8] M van Veldhuizen. D-stability and Kaps-Rentrop-methods. Computing, 32(3):229–237, 1984.
[9] L. Pareschi and G. Russo. Implicit-explicit Runge-Kutta schemes and applications to hyperbolic systems with relaxation. Journal of Scientific Computing, 25(1):129–155, 2005.
[10] U.M. Ascher, S.J. Ruuth, and R.J. Spiteri. Implicit-explicit Runge-Kutta methods for time-dependent partial differential equations. Applied Numerical Mathematics, 25:151–167, 1997.
[11] C.A. Kennedy and M.H. Carpenter. Additive Runge-Kutta schemes for convection-diffusion-reaction equations. Appl. Numer. Math., 44(1-2):139–181, 2003. doi:10.1016/S0168-9274(02)00138-1.
[12] S. Boscarino, L. Pareschi, G. Russo, Implicit-Explicit Runge-Kutta schemes for hyperbolic systems and kinetic equations in the diffusion limit, https://doi.org/10.48550/arXiv.1110.4375