5.2.1.3. CHEMEQ Example
If your problem has a chemically reacting material, you can define a CHEMEQ model in the material definition to track species evolution and calculate a heat source and gas production from the material decomposition.
When using CHEMEQ, Aria automatically creates multi-valued element fields to track species concentration at each integration point (or, optionally, at the element centroid). These species cannot be transported, but are integrated in time using the reaction mechanism and ODE solver you define and can be used to define other derived quantities (heat source, composition-dependent material properties, gas production for pressurization).
5.2.1.3.1. Problem Files
The files required for this example can be downloaded here, or found at $TESTS/aria_rtest/example/training/chemistry (where TESTS=/projects/sierra/tests in a CEE environment, or your Sierra test distribution otherwise).
5.2.1.3.2. Input Deck Modification
There are several steps required to add CHEMEQ to your problem.
First, add a CHEMEQ block inside the relevant material to define the chemistry mechanism. Refer to the CHEMEQ section in the manual for details about how to define this block.
Begin Aria Material foam # ... Begin Parameters for CHEMEQ model foam_reaction_model Species Names = F_SPECA F_SPECB Species Phases = CONDENSED GAS Concentration Units = mass_fraction Energy release units are per unit mass Begin Reaction R1 Reaction is F_SPECA -> F_SPECB Rate Function = Arrhenius A = 1e14 Ea = 188370 R = 8.314 Concentration Function = Standard mu = Automatic Heat of Reaction = -4186800 # J/kg End End Parameters for CHEMEQ model foam_reaction_model End Aria Material foam
(Optional) Create expressions from the CHEMEQ state variables in order to define composition-dependent properties or allow post-processing of CHEMEQ variables using Aria expression postprocessors.
Begin Aria Material foam # ... Species Names = F_SpecA F_SpecB Mass Fraction of F_SpecA = From_Chemeq Mass Fraction of F_SpecB = From_Chemeq Thermal Conductivity = Scalar_String_Function f = "0.5 - 0.1*mass_fraction_f_specB" Begin Parameters for CHEMEQ model foam_reaction_model # ... End End
Define an energy source from the CHEMEQ model. The name of the CHEMEQ model is not required - Aria can determine this automatically based on the material assigned to the block.
Source for Energy on reacting_foam = ChemEQ_HeatingNote
Adding an energy source is required in order to activate the CHEMEQ model - a CHEMEQ model with no corresponding energy source term will not be integrated.
Define a CHEMEQ solver block with the ODE solver specification and initial conditions for species concentrations. The name used for this block must match the name given to the CHEMEQ block (
foam_reaction_modelhere). This block can also be used to define activation and deactivation conditions for the CHEMEQ mechanism to turn it on or off when certain temperature conditions are met.Begin CHEMEQ Solver for foam_reaction_model ODE Solver = CVODE ADAMS 12 FUNCTIONAL Absolute Tolerance = 1e-10 Relative Tolerance = 1e-4 Maximum Substeps = 100000 # Set the initial concentration values Species F_SPECA = 1.0 Species F_SPECB = 0.0 End