This input runs a zero-dimension ignition delay calculation using a simplified 2S_CH4_CM2 kinetics mechanism. To run this input the 2S_CH4_CM2.mech.dat and 2S_CH4_CM2.thermo.dat files will need to be downloaded and the paths updated in this file.
reactingFlow/ignitionDelay2S_CH4_CM2.yaml
---
test:
# a unique test name for this integration tests
name: ignitionDelay2S_CH4_CM2Tchem
# create a default assert that compares the log file
assert: !testingResources::asserts::TextFileAssert
expected: "inputs/reactingFlow/ignitionDelay2S_CH4_CM2.Temperature.txt"
actual: "ignitionDelayTemperature.txt"
# metadata for the simulation
environment:
title: _ignitionDelay2S_CH4_CM2
tagDirectory: false
arguments:
petsclimiter_type: none
# set up the time stepper responsible for marching in time
timestepper:
name: theMainTimeStepper
arguments:
ts_type: rk
ts_max_time: 0.1
ts_dt: 1E-6
ts_max_steps: 25
# setup a simple mesh with only a single point
domain: !ablate::domain::BoxMesh
name: simpleBoxField
faces: [ 1 ]
lower: [ 0 ]
upper: [ 1 ]
modifiers:
# if using a FVM ghost boundary cells must be added
- !ablate::domain::modifiers::GhostBoundaryCells
fields:
# all fields must be defined before solvers. The ablate::finiteVolume::CompressibleFlowFields is a helper
# class that creates the required fields for the compressible flow solver (rho, rhoE, rhoU, ...) and species mass fractions
- !ablate::finiteVolume::CompressibleFlowFields
eos: &eos !ablate::eos::TChem # the tchem eos uses tChem to parse the mechanisms and determine what species are needed to be tracked
mechFile: ../mechanisms/2S_CH4_CM2.yml
options:
dtDefault: 1E-8;
# set the initial conditions of the flow field
initialization:
# The ablate::finiteVolume::CompressibleFlowFields is a helper class that creates the required fields for the compressible flow solver (rho, rhoE, rhoU, ...)
- !ablate::finiteVolume::fieldFunctions::Euler
state:
&initState
eos: *eos
temperature: 1200.0
pressure: 101325.0
velocity: [ 0.0 ]
# the mass fractions must be specified to compute rho, e, etc.
other: !ablate::finiteVolume::fieldFunctions::MassFractions
# the mass fraction class allows for a subset of mass fractions to be specified. The rest are assumed zero
eos: *eos
values:
- fieldName: N2
field: 0.724672103
- fieldName: CH4
field: 0.055186656
- fieldName: O2
field: 0.220141239
# the DensityMassFractions reuses the initState to set the densityMassFractions for all species
- !ablate::finiteVolume::fieldFunctions::DensityMassFractions
state: *initState
# the basic FiniteVolumeSolver is used with only a single reaction process
solver: !ablate::finiteVolume::FiniteVolumeSolver
id: reactingFlowODE
options: {}
processes:
# without advection/diffusion the Chemistry process is the only one needed
- !ablate::finiteVolume::processes::Chemistry
eos: *eos
boundaryConditions: []
monitors:
# the IgnitionDelayTemperature monitor computes and store the amount of time it took to reach the specified temperature
- !ablate::monitors::IgnitionDelayTemperature
eos: *eos
location: [0.5]
thresholdTemperature: 1500
log: !ablate::monitors::logs::FileLog
name: ignitionDelayTemperature.txt