4.4.12.3. General Chemistry Reference
Similar to CHEMEQ, a General Chemistry reaction mechanism is specified in a nested block inside an Aria Material. The General Chemistry block should generally define the following things:
Species names involved in the mechanism (should be a subset of the species in the Aria material)
Reactions in the mechanism
Species variable name (typically
mass_fraction,density,bulk_density,species, ormole_fraction)
Begin Aria Material ReactingFoo
# ...
BEGIN general chemistry foo_chem
Species Names = Epoxy CO2 CH4
Species Variable Name = mass_fraction
Begin Reaction R1
Reaction is Epoxy -> CH4 + CO2
Rate Function = Arrhenius A = 1e9 Ea = 25000 R = 8.314
Concentration Function = Standard mu = automatic
Heat of Reaction = -1e8
End
END
End
The chemistry source terms can then be included in mass_balance/species and equations using the CHEMISTRY or LUMPED_CHEMISTRY models:
Source for species of Epoxy on block_1 = Chemistry Mechanism = foo_chem
Source for mass_balance of Epoxy on block_1 = Chemistry Mechanism = foo_chem
Source for Energy on block_1 = Chemistry Mechanism = foo_chem
For a complete list of General Chemistry commands, see the General Chemistry command reference.
4.4.12.3.1. Required Prerequisites
Using general chemistry requires that several expressions be defined in the same material block or available on the block it is evaluated on. These expressions, and the conditions when they are required, are described in the following list.
Specific heat of each species (only required if you request a chemistry source term for the energy equation)
Enthalpy of each species (only required if you request a chemistry source term for the energy equation, for most of the common specific heat models this is created automatically)
Temperature
Pressure (optional, if you do not provide it and use a pressure dependent reaction rate it will use 101325 Pa)
Concentrations (required, you specify what form of concentration to use in the chemistry block, e.g. mass fraction, density, species, or species fraction)
Molecular weights of each species (required if you use molar concentrations)
The phases for inputs (temperature and pressure) come from NO_MATERIAL_PHASE by default. Non-default values for these can be specified separately for each reaction using the TEMPERATURE PHASE = and PRESSURE PHASE = commands in the reaction blocks.
4.4.12.3.2. Defining Reactions
Reactions are defined in one or more Begin Reaction blocks inside the General Chemistry model block. There is a legacy syntax for specifying reactions by supplying matrices of coefficients (described in Legacy Reaction Specification), but that approach is no longer recommended.
Each reaction is defined by an overall rate that is the product of one or more terms, a stoichiometric relationship, and a heat release. The syntax for specifying these reaction blocks is described in Reaction Blocks.
4.4.12.3.3. ODE Solver & Initial Conditions
Unlike CHEMEQ, General Chemistry is integrated directly into standard Aria governing equations for species. This means that initial conditions are supplied using the usual Aria convention (e.g. IC for mass_fraction of CH4 on block_1 = constant value = 0.0).
The chemistry ODEs can be solved in two ways using General Chemistry - coupled or segregated.
Coupled - When doing a coupled solve, the reaction rates are included directly into the governing equation source terms and time integration is handled by the overall Aria time integration. This option is more expensive for stiff chemical mechanisms but may be necessary when reaction and transport are tightly coupled. For example, the source for species i with a coupled approach would be:
# Aria Region
Begin Chemistry Solver Parameters For foo_chem
Chemistry Solver Algorithm = COUPLED
End
Segregated - When doing a segregated solve, you must specify an ODE solver to use and the chemistry ODEs are integrated separately from the main Aria time integration. Source terms for species and energy are calculated from the change in state variables during the segregated ODE solve. For example, the source for species i for a segregated approach would be evaluated after the ODE solve to determine as:
# Aria Region
Begin Chemistry Solver Parameters For foo_chem
Chemistry Solver Algorithm = SEGREGATED
ODE Solver = CVODE BDF 5 NEWTON
Absolute Tolerance = 1e-8
Relative Tolerance = 1e-3
Maximum Substeps = 100000
End
4.4.12.3.4. Activation & Deactivation
General Chemistry supports activating and deactivating the chemistry mechanism at specific temperature conditions, similar to CHEMEQ. These commands go in the General Chemistry definition block. After deactivation, you can choose to have the simulation continue or terminate.
Begin Aria Material ReactingFoo
# ...
BEGIN general chemistry foo_chem
# ...
Activation Temperature = 350
Deactivation Temperature = 600 continue
END
End
Once the temperature hits the specified deactivation condition, the General Chemistry solve stops and the simulation either stops or continues, depending on the option selected.
The deactivation option is often used for energetic materials when the reaction rates start to reach thermal runaway conditions. At that point, the cost of solving the chemistry model becomes prohibitive and it often makes sense to switch to a reduced model for the remainder of the burn. The two common options used for this are level set burns and uniform heat release.
To use a uniform heat release after deactivation, you need to specify Post Deactivation Release Time and Post Deactivation Heat Release to control how long the source should be active for and how much heat to release. When using a pressurization zone you should also specify Post Deactivation Gas Release (in moles per volume) to produce an appropriate pressurization.
In the example below, there will be a uniform energy source term of 1e9 W/m3 for 10 seconds after the General Chemistry model deactivates.
BEGIN general chemistry foo_chem
# ...
Post Deactivation Release Time = 10.0
Post Deactivation Heat Release = 1e9
Post Deactivation Gas Release = 1.0
Deactivation temperature = 550.0 continue
# ...
End
4.4.12.3.5. Reaction Units
There are no unit conversions done for you with General Chemistry. You specify the units of the concentration variables with the Species Variable Name = command, and must ensure that the corresponding reaction rate terms are in appropriate units to produce source terms in the correct units (e.g. W/m3 for energy).
4.4.12.3.6. Legacy Reaction Specification
Warning
This section is provided for reference to help understand and convert legacy General Chemistry models. We do not recommend using this syntax for new models.
Instead of using reaction blocks, older General Chemistry models provided a grid of concentration exponents and stoichiometric coefficients along with arrays of activation energies, pre-exponential terms, and heat releases for each reaction.
For example, the following legacy input
BEGIN GENERAL CHEMISTRY DEMO
number of reactions is 3
species names are A B C D
Species Variable Name = mass_fraction
# Define Arrhenius terms and heat release
Steric Coefficients = 0.0 0.0 0.0
Preexponential Factors = 1e9 1e10 1e12
Activation Energies = 200000 300000 400000
Heats of Reaction = -1e6 2e7 3e5
# Define the reaction rate concentration dependence
Concentration Exponents for A = 1.0 0.0 0.0
Concentration Exponents for B = 0.0 1.0 0.0
Concentration Exponents for C = 0.0 0.0 2.0
Concentration Exponents for D = 0.0 0.0 0.0
# Define the reactions
# A -> B
# B -> C
# A + C -> 2D
Stoichiometric coefficients for A = -1.0 0.0 -1.0
Stoichiometric coefficients for B = 1.0 -1.0 0.0
Stoichiometric coefficients for C = 0.0 1.0 -1.0
Stoichiometric coefficients for D = 0.0 0.0 2.0
END
can be converted to a block style below
BEGIN GENERAL CHEMISTRY DEMO
species names are A B C D
Species Variable Name = mass_fraction
Begin Reaction R1
Reaction is A -> B
Rate Function = Arrhenius A = 1e9 Ea = 200000 R = 8.314
Concentration Function = Automatic
Heat of Reaction = -1e6
End
Begin Reaction R2
Reaction is B -> C
Rate Function = Arrhenius A = 1e10 Ea = 300000 R = 8.314
Concentration Function = Automatic
Heat of Reaction = 2e7
End
Begin Reaction R3
Reaction is A + C -> 2D
Rate Function = Arrhenius A = 1e12 Ea = 400000 R = 8.314
Concentration Function = C 2.0
Heat of Reaction = 3e5
End
END
The legacy style required all reactions to use the same basic rate function, while the block-style format provides significantly greater flexibility.