GeochemicalModelInterrogator

Usually this Output is added using the GeochemicalModelInterrogator action. The purpose of this Output is to output balanced reactions and equilibrium constants, activity ratios, equilibrium temperature, etc, depending on the interrogation option. If a invalid swap is defined through the swap_into_basis and swap_out_of_basis options, the simulation will exit with an explanatory error message.

An example of outputting equilibrium reactions (interrogation = reaction) for different choices of basis components is

# Outputs equilibrium reactions fo Clinoptil-Ca for various different basis species, along with log10(K)
[GeochemicalModelInterrogator]
  model_definition = definition
  swap_out_of_basis = "Al+++     SiO2(aq) H+"
  swap_into_basis = "  Muscovite Quartz   OH-"
  equilibrium_species = "Clinoptil-Ca"
[]

[UserObjects]
  [definition]
    type = GeochemicalModelDefinition
    database_file = "../../../database/moose_geochemdb.json"
    basis_species = "H2O Ca++ Al+++ SiO2(aq) H+ K+"
    equilibrium_minerals = "Clinoptil-Ca Muscovite Quartz"
    piecewise_linear_interpolation = true # to get exact logK at 25degC with no best-fit interpolation
  []
[]
(modules/geochemistry/test/tests/interrogate_reactions/clinoptilolite.i)

An example of outputting activity ratios/products (interrogation = activity) is

# Output activity ratios for reactions involving muscovite
[GeochemicalModelInterrogator]
  model_definition = definition
  swap_out_of_basis = "Al+++"
  swap_into_basis = "  Kaolinite"
  activity_species = "H2O"
  activity_values = "1.0"
  equilibrium_species = Muscovite
  interrogation = activity
[]

[UserObjects]
  [definition]
    type = GeochemicalModelDefinition
    database_file = "../../../database/moose_geochemdb.json"
    basis_species = "H2O K+ Al+++ SiO2(aq) H+"
    equilibrium_minerals = "Muscovite Kaolinite"
    piecewise_linear_interpolation = true # to get exact logK at 25degC with no best-fit interpolation
  []
[]
(modules/geochemistry/test/tests/interrogate_reactions/muscovite.i)

An example of computing temperature (interrogation = eqm_temperature) at equilibrium is

# Find temperature at equilibrium for reactions involving gypsum
[GeochemicalModelInterrogator]
  model_definition = definition
  swap_out_of_basis = "Ca++"
  swap_into_basis = "  Anhydrite"
  activity_species = "H2O"
  activity_values = "1.0"
  temperature = 25
  equilibrium_species = Gypsum
  interrogation = eqm_temperature
[]

[UserObjects]
  [definition]
    type = GeochemicalModelDefinition
    database_file = "../../../database/moose_geochemdb.json"
    basis_species = "H2O Ca++ SO4--"
    equilibrium_minerals = "Gypsum Anhydrite"
  []
[]
(modules/geochemistry/test/tests/interrogate_reactions/gypsum.i)

An example of outputting pH and pe (interrogation = activity) at equilibrium is

# Compute pH values for an equilibrium reaction involving the mineral hematite
[GeochemicalModelInterrogator]
  model_definition = definition
  equilibrium_species = Hematite
  activity_species = 'H2O Fe++'
  activity_values = '1 1E-10'
  interrogation = activity
[]

[UserObjects]
  [definition]
    type = GeochemicalModelDefinition
    database_file = "../../../database/moose_geochemdb.json"
    basis_species = "H2O Fe++ H+ O2(aq)"
    equilibrium_minerals = "Hematite"
    piecewise_linear_interpolation = true # to get exact logK at 25degC with no best-fit interpolation
  []
[]
(modules/geochemistry/test/tests/interrogate_reactions/hematite.i)

Input Parameters

  • model_definitionThe name of the GeochemicalModelDefinition user object

    C++ Type:UserObjectName

    Options:

    Description:The name of the GeochemicalModelDefinition user object

Required Parameters

  • activity_speciesSpecies that are provided numerical values of activity (or fugacity for gases) in the activity_value input

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

    Options:

    Description:Species that are provided numerical values of activity (or fugacity for gases) in the activity_value input

  • activity_valuesNumerical values for the activity (or fugacity) for the species in the activity_species list. These are activity values, not log10(activity).

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

    Options:

    Description:Numerical values for the activity (or fugacity) for the species in the activity_species list. These are activity values, not log10(activity).

  • additional_execute_onThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, FAILED, CUSTOM.

    C++ Type:ExecFlagEnum

    Options:NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, FAILED, CUSTOM

    Description:The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, FAILED, CUSTOM.

  • end_stepTime step at which this output object stop operating

    C++ Type:int

    Options:

    Description:Time step at which this output object stop operating

  • equilibrium_speciesOnly output results for this equilibrium species. If not provided, results for all equilibrium species will be outputted

    C++ Type:std::string

    Options:

    Description:Only output results for this equilibrium species. If not provided, results for all equilibrium species will be outputted

  • execute_onFINALThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, FAILED, CUSTOM.

    Default:FINAL

    C++ Type:ExecFlagEnum

    Options:NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, FAILED, CUSTOM

    Description:The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, FAILED, CUSTOM.

  • interrogationreactionType of interrogation to perform. reaction: Output equilibrium species reactions and log10K. activity: determine activity products at equilibrium. eqm_temperature: determine temperature to ensure equilibrium

    Default:reaction

    C++ Type:MooseEnum

    Options:reaction, activity, eqm_temperature

    Description:Type of interrogation to perform. reaction: Output equilibrium species reactions and log10K. activity: determine activity products at equilibrium. eqm_temperature: determine temperature to ensure equilibrium

  • precision4Precision for printing values. Also, if the absolute value of a stoichiometric coefficient is less than 10^(-precision) then it is set to zero. Also, if equilibrium temperatures are desired, they will be computed to a relative error of 10^(-precision)

    Default:4

    C++ Type:unsigned int

    Options:

    Description:Precision for printing values. Also, if the absolute value of a stoichiometric coefficient is less than 10^(-precision) then it is set to zero. Also, if equilibrium temperatures are desired, they will be computed to a relative error of 10^(-precision)

  • start_stepTime step at which this output object begins to operate

    C++ Type:int

    Options:

    Description:Time step at which this output object begins to operate

  • stoichiometry_tolerance1e-06Swapping involves inverting matrices via a singular value decomposition. During this process: (1) if abs(singular value) < stoi_tol * L1norm(singular values), then the matrix is deemed singular (so the basis swap is deemed invalid); (2) if abs(any stoichiometric coefficient) < stoi_tol then it is set to zero.

    Default:1e-06

    C++ Type:double

    Options:

    Description:Swapping involves inverting matrices via a singular value decomposition. During this process: (1) if abs(singular value) < stoi_tol * L1norm(singular values), then the matrix is deemed singular (so the basis swap is deemed invalid); (2) if abs(any stoichiometric coefficient) < stoi_tol then it is set to zero.

  • swap_into_basisSpecies that should be removed from the model_definition's equilibrium species list and added to the basis

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

    Options:

    Description:Species that should be removed from the model_definition's equilibrium species list and added to the basis

  • swap_out_of_basisSpecies that should be removed from the model_definition's basis and be replaced with the swap_into_basis species. There must be the same number of species in swap_out_of_basis and swap_into_basis. If this list contains more than one species, the swapping is performed one-by-one, starting with the first pair (swap_out_of_basis[0] and swap_into_basis[0]), then the next pair, etc

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

    Options:

    Description:Species that should be removed from the model_definition's basis and be replaced with the swap_into_basis species. There must be the same number of species in swap_out_of_basis and swap_into_basis. If this list contains more than one species, the swapping is performed one-by-one, starting with the first pair (swap_out_of_basis[0] and swap_into_basis[0]), then the next pair, etc

  • temperature25Equilibrium constants will be computed at this temperature [degC]. This is ignored if interrogation=eqm_temperature.

    Default:25

    C++ Type:double

    Options:

    Description:Equilibrium constants will be computed at this temperature [degC]. This is ignored if interrogation=eqm_temperature.

  • use_displacedFalseEnable/disable the use of the displaced mesh for outputting

    Default:False

    C++ Type:bool

    Options:

    Description:Enable/disable the use of the displaced mesh for outputting

Optional Parameters

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

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

    Options:

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

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Options:

    Description:Set the enabled status of the MooseObject.

Advanced Parameters

  • end_timeTime at which this output object stop operating

    C++ Type:double

    Options:

    Description:Time at which this output object stop operating

  • interval1The interval at which time steps are output to the solution file

    Default:1

    C++ Type:unsigned int

    Options:

    Description:The interval at which time steps are output to the solution file

  • start_timeTime at which this output object begins to operate

    C++ Type:double

    Options:

    Description:Time at which this output object begins to operate

  • sync_onlyFalseOnly export results at sync times

    Default:False

    C++ Type:bool

    Options:

    Description:Only export results at sync times

  • sync_timesTimes at which the output and solution is forced to occur

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

    Options:

    Description:Times at which the output and solution is forced to occur

  • time_tolerance1e-14Time tolerance utilized checking start and end times

    Default:1e-14

    C++ Type:double

    Options:

    Description:Time tolerance utilized checking start and end times

Timing Parameters