This input runs a zero-dimension ignition delay calculation using the GRIMech3.0 kinetics mechanism. To run this input the grimech30.mech.dat and grimech30.thermo.dat files will need to be downloaded and the paths updated in this file.

reactingFlow/ignitionDelayGriMechConstantVolumeReactor.yaml

---
test:
  # a unique test name for this integration tests
  name: ignitionDelayGriMechConstantVolumeReactorTchem
  # create a list of asserts to compare
  asserts:
    - !testingResources::asserts::TextFileAssert
      expected: "inputs/reactingFlow/ignitionDelayGriMechConstantVolumeReactor.PeakYi.txt"
      actual: "ignitionDelayPeakYi.txt"
    - !testingResources::asserts::TextFileAssert
      expected: "inputs/reactingFlow/ignitionDelayGriMechConstantVolumeReactor.Temperature.txt"
      actual: "ignitionDelayTemperature.csv"

# metadata for the simulation
environment:
  title: _ignitionDelayGriMechConstantVolumeReactorTchem
  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-4
  # 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/gri30.yml
          options:
            # Set the reactor to type to be constant volume
            reactorType: ConstantVolume
            # set a minimum temperature for the chemical kinetics ode integration
            thresholdTemperature: 560

  # 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 IgnitionDelayPeakYi monitor computes and store the amount of time it took to reach peak OH
    - !ablate::monitors::IgnitionDelayPeakYi
      species: OH
      location: [0.5]
      log: !ablate::monitors::logs::FileLog
        name: ignitionDelayPeakYi.txt
      historyLog: !ablate::monitors::logs::CsvLog
        name: ignitionDelayPeakYi.csv
    # 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::CsvLog
        name: ignitionDelayTemperature.csv