LogoLogo
  • 1. GASFLOW Code
    • 1.1. Overview
    • 1.2. Code Approach
    • 1.3. Code Features
    • 1.4. Graphical User Interface
    • 1.5. Code V&V
    • 1.6. Application Highlights
    • 1.7. Publications
    • 1.8. Current Activities
  • 2. Tutorials
    • 2.1. Overview
    • 2.2. Sod's Shock Tube Problem
    • 2.3. Mesh Generation from CAD Models
    • 2.4. 2D Lid-driven Cavity Flow
    • 2.5. Hydrogen Diffusion into Air in a 1D Duct
    • 2.6. Supersonic Flow over a Forward-facing Step
    • 2.7. Vented Explosion of Premixed Hydrogen-Air Mixtures
    • 2.8. Transient Laminar Jet Flow at Low Mach Number Regime
  • 3. Brief User Guide
    • 3.1. Overview
    • 3.2. General User Guidance
    • 3.3. Unit System and Files
    • 3.4. Mesh Generation
    • 3.5. Geometry Definition
    • 3.6. Numerical Control
    • 3.7. Gas Species and Properties
    • 3.8. Initial and Boundary Conditions
    • 3.9. Solid Heat Structures
    • 3.10. Physical Models
    • 3.11. Restart and Output
    • 3.12. GASFLOW Parallelization
  • 4. Pre- and Post-Processing Tools
    • 4.1. GASVIEW
    • 4.2. Pyscan
    • 4.3. Create3D
  • 5. Verification and Validation
    • 5.1.Overview
    • 5.2. Fluid Dynamics
      • [AS-FD 1] Steady-State and Laminar Flow Startup
      • [AS-FD 2] Transient Compressible Flow
      • [AS-FD 3] Diffusion of Hydrogen into Air
      • [AS-FD 4] Flow past a Rectangular Block
      • [AS-FD 5] 1D Flow with an Orifice
      • [ED-FD 1] Incompressible Laminar Flow in a Lid-driven Cavity
      • [ED-FD 2] Stationary Turbulent Channel Flow
      • [ED-FD 3] Turbulent Flow between Two Parallel Plates
      • [ED-FD 4] Flow over Backward-Facing Step
      • [ED-FD 5] Transient Supersonic Flow at Mach 3 over a Forward-facing Step
      • [ED-FD 6] Large Eddy Simulations of the Turbulent Jet Flow
      • [ED-FD-7] Hydrogen Turbulent Dispersion in Nuclear Containment Compartment
      • [ED-FD 8] Buoyant Jet from Unintended Hydrogen Release
      • [ED-FD 9] Radiolytic Gas Accumulation in a Pipe
      • [ED-FD 10] Supersonic Flow at Mach 2 over a Backward Facing Step
    • 5.3. Combustion
      • [ED-CM 1] BOM Spherical Combustion Chamber
      • [ED-CM 2] SNL Flame Acceleration Measurement Facility Experiment
      • [ED-CM 3] Hydrogen Deflagration in a Multi-compartment System
      • [ED-CM 4] Hydrogen Jet Fire in a Compartment with Venting Hole
      • [ED-CM 5] Hydrogen-Air Fast Deflagration in ENACCEF Facility
      • [ED-CM 6] Detonation of Premixed H2-Air Mixture in a Hemispherical Balloon
      • [ED-CM 7] H2 Deflagration at a Refueling Station
      • [ED-CM 8] Methane-Air Explosion in LLEM
      • [ED-CM 9] Hydrogen-Methane Combution in a 20 L Spherical Vessel
    • 5.4. Heat and Mass Transfer
      • [AS-HT 1] Steady-State Heat Transfer through a Wall
      • [AS-HT 2] Pressure-Volume Work Term 1: Equilibrium Case
      • [AS-HT 3] Thermodynamic Benchmarks
      • [AS-HT 4] Uniform Energy Addition to Stagnant Fluid
      • [ED-HT 1] Natural Convection in an Air-filled Square Cavity
      • [ED-HT 2] Validation of the condensation model with COPAIN facility
      • [ED-HT 3] Heat and mass transfer of a thin film model in a channel
      • [ED-HT 4] Validation of the Film Model in the Integral Test Facility for Passive Containment Cooling
      • [ED-HT 5] Stratification Erosion Benchmark
      • [ED-HT 6] Battelle Containment HYJET Test JX7
      • [ED-HT 7] Battelle GX Tests
      • [ED-HT 8] Tests in ThAI Facility
      • [ED-HT 9] HDR Tests
      • [ED-HT 10] Phebus Thermal Hydraulic Tests
      • [ED-HT 11] Test Tosqan ISP47
      • [ED-HT 12] Test MISTRA ISP47
      • [ED-HT 13] Panda SETH Test Program
    • 5.5. Multiphase Flow
      • [AS-MP 1] Particle Terminal Velocity
      • [AS-MP 2] Water droplet evaporation
      • [ED-MP 1] Spray Single Droplet Test
      • [ED-MP 2] Spray Droplets Test 113 at IRSN TOSQAN
      • [ED-MP 3] Spray Droplets Test 101 at IRSN TOSQAN
  • 6. APPLICATION HIGHLIGHTS
    • 6.1. H2 Fuel Cell Vehicle Accident in Tunnel
    • 6.2. Hydrogen Explosion in a Refueling Station
    • 6.3. Hydrogen Explosion at Fukushima Accident
    • 6.4. Methane Explosion in the Roadway of a Coal Mine
    • 6.5. Aerosols and Droplets
      • 6.5.1. Coronavirus Aerosol Transmission
      • 6.5.2. Water Droplets
  • 7. Ongoing Development and Enhancements
    • 7.1. Combustion Modeling
      • 7.1.1. Multi-step Global Methane Combustion Models
        • 7.1.1.1. One-step Reaction Mechanism
        • 7.1.1.2. Two-step Reaction Mechanism
        • 7.1.1.3. Three-step Reaction Mechanism
        • 7.1.1.4. Four-step Reaction Mechanism
        • 7.1.1.5. Five-step Reaction Mechanism
        • 7.1.1.6. FAQ
      • 7.1.2. Laminar Flame Speed Correlations for Methane-air Mixtures
        • 7.1.2.1. Stone's Correlation
        • 7.1.2.2. Elia's Correlation
        • 7.1.2.3. Takizawa's Correlation
        • 7.1.2.4. Liao's Correlation
      • 7.1.3. Turbulent Flame Speed Correlations for Methane-air Mixtures
      • 7.1.4. Correction of Effective Turbulent Burning Velocity for Lean Hydrogen-air Mixtures
      • 7.1.5. Induction Time Model
      • 7.1.6. Detailed Chemical Kinetic Modeling
      • 7.1.7. Jet Flame Modeling
    • 7.2. Discrete Particle Modeling
      • 7.2.1. Particle mass in user-defined volumes - volpardef
      • 7.2.2. Particle injection from ring shaped volumes
    • 7.3. Heat Transfer Modeling
      • 7.3.1. Time-dependent tables for heat flux and heat transfer coefficient in sinkdef
      • 7.3.2. Thermal Radiation Model for Water Vapor and Carbon Dioxide
  • 8. INPUT FILE EXAMPLES
    • 8.1. Overview
    • 8.1. Fluid Dynamics
  • 8.2. Combustion
  • 8.3. Heat Transfer
  • 8.4. Multiphase Flow
  • 8.5. Applications
  • 9. Frequently Asked Questions
    • 9.1. How to set up models for the flashing of pressurized water?
  • 9.2. How to run GASFLOW on Windows?
  • 9.3. How to export/import WSL distribution?
Powered by GitBook
On this page
  • 7.1.6.1. Introduction
  • 7.1.6.2. Approach
  • 7.1.6.3. Import reaction mechanisms in CHEMKIN format for combustion modeling
  • 1) Version requirement
  • 2) Required input files
  • 3) Input parameter for activating the direct use of reaction mechanisms in CHEMKIN format
  • 4) Input parameter for defining gas species
  • 5) Input parameter for limiting the time step
  • 6) Input parameter for reaction temperature threshold
  • 7) Input parameter for ODE solvers
  • 7.1.6.4. Examples
  • Reaction mechanisms in CHEMKIN format for hydrogen oxidation
  • Reaction mechanisms in CHEMKIN format for methane oxidation
  • Reaction mechanisms in CHEMKIN format for syngas oxidation
  • Reaction mechanisms in CHEMKIN format for ammonia oxidation
  • Reaction mechanisms in CHEMKIN format for H2-CH4-CO-NH3 oxidation
  • 7.1.6.5. Limitations
  • References

Was this helpful?

  1. 7. Ongoing Development and Enhancements
  2. 7.1. Combustion Modeling

7.1.6. Detailed Chemical Kinetic Modeling

GASFLOW-MPI 2.0 Revision 4772 or newer

Previous7.1.5. Induction Time ModelNext7.1.7. Jet Flame Modeling

Last updated 3 months ago

Was this helpful?

7.1.6.1. Introduction

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. If the timescales of the turbulent fluctuations are significantly faster than the chemical reaction timescales, 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.

7.1.6.2. Approach

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.

7.1.6.3. Import reaction mechanisms in CHEMKIN format for combustion modeling

1) Version requirement

GASFLOW-MPI 2.0 Revision 4772 or a more recent revision which allows to read general reaction mechanisms in CHEMKIN format.

2) Required input files

  • ingf: input file for GASFLOW-MPI.

  • chem.inp: data file in CHEMKIN format which contains species and reactions for the kinetic modeling. The name of the file must be chem.inp.

The units of the activation energy in the chem.inp are cal/mol.

  • thermo.dat: data file contains coefficients for computing thermodynamic properties based on NASA polynomials. The name of the file must be thermo.dat.

  • periodictable.dat: data file contains the names of elements and their corresponding atomic masses. The name of the file must be periodictable.dat.

3) Input parameter for activating the direct use of reaction mechanisms in CHEMKIN format

  • 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

4) Input parameter for defining gas species

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.

5) Input parameter for limiting the time step

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.

6) Input parameter for reaction temperature threshold

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.

7) Input parameter for ODE solvers

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

idcodesol
Class
Type

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)

idcodetype
Type
Description

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)

idcodetype
Type
Description

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.

7.1.6.4. Examples

  • Example 1

       iburn = 6,         ; activate the detailed chemical kinetics modeling
       dcdtemp = 20,      ; maximum temperature change per time step when iburn = 6
       idcodesol = 1,     ; Rosenbrock W-scheme
       idcodetype = 4,     ; Four stage third order L-stable Rosenbrock-W scheme
  • Example 2

       iburn = 6,         ; activate the detailed chemical kinetics modeling
       dcdtemp = 10,      ; maximum temperature change per time step when iburn = 6
       idcodesol = 2,     ; Implicit-Explicit Runge-Kutta scheme
       idcodetype = 9,   ; One explicit stage and three implicit stages third order ARK IMEX scheme with

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 "chem.inp", and the name of the thermodynamic property file should be changed to "thermo.dat".

Reaction mechanisms in CHEMKIN format for hydrogen oxidation

Reaction mechanisms in CHEMKIN format for methane oxidation

Reaction mechanisms in CHEMKIN format for syngas oxidation

Reaction mechanisms in CHEMKIN format for ammonia oxidation

Reaction mechanisms in CHEMKIN format for H2-CH4-CO-NH3 oxidation

7.1.6.5. Limitations

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.

References

[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.

[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.

[2]

[3] Shrirang Abhyankar, Jed Brown, Emil M. Constantinescu, Debojyoti Ghosh, Barry F. Smith, Hong Zhang, PETSc/TS: A Modern Scalable ODE/DAE Solver Library,

[12] S. Boscarino, L. Pareschi, G. Russo, Implicit-Explicit Runge-Kutta schemes for hyperbolic systems and kinetic equations in the diffusion limit,

https://petsc.org/
https://doi.org/10.48550/arXiv.1806.01437
https://doi.org/10.48550/arXiv.1110.4375
7KB
ingf
3KB
chemfile
4KB
thermofile
2KB
periodictable.dat
453B
h2-chem-10sp-2step
584B
h2-chem-10sp-7step
593B
h2-chem-10sp-8step-1
638B
h2-chem-10sp-8step-2
1KB
h2-chem-10sp-18step
2KB
h2-chem-10sp-20step
3KB
h2-chem-10sp-21step
3KB
h2-therm-10sp.dat
29KB
ch4-chem-gri3-53sp-325step
17KB
ch4-therm-gri3-53sp-325step
9KB
syngas-chem-21sp-62step
7KB
syngas-therm-21sp-62step
45KB
nh3-chem-31sp-203step
10KB
nh3-therm-31sp-203step
28KB
NH3-H2-CH4-CO-chem-53sp-353step
48KB
NH3-H2-CH4-CO-therm-53sp