DETCHEM MPTR Driver
This document describes the configuration directives that are available for use with the DETCHEM Batch driver.
SI units are used exclusively throughout the program. Be sure to convert all values before importing data into CaRMeN. When referring to chemical species, use the correct capitalization, i.e. Ar
instead of AR
. Not doing so will lead to simulation errors since the species names will not be recognized.
Driver Name
This driver is available under the name detchem_mptr
.
Output Resources
This driver outputs three tabular data resources. The primary key in each is time
.
mole_fractions
- The species mole fractions as function of time.mass_fractions
- The species mass fractions as function of time.moles
- The species moles as function of time.
Parameters
The following parameters are available. Note how the three parameters temperature
, pressure
and volume
can either be defined as a top-level parameter or embedded within the initial
object. However, each parameter must only appear once! In general, the parameters set in the top-level object are externally set values, while those set under the initial
object are determined as a result of the simulation.
# The temporal profile to describe the temperature in the reactor.
# The $resource macro is typically used for this.
# The final point in this data also sets the integration time.
temperature:
$resource: ./temperature_profile.csv
# An object that defines the initial conditions of the reactor grouped by phase.
# The keys within this object represent the name of the phase. Either mole or mass fractions can
# be specified.
initial:
# Define the initial conditions of the gas phase
gas:
# The initial volume
volume: 0.01 # m3
# If a volume is specified, then mole_fractions need to be defined.
mole_fractions:
N2(g): '*'
# Define the initial conditions of the urea(s) phase.
# Phases that are defined here are created automatically for you in the mptr.inp file
urea(s):
# The initial mass of the urea(s) phase (here: 6.23 mg).
mass: 6.23e-6
# If a mass is specified (not a volume), then mass_fractions need to be defined.
mass_fractions:
urea(s): 1
# The area of the interface between the various phases.
interface_area: 30e-4 # m3
# The heat transfer coefficient
heat_transfer_coefficient: 10.0
# A complex object type describing the chemical model.
# Use the chemical-model loader to produce a resource with the correct structure,
# then access it using the $resource macro as shown here.
chemical_model:
$resource: ./chemical_model
#
# Optional parameters follow below.
# The given values are the default values used when the parameter is omitted.
#
# Settings pertaining to the numerical solution.
solver:
absolute_tolerance: 1e-18
relative_tolerance: 1e-6
initial_integration_step_size: 1e-16
max_integration_step_size: 10