- variableThe name of the variable that this residual object operates onC++ Type:NonlinearVariableName Unit:(no unit assumed) Controllable:No Description:The name of the variable that this residual object operates on 
PrimaryTimeDerivative
Derivative of primary species concentration wrt time
Derivative of concentration of the primary species wrt time. Implements the weak form of where is porosity.
Input Parameters
- blockThe list of blocks (ids or names) that this object will be appliedC++ Type:std::vector<SubdomainName> Controllable:No Description:The list of blocks (ids or names) that this object will be applied 
- displacementsThe displacementsC++ Type:std::vector<VariableName> Unit:(no unit assumed) Controllable:No Description:The displacements 
- lumpingFalseTrue for mass matrix lumping, false otherwiseDefault:False C++ Type:bool Controllable:No Description:True for mass matrix lumping, false otherwise 
- matrix_onlyFalseWhether this object is only doing assembly to matrices (no vectors)Default:False C++ Type:bool Controllable:No Description:Whether this object is only doing assembly to matrices (no vectors) 
Optional Parameters
- absolute_value_vector_tagsThe tags for the vectors this residual object should fill with the absolute value of the residual contributionC++ Type:std::vector<TagName> Controllable:No Description:The tags for the vectors this residual object should fill with the absolute value of the residual contribution 
- extra_matrix_tagsThe extra tags for the matrices this Kernel should fillC++ Type:std::vector<TagName> Controllable:No Description:The extra tags for the matrices this Kernel should fill 
- extra_vector_tagsThe extra tags for the vectors this Kernel should fillC++ Type:std::vector<TagName> Controllable:No Description:The extra tags for the vectors this Kernel should fill 
- matrix_tagssystem timeThe tag for the matrices this Kernel should fillDefault:system time C++ Type:MultiMooseEnum Options:nontime, system, time Controllable:No Description:The tag for the matrices this Kernel should fill 
- vector_tagstimeThe tag for the vectors this Kernel should fillDefault:time C++ Type:MultiMooseEnum Options:nontime, time Controllable:No Description:The tag for the vectors this Kernel should fill 
Contribution To Tagged Field Data Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.C++ Type:std::vector<std::string> Controllable:No Description:Adds user-defined labels for accessing object parameters via control logic. 
- diag_save_inThe name of auxiliary variables to save this Kernel's diagonal Jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)C++ Type:std::vector<AuxVariableName> Unit:(no unit assumed) Controllable:No Description:The name of auxiliary variables to save this Kernel's diagonal Jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.) 
- enableTrueSet the enabled status of the MooseObject.Default:True C++ Type:bool Controllable:Yes Description:Set the enabled status of the MooseObject. 
- implicitTrueDetermines whether this object is calculated using an implicit or explicit formDefault:True C++ Type:bool Controllable:No Description:Determines whether this object is calculated using an implicit or explicit form 
- save_inThe name of auxiliary variables to save this Kernel's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)C++ Type:std::vector<AuxVariableName> Unit:(no unit assumed) Controllable:No Description:The name of auxiliary variables to save this Kernel's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.) 
- search_methodnearest_node_connected_sidesChoice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes).Default:nearest_node_connected_sides C++ Type:MooseEnum Options:nearest_node_connected_sides, all_proximate_sides Controllable:No Description:Choice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes). 
- seed0The seed for the master random number generatorDefault:0 C++ Type:unsigned int Controllable:No Description:The seed for the master random number generator 
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.Default:False C++ Type:bool Controllable:No Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used. 
Advanced Parameters
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.C++ Type:MaterialPropertyName Unit:(no unit assumed) Controllable:No Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character. 
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.Default:False C++ Type:bool Controllable:No Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction. 
Material Property Retrieval Parameters
Input Files
- (modules/chemical_reactions/test/tests/exceptions/extra_gamma.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/co2_h2o.i)
- (modules/chemical_reactions/test/tests/parser/kinetic_without_action.i)
- (modules/chemical_reactions/test/tests/jacobian/2species.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_with_density.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/calcium_bicarbonate.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_without_action.i)
- (modules/chemical_reactions/test/tests/exceptions/missing_gamma2.i)
- (modules/chemical_reactions/test/tests/exceptions/missing_gamma.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/1species_without_action.i)
- (modules/chemical_reactions/test/tests/parser/kinetic_action.i)
- (modules/chemical_reactions/test/tests/exceptions/missing_sto2.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/2species.i)
- (modules/chemical_reactions/test/tests/exceptions/missing_sto3.i)
- (modules/chemical_reactions/test/tests/parser/equilibrium_action.i)
- (modules/chemical_reactions/test/tests/jacobian/2species_equilibrium.i)
- (modules/chemical_reactions/test/tests/exceptions/missing_sto.i)
- (modules/chemical_reactions/test/tests/solid_kinetics/2species.i)
- (modules/chemical_reactions/test/tests/solid_kinetics/calcite_dissolution.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/1species.i)
- (modules/chemical_reactions/test/tests/jacobian/2species_equilibrium_with_density.i)
- (modules/chemical_reactions/test/tests/solid_kinetics/2species_without_action.i)
- (modules/chemical_reactions/test/tests/exceptions/extra_sto.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/water_dissociation.i)
- (modules/chemical_reactions/test/tests/solid_kinetics/calcite_precipitation.i)
- (modules/chemical_reactions/examples/calcium_bicarbonate/calcium_bicarbonate.i)
- (modules/chemical_reactions/test/tests/kinetic_rate/arrhenius.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_eqaux.i)
- (modules/chemical_reactions/test/tests/parser/equilibrium_without_action.i)
(modules/chemical_reactions/test/tests/exceptions/extra_gamma.i)
# Additional activity coefficient in AqueousEquilibriumRxnAux AuxKernel
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[Variables]
  [./a]
  [../]
  [./b]
  [../]
[]
[AuxVariables]
  [./c]
  [../]
  [./gamma_a]
  [../]
  [./gamma_b]
  [../]
  [./gamma_c]
  [../]
[]
[AuxKernels]
  [./c]
    type = AqueousEquilibriumRxnAux
    variable = c
    v = 'a b'
    gamma_v = 'gamma_a gamma_b gamma_c'
    sto_v = '1 1'
    log_k = 1
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./b_ie]
    type = PrimaryTimeDerivative
    variable = b
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = porosity
    prop_values = 0.2
  [../]
[]
[Executioner]
  type = Transient
  end_time = 1
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/co2_h2o.i)
# Batch CO2 - H2O equilibrium reaction at 25C
#
# Aqueous equilibrium reactions:
# a)  H+ + HCO3- = CO2(aq),         Keq = 10^(6.3447)
# b)  HCO3- = H+ + CO3--,           Keq = 10^(-10.3288)
# c)  - H+ = OH-,                   Keq = 10^(-13.9951)
#
# The primary chemical species are h+ and hco3-, and the secondary equilibrium
# species are CO2(aq), CO3-- and OH-
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[AuxVariables]
  [./ph]
  [../]
  [./total_h+]
  [../]
  [./total_hco3-]
  [../]
[]
[AuxKernels]
  [./ph]
    type = PHAux
    variable = ph
    h_conc = h+
  [../]
  [./total_h+]
    type = TotalConcentrationAux
    variable = total_h+
    primary_species = h+
    v = 'oh- co3-- co2_aq'
    sto_v = '-1 1 1'
  [../]
  [./total_hco3-]
    type = TotalConcentrationAux
    variable = total_hco3-
    primary_species = hco3-
    v = 'co2_aq co3--'
    sto_v = '1 1'
  [../]
[]
[Variables]
  [./h+]
    initial_condition = 1e-5
  [../]
  [./hco3-]
    initial_condition = 1e-5
  [../]
[]
[ReactionNetwork]
  [./AqueousEquilibriumReactions]
    primary_species = 'hco3- h+'
    secondary_species = 'co2_aq co3-- oh-'
    reactions = 'hco3- + h+ = co2_aq 6.3447,
                 hco3- - h+ = co3-- -10.3288,
                 - h+ = oh- -13.9951'
  [../]
[]
[Kernels]
  [./h+_ie]
    type = PrimaryTimeDerivative
    variable = h+
  [../]
  [./hco3-_ie]
    type = PrimaryTimeDerivative
    variable = hco3-
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'diffusivity porosity conductivity'
    prop_values = '1e-7 0.25 1.0'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  nl_abs_tol = 1e-12
  end_time = 1
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Postprocessors]
  [./h+]
    type = ElementIntegralVariablePostprocessor
    variable = h+
    execute_on = 'initial timestep_end'
  [../]
  [./hco3-]
    type = ElementIntegralVariablePostprocessor
    variable = hco3-
    execute_on = 'initial timestep_end'
  [../]
  [./co2_aq]
    type = ElementIntegralVariablePostprocessor
    variable = co2_aq
    execute_on = 'initial timestep_end'
  [../]
  [./co3--]
    type = ElementIntegralVariablePostprocessor
    variable = co3--
    execute_on = 'initial timestep_end'
  [../]
  [./oh-]
    type = ElementIntegralVariablePostprocessor
    variable = oh-
    execute_on = 'initial timestep_end'
  [../]
  [./ph]
    type = ElementIntegralVariablePostprocessor
    variable = ph
    execute_on = 'initial timestep_end'
  [../]
  [./total_h+]
    type = ElementIntegralVariablePostprocessor
    variable = total_h+
    execute_on = 'initial timestep_end'
  [../]
  [./total_hco3-]
    type = ElementIntegralVariablePostprocessor
    variable = total_hco3-
    execute_on = 'initial timestep_end'
  [../]
[]
[Outputs]
  perf_graph = true
  csv = true
[]
(modules/chemical_reactions/test/tests/parser/kinetic_without_action.i)
# Explicitly adds all Kernels and AuxKernels. Used to check that the
# SolidKineticReactions parser is working correctly
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[Variables]
  [./a]
    initial_condition = 0.1
  [../]
  [./b]
    initial_condition = 0.1
  [../]
  [./c]
    initial_condition = 0.1
  [../]
  [./d]
    initial_condition = 0.1
  [../]
[]
[AuxVariables]
  [./m1]
  [../]
  [./m2]
  [../]
  [./m3]
  [../]
[]
[AuxKernels]
  [./m1]
    type = KineticDisPreConcAux
    variable = m1
    v = 'a b'
    sto_v = '1 1'
    log_k = -8
    r_area = 1
    ref_kconst = 1e-8
    e_act = 1e4
    gas_const = 8.314
    ref_temp = 298.15
    sys_temp = 298.15
  [../]
  [./m2]
    type = KineticDisPreConcAux
    variable = m2
    v = 'c d'
    sto_v = '2 3'
    log_k = -8
    r_area = 2
    ref_kconst = 2e-8
    e_act = 2e4
    gas_const = 8.314
    ref_temp = 298.15
    sys_temp = 298.15
  [../]
  [./m3]
    type = KineticDisPreConcAux
    variable = m3
    v = 'a c'
    sto_v = '1 -2'
    log_k = -8
    r_area = 3
    ref_kconst = 3e-8
    e_act = 3e4
    gas_const = 8.314
    ref_temp = 298.15
    sys_temp = 298.15
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./b_ie]
    type = PrimaryTimeDerivative
    variable = b
  [../]
  [./c_ie]
    type = PrimaryTimeDerivative
    variable = c
  [../]
  [./d_ie]
    type = PrimaryTimeDerivative
    variable = d
  [../]
  [./a_kin]
    type = CoupledBEKinetic
    variable = a
    v = 'm1 m3'
    weight = '1 1'
  [../]
  [./b_kin]
    type = CoupledBEKinetic
    variable = b
    v = m1
    weight = 1
  [../]
  [./c_kin]
    type = CoupledBEKinetic
    variable = c
    v = 'm2 m3'
    weight = '2 -2'
  [../]
  [./d_kin]
    type = CoupledBEKinetic
    variable = d
    v = m2
    weight = 3
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = porosity
    prop_values = 0.1
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  end_time = 1
  l_tol = 1e-10
  nl_rel_tol = 1e-10
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Outputs]
  file_base = kinetic_out
  exodus = true
  perf_graph = true
  print_linear_residuals = true
[]
(modules/chemical_reactions/test/tests/jacobian/2species.i)
# Tests the Jacobian when no secondary species are present
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 2
  ny = 2
[]
[Variables]
  [./a]
    order = FIRST
    family = LAGRANGE
  [../]
  [./b]
    order = FIRST
    family = LAGRANGE
  [../]
  [./pressure]
    order = FIRST
    family = LAGRANGE
  [../]
[]
[ICs]
  [./pressure]
    type = RandomIC
    variable = pressure
    max = 10
    min = 1
  [../]
  [./a]
    type = RandomIC
    variable = a
    max = 1
    min = 0
  [../]
  [./b]
    type = RandomIC
    variable = b
    max = 1
    min = 0
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./a_diff]
    type = PrimaryDiffusion
    variable = a
  [../]
  [./a_conv]
    type = PrimaryConvection
    variable = a
    p = pressure
  [../]
  [./b_ie]
    type = PrimaryTimeDerivative
    variable = b
  [../]
  [./b_diff]
    type = PrimaryDiffusion
    variable = b
  [../]
  [./b_conv]
    type = PrimaryConvection
    variable = b
    p = pressure
  [../]
  [./pressure]
    type = DarcyFluxPressure
    variable = pressure
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'diffusivity conductivity porosity'
    prop_values = '1e-4 1e-4 0.2'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = NEWTON
  end_time = 1
[]
[Outputs]
  perf_graph = true
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_with_density.i)
# Simple equilibrium reaction example with fluid density and gravity included
# in calculation of the Darcy velocity. For details about reaction network,
# see documentation in 2species.i
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 10
[]
[Variables]
  [./a]
    order = FIRST
    family = LAGRANGE
    [./InitialCondition]
      type = BoundingBoxIC
      x1 = 0.0
      y1 = 0.0
      x2 = 1.0e-10
      y2 = 1
      inside = 1.0e-2
      outside = 1.0e-10
    [../]
  [../]
  [./b]
    order = FIRST
    family = LAGRANGE
    [./InitialCondition]
      type = BoundingBoxIC
      x1 = 0.0
      y1 = 0.0
      x2 = 1.0e-10
      y2 = 1
      inside = 1.0e-2
      outside = 1.0e-10
    [../]
  [../]
  [./pressure]
    order = FIRST
    family = LAGRANGE
    initial_condition = 1
  [../]
[]
[ReactionNetwork]
  [./AqueousEquilibriumReactions]
    primary_species = 'a b'
    reactions = '2a = pa2     2,
                 a + b = pab -2'
    secondary_species = 'pa2 pab'
    pressure = pressure
    gravity = '-1 0 0'
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./a_diff]
    type = PrimaryDiffusion
    variable = a
  [../]
  [./a_conv]
    type = PrimaryConvection
    variable = a
    p = pressure
    gravity = '-1 0 0'
  [../]
  [./b_ie]
    type = PrimaryTimeDerivative
    variable = b
  [../]
  [./b_diff]
    type = PrimaryDiffusion
    variable = b
  [../]
  [./b_conv]
    type = PrimaryConvection
    variable = b
    p = pressure
    gravity = '-1 0 0'
  [../]
  [./p]
    type = DarcyFluxPressure
    variable = pressure
    gravity = '-1 0 0'
  [../]
[]
[BCs]
  [./a_left]
    type = DirichletBC
    variable = a
    preset = false
    boundary = left
    value = 1.0e-2
  [../]
  [./a_right]
    type = ChemicalOutFlowBC
    variable = a
    boundary = right
  [../]
  [./b_left]
    type = DirichletBC
    variable = b
    preset = false
    boundary = left
    value = 1.0e-2
  [../]
  [./b_right]
    type = ChemicalOutFlowBC
    variable = b
    boundary = right
  [../]
  [./pleft]
    type = DirichletBC
    variable = pressure
    preset = false
    value = 2
    boundary = left
  [../]
  [./pright]
    type = DirichletBC
    variable = pressure
    preset = false
    value = 1
    boundary = right
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'diffusivity conductivity porosity density'
    prop_values = '1e-4 1e-4 0.2 4'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  petsc_options_iname = '-pc_type -pc_hypre_type'
  petsc_options_value = 'hypre boomeramg'
  nl_rel_tol = 1e-12
  start_time = 0.0
  end_time = 100
  dt = 10.0
[]
[Outputs]
  exodus = true
  perf_graph = true
  print_linear_residuals = true
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/calcium_bicarbonate.i)
# Calcium (Ca++) and bicarbonate (HCO3-) batch equilibrium reaction at 25C
#
# Aqueous equilibrium reactions:
# a)  H+ + HCO3- = CO2(aq),          Keq = 10^(6.3447)
# b)  HCO3- = H+ + CO3--,            Keq = 10^(-10.3288)
# c)  Ca++ + HCO3- = H+ + CaCO3(aq), Keq = 10^(-7.0017)
# d)  Ca++ + HCO3- = CaHCO3+,        Keq = 10^(1.0467)
# e)  Ca++ = H+ + CaOH+,             Keq = 10^(-12.85)
# c)  - H+ = OH-,                    Keq = 10^(-13.9951)
# d)
#
# The primary chemical species are Ca++, H+ and HCO3-, and the secondary equilibrium
# species are CO2(aq), CO3--, CaCO3(aq), CaHCO3+, CaOH+ and OH-
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[AuxVariables]
  [./ph]
  [../]
  [./total_ca++]
  [../]
  [./total_h+]
  [../]
  [./total_hco3-]
  [../]
[]
[AuxKernels]
  [./ph]
    type = PHAux
    variable = ph
    h_conc = h+
  [../]
  [./total_ca++]
    type = TotalConcentrationAux
    variable = total_ca++
    primary_species = ca++
    v = 'caco3_aq cahco3+ caoh+'
    sto_v = '1 1 1'
  [../]
  [./total_h+]
    type = TotalConcentrationAux
    variable = total_h+
    primary_species = h+
    v = 'co2_aq co3-- caco3_aq oh-'
    sto_v = '1 -1 -1 -1'
  [../]
  [./total_hco3-]
    type = TotalConcentrationAux
    variable = total_hco3-
    primary_species = hco3-
    v = 'co2_aq co3-- caco3_aq cahco3+'
    sto_v = '1 1 1 1'
  [../]
[]
[Variables]
  [./ca++]
    initial_condition = 1.0e-5
  [../]
  [./h+]
    initial_condition = 1.0e-5
  [../]
  [./hco3-]
    initial_condition = 3.0e-5
  [../]
[]
[ReactionNetwork]
  [./AqueousEquilibriumReactions]
    primary_species = 'ca++ hco3- h+'
    secondary_species = 'co2_aq co3-- caco3_aq cahco3+ caoh+ oh-'
    reactions = 'h+ + hco3- = co2_aq 6.3447,
                 hco3- - h+ = co3-- -10.3288,
                 ca++ + hco3- - h+ = caco3_aq -7.0017,
                 ca++ + hco3- = cahco3+ 1.0467,
                 ca++ - h+ = caoh+ -12.85,
                 - h+ = oh- -13.9951'
  [../]
[]
[Kernels]
  [./ca++_ie]
    type = PrimaryTimeDerivative
    variable = ca++
  [../]
  [./h+_ie]
    type = PrimaryTimeDerivative
    variable = h+
  [../]
  [./hco3-_ie]
    type = PrimaryTimeDerivative
    variable = hco3-
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'diffusivity porosity conductivity'
    prop_values = '1e-7 0.25 1.0'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  nl_abs_tol = 1e-12
  end_time = 1
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Postprocessors]
  [./ca++]
    type = ElementIntegralVariablePostprocessor
    variable = ca++
    execute_on = 'initial timestep_end'
  [../]
  [./h+]
    type = ElementIntegralVariablePostprocessor
    variable = h+
    execute_on = 'initial timestep_end'
  [../]
  [./hco3-]
    type = ElementIntegralVariablePostprocessor
    variable = hco3-
    execute_on = 'initial timestep_end'
  [../]
  [./co2_aq]
    type = ElementIntegralVariablePostprocessor
    variable = co2_aq
    execute_on = 'initial timestep_end'
  [../]
  [./co3--]
    type = ElementIntegralVariablePostprocessor
    variable = co3--
    execute_on = 'initial timestep_end'
  [../]
  [./caco3_aq]
    type = ElementIntegralVariablePostprocessor
    variable = caco3_aq
    execute_on = 'initial timestep_end'
  [../]
  [./cahco3+]
    type = ElementIntegralVariablePostprocessor
    variable = cahco3+
    execute_on = 'initial timestep_end'
  [../]
  [./caoh+]
    type = ElementIntegralVariablePostprocessor
    variable = caoh+
    execute_on = 'initial timestep_end'
  [../]
  [./oh-]
    type = ElementIntegralVariablePostprocessor
    variable = oh-
    execute_on = 'initial timestep_end'
  [../]
  [./ph]
    type = ElementIntegralVariablePostprocessor
    variable = ph
    execute_on = 'initial timestep_end'
  [../]
  [./total_ca++]
    type = ElementIntegralVariablePostprocessor
    variable = total_ca++
    execute_on = 'initial timestep_end'
  [../]
  [./total_hco3-]
    type = ElementIntegralVariablePostprocessor
    variable = total_hco3-
    execute_on = 'initial timestep_end'
  [../]
  [./total_h+]
    type = ElementIntegralVariablePostprocessor
    variable = total_h+
    execute_on = 'initial timestep_end'
  [../]
[]
[Outputs]
  perf_graph = true
  csv = true
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_without_action.i)
# Simple equilibrium reaction example to illustrate the use of the AqueousEquilibriumReactions
# action.
# In this example, two primary species a and b are transported by diffusion and convection
# from the left of the porous medium, reacting to form two equilibrium species pa2 and pab
# according to the equilibrium reaction specified in the AqueousEquilibriumReactions block as:
#
#      reactions = '2a = pa2     2
#                   a + b = pab -2'
#
# where the 2 is the weight of the equilibrium species, the 2 on the RHS of the first reaction
# refers to the equilibrium constant (log10(Keq) = 2), and the -2 on the RHS of the second
# reaction equates to log10(Keq) = -2.
#
# This example is identical to 2species.i, except that it explicitly includes all AuxKernels
# and Kernels that are set up by the action in 2species.i
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 10
[]
[Variables]
  [./a]
    order = FIRST
    family = LAGRANGE
    [./InitialCondition]
      type = BoundingBoxIC
      x1 = 0.0
      y1 = 0.0
      x2 = 1.0e-10
      y2 = 1
      inside = 1.0e-2
      outside = 1.0e-10
    [../]
  [../]
  [./b]
    order = FIRST
    family = LAGRANGE
    [./InitialCondition]
      type = BoundingBoxIC
      x1 = 0.0
      y1 = 0.0
      x2 = 1.0e-10
      y2 = 1
      inside = 1.0e-2
      outside = 1.0e-10
    [../]
  [../]
[]
[AuxVariables]
  [./pressure]
    order = FIRST
    family = LAGRANGE
  [../]
  [./pa2]
  [../]
  [./pab]
  [../]
[]
[AuxKernels]
  [./pa2eq]
    type = AqueousEquilibriumRxnAux
    variable = pa2
    v = a
    sto_v = 2
    log_k = 2
  [../]
  [./pabeq]
    type = AqueousEquilibriumRxnAux
    variable = pab
    v = 'a b'
    sto_v = '1 1'
    log_k = -2
  [../]
[]
[ICs]
  [./pressure]
    type = FunctionIC
    variable = pressure
    function = 2-x
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./a_diff]
    type = PrimaryDiffusion
    variable = a
  [../]
  [./a_conv]
    type = PrimaryConvection
    variable = a
    p = pressure
  [../]
  [./b_ie]
    type = PrimaryTimeDerivative
    variable = b
  [../]
  [./b_diff]
    type = PrimaryDiffusion
    variable = b
  [../]
  [./b_conv]
    type = PrimaryConvection
    variable = b
    p = pressure
  [../]
  [./a1eq]
    type = CoupledBEEquilibriumSub
    variable = a
    log_k = 2
    weight = 2
    sto_u = 2
  [../]
  [./a1diff]
    type = CoupledDiffusionReactionSub
    variable = a
    log_k = 2
    weight = 2
    sto_u = 2
  [../]
  [./a1conv]
    type = CoupledConvectionReactionSub
    variable = a
    log_k = 2
    weight = 2
    sto_u = 2
    p = pressure
  [../]
  [./a2eq]
    type = CoupledBEEquilibriumSub
    variable = a
    v = b
    log_k = -2
    weight = 1
    sto_v = 1
    sto_u = 1
  [../]
  [./a2diff]
    type = CoupledDiffusionReactionSub
    variable = a
    v = b
    log_k = -2
    weight = 1
    sto_v = 1
    sto_u = 1
  [../]
  [./a2conv]
    type = CoupledConvectionReactionSub
    variable = a
    v = b
    log_k = -2
    weight = 1
    sto_v = 1
    sto_u = 1
    p = pressure
  [../]
  [./b2eq]
    type = CoupledBEEquilibriumSub
    variable = b
    v = a
    log_k = -2
    weight = 1
    sto_v = 1
    sto_u = 1
  [../]
  [./b2diff]
    type = CoupledDiffusionReactionSub
    variable = b
    v = a
    log_k = -2
    weight = 1
    sto_v = 1
    sto_u = 1
  [../]
  [./b2conv]
    type = CoupledConvectionReactionSub
    variable = b
    v = a
    log_k = -2
    weight = 1
    sto_v = 1
    sto_u = 1
    p = pressure
  [../]
[]
[BCs]
  [./a_left]
    type = DirichletBC
    variable = a
    boundary = left
    value = 1.0e-2
  [../]
  [./a_right]
    type = ChemicalOutFlowBC
    variable = a
    boundary = right
  [../]
  [./b_left]
    type = DirichletBC
    variable = b
    boundary = left
    value = 1.0e-2
  [../]
  [./b_right]
    type = ChemicalOutFlowBC
    variable = b
    boundary = right
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'diffusivity conductivity porosity'
    prop_values = '1e-4 1e-4 0.2'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  petsc_options_iname = '-pc_type -pc_hypre_type'
  petsc_options_value = 'hypre boomeramg'
  nl_abs_tol = 1e-12
  start_time = 0.0
  end_time = 100
  dt = 10.0
[]
[Outputs]
  file_base = 2species_out
  exodus = true
  perf_graph = true
  print_linear_residuals = true
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
(modules/chemical_reactions/test/tests/exceptions/missing_gamma2.i)
# Missing activity coefficient in CoupledBEEquilibriumSub Kernel
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[Variables]
  [./a]
  [../]
  [./b]
  [../]
  [./c]
  [../]
[]
[AuxVariables]
  [./gamma_a]
  [../]
  [./gamma_b]
  [../]
  [./gamma_c]
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./b_ie]
    type = PrimaryTimeDerivative
    variable = b
  [../]
  [./c_ie]
    type = PrimaryTimeDerivative
    variable = c
  [../]
  [./aeq]
    type = CoupledBEEquilibriumSub
    variable = a
    log_k = 1
    weight = 2
    sto_u = 2
    v = 'b c'
    sto_v = '1 1'
    gamma_v = gamma_b
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = porosity
    prop_values = 0.2
  [../]
[]
[Executioner]
  type = Transient
  end_time = 1
[]
(modules/chemical_reactions/test/tests/exceptions/missing_gamma.i)
# Missing activity coefficient in AqueousEquilibriumRxnAux AuxKernel
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[Variables]
  [./a]
  [../]
  [./b]
  [../]
[]
[AuxVariables]
  [./c]
  [../]
  [./gamma_a]
  [../]
[]
[AuxKernels]
  [./c]
    type = AqueousEquilibriumRxnAux
    variable = c
    v = 'a b'
    gamma_v = gamma_a
    sto_v = '1 1'
    log_k = 1
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./b_ie]
    type = PrimaryTimeDerivative
    variable = b
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = porosity
    prop_values = 0.2
  [../]
[]
[Executioner]
  type = Transient
  end_time = 1
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/1species_without_action.i)
# Simple equilibrium reaction example.
# This simulation is identical to 1species.i, but explicitly includes the AuxVariables,
# AuxKernels, and Kernels that the action in 1species.i adds
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 10
[]
[Variables]
  [./a]
    order = FIRST
    family = LAGRANGE
    [./InitialCondition]
      type = BoundingBoxIC
      x1 = 0.0
      y1 = 0.0
      x2 = 1e-2
      y2 = 1
      inside = 1.0e-2
      outside = 1.0e-10
      variable = a
    [../]
  [../]
[]
[AuxVariables]
  [./pressure]
    order = FIRST
    family = LAGRANGE
  [../]
  [./pa2]
  [../]
[]
[AuxKernels]
  [./pa2eq]
    type = AqueousEquilibriumRxnAux
    variable = pa2
    v = a
    sto_v = 2
    log_k = 1
  [../]
[]
[ICs]
  [./pressure]
    type = FunctionIC
    variable = pressure
    function = 2-x
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./a_diff]
    type = PrimaryDiffusion
    variable = a
  [../]
  [./a_conv]
    type = PrimaryConvection
    variable = a
    p = pressure
  [../]
  [./aeq]
    type = CoupledBEEquilibriumSub
    variable = a
    log_k = 1
    weight = 2
    sto_u = 2
  [../]
  [./adiff]
    type = CoupledDiffusionReactionSub
    variable = a
    log_k = 1
    weight = 2
    sto_u = 2
  [../]
  [./aconv]
    type = CoupledConvectionReactionSub
    variable = a
    log_k = 1
    weight = 2
    sto_u = 2
    p = pressure
  [../]
[]
[BCs]
  [./a_right]
    type = ChemicalOutFlowBC
    variable = a
    boundary = right
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'diffusivity conductivity porosity'
    prop_values = '1e-4 1e-4 0.2'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  petsc_options_iname = '-pc_type -pc_hypre_type'
  petsc_options_value = 'hypre boomeramg'
  nl_abs_tol = 1e-12
  start_time = 0.0
  end_time = 100
  dt = 10.0
[]
[Outputs]
  file_base = 1species_out
  exodus = true
  perf_graph = true
  print_linear_residuals = true
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
(modules/chemical_reactions/test/tests/parser/kinetic_action.i)
# Test SolidKineticReactions parser
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[Variables]
  [./a]
    initial_condition = 0.1
  [../]
  [./b]
    initial_condition = 0.1
  [../]
  [./c]
    initial_condition = 0.1
  [../]
  [./d]
    initial_condition = 0.1
  [../]
[]
[ReactionNetwork]
  [./SolidKineticReactions]
    primary_species = 'a b c d'
    secondary_species = 'm1 m2 m3'
    kin_reactions = '(1.0)a + (1.0)b = m1,
                      2c + 3d = m2,
                      a - 2c = m3'
    log10_keq = '-8 -8 -8'
    specific_reactive_surface_area = '1 2 3'
    kinetic_rate_constant = '1e-8 2e-8 3e-8'
    activation_energy = '1e4 2e4 3e4'
    gas_constant = 8.314
    reference_temperature = '298.15 298.15 298.15'
    system_temperature = '298.15 298.15 298.15'
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./b_ie]
    type = PrimaryTimeDerivative
    variable = b
  [../]
  [./c_ie]
    type = PrimaryTimeDerivative
    variable = c
  [../]
  [./d_ie]
    type = PrimaryTimeDerivative
    variable = d
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = porosity
    prop_values = 0.1
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  end_time = 1
  l_tol = 1e-10
  nl_rel_tol = 1e-10
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Outputs]
  file_base = kinetic_out
  exodus = true
  perf_graph = true
  print_linear_residuals = true
[]
(modules/chemical_reactions/test/tests/exceptions/missing_sto2.i)
# Missing stoichiometric coefficient in CoupledBEEquilibriumSub Kernel
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[Variables]
  [./a]
  [../]
  [./b]
  [../]
  [./c]
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./b_ie]
    type = PrimaryTimeDerivative
    variable = b
  [../]
  [./c_ie]
    type = PrimaryTimeDerivative
    variable = c
  [../]
  [./aeq]
    type = CoupledBEEquilibriumSub
    variable = a
    log_k = 1
    weight = 2
    sto_u = 2
    v = 'b c'
    sto_v = 1
    gamma_v = '2 2'
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = porosity
    prop_values = 0.2
  [../]
[]
[Executioner]
  type = Transient
  end_time = 1
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/2species.i)
# Simple equilibrium reaction example to illustrate the use of the AqueousEquilibriumReactions
# action.
# In this example, two primary species a and b are transported by diffusion and convection
# from the left of the porous medium, reacting to form two equilibrium species pa2 and pab
# according to the equilibrium reaction specified in the AqueousEquilibriumReactions block as:
#
#      reactions = '2a = pa2     2
#                   a + b = pab -2'
#
# where the 2 is the weight of the equilibrium species, the 2 on the RHS of the first reaction
# refers to the equilibrium constant (log10(Keq) = 2), and the -2 on the RHS of the second
# reaction equates to log10(Keq) = -2.
#
# The AqueousEquilibriumReactions action creates all the required kernels and auxkernels
# to compute the reaction given by the above equilibrium reaction equation.
#
# Specifically, it adds to following:
# * An AuxVariable named 'pa2' (given in the reactions equations)
# * An AuxVariable named 'pab' (given in the reactions equations)
# * A AqueousEquilibriumRxnAux AuxKernel for each AuxVariable with all parameters
# * A CoupledBEEquilibriumSub Kernel for each primary species with all parameters
# * A CoupledDiffusionReactionSub Kernel for each primary species with all parameters
# * A CoupledConvectionReactionSub Kernel for each primary species with all parameters if
# pressure is a coupled variable
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 10
[]
[Variables]
  [./a]
    order = FIRST
    family = LAGRANGE
    [./InitialCondition]
      type = BoundingBoxIC
      x1 = 0.0
      y1 = 0.0
      x2 = 1.0e-10
      y2 = 1
      inside = 1.0e-2
      outside = 1.0e-10
    [../]
  [../]
  [./b]
    order = FIRST
    family = LAGRANGE
    [./InitialCondition]
      type = BoundingBoxIC
      x1 = 0.0
      y1 = 0.0
      x2 = 1.0e-10
      y2 = 1
      inside = 1.0e-2
      outside = 1.0e-10
    [../]
  [../]
[]
[AuxVariables]
  [./pressure]
    order = FIRST
    family = LAGRANGE
  [../]
[]
[ICs]
  [./pressure]
    type = FunctionIC
    variable = pressure
    function = 2-x
  [../]
[]
[ReactionNetwork]
  [./AqueousEquilibriumReactions]
    primary_species = 'a b'
    reactions = '2a = pa2     2,
                 a + b = pab -2'
    secondary_species = 'pa2 pab'
    pressure = pressure
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./a_diff]
    type = PrimaryDiffusion
    variable = a
  [../]
  [./a_conv]
    type = PrimaryConvection
    variable = a
    p = pressure
  [../]
  [./b_ie]
    type = PrimaryTimeDerivative
    variable = b
  [../]
  [./b_diff]
    type = PrimaryDiffusion
    variable = b
  [../]
  [./b_conv]
    type = PrimaryConvection
    variable = b
    p = pressure
  [../]
[]
[BCs]
  [./a_left]
    type = DirichletBC
    variable = a
    boundary = left
    value = 1.0e-2
  [../]
  [./a_right]
    type = ChemicalOutFlowBC
    variable = a
    boundary = right
  [../]
  [./b_left]
    type = DirichletBC
    variable = b
    boundary = left
    value = 1.0e-2
  [../]
  [./b_right]
    type = ChemicalOutFlowBC
    variable = b
    boundary = right
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'diffusivity conductivity porosity'
    prop_values = '1e-4 1e-4 0.2'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  petsc_options_iname = '-pc_type -pc_hypre_type'
  petsc_options_value = 'hypre boomeramg'
  nl_abs_tol = 1e-12
  start_time = 0.0
  end_time = 100
  dt = 10.0
[]
[Outputs]
  file_base = 2species_out
  exodus = true
  perf_graph = true
  print_linear_residuals = true
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
(modules/chemical_reactions/test/tests/exceptions/missing_sto3.i)
# Missing stoichiometric coefficient in AqueousEquilibriumRxnAux AuxKernel
# Simple reaction-diffusion example without using the action.
# In this example, two primary species a and b diffuse towards each other from
# opposite ends of a porous medium, reacting when they meet to form a mineral
# precipitate
# This simulation is identical to 2species.i, but explicitly includes the AuxVariables,
# AuxKernels, and Kernels that the action in 2species.i adds
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[Variables]
  [./a]
  [../]
  [./b]
  [../]
[]
[AuxVariables]
  [./mineral]
  [../]
[]
[AuxKernels]
  [./mineral_conc]
    type = KineticDisPreConcAux
    variable = mineral
    sto_v = 1
    v = 'a b'
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./b_ie]
    type = PrimaryTimeDerivative
    variable = b
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = porosity
    prop_values = 0.2
  [../]
[]
[Executioner]
  type = Transient
  end_time = 1
[]
(modules/chemical_reactions/test/tests/parser/equilibrium_action.i)
# Test AqueousEquilibriumReactions parser
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[Variables]
  [./a]
  [../]
  [./b]
  [../]
[]
[AuxVariables]
  [./pressure]
  [../]
[]
[ICs]
  [./a]
    type = BoundingBoxIC
    variable = a
    x1 = 0.0
    y1 = 0.0
    x2 = 1.0e-10
    y2 = 1
    inside = 1.0e-2
    outside = 1.0e-10
  [../]
  [./b]
    type = BoundingBoxIC
    variable = b
    x1 = 0.0
    y1 = 0.0
    x2 = 1.0e-10
    y2 = 1
    inside = 1.0e-2
    outside = 1.0e-10
  [../]
  [./pressure]
    type = FunctionIC
    variable = pressure
    function = 2-x
  [../]
[]
[ReactionNetwork]
  [./AqueousEquilibriumReactions]
    primary_species = 'a b'
    reactions = '2a = pa2 2,
                 (1.0)a + (1.0)b = pab -2'
    secondary_species = 'pa2 pab'
    pressure = pressure
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./a_diff]
    type = PrimaryDiffusion
    variable = a
  [../]
  [./a_conv]
    type = PrimaryConvection
    variable = a
    p = pressure
  [../]
  [./b_ie]
    type = PrimaryTimeDerivative
    variable = b
  [../]
  [./b_diff]
    type = PrimaryDiffusion
    variable = b
  [../]
  [./b_conv]
    type = PrimaryConvection
    variable = b
    p = pressure
  [../]
[]
[BCs]
  [./a_left]
    type = DirichletBC
    variable = a
    boundary = left
    value = 1.0e-2
  [../]
  [./a_right]
    type = ChemicalOutFlowBC
    variable = a
    boundary = right
  [../]
  [./b_left]
    type = DirichletBC
    variable = b
    boundary = left
    value = 1.0e-2
  [../]
  [./b_right]
    type = ChemicalOutFlowBC
    variable = b
    boundary = right
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'diffusivity conductivity porosity'
    prop_values = '1e-4 1e-4 0.2'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  nl_abs_tol = 1e-12
  end_time = 10
  dt = 10
[]
[Outputs]
  file_base = equilibrium_out
  exodus = true
  perf_graph = true
  print_linear_residuals = true
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
(modules/chemical_reactions/test/tests/jacobian/2species_equilibrium.i)
# Tests the Jacobian when equilibrium secondary species are present
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 3
  ny = 3
[]
[Variables]
  [./a]
    order = FIRST
    family = LAGRANGE
  [../]
  [./b]
    order = FIRST
    family = LAGRANGE
  [../]
  [./pressure]
    order = FIRST
    family = LAGRANGE
  [../]
[]
[ICs]
  [./pressure]
    type = RandomIC
    variable = pressure
    max = 5
    min = 1
  [../]
  [./a]
    type = RandomIC
    variable = a
    max = 1
    min = 0
  [../]
  [./b]
    type = RandomIC
    variable = b
    max = 1
    min = 0
  [../]
[]
[ReactionNetwork]
  [./AqueousEquilibriumReactions]
    primary_species = 'a b'
    reactions = '2a = pa2     2
                 a + b = pab 2'
    secondary_species = 'pa2 pab'
    pressure = pressure
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./a_diff]
    type = PrimaryDiffusion
    variable = a
  [../]
  [./a_conv]
    type = PrimaryConvection
    variable = a
    p = pressure
  [../]
  [./b_ie]
    type = PrimaryTimeDerivative
    variable = b
  [../]
  [./b_diff]
    type = PrimaryDiffusion
    variable = b
  [../]
  [./b_conv]
    type = PrimaryConvection
    variable = b
    p = pressure
  [../]
  [./pressure]
    type = DarcyFluxPressure
    variable = pressure
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'diffusivity conductivity porosity'
    prop_values = '1e-4 1e-4 0.2'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = NEWTON
  end_time = 1
[]
[Outputs]
  perf_graph = true
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
(modules/chemical_reactions/test/tests/exceptions/missing_sto.i)
# Missing stoichiometric coefficient in AqueousEquilibriumRxnAux AuxKernel
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[Variables]
  [./a]
  [../]
  [./b]
  [../]
[]
[AuxVariables]
  [./c]
  [../]
  [./gamma_a]
  [../]
  [./gamma_b]
  [../]
[]
[AuxKernels]
  [./c]
    type = AqueousEquilibriumRxnAux
    variable = c
    v = 'a b'
    gamma_v = 'gamma_a gamma_b'
    sto_v = 1
    log_k = 1
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./a_diff]
    type = PrimaryDiffusion
    variable = a
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = porosity
    prop_values = 0.2
  [../]
[]
[Executioner]
  type = Transient
  end_time = 1
[]
(modules/chemical_reactions/test/tests/solid_kinetics/2species.i)
# Simple reaction-diffusion example to illustrate the use of the SolidKineticReactions
# action.
# In this example, two primary species a and b diffuse towards each other from
# opposite ends of a porous medium, reacting when they meet to form a mineral
# precipitate. The kinetic reaction is specified in the SolidKineticReactions block as:
#
# kin_reactions = '(1.0)a+(1.0)b=mineral'
#
# where a and b are the primary species (reactants), mineral is the precipitate,
# and the values in the parentheses are the stoichiometric coefficients for each
# species in the kinetic reaction.
#
# The SolidKineticReactions action creates all the required kernels and auxkernels
# to compute the reaction given by the above kinetic reaction equation.
#
# Specifically, it adds to following:
# * An AuxVariable named 'mineral' (given in the RHS of the kinetic reaction)
# * A KineticDisPreConcAux AuxKernel for this AuxVariable with all parameters
# * A CoupledBEKinetic Kernel for each primary species with all parameters
[Mesh]
  type = GeneratedMesh
  dim = 2
  xmax = 1
  ymax = 1
  nx = 40
[]
[Variables]
  [./a]
    order = FIRST
    family = LAGRANGE
    initial_condition = 0
  [../]
  [./b]
    order = FIRST
    family = LAGRANGE
    initial_condition = 0
  [../]
[]
[ReactionNetwork]
  [./SolidKineticReactions]
    primary_species = 'a b'
    secondary_species = mineral
    kin_reactions = 'a + b = mineral'
    log10_keq = '-6'
    specific_reactive_surface_area = '1.0'
    kinetic_rate_constant = '1.0e-8'
    activation_energy = '1.5e4'
    gas_constant = 8.314
    reference_temperature = '298.15'
    system_temperature = '298.15'
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./a_pd]
    type = PrimaryDiffusion
    variable = a
  [../]
  [./b_ie]
    type = PrimaryTimeDerivative
    variable = b
  [../]
  [./b_pd]
    type = PrimaryDiffusion
    variable = b
  [../]
[]
[BCs]
  [./a_left]
    type = DirichletBC
    variable = a
    preset = false
    boundary = left
    value = 1.0e-2
  [../]
  [./a_right]
    type = DirichletBC
    variable = a
    preset = false
    boundary = right
    value = 0
  [../]
  [./b_left]
    type = DirichletBC
    variable = b
    preset = false
    boundary = left
    value = 0
  [../]
  [./b_right]
    type = DirichletBC
    variable = b
    preset = false
    boundary = right
    value = 1.0e-2
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'diffusivity conductivity porosity'
    prop_values = '5e-4 4e-3 0.4'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  end_time = 50
  dt = 5
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Outputs]
  file_base = 2species_out
  exodus = true
  perf_graph = true
  print_linear_residuals = true
[]
(modules/chemical_reactions/test/tests/solid_kinetics/calcite_dissolution.i)
# Example of batch reaction of calcite (CaCO3) dissolution to form calcium (Ca++)
# and bicarbonate (HCO3-).
#
# The reaction network considered is as follows:
# Aqueous equilibrium reactions:
# a)  H+ + HCO3- = CO2(aq),             Keq = 10^(6.341)
# b)  HCO3- = H+ + CO3--,               Keq = 10^(-10.325)
# c)  Ca++ + HCO3- = H+ + CaCO3(aq),    Keq = 10^(-7.009)
# d)  Ca++ + HCO3- = CaHCO3+,           Keq = 10^(-0.653)
# e)  Ca++ = H+ + CaOh+,                Keq = 10^(-12.85)
# f)  - H+ = OH-,                       Keq = 10^(-13.991)
#
# Kinetic reactions
# g)  Ca++ + HCO3- = H+ + CaCO3(s),     A = 0.461 m^2/L, k = 6.456542e-2 mol/m^2 s,
#                                       Keq = 10^(1.8487)
#
# The primary chemical species are H+, HCO3- and Ca++.
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[Variables]
  [./ca++]
    initial_condition = 1.0e-5
  [../]
  [./h+]
    initial_condition = 1.0e-6
  [../]
  [./hco3-]
    initial_condition = 1.0e-5
  [../]
[]
[AuxVariables]
  [./caco3_s]
    initial_condition = 0.05
  [../]
  [./ph]
  [../]
[]
[AuxKernels]
  [./ph]
    type = PHAux
    h_conc = h+
    variable = ph
  [../]
[]
[ReactionNetwork]
  [./AqueousEquilibriumReactions]
    primary_species = 'ca++ hco3- h+'
    secondary_species = 'co2_aq co3-- caco3_aq cahco3+ caoh+ oh-'
    reactions = 'h+ + hco3- = co2_aq 6.3447,
                 hco3- - h+ = co3-- -10.3288,
                 ca++ + hco3- - h+ = caco3_aq -7.0017,
                 ca++ + hco3- = cahco3+ -1.0467,
                 ca++ - h+ = caoh+ -12.85,
                 - h+ = oh- -13.9951'
  [../]
  [./SolidKineticReactions]
    primary_species = 'ca++ hco3- h+'
    kin_reactions = 'ca++ + hco3- - h+ = caco3_s'
    secondary_species = caco3_s
    log10_keq = 1.8487
    reference_temperature = 298.15
    system_temperature = 298.15
    gas_constant = 8.314
    specific_reactive_surface_area = 0.1
    kinetic_rate_constant = 6.456542e-7
    activation_energy = 1.5e4
  [../]
[]
[Kernels]
  [./ca++_ie]
    type = PrimaryTimeDerivative
    variable = ca++
  [../]
  [./h+_ie]
    type = PrimaryTimeDerivative
    variable = h+
  [../]
  [./hco3-_ie]
    type = PrimaryTimeDerivative
    variable = hco3-
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'porosity diffusivity conductivity'
    prop_values = '0.25 1e-9 1.0'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  end_time = 100
  dt = 10
  nl_abs_tol = 1e-12
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Postprocessors]
  [./h+]
    type = ElementIntegralVariablePostprocessor
    variable = h+
    execute_on = 'initial timestep_end'
  [../]
  [./ca++]
    type = ElementIntegralVariablePostprocessor
    variable = ca++
    execute_on = 'initial timestep_end'
  [../]
  [./hco3-]
    type = ElementIntegralVariablePostprocessor
    variable = hco3-
    execute_on = 'initial timestep_end'
  [../]
  [./co2_aq]
    type = ElementIntegralVariablePostprocessor
    variable = co2_aq
    execute_on = 'initial timestep_end'
  [../]
  [./oh-]
    type = ElementIntegralVariablePostprocessor
    variable = oh-
    execute_on = 'initial timestep_end'
  [../]
  [./co3--]
    type = ElementIntegralVariablePostprocessor
    variable = co3--
    execute_on = 'initial timestep_end'
  [../]
  [./caco3_aq]
    type = ElementIntegralVariablePostprocessor
    variable = caco3_aq
    execute_on = 'initial timestep_end'
  [../]
  [./caco3_s]
    type = ElementIntegralVariablePostprocessor
    variable = caco3_s
    execute_on = 'initial timestep_end'
  [../]
  [./ph]
    type = ElementIntegralVariablePostprocessor
    variable = ph
    execute_on = 'initial timestep_end'
  [../]
  [./calcite_vf]
    type = TotalMineralVolumeFraction
    variable = caco3_s
    molar_volume = 36.934e-6
  [../]
[]
[Outputs]
  perf_graph = true
  csv = true
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/1species.i)
# Simple equilibrium reaction example to illustrate the use of the AqueousEquilibriumReactions
# action.
# In this example, a single primary species a is transported by diffusion and convection
# from the left of the porous medium, reacting to form an equilibrium species pa2 according to
# the equilibrium reaction specified in the AqueousEquilibriumReactions block as:
#
#  reactions = '2a = pa2 1'
#
# where the 2 is the weight of the equilibrium species, and the 1 refers to the equilibrium
# constant (log10(Keq) = 1).
#
# The AqueousEquilibriumReactions action creates all the required kernels and auxkernels
# to compute the reaction given by the above equilibrium reaction equation.
#
# Specifically, it adds to following:
# * An AuxVariable named 'pa2' (given in the reactions equations)
# * A AqueousEquilibriumRxnAux AuxKernel for this AuxVariable with all parameters
# * A CoupledBEEquilibriumSub Kernel for each primary species with all parameters
# * A CoupledDiffusionReactionSub Kernel for each primary species with all parameters
# * A CoupledConvectionReactionSub Kernel for each primary species with all parameters if
# pressure is a coupled variable
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 10
[]
[Variables]
  [./a]
    order = FIRST
    family = LAGRANGE
    [./InitialCondition]
      type = BoundingBoxIC
      x1 = 0.0
      y1 = 0.0
      x2 = 1e-2
      y2 = 1
      inside = 1.0e-2
      outside = 1.0e-10
      variable = a
    [../]
  [../]
[]
[AuxVariables]
  [./pressure]
    order = FIRST
    family = LAGRANGE
  [../]
[]
[ICs]
  [./pressure]
    type = FunctionIC
    variable = pressure
    function = 2-x
  [../]
[]
[ReactionNetwork]
  [./AqueousEquilibriumReactions]
    primary_species = a
    reactions = '2a = pa2 1'
    secondary_species = pa2
    pressure = pressure
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./a_diff]
    type = PrimaryDiffusion
    variable = a
  [../]
  [./a_conv]
    type = PrimaryConvection
    variable = a
    p = pressure
  [../]
[]
[BCs]
  [./a_right]
    type = ChemicalOutFlowBC
    variable = a
    boundary = right
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'diffusivity conductivity porosity'
    prop_values = '1e-4 1e-4 0.2'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  petsc_options_iname = '-pc_type -pc_hypre_type'
  petsc_options_value = 'hypre boomeramg'
  nl_abs_tol = 1e-12
  start_time = 0.0
  end_time = 100
  dt = 10.0
[]
[Outputs]
  file_base = 1species_out
  exodus = true
  perf_graph = true
  print_linear_residuals = true
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
(modules/chemical_reactions/test/tests/jacobian/2species_equilibrium_with_density.i)
# Tests the Jacobian when equilibrium secondary species are present including density
# in flux calculation
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 3
  ny = 3
[]
[Variables]
  [./a]
    order = FIRST
    family = LAGRANGE
  [../]
  [./b]
    order = FIRST
    family = LAGRANGE
  [../]
  [./pressure]
    order = FIRST
    family = LAGRANGE
  [../]
[]
[ICs]
  [./pressure]
    type = RandomIC
    variable = pressure
    max = 5
    min = 1
  [../]
  [./a]
    type = RandomIC
    variable = a
    max = 1
    min = 0
  [../]
  [./b]
    type = RandomIC
    variable = b
    max = 1
    min = 0
  [../]
[]
[ReactionNetwork]
  [./AqueousEquilibriumReactions]
    primary_species = 'a b'
    reactions = '2a = pa2     2
                 a + b = pab 2'
    secondary_species = 'pa2 pab'
    pressure = pressure
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./a_diff]
    type = PrimaryDiffusion
    variable = a
  [../]
  [./a_conv]
    type = PrimaryConvection
    variable = a
    p = pressure
    gravity = '0 -10 0'
  [../]
  [./b_ie]
    type = PrimaryTimeDerivative
    variable = b
  [../]
  [./b_diff]
    type = PrimaryDiffusion
    variable = b
  [../]
  [./b_conv]
    type = PrimaryConvection
    variable = b
    p = pressure
    gravity = '0 -10 0'
  [../]
  [./pressure]
    type = DarcyFluxPressure
    variable = pressure
    gravity = '0 -10 0'
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'diffusivity conductivity porosity density'
    prop_values = '1e-4 1e-4 0.2 10'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = NEWTON
  end_time = 1
[]
[Outputs]
  perf_graph = true
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
(modules/chemical_reactions/test/tests/solid_kinetics/2species_without_action.i)
# Simple reaction-diffusion example without using the action.
# In this example, two primary species a and b diffuse towards each other from
# opposite ends of a porous medium, reacting when they meet to form a mineral
# precipitate
# This simulation is identical to 2species.i, but explicitly includes the AuxVariables,
# AuxKernels, and Kernels that the action in 2species.i adds
[Mesh]
  type = GeneratedMesh
  dim = 2
  xmax = 1
  ymax = 1
  nx = 40
[]
[Variables]
  [./a]
    order = FIRST
    family = LAGRANGE
    initial_condition = 0
  [../]
  [./b]
    order = FIRST
    family = LAGRANGE
    initial_condition = 0
  [../]
[]
[AuxVariables]
  [./mineral]
  [../]
[]
[AuxKernels]
  [./mineral_conc]
    type = KineticDisPreConcAux
    variable = mineral
    e_act = 1.5e4
    r_area = 1
    log_k = -6
    ref_kconst = 1e-8
    gas_const = 8.314
    ref_temp = 298.15
    sys_temp = 298.15
    sto_v = '1 1'
    v = 'a b'
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./a_pd]
    type = PrimaryDiffusion
    variable = a
  [../]
  [./b_ie]
    type = PrimaryTimeDerivative
    variable = b
  [../]
  [./b_pd]
    type = PrimaryDiffusion
    variable = b
  [../]
  [./a_r]
    type = CoupledBEKinetic
    variable = a
    v = mineral
    weight = 1
  [../]
  [./b_r]
    type = CoupledBEKinetic
    variable = b
    v = mineral
    weight = 1
  [../]
[]
[BCs]
  [./a_left]
    type = DirichletBC
    variable = a
    preset = false
    boundary = left
    value = 1.0e-2
  [../]
  [./a_right]
    type = DirichletBC
    variable = a
    preset = false
    boundary = right
    value = 0
  [../]
  [./b_left]
    type = DirichletBC
    variable = b
    preset = false
    boundary = left
    value = 0
  [../]
  [./b_right]
    type = DirichletBC
    variable = b
    preset = false
    boundary = right
    value = 1.0e-2
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'diffusivity conductivity porosity'
    prop_values = '5e-4 4e-3 0.4'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  end_time = 50
  dt = 5
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Outputs]
  file_base = 2species_out
  exodus = true
  perf_graph = true
  print_linear_residuals = true
[]
(modules/chemical_reactions/test/tests/exceptions/extra_sto.i)
# Additional stoichiometric coefficient in AqueousEquilibriumRxnAux AuxKernel
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[Variables]
  [./a]
  [../]
  [./b]
  [../]
[]
[AuxVariables]
  [./c]
  [../]
  [./gamma_a]
  [../]
  [./gamma_b]
  [../]
[]
[AuxKernels]
  [./c]
    type = AqueousEquilibriumRxnAux
    variable = c
    v = 'a b'
    gamma_v = 'gamma_a gamma_b'
    sto_v = '1 2 3'
    log_k = 1
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./a_diff]
    type = PrimaryDiffusion
    variable = a
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = porosity
    prop_values = 0.2
  [../]
[]
[Executioner]
  type = Transient
  end_time = 1
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/water_dissociation.i)
# Dissociation of H2O at 25C
# The dissociation of water into H+ and OH- is given by
# the equilibrium reaction H20 = H+ + OH-
#
# This can be entered in the ReactionNetwork block using
# Aqueous equilibrium reaction: - H+ = OH-, Keq = 10^(-13.9951)
#
# Note that H2O does not need to be explicitly included.
#
# The primary chemical species is H+, and the secondary equilibrium
# species is OH-.
#
# The initial concentration of H+ is 10^-7, which is its value in neutral
# water. The pH of this water is therefore 7.
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[AuxVariables]
  [./ph]
  [../]
[]
[AuxKernels]
  [./ph]
    type = PHAux
    h_conc = h+
    variable = ph
  [../]
[]
[Variables]
  [./h+]
    initial_condition = 1.0e-7
  [../]
[]
[ReactionNetwork]
  [./AqueousEquilibriumReactions]
    primary_species = h+
    secondary_species = oh-
    reactions = '- h+ = oh- -13.9951'
  [../]
[]
[Kernels]
  [./h+_ie]
    type = PrimaryTimeDerivative
    variable = h+
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'diffusivity porosity conductivity'
    prop_values = '1e-7 0.25 1.0'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  end_time = 1
  nl_abs_tol = 1e-12
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Postprocessors]
  [./h+]
    type = ElementIntegralVariablePostprocessor
    variable = h+
    execute_on = 'initial timestep_end'
  [../]
  [./oh-]
    type = ElementIntegralVariablePostprocessor
    variable = oh-
    execute_on = 'initial timestep_end'
  [../]
  [./ph]
    type = ElementIntegralVariablePostprocessor
    variable = ph
    execute_on = 'initial timestep_end'
  [../]
[]
[Outputs]
  perf_graph = true
  csv = true
[]
(modules/chemical_reactions/test/tests/solid_kinetics/calcite_precipitation.i)
# Example of batch reaction of calcium (Ca++) and bicarbonate (HCO3-) precipitation
# to form calcite (CaCO3).
#
# The reaction network considered is as follows:
# Aqueous equilibrium reactions:
# a)  H+ + HCO3- = CO2(aq),             Keq = 10^(6.341)
# b)  HCO3- = H+ + CO3--,               Keq = 10^(-10.325)
# c)  Ca++ + HCO3- = H+ + CaCO3(aq),    Keq = 10^(-7.009)
# d)  Ca++ + HCO3- = CaHCO3+,           Keq = 10^(-0.653)
# e)  Ca++ = H+ + CaOh+,                Keq = 10^(-12.85)
# f)  - H+ = OH-,                       Keq = 10^(-13.991)
#
# Kinetic reactions
# g)  Ca++ + HCO3- = H+ + CaCO3(s),     A = 0.461 m^2/L, k = 6.456542e-2 mol/m^2 s,
#                                       Keq = 10^(1.8487)
#
# The primary chemical species are H+, HCO3- and Ca++.
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[Variables]
  [./ca++]
    initial_condition = 2.0e-2
  [../]
  [./h+]
    initial_condition = 1.0e-8
  [../]
  [./hco3-]
    initial_condition = 1.0e-2
  [../]
[]
[AuxVariables]
  [./caco3_s]
  [../]
  [./ph]
  [../]
[]
[AuxKernels]
  [./ph]
    type = PHAux
    h_conc = h+
    variable = ph
  [../]
[]
[ReactionNetwork]
  [./AqueousEquilibriumReactions]
    primary_species = 'ca++ hco3- h+'
    secondary_species = 'co2_aq co3-- caco3_aq cahco3+ caoh+ oh-'
    reactions = 'h+ + hco3- = co2_aq 6.3447,
                 hco3- - h+ = co3-- -10.3288,
                 ca++ + hco3- - h+ = caco3_aq -7.0017,
                 ca++ + hco3- = cahco3+ -1.0467,
                 ca++ - h+ = caoh+ -12.85,
                 - h+ = oh- -13.9951'
  [../]
  [./SolidKineticReactions]
    primary_species = 'ca++ hco3- h+'
    kin_reactions = 'ca++ + hco3- - h+ = caco3_s'
    secondary_species = caco3_s
    log10_keq = 1.8487
    reference_temperature = 298.15
    system_temperature = 298.15
    gas_constant = 8.314
    specific_reactive_surface_area = 0.1
    kinetic_rate_constant = 1e-6
    activation_energy = 1.5e4
  [../]
[]
[Kernels]
  [./ca++_ie]
    type = PrimaryTimeDerivative
    variable = ca++
  [../]
  [./h+_ie]
    type = PrimaryTimeDerivative
    variable = h+
  [../]
  [./hco3-_ie]
    type = PrimaryTimeDerivative
    variable = hco3-
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'porosity diffusivity conductivity'
    prop_values = '0.25 1e-9 1.0'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  end_time = 100
  dt = 10
  nl_abs_tol = 1e-12
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Postprocessors]
  [./h+]
    type = ElementIntegralVariablePostprocessor
    variable = h+
    execute_on = 'initial timestep_end'
  [../]
  [./ca++]
    type = ElementIntegralVariablePostprocessor
    variable = ca++
    execute_on = 'initial timestep_end'
  [../]
  [./hco3-]
    type = ElementIntegralVariablePostprocessor
    variable = hco3-
    execute_on = 'initial timestep_end'
  [../]
  [./co2_aq]
    type = ElementIntegralVariablePostprocessor
    variable = co2_aq
    execute_on = 'initial timestep_end'
  [../]
  [./oh-]
    type = ElementIntegralVariablePostprocessor
    variable = oh-
    execute_on = 'initial timestep_end'
  [../]
  [./co3--]
    type = ElementIntegralVariablePostprocessor
    variable = co3--
    execute_on = 'initial timestep_end'
  [../]
  [./caco3_aq]
    type = ElementIntegralVariablePostprocessor
    variable = caco3_aq
    execute_on = 'initial timestep_end'
  [../]
  [./caco3_s]
    type = ElementIntegralVariablePostprocessor
    variable = caco3_s
    execute_on = 'initial timestep_end'
  [../]
  [./ph]
    type = ElementIntegralVariablePostprocessor
    variable = ph
    execute_on = 'initial timestep_end'
  [../]
  [./calcite_vf]
    type = TotalMineralVolumeFraction
    variable = caco3_s
    molar_volume = 36.934e-6
  [../]
[]
[Outputs]
  perf_graph = true
  csv = true
[]
(modules/chemical_reactions/examples/calcium_bicarbonate/calcium_bicarbonate.i)
# Example of reactive transport model with precipitation and dissolution.
# Calcium (ca2) and bicarbonate (hco3) reaction to form calcite (CaCO3).
# Models bicarbonate injection following calcium injection, so that a
# moving reaction front forms a calcite precipitation zone. As the front moves,
# the upstream side of the front continues to form calcite via precipitation,
# while at the downstream side, dissolution of the solid calcite occurs.
#
# The reaction network considered is as follows:
# Aqueous equilibrium reactions:
# a)  h+ + hco3- = CO2(aq),             Keq = 10^(6.341)
# b)  hco3- = h+ + CO23-,               Keq = 10^(-10.325)
# c)  ca2+ + hco3- = h+ + CaCO3(aq),    Keq = 10^(-7.009)
# d)  ca2+ + hco3- = cahco3+,           Keq = 10^(-0.653)
# e)  ca2+ = h+ + CaOh+,                Keq = 10^(-12.85)
# f)  - h+ = oh-,                       Keq = 10^(-13.991)
#
# Kinetic reactions
# g)  ca2+ + hco3- = h+ + CaCO3(s),     A = 0.461 m^2/L, k = 6.456542e-2 mol/m^2 s,
#                                       Keq = 10^(1.8487)
#
# The primary chemical species are h+, hco3- and ca2+. The pressure gradient is fixed,
# and a conservative tracer is also included.
#
# This example is taken from:
# Guo et al, A parallel, fully coupled, fully implicit solution to reactive
# transport in porous media using the preconditioned Jacobian-Free Newton-Krylov
# Method, Advances in Water Resources, 53, 101-108 (2013).
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 100
  xmax = 1
  ymax = 0.25
[]
[Variables]
  [./tracer]
  [../]
  [./ca2+]
  [../]
  [./h+]
    initial_condition = 1.0e-7
    scaling = 1e6
  [../]
  [./hco3-]
  [../]
[]
[AuxVariables]
  [./pressure]
    order = FIRST
    family = LAGRANGE
  [../]
[]
[ICs]
  [./pressure_ic]
    type = FunctionIC
    variable = pressure
    function = pic
  [../]
  [./hco3_ic]
    type = BoundingBoxIC
    variable = hco3-
    x1 = 0.0
    y1 = 0.0
    x2 = 1.0e-10
    y2 = 0.25
    inside = 5.0e-2
    outside = 1.0e-6
  [../]
  [./ca2_ic]
    type = BoundingBoxIC
    variable = ca2+
    x1 = 0.0
    y1 = 0.0
    x2 = 1.0e-10
    y2 = 0.25
    inside = 1.0e-6
    outside = 5.0e-2
  [../]
  [./tracer_ic]
    type = BoundingBoxIC
    variable = tracer
    x1 = 0.0
    y1 = 0.0
    x2 = 1.0e-10
    y2 = 0.25
    inside = 1.0
    outside = 0.0
  [../]
[]
[Functions]
  [./pic]
    type = ParsedFunction
    expression = 60-50*x
  [../]
[]
[ReactionNetwork]
  [./AqueousEquilibriumReactions]
    primary_species = 'ca2+ hco3- h+'
    secondary_species = 'co2_aq co32- caco3_aq cahco3+ caoh+ oh-'
    pressure = pressure
    reactions = 'h+ + hco3- = co2_aq 6.341,
                 hco3- - h+ = co32- -10.325,
                 ca2+ + hco3- - h+ = caco3_aq -7.009,
                 ca2+ + hco3- = cahco3+ -0.653,
                 ca2+ - h+ = caoh+ -12.85,
                 - h+ = oh- -13.991'
  [../]
  [./SolidKineticReactions]
    primary_species = 'ca2+ hco3- h+'
    kin_reactions = 'ca2+ + hco3- - h+ = caco3_s'
    secondary_species = caco3_s
    log10_keq = 1.8487
    reference_temperature = 298.15
    system_temperature = 298.15
    gas_constant = 8.314
    specific_reactive_surface_area = 4.61e-4
    kinetic_rate_constant = 6.456542e-7
    activation_energy = 1.5e4
  [../]
[]
[Kernels]
  [./tracer_ie]
    type = PrimaryTimeDerivative
    variable = tracer
  [../]
  [./tracer_pd]
    type = PrimaryDiffusion
    variable = tracer
  [../]
  [./tracer_conv]
    type = PrimaryConvection
    variable = tracer
    p = pressure
  [../]
  [./ca2+_ie]
    type = PrimaryTimeDerivative
    variable = ca2+
  [../]
  [./ca2+_pd]
    type = PrimaryDiffusion
    variable = ca2+
  [../]
  [./ca2+_conv]
    type = PrimaryConvection
    variable = ca2+
    p = pressure
  [../]
  [./h+_ie]
    type = PrimaryTimeDerivative
    variable = h+
  [../]
  [./h+_pd]
    type = PrimaryDiffusion
    variable = h+
  [../]
  [./h+_conv]
    type = PrimaryConvection
    variable = h+
    p = pressure
  [../]
  [./hco3-_ie]
    type = PrimaryTimeDerivative
    variable = hco3-
  [../]
  [./hco3-_pd]
    type = PrimaryDiffusion
    variable = hco3-
  [../]
  [./hco3-_conv]
    type = PrimaryConvection
    variable = hco3-
    p = pressure
  [../]
[]
[BCs]
  [./tracer_left]
    type = DirichletBC
    variable = tracer
    boundary = left
    value = 1.0
  [../]
  [./tracer_right]
    type = ChemicalOutFlowBC
    variable = tracer
    boundary = right
  [../]
  [./ca2+_left]
    type = SinDirichletBC
    variable = ca2+
    boundary = left
    initial = 5.0e-2
    final = 1.0e-6
    duration = 1
  [../]
  [./ca2+_right]
    type = ChemicalOutFlowBC
    variable = ca2+
    boundary = right
  [../]
  [./hco3-_left]
    type = SinDirichletBC
    variable = hco3-
    boundary = left
    initial = 1.0e-6
    final = 5.0e-2
    duration = 1
  [../]
  [./hco3-_right]
    type = ChemicalOutFlowBC
    variable = hco3-
    boundary = right
  [../]
  [./h+_left]
    type = DirichletBC
    variable = h+
    boundary = left
    value = 1.0e-7
  [../]
  [./h+_right]
    type = ChemicalOutFlowBC
    variable = h+
    boundary = right
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'diffusivity conductivity porosity'
    prop_values = '1e-7 2e-4 0.2'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  l_max_its = 50
  l_tol = 1e-5
  nl_max_its = 10
  nl_rel_tol = 1e-5
  end_time = 10
  [./TimeStepper]
    type = ConstantDT
    dt = 0.1
  [../]
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Outputs]
  perf_graph = true
  exodus = true
[]
(modules/chemical_reactions/test/tests/kinetic_rate/arrhenius.i)
# Check the correct temperature dependence of the kinetic rate constant using
# the Arrhenius equation. Two kinetic reactions take place at different system
# temperatures. The Arrhenius equation states that the kinetic rate increases
# with temperature, so more mineral should be precipitated for the higher system
# temperature. In this case, the AuxVariables kinetic_rate1 and mineral1 should
# be larger than kinetic_rate0 and mineral0.
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[Variables]
  [./a0]
    initial_condition = 0.1
  [../]
  [./b0]
    initial_condition = 0.1
  [../]
  [./a1]
    initial_condition = 0.1
  [../]
  [./b1]
    initial_condition = 0.1
  [../]
[]
[AuxVariables]
  [./mineral0]
  [../]
  [./mineral1]
  [../]
  [./kinetic_rate0]
  [../]
  [./kinetic_rate1]
  [../]
[]
[AuxKernels]
  [./kinetic_rate0]
    type = KineticDisPreRateAux
    variable = kinetic_rate0
    e_act = 1.5e4
    r_area = 1
    log_k = -6
    ref_kconst = 1e-8
    gas_const = 8.31434
    ref_temp = 298.15
    sys_temp = 298.15
    sto_v = '1 1'
    v = 'a0 b0'
  [../]
  [./kinetic_rate1]
    type = KineticDisPreRateAux
    variable = kinetic_rate1
    e_act = 1.5e4
    r_area = 1
    log_k = -6
    ref_kconst = 1e-8
    gas_const = 8.31434
    ref_temp = 298.15
    sys_temp = 323.15
    sto_v = '1 1'
    v = 'a1 b1'
  [../]
  [./mineral0_conc]
    type = KineticDisPreConcAux
    variable = mineral0
    e_act = 1.5e4
    r_area = 1
    log_k = -6
    ref_kconst = 1e-8
    gas_const = 8.31434
    ref_temp = 298.15
    sys_temp = 298.15
    sto_v = '1 1'
    v = 'a0 b0'
  [../]
  [./mineral1_conc]
    type = KineticDisPreConcAux
    variable = mineral1
    e_act = 1.5e4
    r_area = 1
    log_k = -6
    ref_kconst = 1e-8
    gas_const = 8.31434
    ref_temp = 298.15
    sys_temp = 323.15
    sto_v = '1 1'
    v = 'a1 b1'
  [../]
[]
[Kernels]
  [./a0_ie]
    type = PrimaryTimeDerivative
    variable = a0
  [../]
  [./b0_ie]
    type = PrimaryTimeDerivative
    variable = b0
  [../]
  [./a0_r]
    type = CoupledBEKinetic
    variable = a0
    v = mineral0
    weight = 1
  [../]
  [./b0_r]
    type = CoupledBEKinetic
    variable = b0
    v = mineral0
    weight = 1
  [../]
  [./a1_ie]
    type = PrimaryTimeDerivative
    variable = a1
  [../]
  [./b1_ie]
    type = PrimaryTimeDerivative
    variable = b1
  [../]
  [./a1_r]
    type = CoupledBEKinetic
    variable = a1
    v = mineral1
    weight = 1
  [../]
  [./b1_r]
    type = CoupledBEKinetic
    variable = b1
    v = mineral1
    weight = 1
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = porosity
    prop_values = 0.2
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  end_time = 1
  dt = 1
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Outputs]
  exodus = true
  perf_graph = true
  print_linear_residuals = true
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_eqaux.i)
# In this example, two primary species a and b are transported by diffusion and convection
# from the left of the porous medium, reacting to form two equilibrium species pa2 and pab
# according to the equilibrium reaction specified in the AqueousEquilibriumReactions block as:
#
#      reactions = '2a = pa2     2
#                   a + b = pab -2'
#
# where the 2 is the weight of the equilibrium species, the 2 on the RHS of the first reaction
# refers to the equilibrium constant (log10(Keq) = 2), and the -2 on the RHS of the second
# reaction equates to log10(Keq) = -2.
#
# This example is identical to 2species.i, except that it explicitly includes all AuxKernels
# and Kernels that are set up by the action in 2species.i, and that the equilbrium constants
# are provided by AuxVariables
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 10
[]
[Variables]
  [./a]
    order = FIRST
    family = LAGRANGE
    [./InitialCondition]
      type = BoundingBoxIC
      x1 = 0.0
      y1 = 0.0
      x2 = 1.0e-10
      y2 = 1
      inside = 1.0e-2
      outside = 1.0e-10
    [../]
  [../]
  [./b]
    order = FIRST
    family = LAGRANGE
    [./InitialCondition]
      type = BoundingBoxIC
      x1 = 0.0
      y1 = 0.0
      x2 = 1.0e-10
      y2 = 1
      inside = 1.0e-2
      outside = 1.0e-10
    [../]
  [../]
[]
[AuxVariables]
  [./pressure]
    order = FIRST
    family = LAGRANGE
  [../]
  [./pa2]
  [../]
  [./pab]
  [../]
  [./pa2_logk]
    initial_condition = 2
  [../]
  [./pab_logk]
    initial_condition = -2
  [../]
[]
[AuxKernels]
  [./pa2eq]
    type = AqueousEquilibriumRxnAux
    variable = pa2
    v = a
    sto_v = 2
    log_k = pa2_logk
  [../]
  [./pabeq]
    type = AqueousEquilibriumRxnAux
    variable = pab
    v = 'a b'
    sto_v = '1 1'
    log_k = pab_logk
  [../]
[]
[ICs]
  [./pressure]
    type = FunctionIC
    variable = pressure
    function = 2-x
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./a_diff]
    type = PrimaryDiffusion
    variable = a
  [../]
  [./a_conv]
    type = PrimaryConvection
    variable = a
    p = pressure
  [../]
  [./b_ie]
    type = PrimaryTimeDerivative
    variable = b
  [../]
  [./b_diff]
    type = PrimaryDiffusion
    variable = b
  [../]
  [./b_conv]
    type = PrimaryConvection
    variable = b
    p = pressure
  [../]
  [./a1eq]
    type = CoupledBEEquilibriumSub
    variable = a
    log_k = pa2_logk
    weight = 2
    sto_u = 2
  [../]
  [./a1diff]
    type = CoupledDiffusionReactionSub
    variable = a
    log_k = pa2_logk
    weight = 2
    sto_u = 2
  [../]
  [./a1conv]
    type = CoupledConvectionReactionSub
    variable = a
    log_k = pa2_logk
    weight = 2
    sto_u = 2
    p = pressure
  [../]
  [./a2eq]
    type = CoupledBEEquilibriumSub
    variable = a
    v = b
    log_k = pab_logk
    weight = 1
    sto_v = 1
    sto_u = 1
  [../]
  [./a2diff]
    type = CoupledDiffusionReactionSub
    variable = a
    v = b
    log_k = pab_logk
    weight = 1
    sto_v = 1
    sto_u = 1
  [../]
  [./a2conv]
    type = CoupledConvectionReactionSub
    variable = a
    v = b
    log_k = pab_logk
    weight = 1
    sto_v = 1
    sto_u = 1
    p = pressure
  [../]
  [./b2eq]
    type = CoupledBEEquilibriumSub
    variable = b
    v = a
    log_k = pab_logk
    weight = 1
    sto_v = 1
    sto_u = 1
  [../]
  [./b2diff]
    type = CoupledDiffusionReactionSub
    variable = b
    v = a
    log_k = pab_logk
    weight = 1
    sto_v = 1
    sto_u = 1
  [../]
  [./b2conv]
    type = CoupledConvectionReactionSub
    variable = b
    v = a
    log_k = pab_logk
    weight = 1
    sto_v = 1
    sto_u = 1
    p = pressure
  [../]
[]
[BCs]
  [./a_left]
    type = DirichletBC
    variable = a
    boundary = left
    value = 1.0e-2
  [../]
  [./a_right]
    type = ChemicalOutFlowBC
    variable = a
    boundary = right
  [../]
  [./b_left]
    type = DirichletBC
    variable = b
    boundary = left
    value = 1.0e-2
  [../]
  [./b_right]
    type = ChemicalOutFlowBC
    variable = b
    boundary = right
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'diffusivity conductivity porosity'
    prop_values = '1e-4 1e-4 0.2'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  petsc_options_iname = '-pc_type -pc_hypre_type'
  petsc_options_value = 'hypre boomeramg'
  nl_abs_tol = 1e-12
  start_time = 0.0
  end_time = 100
  dt = 10.0
[]
[Outputs]
  file_base = 2species_out
  exodus = true
  perf_graph = true
  print_linear_residuals = true
  hide = 'pa2_logk pab_logk'
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
(modules/chemical_reactions/test/tests/parser/equilibrium_without_action.i)
# Test AqueousEquilibriumReactions parser
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[Variables]
  [./a]
  [../]
  [./b]
  [../]
[]
[AuxVariables]
  [./pressure]
  [../]
  [./pa2]
  [../]
  [./pab]
  [../]
[]
[AuxKernels]
  [./pa2]
    type = AqueousEquilibriumRxnAux
    variable = pa2
    v = a
    log_k = 2
    sto_v = 2
  [../]
  [./pab]
    type = AqueousEquilibriumRxnAux
    variable = pab
    v = 'a b'
    log_k = -2
    sto_v = '1 1'
  [../]
[]
[ICs]
  [./a]
    type = BoundingBoxIC
    variable = a
    x1 = 0.0
    y1 = 0.0
    x2 = 1.0e-10
    y2 = 1
    inside = 1.0e-2
    outside = 1.0e-10
  [../]
  [./b]
    type = BoundingBoxIC
    variable = b
    x1 = 0.0
    y1 = 0.0
    x2 = 1.0e-10
    y2 = 1
    inside = 1.0e-2
    outside = 1.0e-10
  [../]
  [./pressure]
    type = FunctionIC
    variable = pressure
    function = 2-x
  [../]
[]
[Kernels]
  [./a_ie]
    type = PrimaryTimeDerivative
    variable = a
  [../]
  [./a_diff]
    type = PrimaryDiffusion
    variable = a
  [../]
  [./a_conv]
    type = PrimaryConvection
    variable = a
    p = pressure
  [../]
  [./b_ie]
    type = PrimaryTimeDerivative
    variable = b
  [../]
  [./b_diff]
    type = PrimaryDiffusion
    variable = b
  [../]
  [./b_conv]
    type = PrimaryConvection
    variable = b
    p = pressure
  [../]
  [./a1_eq]
    type = CoupledBEEquilibriumSub
    variable = a
    log_k = 2
    weight = 2
    sto_u = 2
  [../]
  [./a1_diff]
    type = CoupledDiffusionReactionSub
    variable = a
    log_k = 2
    weight = 2
    sto_u = 2
  [../]
  [./a1_conv]
    type = CoupledConvectionReactionSub
    variable = a
    log_k = 2
    weight = 2
    sto_u = 2
    p = pressure
  [../]
  [./a2_eq]
    type = CoupledBEEquilibriumSub
    variable = a
    v = b
    log_k = -2
    weight = 1
    sto_v = 1
    sto_u = 1
  [../]
  [./a2_diff]
    type = CoupledDiffusionReactionSub
    variable = a
    v = b
    log_k = -2
    weight = 1
    sto_v = 1
    sto_u = 1
  [../]
  [./a2_conv]
    type = CoupledConvectionReactionSub
    variable = a
    v = b
    log_k = -2
    weight = 1
    sto_v = 1
    sto_u = 1
    p = pressure
  [../]
  [./b2_eq]
    type = CoupledBEEquilibriumSub
    variable = b
    v = a
    log_k = -2
    weight = 1
    sto_v = 1
    sto_u = 1
  [../]
  [./b2_diff]
    type = CoupledDiffusionReactionSub
    variable = b
    v = a
    log_k = -2
    weight = 1
    sto_v = 1
    sto_u = 1
  [../]
  [./b2_conv]
    type = CoupledConvectionReactionSub
    variable = b
    v = a
    log_k = -2
    weight = 1
    sto_v = 1
    sto_u = 1
    p = pressure
  [../]
[]
[BCs]
  [./a_left]
    type = DirichletBC
    variable = a
    boundary = left
    value = 1.0e-2
  [../]
  [./a_right]
    type = ChemicalOutFlowBC
    variable = a
    boundary = right
  [../]
  [./b_left]
    type = DirichletBC
    variable = b
    boundary = left
    value = 1.0e-2
  [../]
  [./b_right]
    type = ChemicalOutFlowBC
    variable = b
    boundary = right
  [../]
[]
[Materials]
  [./porous]
    type = GenericConstantMaterial
    prop_names = 'diffusivity conductivity porosity'
    prop_values = '1e-4 1e-4 0.2'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  nl_abs_tol = 1e-12
  end_time = 10
  dt = 10
[]
[Outputs]
  file_base = equilibrium_out
  exodus = true
  perf_graph = true
  print_linear_residuals = true
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]