Simulation of Combusting Flows

Stream supports finite-rate species transport and combustion models based on precomputed flamelet tables.

Finite-Rate Chemistry

Use a .mdl reaction mechanism and specify initial and boundary species with mixture. Select the reaction treatment with speciesProduction.

For second-order time integration with chemistry sources, use:

timeIntegrator: BDF2
operatorSplitting: source
speciesProduction: instantaneousImplicit

timeIntegrator: CN also supports source splitting, but multi-cell reacting CN runs can fail at startup. Use BDF2 with source splitting for these runs.

Species production choices

Value

Behavior with operatorSplitting: source

CVODE

With BDF, integrates chemistry over the timestep and uses its average source. With BDF2 or CN, Stream automatically uses instantaneousImplicit.

instantaneousImplicit

Updates rates each nonlinear iteration and treats species sources implicitly.

instantaneousExplicit

Updates rates each nonlinear iteration with explicit species sources. May require smaller timesteps to converge.

Check species and flow residuals at each timestep. Stiff chemistry may require smaller timesteps or more nonlinear iterations.

The following options and CVODE tolerances apply only when CVODE integrates chemistry.

CVODE options

Option

Values

operatorSplittingEOS

1 (default) holds thermodynamics fixed during chemistry integration. 2 updates thermodynamics as composition changes, at fixed specific internal energy or enthalpy according to energyEquationOptions.form. 3 is an alias for 2.

cvodeJacobianForm

numerical (default) or analytical. Both include thermodynamic coupling when enabled.

operatorSplitting: strang uses CVODE. Reacting BDF2/Strang is unsupported, and heated Strang runs can lose mass. Use source splitting for these cases.

Flamelet Method

The flamelet method tries to balance computational speed and accuracy by pre-tabulating reaction data for a class of representative combustion model problems that can accumulated to build a database that can be queried to quickly provide information such as heat release and species production rates. A limitation of this method is that it is not accurate for problems that do not lend themselves to being easily represented by a series of flamelet solutions. The flamelet generation process and the theory behind the flamelet equations is documented in a separate guide. A much more detailed introduction to flamelet modeling can be found in Peters’ book Turbulent Combustion [Pete2000]. Diffusion flamelet tables are heavily used with in the flamelet model due to their applicability for injector combustion problems.

To use the compressible flamelet module, the run control file should appear as follows:

loadModule: compressible_flamelet_tf
{
... standard vars file content
}

All flamelet simulations are parameterized by at least two variables: the mixture fraction(Z) and the progress variable(C). The mixture fraction is a variable that represents the state in the fuel and oxidizer streams where a value of Z=0 in the oxidizer stream and Z=1 in the fuel stream. The progress variable is usually defined as the summation of a series of combustion product mass fractions (e.g., C= YH20 + YCO2), and as such is used as a measure of the completeness of a reaction. A value of zero would represent a state where there are no products of combustion and a value of 1 would be a state where there are only products of combustion. Practically, C rarely will go to 1 as there is often a limit to the combustion process turning all the reactants into products for engineering applications.

Flamelet Control File Setup

A few important guidelines must be observed when setting up the run control file for a flamelet combustion simulation:

  • Boundary conditions must be set for the mixture fraction variable Z and the progress variable C on all inlet boundaries.

  • Initial conditions must be set for Z and C.

The following subsections detail the specifics of each section of the vars file required for flamelet simulations.

Getting Started Checklist (compressible_flamelet_tf)

The minimum set of inputs required to run a compressible_flamelet_tf case is:

  1. A flamelet table file (typically .h5), generated by the flamelet table workflow.

  2. A mechanism YAML file (mechanismFile), for example chem.yaml.

  3. A critical properties YAML file (criticalPropertiesFile), for example critical-properties.yaml.

  4. A grid file and the standard Stream run-control data (boundary conditions, initial conditions, solver options, and so on).

For this module, both mechanismFile and criticalPropertiesFile should be specified in the run control file.

If your chemistry source data is in Chemkin format (chem.inp, therm.dat, and tran.dat), one common setup path is:

  1. Convert Chemkin mechanism data to Cantera YAML:

    ck2yaml --input chem.inp --transport tran.dat --thermo therm.dat --permissive --output chem.yaml
    
  2. Generate the .mdl file if needed by your workflow using chemkin-converter (for example, for tools or modules that require .mdl data):

    <StreamInstallDirPath>/bin/chemkin-converter --casename case --mechanism chem.yaml --chemkin
    

Detailed Chemkin and Cantera conversion guidance is provided in Appendix: Thermodynamic Data (including the conversion-tool map for chemkin-converter, cantera_to_mdl, and rmg_to_mdl). For transport-file generation, see Appendix: Transport Properties. For tabulated EoS workflows, see Appendix: tabulated_data Utility.

The critical-properties.yaml file can be obtained from the Cantera data directory and then copied into the case folder. The command below prints all detected Cantera data directories:

python - << 'PY'
import cantera as ct
print("\n".join(ct.get_data_directories()))
PY

Make sure the critical-properties data covers species in your mechanism that do not already provide a complete equation-of-state section in the mechanism file.

A minimal run-control skeleton for this module is:

loadModule: compressible_flamelet_tf
{
transport_model: module
criticalPropertiesFile: critical-properties.yaml
mechanismFile: chem.yaml

combustionModels:
<
  nonpremixed=flamelet(table="my_flamelet_table.h5")
>

combustionModelRegions:
<
  regions=[
    inBox(p1=[-1.0e+30,-1.0e+30,-1.0e+30],p2=[1.0e+30,1.0e+30,1.0e+30],model=nonpremixed)
  ]
>
}

At startup, the log should report reading the flamelet table and mechanism data. If either criticalPropertiesFile or mechanismFile is missing or invalid, the simulation will fail during EOS setup.

Boundary Conditions

The following shows an example of the specification of the flamelet boundary condition for a subsonic inlet for an oxidizer stream with an inert species present in the stream:

Oxidizer_Inlet=subsonicInlet(mdot=2.51243E-04 kg/s, T=700.0 K, Z=0.0, C=0.0551,
                             k=4.2, omega=12900.0)

This specification has an oxidizer inlet with an inert species present in the oxidizer stream (not pure O2), and a definition of the progress variable that includes the species that is mixed with the oxidizer; therefore, the value of C is non-zero for this case. For cases with totally pure oxidizer and fuel streams, the value of C will be zero. A specification of an inlet boundary condition for a pure fuel stream is shown below:

Fuel_Inlet=subsonicInlet(mdot=9.1978E-05 kg/s, T=811.0 K, Z=1.0, C=0.0,
                         k=0.5, omega=37950.0)

The compressible_flamelet_tf module also supports static- and total-temperature forms of totalPressureInlet. In this form, Z and C replace the finite-rate mixture option:

Premixed_Inlet=totalPressureInlet(p0=5 atm, T0=300 K, Z=0.0228961, C=0.0)

The boundary uses the local flamelet composition and the module equation of state with the same gamma-based isentropic approximation as the core Stream boundary. The table reference pressure does not set p0; it describes the state used to construct the table. This boundary is not a nozzle or choking model, and it does not iterate to a fully property-consistent real-fluid stagnation state.

Initial Conditions

The initial conditions for Z and C are set as follows:

initialCondition: <v=0.0 m/s, p=5.4e+06 Pa, T=3174.0 K, Z=0.34, C=0.912,
                  k=0.5, omega=37950.0>

Similar specification of Z and C can be made using the run control file variables ql and qr or the variable initialConditionRegions.

Transport Properties

When running with the compressible flamelet module, the transport properties can be either obtained from the flamelet table or from tabular data.

For compressible_flamelet_tf, turbulentPrandtlNumber and turbulentSchmidtNumber both default to 0.95. Use equal values for these parameters. Unequal values generate a startup warning in turbulent runs.

Flamelet-table molecular diffusion assumes unity Lewis number and does not use laminarSchmidtNumber.

Flamelet Table Transport Properties

To use the transport properties from the flamelet table. Specify the transport_model as module as shown

below.

transport_model: module

The flamelet table provides transport properties that are precomputed and stored for quick access during simulations.

Tabular Transport Properties

There may be cases where a certain flamelet type, such as a 0D reactor, does not include transport properties, or cases where a user may want to provide their own transport properties. The tabular transport properties feature provides the functionality to use user-generated transport property tables in flamelet simulations. This module overrides the transport properties that are obtained from the flamelet table with values from user-generated tabulation files.

To activate the tabular transport properties, the compressible_flamelet_tf_tabular_transport module needs to be loaded at the top of the run control file. An example of the run control file variables that need to be specified is shown below:

loadModule: compressible_flamelet_tf_tabular_transport
{

transport_model: module
eos_type: fluid

combustionModels:
<
detailed_chemistry=H2,
nonpremixed=flamelet(table="allstar_fpvc_ideal_20240909.h5")
>

}

Where the argument in the detailed_chemistry option is the name of the .mdl file that contains the species data. Two available tabulation formats are available when using the tabular transport module: ideal-gas and REFPROP style tabulations.

Ideal-Gas Tabulation

The ideal-gas tabulation format utilizes a Chemkin format transport database file which includes fitting coefficients for viscosity, thermal conductivity, and diffusion coefficients.

The method for generating tabulation files is outlined here. The final result will be a folder named transport/ which contains the tabulated transport properties for all the species in the mechanism.

REFPROP Tabulation

To generate tabulations for species that have a REFPROP fluid definition, use the tabulated_data utility:

tabulated_data refprop --fluid O2 --pmin <pmin> --pmax <pmax> --tmin <tmin> --tmax <tmax>

This command writes outputs to an EoSTables/ folder. Multiple species can be tabulated, with each species fit in its own subdirectory under EoSTables/. This workflow requires a working REFPROP (or HEOS) backend through CoolProp.

This section is describing the flamelet tabular-transport workflow. In this workflow, flamelet modules discover EoSTables/<name>/info.desc through eos=Table(name="...") entries in the detailed-chemistry .mdl species block, while transport_model: module keeps transport selection under the flamelet module.

The generic tabulated-EoS workflow uses a different case setup: loadModule: tabularEoS, chemistry_model: ..., eos_type: fluid, and transport_model: tabularEoS with per-species EoSTables/<name>/ data. See Quick Stream Setup.

Custom Temperature Tabulation

For cases where a REFPROP fluid is not available, use the tabulated_data fit_table mode with a fitTable-formatted input file. This also generates a set of curve fits in EoSTables/.

Flamelet Equation Options

The flamelet equation section of the run control file with all available options appears as follows:

flameletEquationOptions: <linearSolver=SGS, relaxationFactor=0.5, maxIterations=5>
combustion: on
flameletInviscidFlux: SOU

Z and C use the species entries in convergenceAbsoluteTolerance and convergenceRelativeTolerance, or the default entries when species is omitted. If specified, convergenceTolerance takes precedence over the absolute tolerance.

Each scalar must satisfy either its absolute or relative tolerance. Relative residuals use the first positive residual of each time step.

At maxIterationsPerTimeStep, the calculation advances and prints a warning for any unconverged Z or C equation.

The existing Tf option suppresses the tabulated progress-variable chemical source where the local temperature is at or below the specified value. It does not disable advection, diffusion, time terms, ignition terms, or other contributions assembled into the C equation.

Thermodynamic-state scaling of the tabulated progress source is opt-in and is disabled by default:

flameletProgressSourceScaling: on

When enabled, every active flamelet table must contain SRC_PROG_ALPHA and SRC_PROG_TA in addition to SRC_PROG, rho0, and T0. The base compressible_flamelet_tf module evaluates

\[\dot{\omega}_C = \dot{\omega}_{C,0} \left(\frac{\rho}{\rho_0}\right)^{\alpha} \exp\left[-T_a\left(\frac{1}{T}-\frac{1}{T_0}\right)\right].\]

This correction changes the progress source only; it does not add pressure or temperature coordinates to the table. Tables without the scaling fields remain valid with the default flameletProgressSourceScaling: off.

Pressure Coupling

flameletPressureCoupling can improve pressure convergence when energy or composition updates cause strong density changes. The default, off, uses the standard coupling. Set it to predictor to include the predicted density change in the pressure correction:

flowCompressibility: compressible
timeIntegrator: BDF2

pressureCorrectionEquationOptions: <linearSolver=HYPRE,compressibleForm>
  pressureBasedMethod: SIMPLEC
  flameletPressureCoupling: predictor

energyEquationOptions: <linearSolver=SGS,form=totalEnergy>

The predictor requires compressible flow, SIMPLE or SIMPLEC, BDF or BDF2, total energy, and a fixed mesh. Use compressibleForm or compressibleVolumetricForm. The inert flamelet module is also supported.

With doubleFluxMethod: off, saturated two-phase states are unsupported. The predictor also supports doubleFluxMethod: on; double flux does not conserve total energy exactly.

The predictor can increase cost per iteration; its effect on convergence depends on the case.

Output Variables

The table below shows additional field variables that are available for output in flamelet simulations. Default variables are output automatically and do not need to be specified in the plot_output line in the run control file.

Field Variable Output for Combusting Flamelet Flows

Variable

Description

Default

ZZ

Mixture fraction

No

C

Mixture progress variable

No

ZResidual

Mixture fraction eq. residual

No

CResidual

Mixture progress variable eq. residual

No

References

[Pete2000]
  1. Peters, Turbulent Combustion, Cambridge University Press, 2000.