ChemicalComposition Action System

commentnote:For Thermochimica module

This action is designed for use with thermochemistry library Thermochimica Piro et al. (2013). Check out the corresponding submodule by running git submodule update --init --checkout modules/chemical_reactions/contrib/thermochimica.

Description

The ChemicalComposition action simplifies the initialization of variables for thermochemical modeling and the thermodynamic material model. It initializes auxiliary variables based on the elements parameter (recommended in the GlobalParameters block). The created variables have names of chemical elements used in the model and can be passed to other objects in the simulation.

Example Input File Syntax

An example of the ChemicalComposition block is shown in Listing 1. It will create two aux variables Mo and Ru, initialize their values over the entire model to values specified in file ic.csv, and read in thermodynamic material model defined in file Kaye_NobleMetals.dat.

Listing 1:

[GlobalParams]
  elements = 'Mo Ru'
  output_phases = 'BCCN HCPN'
  output_species = 'BCCN:Mo HCPN:Mo BCCN:Ru HCPN:Ru'
  output_element_potentials = 'mu:Mo mu:Ru'
  output_vapor_pressures = 'vp:gas_ideal:Mo'
  output_element_phases = 'ep:BCCN:Mo'
[]

[ChemicalComposition]
  [thermo]
    thermofile = Kaye_NobleMetals.dat
    initial_values = ic.csv
    temperature = 2250
    reinitialization_type = nodal
  []
[]
(modules/chemical_reactions/test/tests/thermochimica/csv_ic.i)

"initial_values" can be used for initialization of the variables specified in the vector elements of the block [GlobalParams]. The initialization file is expected to be in comma-separated value(csv) format as shown in Listing 2. The first line of the file is ignored.

Listing 2: Initialization of chemical elements variables from a file.

name,value
Mo,0.8
Ru,0.2
(modules/chemical_reactions/test/tests/thermochimica/ic.csv)

Subblocks

The subblocks of the ChemicalComposition action are what triggers MOOSE objects to be built. If no block restrictions apply to the constructed ThermochimicaElementData or ThermochimicaNodalData, a single subblock can be used.

If different user objects are needed, multiple subblocks with subdomain restrictions can be used.

[ChemicalComposition]
  tunit = K
  punit = atm
  munit = moles
  is_fv = true
  temperature = T
  [block_0]
    block = '0'
    elements = 'Mo Ru'
    thermofile = Kaye_NobleMetals.dat
    output_phases = 'BCCN HCPN'
    output_species = 'BCCN:Mo'
    is_fv = false
    output_species_unit = mole_fraction
  []
  [block_1]
    block = '1'
    elements = 'Fe O'
    thermofile = FeTiVO.dat
    output_phases = 'gas_ideal'
    output_species = 'SlagBsoln:Fe2O3'
    output_species_unit = moles
  []
[]
(modules/chemical_reactions/test/tests/thermochimica/MoRu_subblock.i)

Parameters supplied at the [ChemicalComposition] level act as defaults for the action subblocks but can be overridden by specifying the parameter within the subblock.

Input Parameters

  • active__all__ If specified only the blocks named will be visited and made active

    Default:__all__

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:If specified only the blocks named will be visited and made active

  • blockThe list of blocks (ids or names) that this object will be applied

    C++ Type:std::vector<SubdomainName>

    Unit:(no unit assumed)

    Controllable:No

    Description:The list of blocks (ids or names) that this object will be applied

  • elementsALL List of chemical elements (or ALL)

    Default:ALL

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:List of chemical elements (or ALL)

  • execute_onINITIAL TIMESTEP_ENDWhen to execute the ThermochimicaData UO

    Default:INITIAL TIMESTEP_END

    C++ Type:ExecFlagEnum

    Unit:(no unit assumed)

    Options:XFEM_MARK, FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR_CONVERGENCE, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM

    Controllable:No

    Description:When to execute the ThermochimicaData UO

  • inactiveIf specified blocks matching these identifiers will be skipped.

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:If specified blocks matching these identifiers will be skipped.

  • initial_valuesThe CSV file name with initial conditions.

    C++ Type:FileName

    Unit:(no unit assumed)

    Controllable:No

    Description:The CSV file name with initial conditions.

  • is_fvFalseShould the variables set up by action be of FV type

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Should the variables set up by action be of FV type

  • munitMass Unit

    C++ Type:MooseEnum

    Unit:(no unit assumed)

    Options:mole_fraction, atom_fraction, atoms, moles, gram-atoms, mass_fraction, kilograms, grams, pounds

    Controllable:No

    Description:Mass Unit

  • output_element_phasesList of elements whose molar amounts in specific phases are requested

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:List of elements whose molar amounts in specific phases are requested

  • output_element_potentialsList of chemical elements for which chemical potentials are requested

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:List of chemical elements for which chemical potentials are requested

  • output_phasesList of phases to be output

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:List of phases to be output

  • output_speciesList species for which concentration in the phases is needed

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:List species for which concentration in the phases is needed

  • output_species_unitMass unit for output species: mole_fractions or moles

    C++ Type:MooseEnum

    Unit:(no unit assumed)

    Options:moles, mole_fraction

    Controllable:No

    Description:Mass unit for output species: mole_fractions or moles

  • output_vapor_pressuresList of gas phase species for which vapor pressures are requested

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:List of gas phase species for which vapor pressures are requested

  • pressureName of pressure variable

    C++ Type:std::vector<VariableName>

    Unit:(no unit assumed)

    Controllable:No

    Description:Name of pressure variable

  • punitPressure Unit

    C++ Type:MooseEnum

    Unit:(no unit assumed)

    Options:atm, psi, bar, Pa, kPa

    Controllable:No

    Description:Pressure Unit

  • reinitialization_typenodalReinitialization scheme to use with Thermochimica

    Default:nodal

    C++ Type:MooseEnum

    Unit:(no unit assumed)

    Options:none, time, nodal

    Controllable:No

    Description:Reinitialization scheme to use with Thermochimica

  • temperatureName of temperature variable

    C++ Type:std::vector<VariableName>

    Unit:(no unit assumed)

    Controllable:No

    Description:Name of temperature variable

  • thermofileThermodynamics model file

    C++ Type:FileName

    Unit:(no unit assumed)

    Controllable:No

    Description:Thermodynamics model file

  • tunitTemperature Unit

    C++ Type:MooseEnum

    Unit:(no unit assumed)

    Options:K, C, F, R

    Controllable:No

    Description:Temperature Unit

  • uo_nameThermochimicaName of the ThermochimicaDataUserObject.

    Default:Thermochimica

    C++ Type:std::string

    Unit:(no unit assumed)

    Controllable:No

    Description:Name of the ThermochimicaDataUserObject.

Optional Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

Advanced Parameters

References

  1. M.H.A. Piro, S. Simunovic, T.M. Besmann, B.J. Lewis, and W.T. Thompson. The thermochemistry library thermochimica. Computational Materials Science, 67:266–272, 2013. URL: https://www.sciencedirect.com/science/article/pii/S0927025612005502, doi:https://doi.org/10.1016/j.commatsci.2012.09.011.[BibTeX]