- basis_speciesA list of basis components relevant to the aqueous-equilibrium problem. H2O must appear first in this list. These components must be chosen from the 'basis species' in the database, the sorbing sites (if any) and the decoupled redox states that are in disequilibrium (if any).
C++ Type:std::vector<std::string>
Controllable:No
Description:A list of basis components relevant to the aqueous-equilibrium problem. H2O must appear first in this list. These components must be chosen from the 'basis species' in the database, the sorbing sites (if any) and the decoupled redox states that are in disequilibrium (if any).
- database_fileThe name of the geochemical database file
C++ Type:FileName
Controllable:No
Description:The name of the geochemical database file
GeochemicalModelDefinition
Defines the geochemical system. This extracts information from the geochemistry database and stores information pertinent to the model in computationally-efficient data structures, eliminating all extraneous information.
All geochemistry
models must contain a GeochemicalModelDefinition
userobject
This userobject extensively uses utils/PertinentGeochemicalSystem
, and it is useful to fully discuss the input parameters of this class.
basis_species
This is a list of basis components relevant to the aqueous equilibrium problem. The following requirements must be satisfied (otherwise a mooseError is produced and the simulation stops):
"H2O" must appear first in this list;
No member must appear more than once in this list;
These components must be chosen from the "basis species" in the database, the sorbing sites (if any) and the decoupled redox states that are in disequilibrium (if any).
Any redox pair that is not in this list or the kinetic_redox
list, will be assumed to be at equilibrium with the aqueous solution and will be considered a secondary species.
All these species, except H2O, may be later swapped out of this list, either by a manual user-prescribed swap (and replaced by a mineral or a gas of fixed fugacity, for instance), or during the numerical solve. For simple examples of this swap, see GeochemicalModelInterrogator
minerals
This list contains the minerals that are in equilibrium with the aqueous solution. Conditions on the members of this list are:
They must be "minerals" in the database;
No member can appear more than once in this list;
Their equilibrium reaction must consist of only the
basis_species
, and secondary species and non-kinetically-controlled redox couples that can be expressed in terms of the basis_species;If they are also "sorbing minerals" in the database then their sorption sites must consist of the basis_species only.
During simulation, the user can compute the saturation index of these minerals.
These minerals can be swapped into the basis if desired (or required during the numerical solve). For simple examples of this swap, see GeochemicalModelInterrogator. If the user performs a manual "swap" then an initial condition must be provided for the mineral.
The user chooses whether these minerals are allowed to precipitate or not — that is, they can be "suppressed".
This list, along with the kinetic_minerals list, comprises the entire list of minerals in the problem: all others are eliminated from consideration.
gases
This is a list of gases that are in equilibrium with the aqueous solution and can have their fugacities fixed, at least at some time and spatial location.
All members of this list must be a "gas" in the database file.
No gas must appear more than once in this list.
The equilibrium reaction of each gas must involve only the basis_species, or secondary species or non-kinetically-controlled redox couples that can be expressed in terms of the basis_species.
This list comprises all the gases that are in the simulation: all others are eliminated.
kinetic_minerals
This is a list of minerals that whose dynamics are governed by a rate law. These are not in equilibrium with the aqueous solution.
The list can only include the "minerals" in the database file.
No member can appear more than once in this list.
The equilibrium reaction of each mineral must involve only the basis_species, or secondary species or non-kinetically-controlled redox couples that can be expressed in terms of the basis_species.
If a mineral is also a "sorbing mineral" in the database then their sorption sites must consist of the basis_speices only.
No members of this list must be in the minerals list.
These minerals can never be swapped into the basis, nor can they be "suppressed".
kinetic_redox
This is a list of redox pairs that whose dynamics are governed by a rate law. These are not in equilibrium with the aqueous solution.
The list can only include the "redox couples" in the database file.
No member can appear more than once in this list.
The equilibrium reaction of each member must involve only the basis_species, or secondary species or non-kinetically-controlled redox couples that can be expressed in terms of the basis_species.
No members of this list must be in the basis_species list.
These species can never be swapped into the basis.
kinetic_surface_species
This is a list of surface sorbing species that whose dynamics are governed by a rate law. These are not in equilibrium with the aqueous solution.
The list can only include the "surface species" in the database file.
No member can appear more than once in this list.
The equilibrium reaction of each member must involve only the basis_species, or secondary species or non-kinetically-controlled redox couples that can be expressed in terms of the basis_species.
These species can never be swapped into the basis.
kinetic_rate_descriptions
A list of GeochemistryKineticRate user objects that define the kinetic rates for the kinetic species should be supplied. If a kinetic species has no rate prescribed then its reaction rate will be zero. Multiple GeochemistryKineticRate user objects can apply to a single kinetic species: in this case the sum of all the rates defines the overall reaction rate for the kinetic species.
Secondary species
The complete list of secondary species is automatically computed based on the above information using the following algorithm:
All "redox couples" in the database are queried one-by-one, and included if:
they are not part of the
kinetic_redox
list; andthey are not part of the
basis_species
list; andtheir reaction involves only basis_species or secondary species already encountered. This means redox couples whose reactions involve already-encountered redox couples can be included in the secondary species' list.
All secondary species in the database are queried one-by-one, and included if:
their reaction involves basis_species, or secondary species already encountered.
All surface species in the database are queried one-by-one, and included if:
they are not in the kinetic_surface_species list; and
their reaction involves only basis_species or secondary species encountered so far
The resulting list contains only species whose equilibrium reactions can ultimately be expressed in terms of basis species. Once this list is created, the equilibrium reactions for the minerals, gases, kinetic_redox and kinetic_surface_species can also be checked that they can be ultimately expressed in terms of basis species as specified above in the conditions "the equilibrium reaction of each member must involve only the basis_species, or secondary species or non-kinetically-controlled redox couples that can be expressed in terms of the basis_species."
Creating the pertinent model
All the aforementioned species are included in the "pertinent model" created by this class, including their names, charges, molecular weights, ionic radii, molecular volumes, stoichiometric coefficients and equilibrium constants.
Executing
All computations in this Userobject are performed in its constructor during initial setup. During simulation, this Userobject does nothing.
Example
An example that simply outputs equilibrium reactions involving the clinoptilolite mineral 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)Input Parameters
- equilibrium_gasesA list of gases that are in equilibrium with the aqueous solution and can have their fugacities fixed, at least for some time and spatial location. All members of this list must be in the 'gas' section of the database file
C++ Type:std::vector<std::string>
Controllable:No
Description:A list of gases that are in equilibrium with the aqueous solution and can have their fugacities fixed, at least for some time and spatial location. All members of this list must be in the 'gas' section of the database file
- equilibrium_mineralsA list of minerals that are in equilibrium with the aqueous solution. All members of this list must be in the 'minerals' section of the database file
C++ Type:std::vector<std::string>
Controllable:No
Description:A list of minerals that are in equilibrium with the aqueous solution. All members of this list must be in the 'minerals' section of the database file
- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Options:FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
- kinetic_mineralsA list of minerals whose dynamics are governed by a rate law. These are not in equilibrium with the aqueous solution. All members of this list must be in the 'minerals' section of the database file.
C++ Type:std::vector<std::string>
Controllable:No
Description:A list of minerals whose dynamics are governed by a rate law. These are not in equilibrium with the aqueous solution. All members of this list must be in the 'minerals' section of the database file.
- kinetic_rate_descriptionsA list of GeochemistryKineticRate UserObject names that define the kinetic rates. If a kinetic species has no rate prescribed to it, its reaction rate will be zero
C++ Type:std::vector<UserObjectName>
Controllable:No
Description:A list of GeochemistryKineticRate UserObject names that define the kinetic rates. If a kinetic species has no rate prescribed to it, its reaction rate will be zero
- kinetic_redoxA list alternative oxidation states (eg Fe+++) whose dynamics are governed by a rate law. These are not in equilibrium with the aqueous solution. All members of this list must be in the 'redox couples' section of the database file.
C++ Type:std::vector<std::string>
Controllable:No
Description:A list alternative oxidation states (eg Fe+++) whose dynamics are governed by a rate law. These are not in equilibrium with the aqueous solution. All members of this list must be in the 'redox couples' section of the database file.
- kinetic_surface_speciesA list surface sorbing species whose dynamics are governed by a rate law. These are not in equilibrium with the aqueous solution. All members of this list must be in the 'surface species' section of the database file.
C++ Type:std::vector<std::string>
Controllable:No
Description:A list surface sorbing species whose dynamics are governed by a rate law. These are not in equilibrium with the aqueous solution. All members of this list must be in the 'surface species' section of the database file.
- piecewise_linear_interpolationFalseIf true then use a piecewise-linear interpolation of logK and Debye-Huckel parameters, regardless of the interpolation type specified in the database file. This can be useful for comparing with results using other geochemistry software
Default:False
C++ Type:bool
Controllable:No
Description:If true then use a piecewise-linear interpolation of logK and Debye-Huckel parameters, regardless of the interpolation type specified in the database file. This can be useful for comparing with results using other geochemistry software
- 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
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.
- redox_electrone-The name of the free electron. For redox pairs that are in disequilibrium to be correctly recorded, and hence their Nernst potentials to be computed eqsily, the equilibrium reaction for redox_electron must involve redox_oxygen, and the basis species must be chosen to that redox_electron is an equilibrium species
Default:e-
C++ Type:std::string
Controllable:No
Description:The name of the free electron. For redox pairs that are in disequilibrium to be correctly recorded, and hence their Nernst potentials to be computed eqsily, the equilibrium reaction for redox_electron must involve redox_oxygen, and the basis species must be chosen to that redox_electron is an equilibrium species
- redox_oxygenO2(aq)The name of the oxygen species that appears in redox reactions. For redox pairs that are in disequilibrium to be correctly recorded, and hence their Nernst potentials to be computed easily, redox_oxygen must be a basis species and it must appear in the reaction for each redox pair
Default:O2(aq)
C++ Type:std::string
Controllable:No
Description:The name of the oxygen species that appears in redox reactions. For redox pairs that are in disequilibrium to be correctly recorded, and hence their Nernst potentials to be computed easily, redox_oxygen must be a basis species and it must appear in the reaction for each redox pair
- reexpress_free_electronTrueIf true then if: (1) the 'free electron' appears in the database file; and (2) its equilibrium reaction includes O2(g); and (3) O2(g) is a gas; and (4) O2(g)'s equilibrium reaction is O2(g)=O2(eq); and (5) O2(aq) exists as a basis species in the database file; then reexpress the free electron's equilibrium reaction in terms of O2(aq). Note that if you choose 'reexpress_free_electron=false' and these other 5 conditions are true, then the 'free electron' will not be available as a secondary species
Default:True
C++ Type:bool
Controllable:No
Description:If true then if: (1) the 'free electron' appears in the database file; and (2) its equilibrium reaction includes O2(g); and (3) O2(g) is a gas; and (4) O2(g)'s equilibrium reaction is O2(g)=O2(eq); and (5) O2(aq) exists as a basis species in the database file; then reexpress the free electron's equilibrium reaction in terms of O2(aq). Note that if you choose 'reexpress_free_electron=false' and these other 5 conditions are true, then the 'free electron' will not be available as a secondary species
- remove_all_extrapolated_secondary_speciesFalseAfter reading the database file, immediately remove all secondary species that have extrapolated equilibrium constants. Sometimes these extrapolations are completely crazy and those secondary species greatly impact the results
Default:False
C++ Type:bool
Controllable:No
Description:After reading the database file, immediately remove all secondary species that have extrapolated equilibrium constants. Sometimes these extrapolations are completely crazy and those secondary species greatly impact the results
- 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.
Optional Parameters
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- 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.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
- 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
Input Files
- (modules/geochemistry/test/tests/kinetics/bio_sulfate_0.i)
- (modules/geochemistry/test/tests/kinetics/kinetic_albite.i)
- (modules/geochemistry/test/tests/geochemistry_quantity_aux/except4.i)
- (modules/geochemistry/test/tests/equilibrium_models/red_sea_precip.i)
- (modules/geochemistry/test/tests/geochemistry_quantity_aux/bulk_moles.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/except3.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/except1.i)
- (modules/geochemistry/test/tests/interrogate_reactions/muscovite.i)
- (modules/geochemistry/test/tests/geochemistry_quantity_aux/temperature.i)
- (modules/geochemistry/test/tests/geochemistry_quantity_aux/free_cm3.i)
- (modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/aquifer_geochemistry.i)
- (modules/geochemistry/test/tests/equilibrium_models/seawater_precip.i)
- (modules/geochemistry/test/tests/kinetics/bio_arsenate0.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/dissolution_pyrite_2.i)
- (modules/geochemistry/test/tests/geochemistry_quantity_aux/surface_charge.i)
- (modules/geochemistry/test/tests/spatial_reactor/spatial_6.i)
- (modules/geochemistry/test/tests/kinetics/bio_arsenate1.i)
- (modules/geochemistry/test/tests/geochemistry_quantity_aux/except3.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/simple.i)
- (modules/geochemistry/test/tests/equilibrium_models/HCl_no_action.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/flushing_case3.i)
- (modules/geochemistry/test/tests/redox_disequilibrium/morro_disequilibrium.i)
- (modules/combined/examples/geochem-porous_flow/forge/natural_reservoir.i)
- (modules/combined/examples/geochem-porous_flow/geotes_2D/aquifer_un_quartz_geochemistry.i)
- (modules/geochemistry/test/tests/kinetics/bio_sulfate_2.i)
- (modules/combined/examples/geochem-porous_flow/forge/reservoir_and_water_3.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/seawater_evaporation_no_flow_through.i)
- (modules/combined/examples/geochem-porous_flow/geotes_2D/exchanger.i)
- (modules/geochemistry/test/tests/geochemistry_quantity_aux/neglog10a.i)
- (modules/combined/examples/geochem-porous_flow/forge/water_60_to_220degC.i)
- (modules/geochemistry/test/tests/spatial_reactor/except6.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/except6.i)
- (modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/eqm_model_25_to_92degC.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/seawater_evaporation_flow_through.i)
- (modules/combined/examples/geochem-porous_flow/geotes_2D/exchanger_un_quartz.i)
- (modules/combined/examples/geochem-porous_flow/forge/aquifer_geochemistry.i)
- (modules/geochemistry/test/tests/geochemistry_quantity_aux/except5.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/changing_pH_ferric_hydroxide.i)
- (modules/geochemistry/test/tests/spatial_reactor/spatial_3.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/except4.i)
- (modules/geochemistry/test/tests/equilibrium_models/amazon_with_minerals.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/except5.i)
- (modules/geochemistry/test/tests/spatial_reactor/spatial_5.i)
- (modules/geochemistry/test/tests/geochemistry_console_output/console.i)
- (modules/geochemistry/test/tests/equilibrium_models/bulk_constraints.i)
- (modules/geochemistry/test/tests/spatial_reactor/except3.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/calcite_dumping.i)
- (modules/geochemistry/test/tests/spatial_reactor/except5.i)
- (modules/geochemistry/test/tests/geochemistry_quantity_aux/surface_potential.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/simple_no_action.i)
- (modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/eqm_model_25degC_no_precip.i)
- (modules/geochemistry/test/tests/geochemistry_quantity_aux/mg_per_kg.i)
- (modules/geochemistry/test/tests/solubilities_and_activities/gypsum_solubility.i)
- (modules/geochemistry/test/tests/kinetics/quartz_dissolution.i)
- (modules/geochemistry/test/tests/geochemistry_quantity_aux/kinetic_moles.i)
- (modules/geochemistry/test/tests/spatial_reactor/spatial_8.i)
- (modules/combined/examples/geochem-porous_flow/forge/water_60degC.i)
- (modules/geochemistry/test/tests/interrogate_reactions/clinoptilolite2.i)
- (modules/geochemistry/test/tests/sorption_and_surface_complexation/ferric_hydroxide.i)
- (modules/combined/examples/geochem-porous_flow/geotes_2D/aquifer_equilibrium.i)
- (modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/exchanger.i)
- (modules/geochemistry/test/tests/spatial_reactor/spatial_2.i)
- (modules/geochemistry/test/tests/geochemistry_quantity_aux/molal.i)
- (modules/geochemistry/test/tests/sorption_and_surface_complexation/selenate.i)
- (modules/geochemistry/test/tests/interrogate_reactions/muscovite2.i)
- (modules/combined/examples/geochem-porous_flow/forge/kinetic.i)
- (modules/geochemistry/test/tests/equilibrium_models/red_sea_no_precip.i)
- (modules/geochemistry/test/tests/geochemistry_quantity_aux/kinetic_rate.i)
- (modules/geochemistry/test/tests/spatial_reactor/spatial_1.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/flushing_equilibrium_at70degC.i)
- (modules/geochemistry/test/tests/spatial_reactor/except2.i)
- (modules/geochemistry/test/tests/spatial_reactor/except1.i)
- (modules/geochemistry/test/tests/redox_disequilibrium/morro.i)
- (modules/geochemistry/test/tests/equilibrium_models/amazon.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/flushing_case1.i)
- (modules/geochemistry/test/tests/spatial_reactor/spatial_4.i)
- (modules/geochemistry/test/tests/spatial_reactor/except4.i)
- (modules/geochemistry/test/tests/interrogate_reactions/pyrite.i)
- (modules/geochemistry/test/tests/equilibrium_models/seawater_no_precip.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/flushing.i)
- (modules/geochemistry/test/tests/equilibrium_models/HCl.i)
- (modules/geochemistry/test/tests/geochemistry_quantity_aux/except1.i)
- (modules/combined/examples/geochem-porous_flow/geotes_2D/aquifer_un_quartz_equilibrium.i)
- (modules/geochemistry/test/tests/spatial_reactor/spatial_7.i)
- (modules/geochemistry/test/tests/kinetics/quartz_equilibrium_at300degC.i)
- (modules/geochemistry/test/tests/solubilities_and_activities/sebkhat_el_melah.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/add_feldspar.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/changing_fugacity_calcite.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/dissolution_pyrite_1.i)
- (modules/combined/examples/geochem-porous_flow/forge/water_3.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/mixing.i)
- (modules/geochemistry/test/tests/kinetics/bio_sulfate_1.i)
- (modules/geochemistry/test/tests/spatial_reactor/spatial_1_console.i)
- (modules/geochemistry/test/tests/interrogate_reactions/hematite.i)
- (modules/geochemistry/test/tests/kinetics/bio_zoning_conc.i)
- (modules/geochemistry/test/tests/kinetics/bio_death.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/except2.i)
- (modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/scaling.i)
- (modules/geochemistry/test/tests/equilibrium_models/ph_constraint.i)
- (modules/geochemistry/test/tests/geochemistry_quantity_aux/except2.i)
- (modules/combined/examples/geochem-porous_flow/geotes_2D/aquifer_geochemistry.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/flushing_case2.i)
- (modules/geochemistry/test/tests/interrogate_reactions/gypsum.i)
- (modules/geochemistry/test/tests/redox_disequilibrium/microbial.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/cooling.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/mixing_seawater_step1.i)
- (modules/geochemistry/test/tests/geochemistry_quantity_aux/free_mg.i)
- (modules/geochemistry/test/tests/interrogate_reactions/clinoptilolite.i)
- (modules/geochemistry/test/tests/geochemistry_quantity_aux/activity.i)
- (modules/geochemistry/test/tests/interrogate_reactions/invalid_swap.i)
- (modules/geochemistry/test/tests/kinetics/quartz_deposition.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/mixing_seawater_step2.i)
- (modules/geochemistry/test/tests/time_dependent_reactions/add_NaCl.i)
(modules/geochemistry/test/tests/interrogate_reactions/clinoptilolite.i)
# 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/kinetics/bio_sulfate_0.i)
# The purpose of this is to find the equilibrium constants in the equations
# CH3COO- + SO4-- = 2HCO3- + HS-
# CH3COO- + H2O = CH4(aq) + HCO3-
# Results:
# T=0
# CH3COO- = 2*HCO3- - 1*SO4-- + 1*HS- . log10(K) = 8.502
# CH3COO- = -1*H2O + 1*HCO3- + 1*CH4(aq) . log10(K) = 2.727
# T=25
# CH3COO- = 2*HCO3- - 1*SO4-- + 1*HS- . log10(K) = 8.404
# CH3COO- = -1*H2O + 1*HCO3- + 1*CH4(aq) . log10(K) = 2.641
# T=60
# CH3COO- = 2*HCO3- - 1*SO4-- + 1*HS- . log10(K) = 8.451
# CH3COO- = -1*H2O + 1*HCO3- + 1*CH4(aq) . log10(K) = 2.699
# T=100
# CH3COO- = 2*HCO3- - 1*SO4-- + 1*HS- . log10(K) = 8.657
# CH3COO- = -1*H2O + 1*HCO3- + 1*CH4(aq) . log10(K) = 2.933
# T=150
# CH3COO- = 2*HCO3- - 1*SO4-- + 1*HS- . log10(K) = 9.023
# CH3COO- = -1*H2O + 1*HCO3- + 1*CH4(aq) . log10(K) = 3.28
# T=200
# CH3COO- = 2*HCO3- - 1*SO4-- + 1*HS- . log10(K) = 9.457
# CH3COO- = -1*H2O + 1*HCO3- + 1*CH4(aq) . log10(K) = 3.788
# T=250
# CH3COO- = 2*HCO3- - 1*SO4-- + 1*HS- . log10(K) = 9.917
# CH3COO- = -1*H2O + 1*HCO3- + 1*CH4(aq) . log10(K) = 4.336
# T=300
# CH3COO- = 2*HCO3- - 1*SO4-- + 1*HS- . log10(K) = 10.31
# CH3COO- = -1*H2O + 1*HCO3- + 1*CH4(aq) . log10(K) = 4.789
[GeochemicalModelInterrogator]
model_definition = definition
swap_out_of_basis = 'O2(aq) HS-'
swap_into_basis = 'HS- CH4(aq)'
temperature = 300.0
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O HCO3- SO4-- H+ O2(aq)"
piecewise_linear_interpolation = true
[]
[]
(modules/geochemistry/test/tests/kinetics/kinetic_albite.i)
# Example of kinetically-controlled dissolution of albite into an acidic solution
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl- Na+ SiO2(aq) Al+++"
constraint_value = " 1.0 -1.5 0.1 0.1 1E-6 1E-6"
constraint_meaning = "kg_solvent_water log10activity bulk_composition bulk_composition free_concentration free_concentration"
constraint_unit = " kg dimensionless moles moles molal molal"
initial_temperature = 70.0
temperature = 70.0
kinetic_species_name = Albite
kinetic_species_initial_value = 250
kinetic_species_unit = g
evaluate_kinetic_rates_always = true # implicit time-marching used for stability
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
execute_console_output_on = '' # only CSV output for this example
[]
[UserObjects]
[rate_albite]
type = GeochemistryKineticRate
kinetic_species_name = Albite
intrinsic_rate_constant = 5.4432E-8 # 6.3E-13mol/s/cm^2 = 5.4432E-8mol/day/cm^2
multiply_by_mass = true
area_quantity = 1000
promoting_species_names = "H+"
promoting_indices = "1.0"
[]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- Na+ SiO2(aq) Al+++"
kinetic_minerals = "Albite"
kinetic_rate_descriptions = "rate_albite"
[]
[]
[Executioner]
type = Transient
dt = 5
end_time = 30 # measured in days
[]
[AuxVariables]
[mole_change_albite]
[]
[]
[AuxKernels]
[mole_change_albite]
type = ParsedAux
coupled_variables = moles_Albite
expression = 'moles_Albite - 0.953387'
variable = mole_change_albite
[]
[]
[Postprocessors]
[mole_change_Albite]
type = PointValue
point = '0 0 0'
variable = "mole_change_albite"
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/geochemistry_quantity_aux/except4.i)
#Exception test: inappropriate quantity
[TimeIndependentReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl- Fe+++"
constraint_value = " 1.0 1.0 1.0 1.0"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition bulk_composition"
constraint_unit = "kg moles moles moles"
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Cl- Fe+++"
equilibrium_minerals = "Fe(OH)3(ppd)_nosorb"
[]
[]
[AuxVariables]
[error]
[]
[]
[AuxKernels]
[error]
type = GeochemistryQuantityAux
species = "Fe(OH)3(ppd)_nosorb"
reactor = geochemistry_reactor
variable = error
quantity = surface_charge
[]
[]
(modules/geochemistry/test/tests/equilibrium_models/red_sea_precip.i)
# Time-independent model of water from the Red Sea including precipitation
[TimeIndependentReactionSolver]
model_definition = definition
swap_out_of_basis = "O2(aq) Ba++"
swap_into_basis = "Sphalerite Barite"
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Na+ K+ Mg++ Ca++ Cl- SO4-- HCO3- Cu+ F- Fe++ Pb++ Zn++ Sphalerite Barite"
constraint_value = " 1.0 -5.6 5.42 0.0643 0.0423 0.173 5.89 0.0118 0.00309 5.50E-06 0.000354 0.00195 4.09E-06 0.000111 5.87E-8 9.772E-6"
constraint_meaning = "kg_solvent_water log10activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = " kg dimensionless moles moles moles moles moles moles moles moles moles moles moles moles moles moles"
ramp_max_ionic_strength_initial = 0
temperature = 60
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
mol_cutoff = 1E-7
abs_tol = 1E-12
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Na+ K+ Mg++ Ca++ Cl- SO4-- HCO3- Cu+ F- Fe++ Pb++ Zn++ O2(aq) Ba++"
equilibrium_minerals = "Sphalerite Barite Fluorite Chalcocite Bornite Chalcopyrite Pyrite Galena Covellite"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
(modules/geochemistry/test/tests/geochemistry_quantity_aux/bulk_moles.i)
#Extract bulk moles
[TimeIndependentReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 1.0 1.0E-2 1.0E-2"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition"
constraint_unit = "kg moles moles"
ramp_max_ionic_strength_initial = 0
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Cl-"
[]
[]
[AuxVariables]
[the_aux]
[]
[]
[AuxKernels]
[the_aux]
type = GeochemistryQuantityAux
species = 'Cl-'
reactor = geochemistry_reactor
variable = the_aux
quantity = bulk_moles
[]
[]
[Postprocessors]
[value]
type = PointValue
point = '0 0 0'
variable = the_aux
[]
[value_from_action]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_Cl-"
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/time_dependent_reactions/except3.i)
#Exception: bad fixed-activity name
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Na+ K+ Ca++ Mg++ Al+++ SiO2(aq) Cl- SO4-- HCO3-"
constraint_value = " 1.0 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5"
constraint_meaning = "kg_solvent_water activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = "kg dimensionless moles moles moles moles moles moles moles moles moles"
remove_fixed_activity_name = "NaCl"
remove_fixed_activity_time = "0"
[]
[Executioner]
type = Steady
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Na+ K+ Ca++ Mg++ Al+++ SiO2(aq) Cl- SO4-- HCO3-"
[]
[]
(modules/geochemistry/test/tests/time_dependent_reactions/except1.i)
#Exception: incorrect size of source_species
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Na+ K+ Ca++ Mg++ Al+++ SiO2(aq) Cl- SO4-- HCO3-"
constraint_value = " 1.0 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5"
constraint_meaning = "kg_solvent_water activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = "kg dimensionless moles moles moles moles moles moles moles moles moles"
source_species_names = "Al+++"
source_species_rates = "1 0"
[]
[Executioner]
type = Steady
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Na+ K+ Ca++ Mg++ Al+++ SiO2(aq) Cl- SO4-- HCO3-"
[]
[]
(modules/geochemistry/test/tests/interrogate_reactions/muscovite.i)
# 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/geochemistry_quantity_aux/temperature.i)
#Extract temperature
[TimeIndependentReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 1.0 1.0E-6 1.0E-6"
constraint_meaning = "kg_solvent_water free_concentration bulk_composition"
constraint_unit = "kg molal moles"
ramp_max_ionic_strength_initial = 0
temperature = 30
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Cl-"
[]
[]
[AuxVariables]
[the_aux]
[]
[]
[AuxKernels]
[the_aux]
type = GeochemistryQuantityAux
species = 'H+'
reactor = geochemistry_reactor
variable = the_aux
quantity = temperature
[]
[]
[Postprocessors]
[value]
type = PointValue
point = '0 0 0'
variable = the_aux
[]
[value_from_action]
type = PointValue
point = '0 0 0'
variable = "solution_temperature"
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/geochemistry_quantity_aux/free_cm3.i)
#Extract free cm^3
[TimeIndependentReactionSolver]
model_definition = definition
swap_out_of_basis = 'H+'
swap_into_basis = 'Fe(OH)3(ppd)_nosorb'
charge_balance_species = "Cl-"
constraint_species = "H2O Cl- Fe+++ Fe(OH)3(ppd)_nosorb"
constraint_value = " 1.0 1.0E-6 1.0E-6 1.0"
constraint_meaning = "kg_solvent_water bulk_composition free_concentration free_mineral"
constraint_unit = "kg moles molal moles"
ramp_max_ionic_strength_initial = 0
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Cl- Fe+++"
equilibrium_minerals = "Fe(OH)3(ppd)_nosorb"
[]
[]
[AuxVariables]
[the_aux]
[]
[]
[AuxKernels]
[the_aux]
type = GeochemistryQuantityAux
species = "Fe(OH)3(ppd)_nosorb"
reactor = geochemistry_reactor
variable = the_aux
quantity = free_cm3
[]
[]
[Postprocessors]
[value]
type = PointValue
point = '0 0 0'
variable = the_aux
[]
[value_from_action]
type = PointValue
point = '0 0 0'
variable = "free_cm3_Fe(OH)3(ppd)_nosorb"
[]
[]
[Outputs]
csv = true
[]
(modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/aquifer_geochemistry.i)
#########################################
# #
# File written by create_input_files.py #
# #
#########################################
# Simulates geochemistry in the aquifer. This input file may be run in standalone fashion but it does not do anything of interest. To simulate something interesting, run the porous_flow.i simulation which couples to this input file using MultiApps.
# This file receives pf_rate_H pf_rate_Cl pf_rate_SO4 pf_rate_HCO3 pf_rate_SiO2aq pf_rate_Al pf_rate_Ca pf_rate_Mg pf_rate_Fe pf_rate_K pf_rate_Na pf_rate_Sr pf_rate_F pf_rate_BOH pf_rate_Br pf_rate_Ba pf_rate_Li pf_rate_NO3 pf_rate_O2aq pf_rate_H2O and temperature as AuxVariables from porous_flow.i
# The pf_rate quantities are kg/s changes of fluid-component mass at each node, but the geochemistry module expects rates-of-changes of moles at every node. Secondly, since this input file considers just 1 litre of aqueous solution at every node, the nodal_void_volume is used to convert pf_rate_* into rate_*_per_1l, which is measured in mol/s/1_litre_of_aqueous_solution.
# This file sends massfrac_H massfrac_Cl massfrac_SO4 massfrac_HCO3 massfrac_SiO2aq massfrac_Al massfrac_Ca massfrac_Mg massfrac_Fe massfrac_K massfrac_Na massfrac_Sr massfrac_F massfrac_BOH massfrac_Br massfrac_Ba massfrac_Li massfrac_NO3 massfrac_O2aq to porous_flow.i. These are computed from the corresponding transported_* quantities.
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = '../../../../geochemistry/database/moose_geochemdb.json'
basis_species = 'H2O H+ Cl- SO4-- HCO3- SiO2(aq) Al+++ Ca++ Mg++ Fe++ K+ Na+ Sr++ F- B(OH)3 Br- Ba++ Li+ NO3- O2(aq)'
equilibrium_minerals = 'Siderite Pyrrhotite Dolomite Illite Anhydrite Calcite Quartz K-feldspar Kaolinite Barite Celestite Fluorite Albite Chalcedony Goethite'
[]
[nodal_void_volume_uo]
type = NodalVoidVolume
porosity = porosity
execute_on = 'initial timestep_end' # initial means this is evaluated properly for the first timestep
[]
[]
[SpatialReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = 'Cl-'
swap_out_of_basis = 'NO3- H+ Fe++ Ba++ SiO2(aq) Mg++ O2(aq) Al+++ K+ Ca++ HCO3-'
swap_into_basis = ' NH3 Pyrrhotite K-feldspar Barite Quartz Dolomite Siderite Calcite Illite Anhydrite Kaolinite'
# ASSUME that 1 litre of solution contains:
constraint_species = 'H2O Quartz Calcite K-feldspar Siderite Dolomite Anhydrite Pyrrhotite Illite Kaolinite Barite Na+ Cl- SO4-- Li+ B(OH)3 Br- F- Sr++ NH3'
constraint_value = ' 0.99778351 322.177447 12.111108 6.8269499 6.2844304 2.8670301 1.1912027 0.51474767 0.3732507 0.20903322 0.0001865889 1.5876606 1.5059455 0.046792579 0.013110503 0.006663119 0.001238987 0.00032108 0.000159781 0.001937302'
constraint_meaning = 'kg_solvent_water bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition'
constraint_unit = "kg moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles"
prevent_precipitation = 'Fluorite Albite Goethite'
initial_temperature = 92
temperature = temperature
source_species_names = 'H+ Cl- SO4-- HCO3- SiO2(aq) Al+++ Ca++ Mg++ Fe++ K+ Na+ Sr++ F- B(OH)3 Br- Ba++ Li+ NO3- O2(aq) H2O'
source_species_rates = ' rate_H_per_1l rate_Cl_per_1l rate_SO4_per_1l rate_HCO3_per_1l rate_SiO2aq_per_1l rate_Al_per_1l rate_Ca_per_1l rate_Mg_per_1l rate_Fe_per_1l rate_K_per_1l rate_Na_per_1l rate_Sr_per_1l rate_F_per_1l rate_BOH_per_1l rate_Br_per_1l rate_Ba_per_1l rate_Li_per_1l rate_NO3_per_1l rate_O2aq_per_1l rate_H2O_per_1l'
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
execute_console_output_on = '' # only CSV and exodus output for this simulation
add_aux_molal = false # save some memory and reduce variables in output exodus
add_aux_mg_per_kg = false # save some memory and reduce variables in output exodus
add_aux_free_mg = false # save some memory and reduce variables in output exodus
add_aux_activity = false # save some memory and reduce variables in output exodus
add_aux_bulk_moles = false # save some memory and reduce variables in output exodus
adaptive_timestepping = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -75
xmax = 75
ymin = 0
ymax = 40
zmin = -25
zmax = 25
nx = 15
ny = 4
nz = 5
[]
[aquifer]
type = ParsedSubdomainMeshGenerator
input = gen
block_id = 1
block_name = aquifer
combinatorial_geometry = 'z >= -5 & z <= 5'
[]
[injection_nodes]
input = aquifer
type = ExtraNodesetGenerator
new_boundary = injection_nodes
coord = '-25 0 -5; -25 0 5'
[]
[production_nodes]
input = injection_nodes
type = ExtraNodesetGenerator
new_boundary = production_nodes
coord = '25 0 -5; 25 0 5'
[]
[]
[GlobalParams]
point = '-25 0 0'
reactor = reactor
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 7.76E6 # 90 days
[TimeStepper]
type = FunctionDT
function = 'min(3E4, max(1E4, 0.2 * t))'
[]
[]
[AuxVariables]
[temperature]
initial_condition = 92.0
[]
[porosity]
initial_condition = 0.1
[]
[nodal_void_volume]
[]
[free_cm3_Kfeldspar] # necessary because of the minus sign in K-feldspar which does not parse correctly in the porosity AuxKernel
[]
[pf_rate_H] # change in H mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Cl] # change in Cl mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_SO4] # change in SO4 mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_HCO3] # change in HCO3 mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_SiO2aq] # change in SiO2aq mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Al] # change in Al mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Ca] # change in Ca mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Mg] # change in Mg mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Fe] # change in Fe mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_K] # change in K mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Na] # change in Na mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Sr] # change in Sr mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_F] # change in F mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_BOH] # change in BOH mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Br] # change in Br mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Ba] # change in Ba mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Li] # change in Li mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_NO3] # change in NO3 mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_O2aq] # change in O2aq mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_H2O] # change in H2O mass (kg/s) at each node provided by the porous-flow simulation
[]
[rate_H_per_1l]
[]
[rate_Cl_per_1l]
[]
[rate_SO4_per_1l]
[]
[rate_HCO3_per_1l]
[]
[rate_SiO2aq_per_1l]
[]
[rate_Al_per_1l]
[]
[rate_Ca_per_1l]
[]
[rate_Mg_per_1l]
[]
[rate_Fe_per_1l]
[]
[rate_K_per_1l]
[]
[rate_Na_per_1l]
[]
[rate_Sr_per_1l]
[]
[rate_F_per_1l]
[]
[rate_BOH_per_1l]
[]
[rate_Br_per_1l]
[]
[rate_Ba_per_1l]
[]
[rate_Li_per_1l]
[]
[rate_NO3_per_1l]
[]
[rate_O2aq_per_1l]
[]
[rate_H2O_per_1l]
[]
[transported_H]
[]
[transported_Cl]
[]
[transported_SO4]
[]
[transported_HCO3]
[]
[transported_SiO2aq]
[]
[transported_Al]
[]
[transported_Ca]
[]
[transported_Mg]
[]
[transported_Fe]
[]
[transported_K]
[]
[transported_Na]
[]
[transported_Sr]
[]
[transported_F]
[]
[transported_BOH]
[]
[transported_Br]
[]
[transported_Ba]
[]
[transported_Li]
[]
[transported_NO3]
[]
[transported_O2aq]
[]
[transported_H2O]
[]
[transported_mass]
[]
[massfrac_H]
[]
[massfrac_Cl]
[]
[massfrac_SO4]
[]
[massfrac_HCO3]
[]
[massfrac_SiO2aq]
[]
[massfrac_Al]
[]
[massfrac_Ca]
[]
[massfrac_Mg]
[]
[massfrac_Fe]
[]
[massfrac_K]
[]
[massfrac_Na]
[]
[massfrac_Sr]
[]
[massfrac_F]
[]
[massfrac_BOH]
[]
[massfrac_Br]
[]
[massfrac_Ba]
[]
[massfrac_Li]
[]
[massfrac_NO3]
[]
[massfrac_O2aq]
[]
[massfrac_H2O]
[]
[]
[AuxKernels]
[free_cm3_Kfeldspar]
type = GeochemistryQuantityAux
variable = free_cm3_Kfeldspar
species = 'K-feldspar'
quantity = free_cm3
execute_on = 'timestep_end'
[]
[porosity_auxk]
type = ParsedAux
coupled_variables = 'free_cm3_Siderite free_cm3_Pyrrhotite free_cm3_Dolomite free_cm3_Illite free_cm3_Anhydrite free_cm3_Calcite free_cm3_Quartz free_cm3_Kfeldspar free_cm3_Kaolinite free_cm3_Barite free_cm3_Celestite free_cm3_Fluorite free_cm3_Albite free_cm3_Chalcedony free_cm3_Goethite'
expression = '1000.0 / (1000.0 + free_cm3_Siderite + free_cm3_Pyrrhotite + free_cm3_Dolomite + free_cm3_Illite + free_cm3_Anhydrite + free_cm3_Calcite + free_cm3_Quartz + free_cm3_Kfeldspar + free_cm3_Kaolinite + free_cm3_Barite + free_cm3_Celestite + free_cm3_Fluorite + free_cm3_Albite + free_cm3_Chalcedony + free_cm3_Goethite)'
variable = porosity
execute_on = 'timestep_end'
[]
[nodal_void_volume_auxk]
type = NodalVoidVolumeAux
variable = nodal_void_volume
nodal_void_volume_uo = nodal_void_volume_uo
execute_on = 'initial timestep_end' # initial to ensure it is properly evaluated for the first timestep
[]
[rate_H_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_H nodal_void_volume'
variable = rate_H_per_1l
expression = 'pf_rate_H / 1.0079 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Cl_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Cl nodal_void_volume'
variable = rate_Cl_per_1l
expression = 'pf_rate_Cl / 35.453 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_SO4_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_SO4 nodal_void_volume'
variable = rate_SO4_per_1l
expression = 'pf_rate_SO4 / 96.0576 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_HCO3_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_HCO3 nodal_void_volume'
variable = rate_HCO3_per_1l
expression = 'pf_rate_HCO3 / 61.0171 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_SiO2aq_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_SiO2aq nodal_void_volume'
variable = rate_SiO2aq_per_1l
expression = 'pf_rate_SiO2aq / 60.0843 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Al_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Al nodal_void_volume'
variable = rate_Al_per_1l
expression = 'pf_rate_Al / 26.9815 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Ca_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Ca nodal_void_volume'
variable = rate_Ca_per_1l
expression = 'pf_rate_Ca / 40.08 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Mg_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Mg nodal_void_volume'
variable = rate_Mg_per_1l
expression = 'pf_rate_Mg / 24.305 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Fe_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Fe nodal_void_volume'
variable = rate_Fe_per_1l
expression = 'pf_rate_Fe / 55.847 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_K_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_K nodal_void_volume'
variable = rate_K_per_1l
expression = 'pf_rate_K / 39.0983 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Na_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Na nodal_void_volume'
variable = rate_Na_per_1l
expression = 'pf_rate_Na / 22.9898 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Sr_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Sr nodal_void_volume'
variable = rate_Sr_per_1l
expression = 'pf_rate_Sr / 87.62 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_F_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_F nodal_void_volume'
variable = rate_F_per_1l
expression = 'pf_rate_F / 18.9984 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_BOH_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_BOH nodal_void_volume'
variable = rate_BOH_per_1l
expression = 'pf_rate_BOH / 61.8329 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Br_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Br nodal_void_volume'
variable = rate_Br_per_1l
expression = 'pf_rate_Br / 79.904 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Ba_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Ba nodal_void_volume'
variable = rate_Ba_per_1l
expression = 'pf_rate_Ba / 137.33 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Li_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Li nodal_void_volume'
variable = rate_Li_per_1l
expression = 'pf_rate_Li / 6.941 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_NO3_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_NO3 nodal_void_volume'
variable = rate_NO3_per_1l
expression = 'pf_rate_NO3 / 62.0049 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_O2aq_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_O2aq nodal_void_volume'
variable = rate_O2aq_per_1l
expression = 'pf_rate_O2aq / 31.9988 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_H2O_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_H2O nodal_void_volume'
variable = rate_H2O_per_1l
expression = 'pf_rate_H2O / 18.01801802 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[transported_H_auxk]
type = GeochemistryQuantityAux
variable = transported_H
species = 'H+'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Cl_auxk]
type = GeochemistryQuantityAux
variable = transported_Cl
species = 'Cl-'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_SO4_auxk]
type = GeochemistryQuantityAux
variable = transported_SO4
species = 'SO4--'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_HCO3_auxk]
type = GeochemistryQuantityAux
variable = transported_HCO3
species = 'HCO3-'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_SiO2aq_auxk]
type = GeochemistryQuantityAux
variable = transported_SiO2aq
species = 'SiO2(aq)'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Al_auxk]
type = GeochemistryQuantityAux
variable = transported_Al
species = 'Al+++'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Ca_auxk]
type = GeochemistryQuantityAux
variable = transported_Ca
species = 'Ca++'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Mg_auxk]
type = GeochemistryQuantityAux
variable = transported_Mg
species = 'Mg++'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Fe_auxk]
type = GeochemistryQuantityAux
variable = transported_Fe
species = 'Fe++'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_K_auxk]
type = GeochemistryQuantityAux
variable = transported_K
species = 'K+'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Na_auxk]
type = GeochemistryQuantityAux
variable = transported_Na
species = 'Na+'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Sr_auxk]
type = GeochemistryQuantityAux
variable = transported_Sr
species = 'Sr++'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_F_auxk]
type = GeochemistryQuantityAux
variable = transported_F
species = 'F-'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_BOH_auxk]
type = GeochemistryQuantityAux
variable = transported_BOH
species = 'B(OH)3'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Br_auxk]
type = GeochemistryQuantityAux
variable = transported_Br
species = 'Br-'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Ba_auxk]
type = GeochemistryQuantityAux
variable = transported_Ba
species = 'Ba++'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Li_auxk]
type = GeochemistryQuantityAux
variable = transported_Li
species = 'Li+'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_NO3_auxk]
type = GeochemistryQuantityAux
variable = transported_NO3
species = 'NO3-'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_O2aq_auxk]
type = GeochemistryQuantityAux
variable = transported_O2aq
species = 'O2(aq)'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_H2O_auxk]
type = GeochemistryQuantityAux
variable = transported_H2O
species = 'H2O'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_mass_auxk]
type = ParsedAux
coupled_variables = ' transported_H transported_Cl transported_SO4 transported_HCO3 transported_SiO2aq transported_Al transported_Ca transported_Mg transported_Fe transported_K transported_Na transported_Sr transported_F transported_BOH transported_Br transported_Ba transported_Li transported_NO3 transported_O2aq transported_H2O'
variable = transported_mass
expression = 'transported_H * 1.0079 + transported_Cl * 35.453 + transported_SO4 * 96.0576 + transported_HCO3 * 61.0171 + transported_SiO2aq * 60.0843 + transported_Al * 26.9815 + transported_Ca * 40.08 + transported_Mg * 24.305 + transported_Fe * 55.847 + transported_K * 39.0983 + transported_Na * 22.9898 + transported_Sr * 87.62 + transported_F * 18.9984 + transported_BOH * 61.8329 + transported_Br * 79.904 + transported_Ba * 137.33 + transported_Li * 6.941 + transported_NO3 * 62.0049 + transported_O2aq * 31.9988 + transported_H2O * 18.01801802'
execute_on = 'timestep_end'
[]
[massfrac_H_auxk]
type = ParsedAux
coupled_variables = 'transported_H transported_mass'
variable = massfrac_H
expression = 'transported_H * 1.0079 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Cl_auxk]
type = ParsedAux
coupled_variables = 'transported_Cl transported_mass'
variable = massfrac_Cl
expression = 'transported_Cl * 35.453 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_SO4_auxk]
type = ParsedAux
coupled_variables = 'transported_SO4 transported_mass'
variable = massfrac_SO4
expression = 'transported_SO4 * 96.0576 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_HCO3_auxk]
type = ParsedAux
coupled_variables = 'transported_HCO3 transported_mass'
variable = massfrac_HCO3
expression = 'transported_HCO3 * 61.0171 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_SiO2aq_auxk]
type = ParsedAux
coupled_variables = 'transported_SiO2aq transported_mass'
variable = massfrac_SiO2aq
expression = 'transported_SiO2aq * 60.0843 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Al_auxk]
type = ParsedAux
coupled_variables = 'transported_Al transported_mass'
variable = massfrac_Al
expression = 'transported_Al * 26.9815 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Ca_auxk]
type = ParsedAux
coupled_variables = 'transported_Ca transported_mass'
variable = massfrac_Ca
expression = 'transported_Ca * 40.08 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Mg_auxk]
type = ParsedAux
coupled_variables = 'transported_Mg transported_mass'
variable = massfrac_Mg
expression = 'transported_Mg * 24.305 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Fe_auxk]
type = ParsedAux
coupled_variables = 'transported_Fe transported_mass'
variable = massfrac_Fe
expression = 'transported_Fe * 55.847 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_K_auxk]
type = ParsedAux
coupled_variables = 'transported_K transported_mass'
variable = massfrac_K
expression = 'transported_K * 39.0983 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Na_auxk]
type = ParsedAux
coupled_variables = 'transported_Na transported_mass'
variable = massfrac_Na
expression = 'transported_Na * 22.9898 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Sr_auxk]
type = ParsedAux
coupled_variables = 'transported_Sr transported_mass'
variable = massfrac_Sr
expression = 'transported_Sr * 87.62 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_F_auxk]
type = ParsedAux
coupled_variables = 'transported_F transported_mass'
variable = massfrac_F
expression = 'transported_F * 18.9984 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_BOH_auxk]
type = ParsedAux
coupled_variables = 'transported_BOH transported_mass'
variable = massfrac_BOH
expression = 'transported_BOH * 61.8329 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Br_auxk]
type = ParsedAux
coupled_variables = 'transported_Br transported_mass'
variable = massfrac_Br
expression = 'transported_Br * 79.904 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Ba_auxk]
type = ParsedAux
coupled_variables = 'transported_Ba transported_mass'
variable = massfrac_Ba
expression = 'transported_Ba * 137.33 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Li_auxk]
type = ParsedAux
coupled_variables = 'transported_Li transported_mass'
variable = massfrac_Li
expression = 'transported_Li * 6.941 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_NO3_auxk]
type = ParsedAux
coupled_variables = 'transported_NO3 transported_mass'
variable = massfrac_NO3
expression = 'transported_NO3 * 62.0049 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_O2aq_auxk]
type = ParsedAux
coupled_variables = 'transported_O2aq transported_mass'
variable = massfrac_O2aq
expression = 'transported_O2aq * 31.9988 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_H2O_auxk]
type = ParsedAux
coupled_variables = 'transported_H2O transported_mass'
variable = massfrac_H2O
expression = 'transported_H2O * 18.01801802 / transported_mass'
execute_on = 'timestep_end'
[]
[]
[Postprocessors]
[memory]
type = MemoryUsage
outputs = 'console'
[]
[porosity]
type = PointValue
variable = porosity
[]
[solution_temperature]
type = PointValue
variable = solution_temperature
[]
[massfrac_H]
type = PointValue
variable = massfrac_H
[]
[massfrac_Cl]
type = PointValue
variable = massfrac_Cl
[]
[massfrac_SO4]
type = PointValue
variable = massfrac_SO4
[]
[massfrac_HCO3]
type = PointValue
variable = massfrac_HCO3
[]
[massfrac_SiO2aq]
type = PointValue
variable = massfrac_SiO2aq
[]
[massfrac_Al]
type = PointValue
variable = massfrac_Al
[]
[massfrac_Ca]
type = PointValue
variable = massfrac_Ca
[]
[massfrac_Mg]
type = PointValue
variable = massfrac_Mg
[]
[massfrac_Fe]
type = PointValue
variable = massfrac_Fe
[]
[massfrac_K]
type = PointValue
variable = massfrac_K
[]
[massfrac_Na]
type = PointValue
variable = massfrac_Na
[]
[massfrac_Sr]
type = PointValue
variable = massfrac_Sr
[]
[massfrac_F]
type = PointValue
variable = massfrac_F
[]
[massfrac_BOH]
type = PointValue
variable = massfrac_BOH
[]
[massfrac_Br]
type = PointValue
variable = massfrac_Br
[]
[massfrac_Ba]
type = PointValue
variable = massfrac_Ba
[]
[massfrac_Li]
type = PointValue
variable = massfrac_Li
[]
[massfrac_NO3]
type = PointValue
variable = massfrac_NO3
[]
[massfrac_O2aq]
type = PointValue
variable = massfrac_O2aq
[]
[massfrac_H2O]
type = PointValue
variable = massfrac_H2O
[]
[free_cm3_Siderite]
type = PointValue
variable = free_cm3_Siderite
[]
[free_cm3_Pyrrhotite]
type = PointValue
variable = free_cm3_Pyrrhotite
[]
[free_cm3_Dolomite]
type = PointValue
variable = free_cm3_Dolomite
[]
[free_cm3_Illite]
type = PointValue
variable = free_cm3_Illite
[]
[free_cm3_Anhydrite]
type = PointValue
variable = free_cm3_Anhydrite
[]
[free_cm3_Calcite]
type = PointValue
variable = free_cm3_Calcite
[]
[free_cm3_Quartz]
type = PointValue
variable = free_cm3_Quartz
[]
[free_cm3_K-feldspar]
type = PointValue
variable = free_cm3_K-feldspar
[]
[free_cm3_Kaolinite]
type = PointValue
variable = free_cm3_Kaolinite
[]
[free_cm3_Barite]
type = PointValue
variable = free_cm3_Barite
[]
[free_cm3_Celestite]
type = PointValue
variable = free_cm3_Celestite
[]
[free_cm3_Fluorite]
type = PointValue
variable = free_cm3_Fluorite
[]
[free_cm3_Albite]
type = PointValue
variable = free_cm3_Albite
[]
[free_cm3_Chalcedony]
type = PointValue
variable = free_cm3_Chalcedony
[]
[free_cm3_Goethite]
type = PointValue
variable = free_cm3_Goethite
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/geochemistry/test/tests/equilibrium_models/seawater_precip.i)
[TimeIndependentReactionSolver]
model_definition = definition
swap_out_of_basis = "H+ "
swap_into_basis = " MgCO3"
charge_balance_species = "Cl-" # this means the bulk moles of Cl- will not be exactly as set below
constraint_species = "H2O MgCO3 O2(aq) Cl- Na+ SO4-- Mg++ Ca++ K+ HCO3- SiO2(aq)"
# to obtain the constraint on MgCO3: (1) run seawater_no_precip.i to obtain the free molality of MgCO3; (2) then running seawater_no_precip.i with MgCO3 in the basis (in place of H+) with that free molality, to obtain the bulk mole number
constraint_value = " 1.0 0.0001959 0.2151E-3 0.566 0.485 0.0292 0.055 0.0106 0.0106 0.00241 0.000103"
constraint_meaning = "kg_solvent_water bulk_composition free_concentration bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = " kg moles molal moles moles moles moles moles moles moles moles"
prevent_precipitation = "Dolomite-dis Dolomite-ord"
ramp_max_ionic_strength_initial = 0 # not needed in this simple problem
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
mol_cutoff = 1E-5
abs_tol = 1E-15
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- Na+ SO4-- Mg++ Ca++ K+ HCO3- SiO2(aq) O2(aq)"
equilibrium_minerals = "Antigorite Tremolite Talc Chrysotile Sepiolite Anthophyllite Dolomite Dolomite-ord Huntite Dolomite-dis Magnesite Calcite Aragonite Quartz"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
(modules/geochemistry/test/tests/kinetics/bio_arsenate0.i)
# The purpose of this is to find the equilibrium constants in the equation
# Lactate- = -2*H2O + 1*CO3-- + 1*CH3COO- - 2*HAsO4-- + 2*As(OH)4-
# The database contains this reaction only: Lactate- = -3O2(aq) + 3HCO3- + 2H+
#
# T=0: Lactate- = -2*H2O + 1*CO3-- + 1*CH3COO- - 2*HAsO4-- + 2*As(OH)4- . log10(K) = 6.742
# T=25: Lactate- = -2*H2O + 1*CO3-- + 1*CH3COO- - 2*HAsO4-- + 2*As(OH)4- . log10(K) = 26.75
# T=60: Lactate- = -2*H2O + 1*CO3-- + 1*CH3COO- - 2*HAsO4-- + 2*As(OH)4- . log10(K) = 49.93
# T=100: Lactate- = -2*H2O + 1*CO3-- + 1*CH3COO- - 2*HAsO4-- + 2*As(OH)4- . log10(K) = 71.18
# T=150: Lactate- = -2*H2O + 1*CO3-- + 1*CH3COO- - 2*HAsO4-- + 2*As(OH)4- . log10(K) = 92.42
# T=200: Lactate- = -2*H2O + 1*CO3-- + 1*CH3COO- - 2*HAsO4-- + 2*As(OH)4- . log10(K) = 109.5
# T=250: Lactate- = -2*H2O + 1*CO3-- + 1*CH3COO- - 2*HAsO4-- + 2*As(OH)4- . log10(K) = 123.8
# T=300: Lactate- = -2*H2O + 1*CO3-- + 1*CH3COO- - 2*HAsO4-- + 2*As(OH)4- . log10(K) = 136.1
[GeochemicalModelInterrogator]
model_definition = definition
swap_into_basis = 'CO3-- HAsO4-- CH3COO-'
swap_out_of_basis = 'HCO3- H+ O2(aq)'
temperature = 25.0
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O Na+ HCO3- O2(aq) H+ As(OH)4-"
piecewise_linear_interpolation = true
[]
[]
(modules/geochemistry/test/tests/time_dependent_reactions/dissolution_pyrite_2.i)
#Pyrite is added, and the fugacity of O2(g) is fixed
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
swap_out_of_basis = "O2(aq) Fe++"
swap_into_basis = "O2(g) Hematite"
charge_balance_species = "Cl-"
constraint_species = "H2O Hematite H+ Ca++ Mg++ Na+ HCO3- SO4-- Cl- O2(g)"
constraint_value = " 1.0 1 -6.5 4 1 2 18 3 5 0.2"
constraint_meaning = "kg_solvent_water free_mineral log10activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition fugacity"
constraint_unit = " kg mg dimensionless mg mg mg mg mg mg dimensionless"
remove_fixed_activity_name = "H+"
remove_fixed_activity_time = '0 '
source_species_names = "Pyrite"
source_species_rates = 8.336E-4 # = 0.1g(pyrite)/second over 10 seconds, 1g(pyrite) = 8.34E-3
ramp_max_ionic_strength_initial = 0 # not needed in this simple problem
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
abs_tol = 1E-13
execute_console_output_on = '' # only CSV output is required
[]
[Executioner]
type = Transient
dt = 1
end_time = 10
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Fe++ Ca++ Mg++ Na+ HCO3- SO4-- Cl- O2(aq)"
equilibrium_minerals = "Hematite Pyrite"
equilibrium_gases = "O2(g)"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
[Postprocessors]
[mg_Hematite]
type = PointValue
point = '0 0 0'
variable = 'free_mg_Hematite'
[]
[mg_Pyrite]
type = PointValue
point = '0 0 0'
variable = 'free_mg_Pyrite'
[]
[pH]
type = PointValue
point = '0 0 0'
variable = 'pH'
[]
[molal_CO2aq]
type = PointValue
point = '0 0 0'
variable = 'molal_CO2(aq)'
[]
[molal_HCO3-]
type = PointValue
point = '0 0 0'
variable = 'molal_HCO3-'
[]
[molal_SO4--]
type = PointValue
point = '0 0 0'
variable = 'molal_SO4--'
[]
[molal_Fe++]
type = PointValue
point = '0 0 0'
variable = 'molal_Fe++'
[]
[molal_O2aq]
type = PointValue
point = '0 0 0'
variable = 'molal_O2(aq)'
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/geochemistry_quantity_aux/surface_charge.i)
#Extract surface charge
[TimeIndependentReactionSolver]
model_definition = definition
swap_out_of_basis = 'H+'
swap_into_basis = 'Fe(OH)3(ppd)'
charge_balance_species = "Cl-"
constraint_species = "H2O Cl- Fe+++ >(s)FeOH >(w)FeOH Fe(OH)3(ppd)"
constraint_value = " 1.0 1.0E-6 1.0E-6 1.0E-6 1.0E-6 1.0E-6"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition free_concentration free_concentration free_mineral"
constraint_unit = "kg moles moles molal molal moles"
ramp_max_ionic_strength_initial = 0
abs_tol = 1E-20
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Cl- Fe+++ >(s)FeOH >(w)FeOH"
equilibrium_minerals = "Fe(OH)3(ppd)"
[]
[]
[AuxVariables]
[the_aux]
[]
[]
[AuxKernels]
[the_aux]
type = GeochemistryQuantityAux
species = "Fe(OH)3(ppd)"
reactor = geochemistry_reactor
variable = the_aux
quantity = surface_charge
[]
[]
[Postprocessors]
[value]
type = PointValue
point = '0 0 0'
variable = the_aux
[]
[value_from_action]
type = PointValue
point = '0 0 0'
variable = "surface_charge_Fe(OH)3(ppd)"
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/spatial_reactor/spatial_6.i)
# demonstrating that temperature may be spatially-dependent
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
[]
[]
[SpatialReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 55.5 1E-5 1E-5"
constraint_meaning = "bulk_composition bulk_composition bulk_composition"
constraint_unit = "moles moles moles"
temperature = temp_controller
[]
[VectorPostprocessors]
[temperature]
type = LineValueSampler
start_point = '0 0 0'
end_point = '10 0 0'
sort_by = x
num_points = 11
variable = 'solution_temperature'
[]
[]
[AuxVariables]
[temp_controller]
[]
[]
[AuxKernels]
[temp_controller]
type = FunctionAux
variable = temp_controller
function = '25 + x'
execute_on = timestep_begin # so the Reactor gets the correct value
[]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 10
[]
[Executioner]
type = Transient
dt = 1
end_time = 2
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/kinetics/bio_arsenate1.i)
# Example of a microbe-catalysed reaction:
# Lactate- + 2HAsO4-- + 2H2O -> CH3COO- + CO3-- + 2As(OH)4-
# at pH = 9.8
# at temperature = 20degC
# The equation in the database involving lactate is
# Lactate- + 3O2(aq) -> 2H+ + 3HCO3-
# with log10(K) = 231.4 at 20degC
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
swap_into_basis = 'CO3--'
swap_out_of_basis = 'HCO3-'
charge_balance_species = "Cl-"
constraint_species = "H2O Na+ CO3-- Lactate- Cl- AsO4--- CH3COO- As(OH)4- H+"
constraint_value = " 1.0 1448E-3 24E-3 10E-3 1500E-3 10E-3 1E-6 1E-6 -9.8"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition log10activity"
constraint_unit = " kg moles moles moles moles moles moles moles dimensionless"
controlled_activity_name = 'H+'
controlled_activity_value = 1.58489E-10 # this is pH=9.8
kinetic_species_name = "arsenate_reducer"
kinetic_species_initial_value = 0.5 # molecular weight of arsenate_reducer = 1, so this is the amount of mmoles too
kinetic_species_unit = mg
ramp_max_ionic_strength_initial = 0
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
execute_console_output_on = ''
mol_cutoff = 1E-20
solver_info = true
evaluate_kinetic_rates_always = true
precision = 16
[]
[UserObjects]
[rate_arsenate_reducer]
type = GeochemistryKineticRate
kinetic_species_name = "arsenate_reducer"
intrinsic_rate_constant = 0.6048 # 7E-9 mol/mg/s = 0.6048 mol/g/day
promoting_species_names = 'HAsO4--'
promoting_indices = '1'
promoting_monod_indices = '1'
promoting_half_saturation = 10E-6
multiply_by_mass = true
direction = dissolution
kinetic_biological_efficiency = 5
energy_captured = 125E3
theta = 0.25
eta = 1
[]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O Na+ Cl- HCO3- H+ As(OH)4- Lactate- CH3COO- AsO4---"
kinetic_redox = "arsenate_reducer"
kinetic_rate_descriptions = "rate_arsenate_reducer"
[]
[]
[Executioner]
type = Transient
dt = 0.01
end_time = 2
[]
[AuxVariables]
[moles_acetate]
[]
[biomass_g]
[]
[]
[AuxKernels]
[moles_acetate]
type = GeochemistryQuantityAux
species = 'CH3COO-'
reactor = reactor
variable = moles_acetate
quantity = transported_moles_in_original_basis
[]
[biomass_g]
type = GeochemistryQuantityAux
species = 'arsenate_reducer'
reactor = reactor
variable = biomass_g
quantity = kinetic_moles # remember molecular weight = 1 g/mol
[]
[]
[Functions]
[rate]
type = ParsedFunction
vars = 'dt reaction_rate_times_dt'
vals = 'dt reaction_rate_times_dt'
value = 'reaction_rate_times_dt / dt'
[]
[]
[Postprocessors]
[moles_acetate]
type = PointValue
point = '0 0 0'
variable = moles_acetate
[]
[reaction_rate_times_dt]
type = PointValue
point = '0 0 0'
variable = mol_change_arsenate_reducer
outputs = 'none'
[]
[dt]
type = TimestepSize
outputs = 'none'
[]
[reaction_rate]
type = FunctionValuePostprocessor
function = rate
[]
[biomass_g]
type = PointValue
point = '0 0 0'
variable = biomass_g
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/geochemistry_quantity_aux/except3.i)
#Exception test: inappropriate quantity
[TimeIndependentReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl- Fe+++ >(s)FeOH >(w)FeOH"
constraint_value = " 1.0 1.0 1.0 1.0 1.0 1.0"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = "kg moles moles moles moles moles"
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Cl- Fe+++ >(s)FeOH >(w)FeOH"
equilibrium_minerals = "Fe(OH)3(ppd)"
[]
[]
[AuxVariables]
[error]
[]
[]
[AuxKernels]
[error]
type = GeochemistryQuantityAux
species = "Fe(OH)3(ppd)"
reactor = geochemistry_reactor
variable = error
quantity = molal
[]
[]
(modules/geochemistry/test/tests/time_dependent_reactions/simple.i)
# Simple example of time-dependent reaction path.
# This example involves an HCl solution that is initialized at pH=2, then the pH is controlled via controlled_activity, and finally HCl is titrated into the solution
[GlobalParams]
point = '0 0 0'
[]
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 1.0 -2 1E-2"
constraint_meaning = "kg_solvent_water log10activity bulk_composition"
constraint_unit = " kg dimensionless moles"
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
execute_console_output_on = '' # only CSV output for this example
# close the system at time = 0
close_system_at_time = 0
# control pH. This sets pH = 2 + t (see the act_H+ AuxKernel)
controlled_activity_name = 'H+'
controlled_activity_value = 'act_H+'
# remove the constraint on H+ activity at time = 5, when, from the previous time-step, pH = 2 + 4 = 6
remove_fixed_activity_name = 'H+'
remove_fixed_activity_time = 5
# add 1E-5 moles of HCl every second of the simulation: this has no impact before time = 5 when the fixed-activity constraint it turned off, but then, molality_H+ ~ 1E-6 + 1E-4 * (t - 4), so
# time, approx_pH
# 5, -log10(1E-4) = 4
# 10, -log10(6E-4) = 3.2
source_species_names = 'HCl'
source_species_rates = '1E-4'
[]
[AuxVariables]
[act_H+]
[]
[]
[AuxKernels]
[act_H+]
type = FunctionAux
variable = act_H+
function = '10^(-2 - t)'
execute_on = timestep_begin
[]
[]
[Postprocessors]
[pH]
type = PointValue
variable = 'pH'
[]
[solvent_mass]
type = PointValue
variable = 'kg_solvent_H2O'
[]
[molal_Cl-]
type = PointValue
variable = 'molal_Cl-'
[]
[mg_per_kg_HCl]
type = PointValue
variable = 'mg_per_kg_HCl'
[]
[activity_OH-]
type = PointValue
variable = 'activity_OH-'
[]
[bulk_H+]
type = PointValue
variable = 'bulk_moles_H+'
[]
[temperature]
type = PointValue
variable = 'solution_temperature'
[]
[]
[Executioner]
type = Transient
dt = 1
end_time = 10
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/equilibrium_models/HCl_no_action.i)
# This is an example of an input file that does not utilize an action. Its functionality is the same as HCl.i
# This solves for molalities in a system just containing HCl
[GlobalParams]
point = '0 0 0'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx= 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[u]
type = Diffusion
variable = u
[]
[]
[AuxVariables]
[solution_temperature]
[]
[kg_solvent_H2O]
[]
[activity_H2O]
[]
[bulk_moles_H2O]
[]
[pH]
[]
[molal_H+]
[]
[molal_Cl-]
[]
[molal_HCl]
[]
[molal_OH-]
[]
[mg_per_kg_H+]
[]
[mg_per_kg_Cl-]
[]
[mg_per_kg_HCl]
[]
[mg_per_kg_OH-]
[]
[activity_H+]
[]
[activity_Cl-]
[]
[activity_HCl]
[]
[activity_OH-]
[]
[bulk_moles_H+]
[]
[bulk_moles_Cl-]
[]
[bulk_moles_HCl]
[]
[bulk_moles_OH-]
[]
[]
[AuxKernels]
[solution_temperature]
type = GeochemistryQuantityAux
species = 'H+'
reactor = reactor
variable = solution_temperature
quantity = temperature
[]
[kg_solvent_H2O]
type = GeochemistryQuantityAux
species = 'H2O'
reactor = reactor
variable = kg_solvent_H2O
quantity = molal
[]
[activity_H2O]
type = GeochemistryQuantityAux
species = 'H2O'
reactor = reactor
variable = activity_H2O
quantity = activity
[]
[bulk_moles_H2O]
type = GeochemistryQuantityAux
species = 'H2O'
reactor = reactor
variable = bulk_moles_H2O
quantity = bulk_moles
[]
[pH]
type = GeochemistryQuantityAux
species = 'H+'
reactor = reactor
variable = pH
quantity = neglog10a
[]
[molal_H+]
type = GeochemistryQuantityAux
species = 'H+'
reactor = reactor
variable = 'molal_H+'
quantity = molal
[]
[molal_Cl-]
type = GeochemistryQuantityAux
species = 'Cl-'
reactor = reactor
variable = 'molal_Cl-'
quantity = molal
[]
[molal_HCl]
type = GeochemistryQuantityAux
species = 'HCl'
reactor = reactor
variable = 'molal_HCl'
quantity = molal
[]
[molal_OH-]
type = GeochemistryQuantityAux
species = 'OH-'
reactor = reactor
variable = 'molal_OH-'
quantity = molal
[]
[mg_per_kg_H+]
type = GeochemistryQuantityAux
species = 'H+'
reactor = reactor
variable = 'mg_per_kg_H+'
quantity = mg_per_kg
[]
[mg_per_kg_Cl-]
type = GeochemistryQuantityAux
species = 'Cl-'
reactor = reactor
variable = 'mg_per_kg_Cl-'
quantity = mg_per_kg
[]
[mg_per_kg_HCl]
type = GeochemistryQuantityAux
species = 'HCl'
reactor = reactor
variable = 'mg_per_kg_HCl'
quantity = mg_per_kg
[]
[mg_per_kg_OH-]
type = GeochemistryQuantityAux
species = 'OH-'
reactor = reactor
variable = 'mg_per_kg_OH-'
quantity = mg_per_kg
[]
[activity_H+]
type = GeochemistryQuantityAux
species = 'H+'
reactor = reactor
variable = 'activity_H+'
quantity = activity
[]
[activity_Cl-]
type = GeochemistryQuantityAux
species = 'Cl-'
reactor = reactor
variable = 'activity_Cl-'
quantity = activity
[]
[activity_HCl]
type = GeochemistryQuantityAux
species = 'HCl'
reactor = reactor
variable = 'activity_HCl'
quantity = activity
[]
[activity_OH-]
type = GeochemistryQuantityAux
species = 'OH-'
reactor = reactor
variable = 'activity_OH-'
quantity = activity
[]
[bulk_moles_H+]
type = GeochemistryQuantityAux
species = 'H+'
reactor = reactor
variable = 'bulk_moles_H+'
quantity = bulk_moles
[]
[bulk_moles_Cl-]
type = GeochemistryQuantityAux
species = 'Cl-'
reactor = reactor
variable = 'bulk_moles_Cl-'
quantity = bulk_moles
[]
[bulk_moles_HCl]
type = GeochemistryQuantityAux
species = 'HCl'
reactor = reactor
variable = 'bulk_moles_HCl'
quantity = bulk_moles
[]
[bulk_moles_OH-]
type = GeochemistryQuantityAux
species = 'OH-'
reactor = reactor
variable = 'bulk_moles_OH-'
quantity = bulk_moles
[]
[]
[Postprocessors]
[pH]
type = PointValue
variable = 'pH'
[]
[solvent_mass]
type = PointValue
variable = 'kg_solvent_H2O'
[]
[molal_Cl-]
type = PointValue
variable = 'molal_Cl-'
[]
[mg_per_kg_HCl]
type = PointValue
variable = 'mg_per_kg_HCl'
[]
[activity_OH-]
type = PointValue
variable = 'activity_OH-'
[]
[bulk_H+]
type = PointValue
variable = 'bulk_moles_H+'
[]
[temperature]
type = PointValue
variable = 'solution_temperature'
[]
[]
[Executioner]
type = Steady
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
piecewise_linear_interpolation = true # to reproduce the GWB result
[]
[reactor]
type = GeochemistryTimeDependentReactor
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 1.0 -2 1E-2"
constraint_meaning = "kg_solvent_water log10activity bulk_composition"
constraint_unit = " kg dimensionless moles"
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
abs_tol = 1E-15
[]
[nnn]
type = NearestNodeNumberUO
[]
[]
[Outputs]
csv = true
[console_output]
type = GeochemistryConsoleOutput
geochemistry_reactor = reactor
nearest_node_number_UO = nnn
solver_info = true
execute_on = initial
[]
[]
(modules/geochemistry/test/tests/time_dependent_reactions/flushing_case3.i)
# Alkali flushing of a reservoir (an example of flushing): adding Na2SiO3
# To determine the initial constraint_values, run flushing_equilibrium_at70degC.i
# Note that flushing_equilibrium_at70degC.i will have to be re-run when temperature-dependence has been added to geochemistry
# Note that Dawsonite is currently not included as an equilibrium_mineral, otherwise it is supersaturated in the initial configuration, so precipitates. Bethke does not report this in Fig30.4, so I assume it is due to temperature dependence
[GlobalParams]
point = '0 0 0'
[]
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
swap_into_basis = "Calcite Dolomite-ord Muscovite Kaolinite"
swap_out_of_basis = "HCO3- Mg++ K+ Al+++"
constraint_species = "H2O H+ Cl- Na+ Ca++ Calcite Dolomite-ord Muscovite Kaolinite SiO2(aq)"
constraint_value = " 1.0 1E-5 2.1716946 1.0288941 0.21650572 10.177537 3.6826177 1.320907 1.1432682 6.318e-05"
constraint_meaning = "kg_solvent_water activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition free_concentration"
constraint_unit = " kg dimensionless moles moles moles moles moles moles moles molal"
initial_temperature = 70.0
temperature = 70.0
kinetic_species_name = Quartz
kinetic_species_initial_value = 226.992243
kinetic_species_unit = moles
evaluate_kinetic_rates_always = true # implicit time-marching used for stability
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
close_system_at_time = 0.0
remove_fixed_activity_name = "H+"
remove_fixed_activity_time = 0.0
mode = 3 # flush through the NaOH solution specified below:
source_species_names = "H2O H+ Na+ SiO2(aq)"
source_species_rates = "27.88 -0.25 0.25 0.125" # 1kg water/2days = 27.755moles/day. 0.25mol Na2O/2days = 0.25*(--2mol H+ + 2mol Na+ + 1mol H2O)/2days
[]
[UserObjects]
[rate_quartz]
type = GeochemistryKineticRate
kinetic_species_name = Quartz
intrinsic_rate_constant = 1.3824E-13 # 1.6E-19mol/s/cm^2 = 1.3824E-13mol/day/cm^2
multiply_by_mass = true
area_quantity = 1000
promoting_species_names = "H+"
promoting_indices = "-0.5"
[]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- Na+ Ca++ HCO3- Mg++ K+ Al+++ SiO2(aq)"
equilibrium_minerals = "Calcite Dolomite-ord Muscovite Kaolinite Paragonite Analcime Phlogopite Tridymite" # Dawsonite
kinetic_minerals = "Quartz"
kinetic_rate_descriptions = "rate_quartz"
[]
[]
[AuxVariables]
[diss_rate]
[]
[]
[AuxKernels]
[diss_rate]
type = ParsedAux
coupled_variables = mol_change_Quartz
expression = '-mol_change_Quartz / 1.0' # 1.0 = timestep size
variable = diss_rate
[]
[]
[Postprocessors]
[pH]
type = PointValue
variable = "pH"
[]
[rate_mole_per_day]
type = PointValue
variable = diss_rate
[]
[cm3_Calcite]
type = PointValue
variable = free_cm3_Calcite
[]
[cm3_Dolomite]
type = PointValue
variable = free_cm3_Dolomite-ord
[]
[cm3_Muscovite]
type = PointValue
variable = free_cm3_Muscovite
[]
[cm3_Kaolinite]
type = PointValue
variable = free_cm3_Kaolinite
[]
[cm3_Quartz]
type = PointValue
variable = free_cm3_Quartz
[]
[cm3_Paragonite]
type = PointValue
variable = free_cm3_Paragonite
[]
[cm3_Analcime]
type = PointValue
variable = free_cm3_Analcime
[]
[cm3_Phlogopite]
type = PointValue
variable = free_cm3_Phlogopite
[]
[cm3_Tridymite]
type = PointValue
variable = free_cm3_Tridymite
[]
[]
[Executioner]
type = Transient
dt = 0.1
end_time = 20E-1 # measured in days
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/redox_disequilibrium/morro_disequilibrium.i)
[TimeIndependentReactionSolver]
model_definition = definition
temperature = 22
charge_balance_species = "Cl-" # this means the bulk moles of Cl- will not be exactly as set below
constraint_species = "H2O H+ O2(aq) Cl- HCO3- Ca++ Mg++ Na+ K+ Fe++ Fe+++ Mn++ Zn++ SO4--"
constraint_value = " 1.0 -6.05 0.13438E-3 3.041E-5 0.0295E-3 0.005938E-3 0.01448E-3 0.0018704E-3 0.005115E-3 0.012534E-3 0.0005372E-3 0.005042E-3 0.001897E-3 0.01562E-4"
constraint_meaning = "kg_solvent_water log10activity free_concentration bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = " kg dimensionless molal moles moles moles moles moles moles moles moles moles moles moles"
max_initial_residual = 1E-2
ramp_max_ionic_strength_initial = 10
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
mol_cutoff = 1E-5
abs_tol = 1E-15
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- O2(aq) HCO3- Ca++ Mg++ Na+ K+ Fe++ Fe+++ Mn++ Zn++ SO4--"
[]
[]
(modules/combined/examples/geochem-porous_flow/forge/natural_reservoir.i)
# Simulation to assess natural changes in the reservoir. Recall that water_60_to_220degC has provided a stable mineral assemblage that is in agreement with XRD observations, and a water at equilibrium with that assemblage. However, Stuart Simmons suggested including Laumontite and Zoisite into the simulation, and they were not included in water_60_to_220degC since they are more stable than Anorthite, so Anorthite completely dissolves when equilibrium is assumed. Here, all minerals suggested by Stuart Simmons are added to the system and kinetics are used to determine the time scales of the mineral changes. The initial water composition is the reservoir water from water_60_to_220degC.
# The initial mole numbers of the kinetic species are chosen to be such that:
# - the mass fractions are: Albite 0.44; Anorthite 0.05; K-feldspar 0.29; Quartz 0.18, Phlgoptite 0.02 and Illite 0.02 with trace amounts of the remaining minerals. These are similar to that measured in bulk X-ray diffraction results of 10 samples from well 58-32, assuming that "plagioclase feldspar" consists of Albite and Anorthite in the ratio 9:1, and that Biotite is Phlogoptite. The trace amounts of each mineral are necessary because of the way the kinetics works: precipitation rate is proportional to mineral-species mass, so without any mass, no precipitation is possible. Precisely:
# - it is assumed that water_60_to_220degC consists of 1 litre of water (there is 1kg of solvent water) and that the porosity is 0.01, so the amount of rock should be 99000cm^3
# - the cm^3 of the trace minerals Calcite and Anhydrite is exactly given by water_60_to_220degC (0.016 and 0.018 respectively)
# - see initial_kinetic_moles.xlsx for the remaining mole numbers
# The results depend on the kinetic rates used and these are recognised to be poorly constrained by experiment
[UserObjects]
[rate_Albite]
type = GeochemistryKineticRate
kinetic_species_name = Albite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 69.8E3
one_over_T0 = 0.003354
[]
[rate_Anhydrite]
type = GeochemistryKineticRate
kinetic_species_name = Anhydrite
intrinsic_rate_constant = 1.0E-7
multiply_by_mass = true
area_quantity = 10
activation_energy = 14.3E3
one_over_T0 = 0.003354
[]
[rate_Anorthite]
type = GeochemistryKineticRate
kinetic_species_name = Anorthite
intrinsic_rate_constant = 1.0E-13
multiply_by_mass = true
area_quantity = 10
activation_energy = 17.8E3
one_over_T0 = 0.003354
[]
[rate_Calcite]
type = GeochemistryKineticRate
kinetic_species_name = Calcite
intrinsic_rate_constant = 1.0E-10
multiply_by_mass = true
area_quantity = 10
activation_energy = 23.5E3
one_over_T0 = 0.003354
[]
[rate_Chalcedony]
type = GeochemistryKineticRate
kinetic_species_name = Chalcedony
intrinsic_rate_constant = 1.0E-18
multiply_by_mass = true
area_quantity = 10
activation_energy = 90.1E3
one_over_T0 = 0.003354
[]
[rate_Clinochl-7A]
type = GeochemistryKineticRate
kinetic_species_name = Clinochl-7A
intrinsic_rate_constant = 1.0E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 88.0E3
one_over_T0 = 0.003354
[]
[rate_Illite]
type = GeochemistryKineticRate
kinetic_species_name = Illite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 29E3
one_over_T0 = 0.003354
[]
[rate_K-feldspar]
type = GeochemistryKineticRate
kinetic_species_name = K-feldspar
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 38E3
one_over_T0 = 0.003354
[]
[rate_Kaolinite]
type = GeochemistryKineticRate
kinetic_species_name = Kaolinite
intrinsic_rate_constant = 1E-18
multiply_by_mass = true
area_quantity = 10
activation_energy = 22.2E3
one_over_T0 = 0.003354
[]
[rate_Quartz]
type = GeochemistryKineticRate
kinetic_species_name = Quartz
intrinsic_rate_constant = 1E-18
multiply_by_mass = true
area_quantity = 10
activation_energy = 90.1E3
one_over_T0 = 0.003354
[]
[rate_Paragonite]
type = GeochemistryKineticRate
kinetic_species_name = Paragonite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 22E3
one_over_T0 = 0.003354
[]
[rate_Phlogopite]
type = GeochemistryKineticRate
kinetic_species_name = Phlogopite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 22E3
one_over_T0 = 0.003354
[]
[rate_Laumontite]
type = GeochemistryKineticRate
kinetic_species_name = Laumontite
intrinsic_rate_constant = 1.0E-15
multiply_by_mass = true
area_quantity = 10
activation_energy = 17.8E3
one_over_T0 = 0.003354
[]
[rate_Zoisite]
type = GeochemistryKineticRate
kinetic_species_name = Zoisite
intrinsic_rate_constant = 1E-16
multiply_by_mass = true
area_quantity = 10
activation_energy = 66.1E3
one_over_T0 = 0.003354
[]
[definition]
type = GeochemicalModelDefinition
database_file = '../../../../geochemistry/database/moose_geochemdb.json'
basis_species = 'H2O H+ Na+ K+ Ca++ Mg++ SiO2(aq) Al+++ Cl- SO4-- HCO3-'
remove_all_extrapolated_secondary_species = true
kinetic_minerals = 'Albite Anhydrite Anorthite Calcite Chalcedony Clinochl-7A Illite K-feldspar Kaolinite Quartz Paragonite Phlogopite Zoisite Laumontite'
kinetic_rate_descriptions = 'rate_Albite rate_Anhydrite rate_Anorthite rate_Calcite rate_Chalcedony rate_Clinochl-7A rate_Illite rate_K-feldspar rate_Kaolinite rate_Quartz rate_Paragonite rate_Phlogopite rate_Zoisite rate_Laumontite'
[]
[]
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = 'Cl-'
constraint_species = 'H2O H+ Na+ K+ Ca++ Mg++ SiO2(aq) Al+++ Cl- SO4-- HCO3-'
# Following numbers are from water_60_to_220degC_out.csv
constraint_value = ' 1.0006383866109 9.5165072498215e-07 0.100020379171 0.0059389061065 0.011570884507621 4.6626763057447e-06 0.0045110404925255 5.8096968688789e-17 0.13500708594394 6.6523540147676e-05 7.7361407898089e-05'
constraint_meaning = 'kg_solvent_water free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration bulk_composition free_concentration free_concentration'
constraint_unit = ' kg molal molal molal molal molal molal molal moles molal molal'
initial_temperature = 220
temperature = 220
kinetic_species_name = ' Albite Anorthite K-feldspar Quartz Phlogopite Paragonite Calcite Anhydrite Chalcedony Illite Kaolinite Clinochl-7A Zoisite Laumontite'
kinetic_species_initial_value = '4.324073236492E+02 4.631370307325E+01 2.685015418378E+02 7.720095013956E+02 1.235192062541E+01 7.545461404965E-01 4.234651808835E-04 4.000485907930E-04 4.407616361072E+00 1.342524904876E+01 1.004823151125E+00 4.728132387707E-01 7.326007326007E-01 4.818116116598E-01'
kinetic_species_unit = ' moles moles moles moles moles moles moles moles moles moles moles moles moles moles'
evaluate_kinetic_rates_always = true # otherwise will easily "run out" of dissolving species
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
execute_console_output_on = ''
[]
[Executioner]
type = Transient
[TimeStepper]
type = FunctionDT
function = 'max(1E2, 0.1 * t)'
[]
end_time = 4E11
[]
[GlobalParams]
point = '0 0 0'
[]
[Postprocessors]
[cm3_Albite]
type = PointValue
variable = 'free_cm3_Albite'
[]
[cm3_Anhydrite]
type = PointValue
variable = 'free_cm3_Anhydrite'
[]
[cm3_Anorthite]
type = PointValue
variable = 'free_cm3_Anorthite'
[]
[cm3_Calcite]
type = PointValue
variable = 'free_cm3_Calcite'
[]
[cm3_Chalcedony]
type = PointValue
variable = 'free_cm3_Chalcedony'
[]
[cm3_Clinochl-7A]
type = PointValue
variable = 'free_cm3_Clinochl-7A'
[]
[cm3_Illite]
type = PointValue
variable = 'free_cm3_Illite'
[]
[cm3_K-feldspar]
type = PointValue
variable = 'free_cm3_K-feldspar'
[]
[cm3_Kaolinite]
type = PointValue
variable = 'free_cm3_Kaolinite'
[]
[cm3_Quartz]
type = PointValue
variable = 'free_cm3_Quartz'
[]
[cm3_Paragonite]
type = PointValue
variable = 'free_cm3_Paragonite'
[]
[cm3_Phlogopite]
type = PointValue
variable = 'free_cm3_Phlogopite'
[]
[cm3_Zoisite]
type = PointValue
variable = 'free_cm3_Zoisite'
[]
[cm3_Laumontite]
type = PointValue
variable = 'free_cm3_Laumontite'
[]
[cm3_mineral]
type = LinearCombinationPostprocessor
pp_names = 'cm3_Albite cm3_Anhydrite cm3_Anorthite cm3_Calcite cm3_Chalcedony cm3_Clinochl-7A cm3_Illite cm3_K-feldspar cm3_Kaolinite cm3_Quartz cm3_Paragonite cm3_Phlogopite cm3_Zoisite cm3_Laumontite'
pp_coefs = '1 1 1 1 1 1 1 1 1 1 1 1 1 1'
[]
[pH]
type = PointValue
variable = 'pH'
[]
[kg_solvent_H2O]
type = PointValue
variable = 'kg_solvent_H2O'
[]
[]
[Outputs]
csv = true
[]
(modules/combined/examples/geochem-porous_flow/geotes_2D/aquifer_un_quartz_geochemistry.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 56
ny = 32
xmin = -70
xmax = 70
ymin = -40
ymax = 40
[]
[]
[GlobalParams]
point = '0 0 0'
reactor = reactor
[]
[SpatialReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
constraint_species = "H2O Na+ Cl- SiO2(aq)"
# ASSUME that 1 litre of solution contains:
constraint_value = " 1.0 0.1 0.1 0.00172249633"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition free_concentration"
constraint_unit = " kg moles moles molal"
initial_temperature = 50.0
kinetic_species_name = QuartzUnlike
# Per 1 litre (1000cm^3) of aqueous solution (1kg of solvent water), there is 9000cm^3 of QuartzUnlike, which means the initial porosity is 0.1.
kinetic_species_initial_value = 9000
kinetic_species_unit = cm3
temperature = temperature
source_species_names = 'H2O Na+ Cl- SiO2(aq)'
source_species_rates = 'rate_H2O_per_1l rate_Na_per_1l rate_Cl_per_1l rate_SiO2_per_1l'
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
add_aux_pH = false # there is no H+ in this system
evaluate_kinetic_rates_always = true # implicit time-marching used for stability
execute_console_output_on = '' # only CSV and exodus output used in this example
[]
[UserObjects]
[rate_quartz]
type = GeochemistryKineticRate
kinetic_species_name = QuartzUnlike
intrinsic_rate_constant = 1.0E-2
multiply_by_mass = true
area_quantity = 1
activation_energy = 72800.0
[]
[definition]
type = GeochemicalModelDefinition
database_file = "small_database.json"
basis_species = "H2O SiO2(aq) Na+ Cl-"
kinetic_minerals = "QuartzUnlike"
kinetic_rate_descriptions = "rate_quartz"
[]
[]
[Executioner]
type = Transient
dt = 1E5
end_time = 7.76E6 # 90 days
[]
[AuxVariables]
[temperature]
initial_condition = 50.0
[]
[nodal_volume]
[]
[porosity]
[]
[nodal_void_volume]
[]
[pf_rate_H2O] # change in H2O mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Na] # change in H2O mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Cl] # change in H2O mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_SiO2] # change in H2O mass (kg/s) at each node provided by the porous-flow simulation
[]
[rate_H2O_per_1l] # rate per 1 litre of aqueous solution that we consider at each node
[]
[rate_Na_per_1l]
[]
[rate_Cl_per_1l]
[]
[rate_SiO2_per_1l]
[]
[transported_H2O]
[]
[transported_Na]
[]
[transported_Cl]
[]
[transported_SiO2]
[]
[transported_mass]
[]
[massfrac_Na]
[]
[massfrac_Cl]
[]
[massfrac_SiO2]
[]
[massfrac_H2O]
[]
[]
[AuxKernels]
[nodal_volume] # TODO: change this hard-coded version once PR is merged
type = FunctionAux
variable = nodal_volume
function = 'if(abs(x) = 70 & abs(y) = 40, 2.5, if(abs(x) = 70 | abs(y) = 40, 5, 10))'
execute_on = 'initial'
[]
[porosity]
type = ParsedAux
coupled_variables = free_cm3_QuartzUnlike
expression = '1000.0 / (1000.0 + free_cm3_QuartzUnlike)'
variable = porosity
execute_on = 'timestep_begin timestep_end'
[]
[nodal_void_volume]
type = ParsedAux
coupled_variables = 'porosity nodal_volume'
variable = nodal_void_volume
expression = 'porosity * nodal_volume'
execute_on = 'timestep_begin'
[]
[rate_H2O_per_1l]
type = ParsedAux
coupled_variables = 'pf_rate_H2O nodal_void_volume'
variable = rate_H2O_per_1l
# pf_rate = change in kg at every node
# pf_rate * 1000 / molar_mass_in_g_per_mole = change in moles at every node
# pf_rate * 1000 / molar_mass / (nodal_void_volume_in_m^3 * 1000) = change in moles per litre of aqueous solution
expression = 'pf_rate_H2O / 18.0152 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_Na_per_1l]
type = ParsedAux
coupled_variables = 'pf_rate_Na nodal_void_volume'
variable = rate_Na_per_1l
expression = 'pf_rate_Na / 22.9898 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_Cl_per_1l]
type = ParsedAux
coupled_variables = 'pf_rate_Cl nodal_void_volume'
variable = rate_Cl_per_1l
expression = 'pf_rate_Cl / 35.453 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_SiO2_per_1l]
type = ParsedAux
coupled_variables = 'pf_rate_SiO2 nodal_void_volume'
variable = rate_SiO2_per_1l
expression = 'pf_rate_SiO2 / 60.0843 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[transported_H2O]
type = GeochemistryQuantityAux
variable = transported_H2O
species = H2O
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Na]
type = GeochemistryQuantityAux
variable = transported_Na
species = Na+
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Cl]
type = GeochemistryQuantityAux
variable = transported_Cl
species = Cl-
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_SiO2]
type = GeochemistryQuantityAux
variable = transported_SiO2
species = 'SiO2(aq)'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_mass]
type = ParsedAux
coupled_variables = 'transported_H2O transported_Na transported_Cl transported_SiO2'
variable = transported_mass
expression = 'transported_H2O * 18.0152 + transported_Na * 22.9898 + transported_Cl * 35.453 + transported_SiO2 * 60.0843'
execute_on = 'timestep_end'
[]
[massfrac_H2O]
type = ParsedAux
coupled_variables = 'transported_H2O transported_mass'
variable = massfrac_H2O
expression = 'transported_H2O * 18.0152 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Na]
type = ParsedAux
coupled_variables = 'transported_Na transported_mass'
variable = massfrac_Na
expression = 'transported_Na * 22.9898 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Cl]
type = ParsedAux
coupled_variables = 'transported_Cl transported_mass'
variable = massfrac_Cl
expression = 'transported_Cl * 35.453 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_SiO2]
type = ParsedAux
coupled_variables = 'transported_SiO2 transported_mass'
variable = massfrac_SiO2
expression = 'transported_SiO2 * 60.0843 / transported_mass'
execute_on = 'timestep_end'
[]
[]
[Postprocessors]
[cm3_quartz]
type = PointValue
variable = free_cm3_QuartzUnlike
[]
[porosity]
type = PointValue
variable = porosity
[]
[solution_temperature]
type = PointValue
variable = solution_temperature
[]
[massfrac_H2O]
type = PointValue
variable = massfrac_H2O
[]
[massfrac_Na]
type = PointValue
variable = massfrac_Na
[]
[massfrac_Cl]
type = PointValue
variable = massfrac_Cl
[]
[massfrac_SiO2]
type = PointValue
variable = massfrac_SiO2
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/geochemistry/test/tests/kinetics/bio_sulfate_2.i)
# Example of a microbe-catalysed reaction (see Bethke Section 18.5 for further details):
# CH3COO- + SO4-- -> 2HCO3- + HS-
# at pH = 7.2
# at temperature = 25degC
# This file treats the microbe as a kinetic species and all the aqueous components are in equilibrium
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
swap_into_basis = 'HS-'
swap_out_of_basis = 'O2(aq)'
charge_balance_species = "Cl-"
constraint_species = "H2O Na+ Ca++ Fe++ Cl- SO4-- HCO3- HS- H+ CH3COO-"
constraint_value = " 1.0 501E-3 20E-3 2E-3 500E-3 20E-3 2E-3 0.3E-6 -7.2 1E-3"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition log10activity bulk_composition"
constraint_unit = " kg moles moles moles moles moles moles moles dimensionless moles"
controlled_activity_name = 'H+'
controlled_activity_value = 6.30957E-8 # this is pH=7.2
kinetic_species_name = "sulfate_reducer"
kinetic_species_initial_value = 0.1
kinetic_species_unit = mg
ramp_max_ionic_strength_initial = 0
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
execute_console_output_on = ''
mol_cutoff = 1E-20
solver_info = true
evaluate_kinetic_rates_always = true
prevent_precipitation = 'Pyrite Troilite'
[]
[UserObjects]
[rate_sulfate_reducer]
type = GeochemistryKineticRate
kinetic_species_name = "sulfate_reducer"
intrinsic_rate_constant = 0.0864 # 1E-9 mol/mg/s = 0.0864 mol/g/day
multiply_by_mass = true
promoting_species_names = 'CH3COO-'
promoting_indices = 1
promoting_monod_indices = 1
promoting_half_saturation = 70E-6
direction = both
kinetic_biological_efficiency = 4.3E-3
energy_captured = 45E3
theta = 0.2
eta = 1
[]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O Na+ Ca++ Fe++ Cl- SO4-- HCO3- O2(aq) H+ CH3COO-"
equilibrium_minerals = "Mackinawite" # other minerals make marginal difference
kinetic_minerals = "sulfate_reducer"
kinetic_rate_descriptions = "rate_sulfate_reducer"
piecewise_linear_interpolation = true # comparison with GWB
[]
[]
[Functions]
[timestepper]
type = PiecewiseLinear
x = '0 10 18 21'
y = '1E-2 1E-2 1 1'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = FunctionDT
function = timestepper
[]
end_time = 21
[]
[AuxVariables]
[moles_acetate]
[]
[biomass_mg]
[]
[]
[AuxKernels]
[moles_acetate]
type = GeochemistryQuantityAux
species = 'CH3COO-'
reactor = reactor
variable = moles_acetate
quantity = transported_moles_in_original_basis
[]
[biomass_mg]
type = GeochemistryQuantityAux
species = 'sulfate_reducer'
reactor = reactor
variable = biomass_mg
quantity = free_mg
[]
[]
[Postprocessors]
[moles_acetate]
type = PointValue
point = '0 0 0'
variable = moles_acetate
[]
[biomass_mg]
type = PointValue
point = '0 0 0'
variable = biomass_mg
[]
[]
[Outputs]
csv = true
[]
(modules/combined/examples/geochem-porous_flow/forge/reservoir_and_water_3.i)
# Simulation to assess possible changes in the reservoir. The rock composition from natural_reservoir.i is mixed with the water from water_3.i Note that the free_concentration values are used from water_3.i and that composition is held fixed throughout this entire simulation. This models water_3 continually flushing through the rock mineral assemblage: as soon as a mineral dissolves the aqueous components are swept away and replaced by a new batch of water_3; as soon as mineral precipitates more water_3 sweeps into the system providing a limitless source of aqueous components (in set ratios) at 70degC
# The results depend on the kinetic rates used and these are recognised to be poorly constrained by experiment
[UserObjects]
[rate_Albite]
type = GeochemistryKineticRate
kinetic_species_name = Albite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 69.8E3
one_over_T0 = 0.003354
[]
[rate_Anhydrite]
type = GeochemistryKineticRate
kinetic_species_name = Anhydrite
intrinsic_rate_constant = 1.0E-7
multiply_by_mass = true
area_quantity = 10
activation_energy = 14.3E3
one_over_T0 = 0.003354
[]
[rate_Anorthite]
type = GeochemistryKineticRate
kinetic_species_name = Anorthite
intrinsic_rate_constant = 1.0E-13
multiply_by_mass = true
area_quantity = 10
activation_energy = 17.8E3
one_over_T0 = 0.003354
[]
[rate_Calcite]
type = GeochemistryKineticRate
kinetic_species_name = Calcite
intrinsic_rate_constant = 1.0E-10
multiply_by_mass = true
area_quantity = 10
activation_energy = 23.5E3
one_over_T0 = 0.003354
[]
[rate_Chalcedony]
type = GeochemistryKineticRate
kinetic_species_name = Chalcedony
intrinsic_rate_constant = 1.0E-18
multiply_by_mass = true
area_quantity = 10
activation_energy = 90.1E3
one_over_T0 = 0.003354
[]
[rate_Clinochl-7A]
type = GeochemistryKineticRate
kinetic_species_name = Clinochl-7A
intrinsic_rate_constant = 1.0E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 88.0E3
one_over_T0 = 0.003354
[]
[rate_Illite]
type = GeochemistryKineticRate
kinetic_species_name = Illite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 29E3
one_over_T0 = 0.003354
[]
[rate_K-feldspar]
type = GeochemistryKineticRate
kinetic_species_name = K-feldspar
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 38E3
one_over_T0 = 0.003354
[]
[rate_Kaolinite]
type = GeochemistryKineticRate
kinetic_species_name = Kaolinite
intrinsic_rate_constant = 1E-18
multiply_by_mass = true
area_quantity = 10
activation_energy = 22.2E3
one_over_T0 = 0.003354
[]
[rate_Quartz]
type = GeochemistryKineticRate
kinetic_species_name = Quartz
intrinsic_rate_constant = 1E-18
multiply_by_mass = true
area_quantity = 10
activation_energy = 90.1E3
one_over_T0 = 0.003354
[]
[rate_Paragonite]
type = GeochemistryKineticRate
kinetic_species_name = Paragonite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 22E3
one_over_T0 = 0.003354
[]
[rate_Phlogopite]
type = GeochemistryKineticRate
kinetic_species_name = Phlogopite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 22E3
one_over_T0 = 0.003354
[]
[rate_Laumontite]
type = GeochemistryKineticRate
kinetic_species_name = Laumontite
intrinsic_rate_constant = 1.0E-15
multiply_by_mass = true
area_quantity = 10
activation_energy = 17.8E3
one_over_T0 = 0.003354
[]
[rate_Zoisite]
type = GeochemistryKineticRate
kinetic_species_name = Zoisite
intrinsic_rate_constant = 1E-16
multiply_by_mass = true
area_quantity = 10
activation_energy = 66.1E3
one_over_T0 = 0.003354
[]
[definition]
type = GeochemicalModelDefinition
database_file = '../../../../geochemistry/database/moose_geochemdb.json'
basis_species = 'H2O H+ Na+ K+ Ca++ Mg++ SiO2(aq) Al+++ Cl- SO4-- HCO3-'
remove_all_extrapolated_secondary_species = true
kinetic_minerals = 'Albite Anhydrite Anorthite Calcite Chalcedony Clinochl-7A Illite K-feldspar Kaolinite Quartz Paragonite Phlogopite Zoisite Laumontite'
kinetic_rate_descriptions = 'rate_Albite rate_Anhydrite rate_Anorthite rate_Calcite rate_Chalcedony rate_Clinochl-7A rate_Illite rate_K-feldspar rate_Kaolinite rate_Quartz rate_Paragonite rate_Phlogopite rate_Zoisite rate_Laumontite'
[]
[]
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = 'Cl-'
constraint_species = 'H2O H+ Na+ K+ Ca++ Mg++ SiO2(aq) Al+++ Cl- SO4-- HCO3-'
# Following numbers are from water_3_out.csv
constraint_value = ' 0.99999999549877 8.0204734722945e-07 0.0001319920398478 2.8097346859027e-05 7.7328020546464e-05 2.874602030221e-05 0.00027284654762868 4.4715524787497e-12 0.0002253530818877 1.0385772502298e-05 0.00012427759434288'
constraint_meaning = 'kg_solvent_water free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration bulk_composition free_concentration free_concentration'
constraint_unit = ' kg molal molal molal molal molal molal molal moles molal molal'
initial_temperature = 70
temperature = 70
close_system_at_time = 1E20 # keep the free molalities specified above for all time
kinetic_species_name = ' Albite Anorthite K-feldspar Quartz Phlogopite Paragonite Calcite Anhydrite Chalcedony Illite Kaolinite Clinochl-7A Zoisite Laumontite'
kinetic_species_initial_value = '4.324073236492E+02 4.631370307325E+01 2.685015418378E+02 7.720095013956E+02 1.235192062541E+01 7.545461404965E-01 4.234651808835E-04 4.000485907930E-04 4.407616361072E+00 1.342524904876E+01 1.004823151125E+00 4.728132387707E-01 7.326007326007E-01 4.818116116598E-01'
kinetic_species_unit = ' moles moles moles moles moles moles moles moles moles moles moles moles moles moles'
evaluate_kinetic_rates_always = true # otherwise will easily "run out" of dissolving species
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
execute_console_output_on = ''
[]
[Executioner]
type = Transient
[TimeStepper]
type = FunctionDT
function = 'max(1E6, 0.3 * t)'
[]
end_time = 4E11
[]
[GlobalParams]
point = '0 0 0'
[]
[Postprocessors]
[temperature]
type = PointValue
variable = 'solution_temperature'
[]
[cm3_Albite]
type = PointValue
variable = 'free_cm3_Albite'
[]
[cm3_Anhydrite]
type = PointValue
variable = 'free_cm3_Anhydrite'
[]
[cm3_Anorthite]
type = PointValue
variable = 'free_cm3_Anorthite'
[]
[cm3_Calcite]
type = PointValue
variable = 'free_cm3_Calcite'
[]
[cm3_Chalcedony]
type = PointValue
variable = 'free_cm3_Chalcedony'
[]
[cm3_Clinochl-7A]
type = PointValue
variable = 'free_cm3_Clinochl-7A'
[]
[cm3_Illite]
type = PointValue
variable = 'free_cm3_Illite'
[]
[cm3_K-feldspar]
type = PointValue
variable = 'free_cm3_K-feldspar'
[]
[cm3_Kaolinite]
type = PointValue
variable = 'free_cm3_Kaolinite'
[]
[cm3_Quartz]
type = PointValue
variable = 'free_cm3_Quartz'
[]
[cm3_Paragonite]
type = PointValue
variable = 'free_cm3_Paragonite'
[]
[cm3_Phlogopite]
type = PointValue
variable = 'free_cm3_Phlogopite'
[]
[cm3_Zoisite]
type = PointValue
variable = 'free_cm3_Zoisite'
[]
[cm3_Laumontite]
type = PointValue
variable = 'free_cm3_Laumontite'
[]
[cm3_mineral]
type = LinearCombinationPostprocessor
pp_names = 'cm3_Albite cm3_Anhydrite cm3_Anorthite cm3_Calcite cm3_Chalcedony cm3_Clinochl-7A cm3_Illite cm3_K-feldspar cm3_Kaolinite cm3_Quartz cm3_Paragonite cm3_Phlogopite cm3_Zoisite cm3_Laumontite'
pp_coefs = '1 1 1 1 1 1 1 1 1 1 1 1 1 1'
[]
[pH]
type = PointValue
variable = 'pH'
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/time_dependent_reactions/seawater_evaporation_no_flow_through.i)
#Progressively remove H2O until virtually none remains
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- Ca++ Mg++ Na+ K+ SO4-- HCO3-"
equilibrium_minerals = "Dolomite Epsomite Gypsum Halite Magnesite Mirabilite Sylvite"
equilibrium_gases = "CO2(g)"
piecewise_linear_interpolation = true # for precise agreement with GWB
[]
[]
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
swap_out_of_basis = "H+"
swap_into_basis = " CO2(g)"
charge_balance_species = "Cl-" # this means the bulk moles of Cl- will not be exactly as set below
constraint_species = "H2O CO2(g) Cl- Na+ SO4-- Mg++ Ca++ K+ HCO3-"
constraint_value = " 1.0 -3.5 0.5656 0.4850 0.02924 0.05501 0.01063 0.010576055 0.002412"
constraint_meaning = "kg_solvent_water log10fugacity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = " kg dimensionless moles moles moles moles moles moles moles"
close_system_at_time = 0
source_species_names = "H2O"
source_species_rates = "-1.0" # 1kg H2O = 55.51 moles, each time step removes 1 mole
mode = mode
ramp_max_ionic_strength_initial = 0 # not needed in this simple example
stoichiometric_ionic_str_using_Cl_only = true # for precise agreement with GWB
execute_console_output_on = '' # only CSV output for this example
[]
[Functions]
[timestepper]
type = PiecewiseLinear
x = '0 50 55'
y = '5 5 1'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = FunctionDT
function = timestepper
[]
end_time = 55
[]
[AuxVariables]
[mode]
[]
[]
[AuxKernels]
[mode]
type = FunctionAux
variable = mode
function = 'if(t<=1.0, 1.0, 0.0)' # initial "dump" then "normal"
execute_on = 'timestep_begin'
[]
[]
[GlobalParams]
point = '0 0 0'
[]
[Postprocessors]
[solvent_kg]
type = PointValue
variable = 'kg_solvent_H2O'
[]
[dolomite]
type = PointValue
variable = 'free_cm3_Dolomite'
[]
[gypsum]
type = PointValue
variable = 'free_cm3_Gypsum'
[]
[halite]
type = PointValue
variable = 'free_cm3_Halite'
[]
[mirabilite]
type = PointValue
variable = 'free_cm3_Mirabilite'
[]
[]
[Outputs]
csv = true
[]
(modules/combined/examples/geochem-porous_flow/geotes_2D/exchanger.i)
# Model of the heat-exchanger
# The input fluid to the heat exchanger is determined by AuxVariables called production_temperature, production_rate_Na, production_rate_Cl, production_rate_SiO2 and production_rate_H2O. These come from Postprocessors in the porous-flow simulation that measure the fluid composition at the production well.
# Given the input fluid, the exchanger cools/heats the fluid, removing any precipitates, and injects fluid back to the porous-flow simulation at temperature output_temperature and composition given by massfrac_Na, etc.
# In the absence of data concerning Quartz precipitation rates in heat exchangers, do not treat Quartz as kinetic
[GlobalParams]
point = '0 0 0'
reactor = reactor
[]
[TimeDependentReactionSolver]
model_definition = definition
include_moose_solve = false
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
swap_out_of_basis = "SiO2(aq)"
swap_into_basis = "QuartzLike"
constraint_species = "H2O Na+ Cl- QuartzLike"
constraint_value = " 1.0E-2 0.1E-2 0.1E-2 1E-10"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition free_mineral"
constraint_unit = " kg moles moles moles"
initial_temperature = 50.0
mode = 4
temperature = 200
cold_temperature = 40.0
source_species_names = 'H2O Na+ Cl- SiO2(aq)'
source_species_rates = 'production_rate_H2O production_rate_Na production_rate_Cl production_rate_SiO2'
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
add_aux_pH = false # there is no H+ in this system
evaluate_kinetic_rates_always = true # implicit time-marching used for stability
execute_console_output_on = '' # only CSV output used in this example
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "small_database.json"
basis_species = "H2O SiO2(aq) Na+ Cl-"
equilibrium_minerals = "QuartzLike"
[]
[]
[Executioner]
type = Transient
dt = 1E5
end_time = 2E6 #7.76E6 # 90 days
[]
[AuxVariables]
[production_temperature]
initial_condition = 50 # the production_T Transfer lags one timestep behind for some reason, so give this a reasonable initial condition
[]
[transported_H2O]
[]
[transported_Na]
[]
[transported_Cl]
[]
[transported_SiO2]
[]
[transported_mass]
[]
[massfrac_H2O]
[]
[massfrac_Na]
[]
[massfrac_Cl]
[]
[massfrac_SiO2]
[]
[dumped_quartz]
[]
[production_rate_H2O]
initial_condition = 5.518533e+01 # the production_H2O Transfer lags one timestep behind for some reason (when the porous_flow simulation has finished, it correctly computes mole_rate_H2O_produced, but the Transfer gets the mole_rate_H2O_produced from the previous timestep), so give this a reasonable initial condition, otherwise this will be zero at the start of the simulation!
[]
[production_rate_Na]
initial_condition = 9.943302e-02
[]
[production_rate_Cl]
initial_condition = 9.943302e-02
[]
[production_rate_SiO2]
initial_condition = 2.340931e-04
[]
[]
[AuxKernels]
[transported_H2O_auxk]
type = GeochemistryQuantityAux
variable = transported_H2O
species = H2O
quantity = transported_moles_in_original_basis
[]
[transported_Na]
type = GeochemistryQuantityAux
variable = transported_Na
species = Na+
quantity = transported_moles_in_original_basis
[]
[transported_Cl]
type = GeochemistryQuantityAux
variable = transported_Cl
species = Cl-
quantity = transported_moles_in_original_basis
[]
[transported_SiO2]
type = GeochemistryQuantityAux
variable = transported_SiO2
species = 'SiO2(aq)'
quantity = transported_moles_in_original_basis
[]
[transported_mass_auxk]
type = ParsedAux
coupled_variables = 'transported_H2O transported_Na transported_Cl transported_SiO2'
variable = transported_mass
expression = 'transported_H2O * 18.0152 + transported_Na * 22.9898 + transported_Cl * 35.453 + transported_SiO2 * 60.0843'
[]
[massfrac_H2O]
type = ParsedAux
coupled_variables = 'transported_mass transported_H2O'
variable = massfrac_H2O
expression = '18.0152 * transported_H2O / transported_mass'
[]
[massfrac_Na]
type = ParsedAux
coupled_variables = 'transported_mass transported_Na'
variable = massfrac_Na
expression = '22.9898 * transported_Na / transported_mass'
[]
[massfrac_Cl]
type = ParsedAux
coupled_variables = 'transported_mass transported_Cl'
variable = massfrac_Cl
expression = '35.453 * transported_Cl / transported_mass'
[]
[massfrac_SiO2]
type = ParsedAux
coupled_variables = 'transported_mass transported_SiO2'
variable = massfrac_SiO2
expression = '60.0843 * transported_SiO2 / transported_mass'
[]
[dumped_quartz]
type = GeochemistryQuantityAux
variable = dumped_quartz
species = QuartzLike
quantity = moles_dumped
[]
[]
[Postprocessors]
[cumulative_moles_precipitated_quartz]
type = PointValue
variable = dumped_quartz
[]
[production_temperature]
type = PointValue
variable = production_temperature
[]
[mass_heated_this_timestep]
type = PointValue
variable = transported_mass
[]
[]
[Outputs]
csv = true
[]
[MultiApps]
[porous_flow_sim]
type = TransientMultiApp
input_files = porous_flow.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[injection_T]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'solution_temperature'
variable = 'injection_temperature'
[]
[injection_Na]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Na'
variable = 'injection_rate_massfrac_Na'
[]
[injection_Cl]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Cl'
variable = 'injection_rate_massfrac_Cl'
[]
[injection_SiO2]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_SiO2'
variable = 'injection_rate_massfrac_SiO2'
[]
[injection_H2O]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_H2O'
variable = 'injection_rate_massfrac_H2O'
[]
[production_T]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = production_temperature
variable = production_temperature
[]
[production_Na]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Na_produced
variable = production_rate_Na
[]
[production_Cl]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Cl_produced
variable = production_rate_Cl
[]
[production_SiO2]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_SiO2_produced
variable = production_rate_SiO2
[]
[production_H2O]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_H2O_produced
variable = production_rate_H2O
[]
[]
(modules/geochemistry/test/tests/geochemistry_quantity_aux/neglog10a.i)
#Extract -log10(activity)
[TimeIndependentReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 1.0 1.0E-2 1.0E-2"
constraint_meaning = "kg_solvent_water activity bulk_composition"
constraint_unit = "kg dimensionless moles"
ramp_max_ionic_strength_initial = 0
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Cl-"
[]
[]
[AuxVariables]
[the_aux]
[]
[]
[AuxKernels]
[the_aux]
type = GeochemistryQuantityAux
species = 'H+'
reactor = geochemistry_reactor
variable = the_aux
quantity = neglog10a
[]
[]
[Postprocessors]
[value]
type = PointValue
point = '0 0 0'
variable = the_aux
[]
[value_from_action]
type = PointValue
point = '0 0 0'
variable = "pH"
[]
[]
[Outputs]
csv = true
[]
(modules/combined/examples/geochem-porous_flow/forge/water_60_to_220degC.i)
# Minerals suggested by Stuart Simmons, but I do not include Laumontite and Zoisite as they are more stable than Anorthite so all Anorthite becomes one of these minerals which contradicts the XRD observations. All minerals are considered in the kinetic models.
# Model of "Water 1" from "Subtask 2C.4.7 Geochemical Modeling SSimmons-VPatil.pdf" subjected to the following:
# (1) The system is equilibrated at 60deg, with pH fixed to 7.5, allowing any precipitates to form. Note that the only minerals present in the system are those mentioned in "Subtask 2C.4.7 Geochemical Modeling SSimmons-VPatil.pdf". If other minerals are present, the results change significantly. Only Quartz and K-feldspar precipitate.
# (2) The system is closed (at time=0), ie the pH is no longer fixed. The Quartz and K-feldspar precipitates are retained
# (3) The temperature is raised to 220degC (during 0<time<=1), allowing any precipitates to form or dissolve. Quartz dissolves entirely, K-feldspar precipitate remains, and Calcite and Phlogopite precipitate. The pH becomes 7.078. Note the use of remove_all_extrapolated_secondary_species = true in the GeochemicalModelDefinition. If the extrapolated secondary species are retained instead, the results are significantly different.
# (4) The following minerals are added (during 1<time<=2): Albite (16.8mol = 44% by weight), Anorthite (1.8mol = 5% by weight), K-feldspar (10.4mol = 29% by weight), Quartz (30.0mol = 18% by weight), Phlogopite (0.48mol = 2% by weight) and Illite (0.52mol = 2% by weight). The mol numbers are approximately what has been measured by XRD, but it is not important to specify the exact composition of the rock (that will be done in the kinetic simulations): what is important here is that there is *some* precipitate.
# (5) The free moles precipitated are Albite 16.38, Anorthite 1.785, K-feldspar 10.68, Quartz 30.82, Phlogopite 0.52, Paragonite 0.44, Calcite 0.0004, Anhydrite 0.0004, Chalcedony 0, Illite 0, Kaolinite 0, Clinochl-7A 0. Calcite is constrained by the initial HCO3- concentration and Anhydrite by the initial SO4-- concentration, and both have only been observed in trace quantities in agreement with this simulation
# (6) The free mole numbers of the basis species that are now in equilibrium with the minerals are extracted, which is the key output of this simulation. Note that the original composition of "Water 1" is largely irrelevant. As mentioned, the HCO3- and SO4-- concentrations constrain Calcite and Anhydrite. Also, adding the minerals causes the pH to change to 6.16.
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = '../../../../geochemistry/database/moose_geochemdb.json'
basis_species = 'H2O H+ Na+ K+ Ca++ Mg++ SiO2(aq) Al+++ Cl- SO4-- HCO3-'
equilibrium_minerals = 'Albite Anhydrite Anorthite Calcite Chalcedony Clinochl-7A Illite K-feldspar Kaolinite Quartz Paragonite Phlogopite'
remove_all_extrapolated_secondary_species = true
[]
[]
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = 'Cl-'
constraint_species = 'H2O H+ Na+ K+ Ca++ Mg++ SiO2(aq) Al+++ Cl- SO4-- HCO3-'
constraint_value = ' 1.0 3.16E-8 0.12 0.016 0.68E-3 0.0008E-3 3.7E-3 0.004E-3 0.15 0.5E-3 1.4E-3'
constraint_meaning = 'kg_solvent_water activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition'
constraint_unit = 'kg dimensionless moles moles moles moles moles moles moles moles moles'
initial_temperature = 60
remove_fixed_activity_name = 'H+'
remove_fixed_activity_time = 0
temperature = 220
source_species_names = 'Albite Anorthite K-feldspar Quartz Phlogopite Illite'
source_species_rates = 'Albite_rate Anorthite_rate K-feldspar_rate Quartz_rate Phlogopite_rate Illite_rate'
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
mol_cutoff = 1E-100
execute_console_output_on = 'timestep_end' # only CSV output
solver_info = true
[]
[Executioner]
type = Transient
[TimeStepper]
type = FunctionDT
function = 'if(t<1, 1, if(t<1.01, 0.01, 1))'
[]
end_time = 2
[]
[AuxVariables]
[Albite_rate]
[]
[Anorthite_rate]
[]
[K-feldspar_rate]
[]
[Quartz_rate]
[]
[Phlogopite_rate]
[]
[Illite_rate]
[]
[transported_H2O]
[]
[transported_H+]
[]
[transported_Na+]
[]
[transported_K+]
[]
[transported_Ca++]
[]
[transported_Mg++]
[]
[transported_SiO2]
[]
[transported_Al+++]
[]
[transported_Cl-]
[]
[transported_SO4--]
[]
[transported_HCO3-]
[]
[]
[AuxKernels]
[Albite_rate]
type = FunctionAux
variable = Albite_rate
function = 'if(t>1, 16.8, 0)'
execute_on = timestep_begin
[]
[Anorthite_rate]
type = FunctionAux
variable = Anorthite_rate
function = 'if(t>1, 1.8, 0)'
execute_on = timestep_begin
[]
[K-feldspar_rate]
type = FunctionAux
variable = K-feldspar_rate
function = 'if(t>1, 10.4, 0)'
execute_on = timestep_begin
[]
[Quartz_rate]
type = FunctionAux
variable = Quartz_rate
function = 'if(t>1, 30.0, 0)'
execute_on = timestep_begin
[]
[Phlogopite_rate]
type = FunctionAux
variable = Phlogopite_rate
function = 'if(t>1, 0.48, 0)'
execute_on = timestep_begin
[]
[Illite_rate]
type = FunctionAux
variable = Illite_rate
function = 'if(t>1, 0.52, 0)'
execute_on = timestep_begin
[]
[transported_H2O]
type = GeochemistryQuantityAux
species = 'H2O'
variable = transported_H2O
quantity = transported_moles_in_original_basis
[]
[transported_H+]
type = GeochemistryQuantityAux
species = 'H+'
variable = transported_H+
quantity = transported_moles_in_original_basis
[]
[transported_Na+]
type = GeochemistryQuantityAux
species = 'Na+'
variable = transported_Na+
quantity = transported_moles_in_original_basis
[]
[transported_K+]
type = GeochemistryQuantityAux
species = 'K+'
variable = transported_K+
quantity = transported_moles_in_original_basis
[]
[transported_Ca++]
type = GeochemistryQuantityAux
species = 'Ca++'
variable = transported_Ca++
quantity = transported_moles_in_original_basis
[]
[transported_Mg++]
type = GeochemistryQuantityAux
species = 'Mg++'
variable = transported_Mg++
quantity = transported_moles_in_original_basis
[]
[transported_SiO2]
type = GeochemistryQuantityAux
species = 'SiO2(aq)'
variable = transported_SiO2
quantity = transported_moles_in_original_basis
[]
[transported_Al+++]
type = GeochemistryQuantityAux
species = 'Al+++'
variable = transported_Al+++
quantity = transported_moles_in_original_basis
[]
[transported_Cl-]
type = GeochemistryQuantityAux
species = 'Cl-'
variable = transported_Cl-
quantity = transported_moles_in_original_basis
[]
[transported_SO4--]
type = GeochemistryQuantityAux
species = 'SO4--'
variable = transported_SO4--
quantity = transported_moles_in_original_basis
[]
[transported_HCO3-]
type = GeochemistryQuantityAux
species = 'HCO3-'
variable = transported_HCO3-
quantity = transported_moles_in_original_basis
[]
[]
[GlobalParams]
point = '0 0 0'
reactor = reactor
[]
[Postprocessors]
[kg_solvent_water]
type = PointValue
variable = kg_solvent_H2O
[]
[free_cm3_Albite]
type = PointValue
variable = free_cm3_Albite
[]
[free_cm3_Anhydrite]
type = PointValue
variable = free_cm3_Anhydrite
[]
[free_cm3_Anorthite]
type = PointValue
variable = free_cm3_Anorthite
[]
[free_cm3_Calcite]
type = PointValue
variable = free_cm3_Calcite
[]
[free_cm3_Chalcedony]
type = PointValue
variable = free_cm3_Chalcedony
[]
[free_cm3_Clinochl-7A]
type = PointValue
variable = free_cm3_Clinochl-7A
[]
[free_cm3_Illite]
type = PointValue
variable = free_cm3_Illite
[]
[free_cm3_K-feldspar]
type = PointValue
variable = free_cm3_K-feldspar
[]
[free_cm3_Kaolinite]
type = PointValue
variable = free_cm3_Kaolinite
[]
[free_cm3_Quartz]
type = PointValue
variable = free_cm3_Quartz
[]
[free_cm3_Paragonite]
type = PointValue
variable = free_cm3_Paragonite
[]
[free_cm3_Phlogopite]
type = PointValue
variable = free_cm3_Phlogopite
[]
[molal_H+]
type = PointValue
variable = molal_H+
[]
[molal_Na+]
type = PointValue
variable = molal_Na+
[]
[molal_K+]
type = PointValue
variable = molal_K+
[]
[molal_Ca++]
type = PointValue
variable = molal_Ca++
[]
[molal_Mg++]
type = PointValue
variable = molal_Mg++
[]
[molal_SiO2]
type = PointValue
variable = molal_SiO2(aq)
[]
[molal_Al+++]
type = PointValue
variable = molal_Al+++
[]
[molal_SO4--]
type = PointValue
variable = molal_SO4--
[]
[molal_HCO3-]
type = PointValue
variable = molal_HCO3-
[]
[bulk_moles_Cl-]
type = PointValue
variable = bulk_moles_Cl-
[]
[transported_H2O]
type = PointValue
variable = transported_H2O
[]
[transported_H+]
type = PointValue
variable = transported_H+
[]
[transported_Na+]
type = PointValue
variable = transported_Na+
[]
[transported_K+]
type = PointValue
variable = transported_K+
[]
[transported_Ca++]
type = PointValue
variable = transported_Ca++
[]
[transported_Mg++]
type = PointValue
variable = transported_Mg++
[]
[transported_SiO2]
type = PointValue
variable = transported_SiO2
[]
[transported_Al+++]
type = PointValue
variable = transported_Al+++
[]
[transported_Cl-]
type = PointValue
variable = transported_Cl-
[]
[transported_SO4--]
type = PointValue
variable = transported_SO4--
[]
[transported_HCO3-]
type = PointValue
variable = transported_HCO3-
[]
[pH]
type = PointValue
variable = pH
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/spatial_reactor/except6.i)
# exception testing: incorrect sizing of controlled_activity_name and controlled_activity_time
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
[]
[]
[SpatialReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 55.5 1E-5 1E-5"
constraint_meaning = "bulk_composition activity bulk_composition"
constraint_unit = "moles dimensionless moles"
controlled_activity_name = 'H+'
controlled_activity_value = '1E-4 1'
[]
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Executioner]
type = Transient
num_steps = 1
[]
(modules/geochemistry/test/tests/time_dependent_reactions/except6.i)
#Exception: incorrectly sized controlled_activity vectors
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Na+ K+ Ca++ Mg++ Al+++ SiO2(aq) Cl- SO4-- HCO3-"
constraint_value = " 1.0 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5"
constraint_meaning = "kg_solvent_water activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = "kg dimensionless moles moles moles moles moles moles moles moles moles"
controlled_activity_name = "H+"
controlled_activity_value = '1E-5 0'
[]
[Executioner]
type = Steady
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Na+ K+ Ca++ Mg++ Al+++ SiO2(aq) Cl- SO4-- HCO3-"
[]
[]
(modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/eqm_model_25_to_92degC.i)
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../../geochemistry/database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- SO4-- HCO3- SiO2(aq) Al+++ Ca++ Mg++ Fe++ K+ Na+ Sr++ F- B(OH)3 Br- Ba++ Li+ NO3- O2(aq)"
equilibrium_minerals = "Siderite Pyrrhotite Dolomite Illite Anhydrite Calcite Quartz K-feldspar Kaolinite Barite Celestite Fluorite Albite Chalcedony Goethite"
[]
[]
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
swap_out_of_basis = "NO3- O2(aq)"
swap_into_basis = " NH3 HS-"
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl- SO4-- HCO3- HS- SiO2(aq) Al+++ Ca++ Mg++ Fe++ K+ Na+ Sr++ F- B(OH)3 Br- Ba++ Li+ NH3"
constraint_value = " 1.0 0.019675774 1.619044933 0.062774835 0.065489838 0.003840583 0.001597755 0.000129719 0.013448104 0.001851471 0.000787867 0.048851229 1.587660615 0.000159781 0.00032108 0.006663119 0.001238987 0.000101944 0.013110503 0.001937302"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = "kg moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles"
prevent_precipitation = "Celestite Fluorite Albite Chalcedony Goethite"
ramp_max_ionic_strength_initial = 0 # not needed in this simple problem
initial_temperature = 25
temperature = 95 # so final temp = 92
execute_console_output_on = 'initial timestep_end'
source_species_names = "Siderite Pyrrhotite Dolomite Illite Anhydrite Calcite Quartz K-feldspar Kaolinite Barite"
source_species_rates = "6.287111422 0.510783201 2.796550921 0.647761624 1.175446234 12.1838956 322.504833 6.613392119 5.96865E-05 8.46449E-05"
solver_info = true
stoichiometric_ionic_str_using_Cl_only = true
[]
[Executioner]
type = Transient
dt = 1
end_time = 1
[]
[AuxVariables]
[total_mineral_volume]
[]
[free_cm3_Kfeldspar] # necessary because of the minus sign in K-feldspar which does not parse correctly in the total_mineral_volume AuxKernel
[]
[]
[AuxKernels]
[free_cm3_Kfeldspar]
type = GeochemistryQuantityAux
reactor = reactor
variable = free_cm3_Kfeldspar
species = 'K-feldspar'
quantity = free_cm3
execute_on = 'timestep_begin timestep_end'
[]
[total_mineral_volume_auxk]
type = ParsedAux
coupled_variables = 'free_cm3_Siderite free_cm3_Pyrrhotite free_cm3_Dolomite free_cm3_Illite free_cm3_Anhydrite free_cm3_Calcite free_cm3_Quartz free_cm3_Kfeldspar free_cm3_Kaolinite free_cm3_Barite free_cm3_Celestite free_cm3_Fluorite free_cm3_Albite free_cm3_Chalcedony free_cm3_Goethite'
expression = 'free_cm3_Siderite + free_cm3_Pyrrhotite + free_cm3_Dolomite + free_cm3_Illite + free_cm3_Anhydrite + free_cm3_Calcite + free_cm3_Quartz + free_cm3_Kfeldspar + free_cm3_Kaolinite + free_cm3_Barite + free_cm3_Celestite + free_cm3_Fluorite + free_cm3_Albite + free_cm3_Chalcedony + free_cm3_Goethite'
variable = total_mineral_volume
execute_on = 'timestep_begin timestep_end'
[]
[]
[Postprocessors]
[total_mineral_volume]
type = PointValue
point = '0 0 0'
variable = total_mineral_volume
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/time_dependent_reactions/seawater_evaporation_flow_through.i)
#Progressively remove H2O until virtually none remains, all the while removing any minerals that precipitate
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- Ca++ Mg++ Na+ K+ SO4-- HCO3-"
equilibrium_minerals = "Dolomite Epsomite Gypsum Halite Magnesite Mirabilite Sylvite"
equilibrium_gases = "CO2(g)"
piecewise_linear_interpolation = true # for precise agreement with GWB
[]
[]
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
swap_out_of_basis = "H+"
swap_into_basis = " CO2(g)"
charge_balance_species = "Cl-" # this means the bulk moles of Cl- will not be exactly as set below
constraint_species = "H2O CO2(g) Cl- Na+ SO4-- Mg++ Ca++ K+ HCO3-"
constraint_value = " 1.0 -3.5 0.5656 0.4850 0.02924 0.05501 0.01063 0.010576055 0.002412"
constraint_meaning = "kg_solvent_water log10fugacity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = " kg dimensionless moles moles moles moles moles moles moles"
source_species_names = "H2O"
source_species_rates = "-1.0" # 1kg H2O = 55.51 moles, each time step removes 1 mole
mode = mode
ramp_max_ionic_strength_initial = 0 # not needed in this simple example
stoichiometric_ionic_str_using_Cl_only = true # for precise agreement with GWB
execute_console_output_on = '' # only CSV output for this example
[]
[Functions]
[timestepper]
type = PiecewiseLinear
x = '0 50 55'
y = '5 5 1'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = FunctionDT
function = timestepper
[]
end_time = 55
[]
[AuxVariables]
[mode]
[]
[dolomite_mol]
[]
[halite_mol]
[]
[gypsum_mol]
[]
[mirabilite_mol]
[]
[]
[AuxKernels]
[mode_auxk]
type = FunctionAux
variable = mode
function = 'if(t<=1.0, 1.0, 2.0)' # initial "dump" then "flow_through"
execute_on = 'timestep_begin'
[]
[dolomite_mol_auxk]
type = GeochemistryQuantityAux
reactor = reactor
variable = dolomite_mol
species = Dolomite
quantity = moles_dumped
[]
[gypsum_mol_auxk]
type = GeochemistryQuantityAux
reactor = reactor
variable = gypsum_mol
species = Gypsum
quantity = moles_dumped
[]
[halite_mol]
type = GeochemistryQuantityAux
reactor = reactor
variable = halite_mol
species = Halite
quantity = moles_dumped
[]
[mirabilite_mol]
type = GeochemistryQuantityAux
reactor = reactor
variable = mirabilite_mol
species = Mirabilite
quantity = moles_dumped
[]
[]
[GlobalParams]
point = '0 0 0'
[]
[Postprocessors]
[solvent_kg]
type = PointValue
variable = 'kg_solvent_H2O'
[]
[dolomite_mol]
type = PointValue
variable = dolomite_mol
[]
[gypsum_mol]
type = PointValue
variable = 'gypsum_mol'
[]
[halite_mol]
type = PointValue
variable = 'halite_mol'
[]
[mirabilite_mol]
type = PointValue
variable = 'mirabilite_mol'
[]
[]
[Outputs]
csv = true
[]
(modules/combined/examples/geochem-porous_flow/geotes_2D/exchanger_un_quartz.i)
# Model of the heat-exchanger
# The input fluid to the heat exchanger is determined by AuxVariables called production_temperature, production_rate_Na, production_rate_Cl, production_rate_SiO2 and production_rate_H2O. These come from Postprocessors in the porous-flow simulation that measure the fluid composition at the production well.
# Given the input fluid, the exchanger cools/heats the fluid, removing any precipitates, and injects fluid back to the porous-flow simulation at temperature output_temperature and composition given by massfrac_Na, etc.
# In the absence of data concerning Quartz precipitation rates in heat exchangers, do not treat Quartz as kinetic
[GlobalParams]
point = '0 0 0'
reactor = reactor
[]
[TimeDependentReactionSolver]
model_definition = definition
include_moose_solve = false
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
swap_out_of_basis = "SiO2(aq)"
swap_into_basis = "QuartzUnlike"
constraint_species = "H2O Na+ Cl- QuartzUnlike"
constraint_value = " 1.0E-2 0.1E-2 0.1E-2 1E-10"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition free_mineral"
constraint_unit = " kg moles moles moles"
initial_temperature = 50.0
mode = 4
temperature = 200
cold_temperature = 40.0
source_species_names = 'H2O Na+ Cl- SiO2(aq)'
source_species_rates = 'production_rate_H2O production_rate_Na production_rate_Cl production_rate_SiO2'
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
add_aux_pH = false # there is no H+ in this system
evaluate_kinetic_rates_always = true # implicit time-marching used for stability
execute_console_output_on = '' # only CSV output used in this example
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "small_database.json"
basis_species = "H2O SiO2(aq) Na+ Cl-"
equilibrium_minerals = "QuartzUnlike"
[]
[]
[Executioner]
type = Transient
dt = 1E5
end_time = 2E6 #7.76E6 # 90 days
[]
[AuxVariables]
[production_temperature]
initial_condition = 50 # the production_T Transfer lags one timestep behind for some reason, so give this a reasonable initial condition
[]
[transported_H2O]
[]
[transported_Na]
[]
[transported_Cl]
[]
[transported_SiO2]
[]
[transported_mass]
[]
[massfrac_H2O]
[]
[massfrac_Na]
[]
[massfrac_Cl]
[]
[massfrac_SiO2]
[]
[dumped_quartz]
[]
[production_rate_H2O]
initial_condition = 5.518533e+01 # the production_H2O Transfer lags one timestep behind for some reason (when the porous_flow simulation has finished, it correctly computes mole_rate_H2O_produced, but the Transfer gets the mole_rate_H2O_produced from the previous timestep), so give this a reasonable initial condition, otherwise this will be zero at the start of the simulation!
[]
[production_rate_Na]
initial_condition = 9.943302e-02
[]
[production_rate_Cl]
initial_condition = 9.943302e-02
[]
[production_rate_SiO2]
initial_condition = 2.340931e-04
[]
[]
[AuxKernels]
[transported_H2O]
type = GeochemistryQuantityAux
variable = transported_H2O
species = H2O
quantity = transported_moles_in_original_basis
[]
[transported_Na]
type = GeochemistryQuantityAux
variable = transported_Na
species = Na+
quantity = transported_moles_in_original_basis
[]
[transported_Cl]
type = GeochemistryQuantityAux
variable = transported_Cl
species = Cl-
quantity = transported_moles_in_original_basis
[]
[transported_SiO2]
type = GeochemistryQuantityAux
variable = transported_SiO2
species = 'SiO2(aq)'
quantity = transported_moles_in_original_basis
[]
[transported_mass]
type = ParsedAux
coupled_variables = 'transported_H2O transported_Na transported_Cl transported_SiO2'
variable = transported_mass
expression = 'transported_H2O * 18.0152 + transported_Na * 22.9898 + transported_Cl * 35.453 + transported_SiO2 * 60.0843'
[]
[massfrac_H2O]
type = ParsedAux
coupled_variables = 'transported_mass transported_H2O'
variable = massfrac_H2O
expression = '18.0152 * transported_H2O / transported_mass'
[]
[massfrac_Na]
type = ParsedAux
coupled_variables = 'transported_mass transported_Na'
variable = massfrac_Na
expression = '22.9898 * transported_Na / transported_mass'
[]
[massfrac_Cl]
type = ParsedAux
coupled_variables = 'transported_mass transported_Cl'
variable = massfrac_Cl
expression = '35.453 * transported_Cl / transported_mass'
[]
[massfrac_SiO2]
type = ParsedAux
coupled_variables = 'transported_mass transported_SiO2'
variable = massfrac_SiO2
expression = '60.0843 * transported_SiO2 / transported_mass'
[]
[dumped_quartz]
type = GeochemistryQuantityAux
variable = dumped_quartz
species = QuartzUnlike
quantity = moles_dumped
[]
[]
[Postprocessors]
[cumulative_moles_precipitated_quartz]
type = PointValue
variable = dumped_quartz
[]
[production_temperature]
type = PointValue
variable = production_temperature
[]
[mass_heated_this_timestep]
type = PointValue
variable = transported_mass
[]
[]
[Outputs]
csv = true
[]
[MultiApps]
[porous_flow_sim]
type = TransientMultiApp
input_files = porous_flow.i
cli_args = 'MultiApps/react/input_files=aquifer_un_quartz_geochemistry.i'
execute_on = 'timestep_end'
[]
[]
[Transfers]
[injection_T]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'solution_temperature'
variable = 'injection_temperature'
[]
[injection_Na]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Na'
variable = 'injection_rate_massfrac_Na'
[]
[injection_Cl]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Cl'
variable = 'injection_rate_massfrac_Cl'
[]
[injection_SiO2]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_SiO2'
variable = 'injection_rate_massfrac_SiO2'
[]
[injection_H2O]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_H2O'
variable = 'injection_rate_massfrac_H2O'
[]
[production_T]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = production_temperature
variable = production_temperature
[]
[production_Na]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Na_produced
variable = production_rate_Na
[]
[production_Cl]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Cl_produced
variable = production_rate_Cl
[]
[production_SiO2]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_SiO2_produced
variable = production_rate_SiO2
[]
[production_H2O]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_H2O_produced
variable = production_rate_H2O
[]
[]
(modules/combined/examples/geochem-porous_flow/forge/aquifer_geochemistry.i)
# Simulates geochemistry in the aquifer. This input file may be run in standalone fashion, which will study the natural kinetically-controlled mineral changes in the same way as natural_reservoir.i. To simulate the FORGE injection scenario, run the porous_flow.i simulation which couples to this input file using MultiApps.
# This file receives pf_rate_H pf_rate_Na pf_rate_K pf_rate_Ca pf_rate_Mg pf_rate_SiO2 pf_rate_Al pf_rate_Cl pf_rate_SO4 pf_rate_HCO3 pf_rate_H2O and temperature as AuxVariables from porous_flow.i
# The pf_rate quantities are kg/s changes of fluid-component mass at each node, but the geochemistry module expects rates-of-changes of moles at every node. Secondly, since this input file considers just 1 litre of aqueous solution at every node, the nodal_void_volume is used to convert pf_rate_* into rate_*_per_1l, which is measured in mol/s/1_litre_of_aqueous_solution.
# This file sends massfrac_H massfrac_Na massfrac_K massfrac_Ca massfrac_Mg massfrac_SiO2 massfrac_Al massfrac_Cl massfrac_SO4 massfrac_HCO3 to porous_flow.i. These are computed from the corresponding transported_* quantities.
# The results depend on the kinetic rates used and these are recognised to be poorly constrained by experiment
[UserObjects]
[rate_Albite]
type = GeochemistryKineticRate
kinetic_species_name = Albite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 69.8E3
one_over_T0 = 0.003354
[]
[rate_Anhydrite]
type = GeochemistryKineticRate
kinetic_species_name = Anhydrite
intrinsic_rate_constant = 1.0E-7
multiply_by_mass = true
area_quantity = 10
activation_energy = 14.3E3
one_over_T0 = 0.003354
[]
[rate_Anorthite]
type = GeochemistryKineticRate
kinetic_species_name = Anorthite
intrinsic_rate_constant = 1.0E-13
multiply_by_mass = true
area_quantity = 10
activation_energy = 17.8E3
one_over_T0 = 0.003354
[]
[rate_Calcite]
type = GeochemistryKineticRate
kinetic_species_name = Calcite
intrinsic_rate_constant = 1.0E-10
multiply_by_mass = true
area_quantity = 10
activation_energy = 23.5E3
one_over_T0 = 0.003354
[]
[rate_Chalcedony]
type = GeochemistryKineticRate
kinetic_species_name = Chalcedony
intrinsic_rate_constant = 1.0E-18
multiply_by_mass = true
area_quantity = 10
activation_energy = 90.1E3
one_over_T0 = 0.003354
[]
[rate_Clinochl-7A]
type = GeochemistryKineticRate
kinetic_species_name = Clinochl-7A
intrinsic_rate_constant = 1.0E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 88.0E3
one_over_T0 = 0.003354
[]
[rate_Illite]
type = GeochemistryKineticRate
kinetic_species_name = Illite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 29E3
one_over_T0 = 0.003354
[]
[rate_K-feldspar]
type = GeochemistryKineticRate
kinetic_species_name = K-feldspar
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 38E3
one_over_T0 = 0.003354
[]
[rate_Kaolinite]
type = GeochemistryKineticRate
kinetic_species_name = Kaolinite
intrinsic_rate_constant = 1E-18
multiply_by_mass = true
area_quantity = 10
activation_energy = 22.2E3
one_over_T0 = 0.003354
[]
[rate_Quartz]
type = GeochemistryKineticRate
kinetic_species_name = Quartz
intrinsic_rate_constant = 1E-18
multiply_by_mass = true
area_quantity = 10
activation_energy = 90.1E3
one_over_T0 = 0.003354
[]
[rate_Paragonite]
type = GeochemistryKineticRate
kinetic_species_name = Paragonite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 22E3
one_over_T0 = 0.003354
[]
[rate_Phlogopite]
type = GeochemistryKineticRate
kinetic_species_name = Phlogopite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 22E3
one_over_T0 = 0.003354
[]
[rate_Laumontite]
type = GeochemistryKineticRate
kinetic_species_name = Laumontite
intrinsic_rate_constant = 1.0E-15
multiply_by_mass = true
area_quantity = 10
activation_energy = 17.8E3
one_over_T0 = 0.003354
[]
[rate_Zoisite]
type = GeochemistryKineticRate
kinetic_species_name = Zoisite
intrinsic_rate_constant = 1E-16
multiply_by_mass = true
area_quantity = 10
activation_energy = 66.1E3
one_over_T0 = 0.003354
[]
[definition]
type = GeochemicalModelDefinition
database_file = '../../../../geochemistry/database/moose_geochemdb.json'
basis_species = 'H2O H+ Na+ K+ Ca++ Mg++ SiO2(aq) Al+++ Cl- SO4-- HCO3-'
remove_all_extrapolated_secondary_species = true
kinetic_minerals = 'Albite Anhydrite Anorthite Calcite Chalcedony Clinochl-7A Illite K-feldspar Kaolinite Quartz Paragonite Phlogopite Zoisite Laumontite'
kinetic_rate_descriptions = 'rate_Albite rate_Anhydrite rate_Anorthite rate_Calcite rate_Chalcedony rate_Clinochl-7A rate_Illite rate_K-feldspar rate_Kaolinite rate_Quartz rate_Paragonite rate_Phlogopite rate_Zoisite rate_Laumontite'
[]
[nodal_void_volume_uo]
type = NodalVoidVolume
porosity = porosity
execute_on = 'initial timestep_end' # "initial" means this is evaluated properly for the first timestep
[]
[]
[SpatialReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = 'Cl-'
constraint_species = 'H2O H+ Na+ K+ Ca++ Mg++ SiO2(aq) Al+++ Cl- SO4-- HCO3-'
# Following numbers are from water_60_to_220degC_out.csv
constraint_value = ' 1.0006383866109 9.5165072498215e-07 0.100020379171 0.0059389061065 0.011570884507621 4.6626763057447e-06 0.0045110404925255 5.8096968688789e-17 0.13500708594394 6.6523540147676e-05 7.7361407898089e-05'
constraint_meaning = 'kg_solvent_water free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration bulk_composition free_concentration free_concentration'
constraint_unit = ' kg molal molal molal molal molal molal molal moles molal molal'
initial_temperature = 220
temperature = temperature
kinetic_species_name = ' Albite Anorthite K-feldspar Quartz Phlogopite Paragonite Calcite Anhydrite Chalcedony Illite Kaolinite Clinochl-7A Zoisite Laumontite'
kinetic_species_initial_value = '4.324073236492E+02 4.631370307325E+01 2.685015418378E+02 7.720095013956E+02 1.235192062541E+01 7.545461404965E-01 4.234651808835E-04 4.000485907930E-04 4.407616361072E+00 1.342524904876E+01 1.004823151125E+00 4.728132387707E-01 7.326007326007E-01 4.818116116598E-01'
kinetic_species_unit = ' moles moles moles moles moles moles moles moles moles moles moles moles moles moles'
evaluate_kinetic_rates_always = true # otherwise will easily "run out" of dissolving species
source_species_names = 'H2O H+ Na+ K+ Ca++ Mg++ SiO2(aq) Al+++ Cl- SO4-- HCO3-'
source_species_rates = 'rate_H2O_per_1l rate_H_per_1l rate_Na_per_1l rate_K_per_1l rate_Ca_per_1l rate_Mg_per_1l rate_SiO2_per_1l rate_Al_per_1l rate_Cl_per_1l rate_SO4_per_1l rate_HCO3_per_1l'
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
execute_console_output_on = ''
add_aux_molal = false # save some memory and reduce variables in output exodus
add_aux_mg_per_kg = false # save some memory and reduce variables in output exodus
add_aux_free_mg = false # save some memory and reduce variables in output exodus
add_aux_activity = false # save some memory and reduce variables in output exodus
add_aux_bulk_moles = false # save some memory and reduce variables in output exodus
adaptive_timestepping = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 15
ny = 10
xmin = -100
xmax = 200
ymin = -100
ymax = 100
[]
[injection_node]
input = gen
type = ExtraNodesetGenerator
new_boundary = injection_node
coord = '0 0 0'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = FunctionDT
function = 'max(1E6, 0.3 * t)'
[]
end_time = 4E12
[]
[AuxVariables]
[temperature]
initial_condition = 220.0
[]
[porosity]
initial_condition = 0.01
[]
[nodal_void_volume]
[]
[free_cm3_Kfeldspar] # necessary because of the minus sign in K-feldspar which does not parse correctly in the porosity AuxKernel
[]
[free_cm3_Clinochl7A] # necessary because of the minus sign in Clinochl-7A which does not parse correctly in the porosity AuxKernel
[]
[pf_rate_H] # change in H mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Na]
[]
[pf_rate_K]
[]
[pf_rate_Ca]
[]
[pf_rate_Mg]
[]
[pf_rate_SiO2]
[]
[pf_rate_Al]
[]
[pf_rate_Cl]
[]
[pf_rate_SO4]
[]
[pf_rate_HCO3]
[]
[pf_rate_H2O] # change in H2O mass (kg/s) at each node provided by the porous-flow simulation
[]
[rate_H_per_1l]
[]
[rate_Na_per_1l]
[]
[rate_K_per_1l]
[]
[rate_Ca_per_1l]
[]
[rate_Mg_per_1l]
[]
[rate_SiO2_per_1l]
[]
[rate_Al_per_1l]
[]
[rate_Cl_per_1l]
[]
[rate_SO4_per_1l]
[]
[rate_HCO3_per_1l]
[]
[rate_H2O_per_1l]
[]
[transported_H]
[]
[transported_Na]
[]
[transported_K]
[]
[transported_Ca]
[]
[transported_Mg]
[]
[transported_SiO2]
[]
[transported_Al]
[]
[transported_Cl]
[]
[transported_SO4]
[]
[transported_HCO3]
[]
[transported_H2O]
[]
[transported_mass]
[]
[massfrac_H]
[]
[massfrac_Na]
[]
[massfrac_K]
[]
[massfrac_Ca]
[]
[massfrac_Mg]
[]
[massfrac_SiO2]
[]
[massfrac_Al]
[]
[massfrac_Cl]
[]
[massfrac_SO4]
[]
[massfrac_HCO3]
[]
[massfrac_H2O]
[]
[]
[AuxKernels]
[free_cm3_Kfeldspar]
type = GeochemistryQuantityAux
variable = free_cm3_Kfeldspar
species = 'K-feldspar'
quantity = free_cm3
execute_on = 'timestep_begin timestep_end'
[]
[free_cm3_Clinochl7A]
type = GeochemistryQuantityAux
variable = free_cm3_Clinochl7A
species = 'Clinochl-7A'
quantity = free_cm3
execute_on = 'timestep_begin timestep_end'
[]
[porosity_auxk]
type = ParsedAux
coupled_variables = 'free_cm3_Albite free_cm3_Anhydrite free_cm3_Anorthite free_cm3_Calcite free_cm3_Chalcedony free_cm3_Clinochl7A free_cm3_Illite free_cm3_Kfeldspar free_cm3_Kaolinite free_cm3_Quartz free_cm3_Paragonite free_cm3_Phlogopite free_cm3_Zoisite free_cm3_Laumontite'
expression = '1000.0 / (1000.0 + free_cm3_Albite + free_cm3_Anhydrite + free_cm3_Anorthite + free_cm3_Calcite + free_cm3_Chalcedony + free_cm3_Clinochl7A + free_cm3_Illite + free_cm3_Kfeldspar + free_cm3_Kaolinite + free_cm3_Quartz + free_cm3_Paragonite + free_cm3_Phlogopite + free_cm3_Zoisite + free_cm3_Laumontite)'
variable = porosity
execute_on = 'timestep_end'
[]
[nodal_void_volume_auxk]
type = NodalVoidVolumeAux
variable = nodal_void_volume
nodal_void_volume_uo = nodal_void_volume_uo
execute_on = 'initial timestep_end' # "initial" to ensure it is properly evaluated for the first timestep
[]
[rate_H_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_H nodal_void_volume'
variable = rate_H_per_1l
expression = 'pf_rate_H / 1.0079 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_Na_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Na nodal_void_volume'
variable = rate_Na_per_1l
expression = 'pf_rate_Na / 22.9898 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_K_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_K nodal_void_volume'
variable = rate_K_per_1l
expression = 'pf_rate_K / 39.0983 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_Ca_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Ca nodal_void_volume'
variable = rate_Ca_per_1l
expression = 'pf_rate_Ca / 40.08 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_Mg_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Mg nodal_void_volume'
variable = rate_Mg_per_1l
expression = 'pf_rate_Mg / 24.305 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_SiO2_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_SiO2 nodal_void_volume'
variable = rate_SiO2_per_1l
expression = 'pf_rate_SiO2 / 60.0843 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_Al_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Al nodal_void_volume'
variable = rate_Al_per_1l
expression = 'pf_rate_Al / 26.9815 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_Cl_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Cl nodal_void_volume'
variable = rate_Cl_per_1l
expression = 'pf_rate_Cl / 35.453 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_SO4_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_SO4 nodal_void_volume'
variable = rate_SO4_per_1l
expression = 'pf_rate_SO4 / 96.0576 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_HCO3_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_HCO3 nodal_void_volume'
variable = rate_HCO3_per_1l
expression = 'pf_rate_HCO3 / 61.0171 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_H2O_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_H2O nodal_void_volume'
variable = rate_H2O_per_1l
expression = 'pf_rate_H2O / 18.01801802 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[transported_H_auxk]
type = GeochemistryQuantityAux
variable = transported_H
species = 'H+'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_Na_auxk]
type = GeochemistryQuantityAux
variable = transported_Na
species = 'Na+'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_K_auxk]
type = GeochemistryQuantityAux
variable = transported_K
species = 'K+'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_Ca_auxk]
type = GeochemistryQuantityAux
variable = transported_Ca
species = 'Ca++'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_Mg_auxk]
type = GeochemistryQuantityAux
variable = transported_Mg
species = 'Mg++'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_SiO2_auxk]
type = GeochemistryQuantityAux
variable = transported_SiO2
species = 'SiO2(aq)'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_Al_auxk]
type = GeochemistryQuantityAux
variable = transported_Al
species = 'Al+++'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_Cl_auxk]
type = GeochemistryQuantityAux
variable = transported_Cl
species = 'Cl-'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_SO4_auxk]
type = GeochemistryQuantityAux
variable = transported_SO4
species = 'SO4--'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_HCO3_auxk]
type = GeochemistryQuantityAux
variable = transported_HCO3
species = 'HCO3-'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_H2O_auxk]
type = GeochemistryQuantityAux
variable = transported_H2O
species = 'H2O'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_mass_auxk]
type = ParsedAux
coupled_variables = ' transported_H transported_Na transported_K transported_Ca transported_Mg transported_SiO2 transported_Al transported_Cl transported_SO4 transported_HCO3 transported_H2O'
variable = transported_mass
expression = 'transported_H * 1.0079 + transported_Cl * 35.453 + transported_SO4 * 96.0576 + transported_HCO3 * 61.0171 + transported_SiO2 * 60.0843 + transported_Al * 26.9815 + transported_Ca * 40.08 + transported_Mg * 24.305 + transported_K * 39.0983 + transported_Na * 22.9898 + transported_H2O * 18.01801802'
execute_on = 'timestep_end'
[]
[massfrac_H_auxk]
type = ParsedAux
coupled_variables = 'transported_H transported_mass'
variable = massfrac_H
expression = 'transported_H * 1.0079 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Na_auxk]
type = ParsedAux
coupled_variables = 'transported_Na transported_mass'
variable = massfrac_Na
expression = 'transported_Na * 22.9898 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_K_auxk]
type = ParsedAux
coupled_variables = 'transported_K transported_mass'
variable = massfrac_K
expression = 'transported_K * 39.0983 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Ca_auxk]
type = ParsedAux
coupled_variables = 'transported_Ca transported_mass'
variable = massfrac_Ca
expression = 'transported_Ca * 40.08 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Mg_auxk]
type = ParsedAux
coupled_variables = 'transported_Mg transported_mass'
variable = massfrac_Mg
expression = 'transported_Mg * 24.305 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_SiO2_auxk]
type = ParsedAux
coupled_variables = 'transported_SiO2 transported_mass'
variable = massfrac_SiO2
expression = 'transported_SiO2 * 60.0843 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Al_auxk]
type = ParsedAux
coupled_variables = 'transported_Al transported_mass'
variable = massfrac_Al
expression = 'transported_Al * 26.9815 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Cl_auxk]
type = ParsedAux
coupled_variables = 'transported_Cl transported_mass'
variable = massfrac_Cl
expression = 'transported_Cl * 35.453 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_SO4_auxk]
type = ParsedAux
coupled_variables = 'transported_SO4 transported_mass'
variable = massfrac_SO4
expression = 'transported_SO4 * 96.0576 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_HCO3_auxk]
type = ParsedAux
coupled_variables = 'transported_HCO3 transported_mass'
variable = massfrac_HCO3
expression = 'transported_HCO3 * 61.0171 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_H2O_auxk]
type = ParsedAux
coupled_variables = 'transported_H2O transported_mass'
variable = massfrac_H2O
expression = 'transported_H2O * 18.01801802 / transported_mass'
execute_on = 'timestep_end'
[]
[]
[GlobalParams]
point = '0 0 0'
reactor = reactor
[]
[Postprocessors]
[temperature]
type = PointValue
variable = 'solution_temperature'
[]
[porosity]
type = PointValue
variable = porosity
[]
[solution_temperature]
type = PointValue
variable = solution_temperature
[]
[massfrac_H]
type = PointValue
variable = massfrac_H
[]
[massfrac_Na]
type = PointValue
variable = massfrac_Na
[]
[massfrac_K]
type = PointValue
variable = massfrac_K
[]
[massfrac_Ca]
type = PointValue
variable = massfrac_Ca
[]
[massfrac_Mg]
type = PointValue
variable = massfrac_Mg
[]
[massfrac_SiO2]
type = PointValue
variable = massfrac_SiO2
[]
[massfrac_Al]
type = PointValue
variable = massfrac_Al
[]
[massfrac_Cl]
type = PointValue
variable = massfrac_Cl
[]
[massfrac_SO4]
type = PointValue
variable = massfrac_SO4
[]
[massfrac_HCO3]
type = PointValue
variable = massfrac_HCO3
[]
[massfrac_H2O]
type = PointValue
variable = massfrac_H2O
[]
[cm3_Albite]
type = PointValue
variable = 'free_cm3_Albite'
[]
[cm3_Anhydrite]
type = PointValue
variable = 'free_cm3_Anhydrite'
[]
[cm3_Anorthite]
type = PointValue
variable = 'free_cm3_Anorthite'
[]
[cm3_Calcite]
type = PointValue
variable = 'free_cm3_Calcite'
[]
[cm3_Chalcedony]
type = PointValue
variable = 'free_cm3_Chalcedony'
[]
[cm3_Clinochl-7A]
type = PointValue
variable = 'free_cm3_Clinochl-7A'
[]
[cm3_Illite]
type = PointValue
variable = 'free_cm3_Illite'
[]
[cm3_K-feldspar]
type = PointValue
variable = 'free_cm3_K-feldspar'
[]
[cm3_Kaolinite]
type = PointValue
variable = 'free_cm3_Kaolinite'
[]
[cm3_Quartz]
type = PointValue
variable = 'free_cm3_Quartz'
[]
[cm3_Paragonite]
type = PointValue
variable = 'free_cm3_Paragonite'
[]
[cm3_Phlogopite]
type = PointValue
variable = 'free_cm3_Phlogopite'
[]
[cm3_Zoisite]
type = PointValue
variable = 'free_cm3_Zoisite'
[]
[cm3_Laumontite]
type = PointValue
variable = 'free_cm3_Laumontite'
[]
[cm3_mineral]
type = LinearCombinationPostprocessor
pp_names = 'cm3_Albite cm3_Anhydrite cm3_Anorthite cm3_Calcite cm3_Chalcedony cm3_Clinochl-7A cm3_Illite cm3_K-feldspar cm3_Kaolinite cm3_Quartz cm3_Paragonite cm3_Phlogopite cm3_Zoisite cm3_Laumontite'
pp_coefs = '1 1 1 1 1 1 1 1 1 1 1 1 1 1'
[]
[pH]
type = PointValue
variable = 'pH'
[]
[]
[Outputs]
[exo]
type = Exodus
execute_on = final
[]
csv = true
[]
(modules/geochemistry/test/tests/geochemistry_quantity_aux/except5.i)
#Exception test: inappropriate quantity
[TimeDependentReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl- Fe+++ >(s)FeOH >(w)FeOH"
constraint_value = " 1.0 1.0 1.0 1.0 1.0 1.0"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = "kg moles moles moles moles moles"
kinetic_species_name = "Fe(OH)3(ppd)"
kinetic_species_initial_value = "1.0"
kinetic_species_unit = "moles"
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Cl- Fe+++ >(s)FeOH >(w)FeOH"
kinetic_minerals = "Fe(OH)3(ppd)"
[]
[]
[Executioner]
type = Steady
[]
[AuxVariables]
[error]
[]
[]
[AuxKernels]
[error]
type = GeochemistryQuantityAux
species = "Fe(OH)3(ppd)"
reactor = geochemistry_reactor
variable = error
quantity = kinetic_moles
[]
[]
(modules/geochemistry/test/tests/time_dependent_reactions/changing_pH_ferric_hydroxide.i)
# Sorption onto FerricHydroxide along with changing pH
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
swap_out_of_basis = "Fe+++"
swap_into_basis = "Fe(OH)3(ppd)"
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Na+ Cl- Fe(OH)3(ppd) >(s)FeOH >(w)FeOH"
constraint_value = " 1.0 -4 0.1 0.1 9.3573E-3 4.6786E-5 1.87145E-3"
constraint_meaning = "kg_solvent_water log10activity bulk_composition bulk_composition free_mineral bulk_composition bulk_composition"
constraint_unit = "kg dimensionless moles moles moles moles moles"
controlled_activity_name = "H+"
controlled_activity_value = set_aH
ramp_max_ionic_strength_initial = 0 # not needed in this simple problem
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
abs_tol = 1E-14
execute_console_output_on = '' # only CSV output needed for this example
[]
[AuxVariables]
[set_aH]
[]
[]
[AuxKernels]
[set_aH]
type = FunctionAux
variable = set_aH
function = '10^(-4-t)'
execute_on = timestep_begin # so the correct value is provided to the reactor
[]
[]
[Postprocessors]
[pH]
type = PointValue
point = '0 0 0'
variable = 'pH'
[]
[molal_>wFeOH2+]
type = PointValue
point = '0 0 0'
variable = 'molal_>(w)FeOH2+'
[]
[molal_>wFeOH]
type = PointValue
point = '0 0 0'
variable = 'molal_>(w)FeOH'
[]
[molal_>wFeO-]
type = PointValue
point = '0 0 0'
variable = 'molal_>(w)FeO-'
[]
[molal_>sFeOH2+]
type = PointValue
point = '0 0 0'
variable = 'molal_>(s)FeOH2+'
[]
[molal_>sFeOH]
type = PointValue
point = '0 0 0'
variable = 'molal_>(s)FeOH'
[]
[molal_>sFeO-]
type = PointValue
point = '0 0 0'
variable = 'molal_>(s)FeO-'
[]
[potential]
type = PointValue
point = '0 0 0'
variable = 'surface_potential_Fe(OH)3(ppd)'
[]
[]
[Executioner]
type = Transient
start_time = -0.25
dt = 0.25
end_time = 8
[]
[Outputs]
csv = true
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Na+ Cl- Fe+++ >(s)FeOH >(w)FeOH"
equilibrium_minerals = "Fe(OH)3(ppd)"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
(modules/geochemistry/test/tests/spatial_reactor/spatial_3.i)
# demonstrating that adding sources of a fixed-activity species makes no difference before the system is closed
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
[]
[]
[SpatialReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 55.5 1E-5 1E-5"
constraint_meaning = "bulk_composition free_concentration bulk_composition"
constraint_unit = "moles molal moles"
close_system_at_time = 3
source_species_names = 'HCl'
source_species_rates = '1.0'
[]
[Postprocessors]
[pH]
type = PointValue
point = '0 0 0'
variable = pH
[]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
xmax = 1
[]
[Executioner]
type = Transient
dt = 1
end_time = 2
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/time_dependent_reactions/except4.i)
#Exception: cannot remove fixed activity of a species that does not have an activity or fugacity constraint
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Na+ K+ Ca++ Mg++ Al+++ SiO2(aq) Cl- SO4-- HCO3-"
constraint_value = " 1.0 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5"
constraint_meaning = "kg_solvent_water activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = "kg dimensionless moles moles moles moles moles moles moles moles moles"
remove_fixed_activity_name = "Na+"
remove_fixed_activity_time = "0"
[]
[Executioner]
type = Steady
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Na+ K+ Ca++ Mg++ Al+++ SiO2(aq) Cl- SO4-- HCO3-"
[]
[]
(modules/geochemistry/test/tests/equilibrium_models/amazon_with_minerals.i)
[TimeIndependentReactionSolver]
model_definition = definition
swap_out_of_basis = "Al+++ Fe++"
swap_into_basis = "Kaolinite Hematite"
charge_balance_species = "Cl-"
constraint_species = "H2O H+ O2(aq) SiO2(aq) Kaolinite Hematite Ca++ Mg++ Na+ HCO3- SO4-- Cl- "
constraint_value = " 1.0 -6.5 1.813E-4 0.0001165 1E-2 0.033 0.0001073 4.526E-5 7.83E-5 0.0003114 3.1233E-5 1.383E-4"
constraint_meaning = "kg_solvent_water log10activity free_concentration bulk_composition free_mineral free_mineral bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = " kg dimensionless molal moles moles moles moles moles moles moles moles moles"
prevent_precipitation = "Nontronit-Ca Nontronit-Mg Nontronit-Na Hematite Kaolinite Beidellit-Ca Beidellit-H Beidellit-Mg Beidellit-Na Pyrophyllite Gibbsite Paragonite Quartz"
ramp_max_ionic_strength_initial = 0 # not needed in this simple problem
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
mol_cutoff = 1E-7
abs_tol = 1E-15
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ SiO2(aq) Al+++ Fe++ Ca++ Mg++ Na+ HCO3- SO4-- Cl- O2(aq)"
equilibrium_minerals = "Nontronit-Ca Nontronit-Mg Nontronit-Na Hematite Kaolinite Beidellit-Ca Beidellit-H Beidellit-Mg Beidellit-Na Pyrophyllite Gibbsite Paragonite Quartz"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
(modules/geochemistry/test/tests/time_dependent_reactions/except5.i)
#Exception: incorrectly sized remove_fixed_activity vectors
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Na+ K+ Ca++ Mg++ Al+++ SiO2(aq) Cl- SO4-- HCO3-"
constraint_value = " 1.0 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5"
constraint_meaning = "kg_solvent_water activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = "kg dimensionless moles moles moles moles moles moles moles moles moles"
remove_fixed_activity_name = "H+"
remove_fixed_activity_time = "0 1"
[]
[Executioner]
type = Steady
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Na+ K+ Ca++ Mg++ Al+++ SiO2(aq) Cl- SO4-- HCO3-"
[]
[]
(modules/geochemistry/test/tests/spatial_reactor/spatial_5.i)
# demonstrating that sources may be spatially-dependent, but adding sources of fixed-activity species makes no difference to the system
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
[]
[]
[SpatialReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 55.5 1E-5 1E-5"
constraint_meaning = "bulk_composition activity bulk_composition"
constraint_unit = "moles dimensionless moles"
remove_fixed_activity_name = 'H+'
remove_fixed_activity_time = '2'
source_species_names = HCl
source_species_rates = HCl_rate
[]
[VectorPostprocessors]
[bulk_Cl]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
sort_by = x
num_points = 11
variable = 'bulk_moles_Cl-'
[]
[]
[AuxVariables]
[HCl_rate]
[]
[]
[AuxKernels]
[HCl_rate]
type = FunctionAux
variable = HCl_rate
function = '1E-5 * x'
execute_on = timestep_begin # so the Reactor gets the correct value
[]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 1
[]
[Executioner]
type = Transient
dt = 1
end_time = 2
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/geochemistry_console_output/console.i)
# An example of manually adding a GeochemistryConsoleOutput
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor_name
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl- Fe+++"
constraint_value = " 1.0 1.0E-2 1.3E-2 1.0E-3"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition bulk_composition"
constraint_unit = "kg moles moles moles"
ramp_max_ionic_strength_initial = 0
ramp_max_ionic_strength_subsequent = 1 # so can see the solver_info in the GeochemistryConsoleOutput
kinetic_species_name = "Fe(OH)3(ppd)_nosorb"
kinetic_species_initial_value = "1.0E-6"
kinetic_species_unit = moles
execute_console_output_on = 'final' # can compare with the specially_added one, below
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Cl- Fe+++"
kinetic_minerals = "Fe(OH)3(ppd)_nosorb"
[]
[nearest_node]
type = NearestNodeNumberUO
point = '0 0 0' # in this case there is no spatial dependence, so the point is rather irrelevant
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
[specially_added]
type = GeochemistryConsoleOutput
geochemistry_reactor = reactor_name
precision = 8 # 8 digits of precision
mol_cutoff = 1E-8 # species with molality or mole-number lower than this are not outputted
solver_info = true
nearest_node_number_UO = nearest_node
execute_on = 'final' # just output at the end of the simulation
[]
[]
(modules/geochemistry/test/tests/equilibrium_models/bulk_constraints.i)
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O Cl- Na+ SO4--"
equilibrium_minerals = "Mirabilite"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
[TimeIndependentReactionSolver]
model_definition = definition
swap_out_of_basis = "SO4--"
swap_into_basis = " Mirabilite"
charge_balance_species = "Cl-"
constraint_species = "H2O Na+ Cl- Mirabilite"
constraint_value = " 1.0 1.0 1.0 1.0"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition free_mineral"
constraint_unit = "kg moles moles moles"
ramp_max_ionic_strength_initial = 0 # not needed in this simple problem
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
add_aux_pH = false
mol_cutoff = 1E-5
abs_tol = 1E-15
[]
(modules/geochemistry/test/tests/spatial_reactor/except3.i)
# exception testing: attempt to remove a fixed activity from a secondary species
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
[]
[]
[SpatialReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 55.5 1E-5 1E-5"
constraint_meaning = "bulk_composition activity bulk_composition"
constraint_unit = "moles dimensionless moles"
remove_fixed_activity_name = 'OH-'
remove_fixed_activity_time = 1E-4
[]
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Executioner]
type = Transient
num_steps = 1
[]
(modules/geochemistry/test/tests/time_dependent_reactions/calcite_dumping.i)
# Demonstrating that initial precipitates can be dumped and then reactants added
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
swap_out_of_basis = "HCO3-"
swap_into_basis = "Calcite"
charge_balance_species = "Cl-"
constraint_species = "H2O Calcite Ca++ Na+ Cl- H+"
constraint_value = " 1.0 10 0.01 0.1 0.11 -8"
constraint_meaning = "kg_solvent_water free_mineral bulk_composition bulk_composition bulk_composition log10activity"
constraint_unit = " kg cm3 moles moles moles dimensionless"
ramp_max_ionic_strength_initial = 10
remove_fixed_activity_name = 'H+'
remove_fixed_activity_time = 0
source_species_names = 'HCl'
source_species_rates = 1E-3
mode = 1 # in this case, Calcite never re-precipitates, so never need to turn the dump option off
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
execute_console_output_on = '' # only CSV output for this test
[]
[Outputs]
csv = true
file_base = calcite_dumping_dump
[]
[Postprocessors]
[cm3_Calcite]
type = PointValue
point = '0 0 0'
variable = 'free_cm3_Calcite'
[]
[pH]
type = PointValue
point = '0 0 0'
variable = 'pH'
[]
[molal_CO2aq]
type = PointValue
point = '0 0 0'
variable = 'molal_CO2(aq)'
[]
[molal_CaCl+]
type = PointValue
point = '0 0 0'
variable = 'molal_CaCl+'
[]
[molal_HCO3-]
type = PointValue
point = '0 0 0'
variable = 'molal_HCO3-'
[]
[molal_Ca++]
type = PointValue
point = '0 0 0'
variable = 'molal_Ca++'
[]
[fugacity_CO2]
type = PointValue
point = '0 0 0'
variable = 'activity_CO2(g)'
[]
[]
[Executioner]
type = Transient
dt = 10
end_time = 100
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Na+ Cl- Ca++ HCO3-"
equilibrium_minerals = "Calcite"
equilibrium_gases = "CO2(g)"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
(modules/geochemistry/test/tests/spatial_reactor/except5.i)
# exception testing: incorrect sizing of remove_fixed_activity_name and remove_fixed_activity_time
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
[]
[]
[SpatialReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 55.5 1E-5 1E-5"
constraint_meaning = "bulk_composition activity bulk_composition"
constraint_unit = "moles dimensionless moles"
remove_fixed_activity_name = 'H+'
remove_fixed_activity_time = '0 1'
[]
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Executioner]
type = Transient
num_steps = 1
[]
(modules/geochemistry/test/tests/geochemistry_quantity_aux/surface_potential.i)
#Extract surface potential
[TimeIndependentReactionSolver]
model_definition = definition
swap_out_of_basis = 'H+'
swap_into_basis = 'Fe(OH)3(ppd)'
charge_balance_species = "Cl-"
constraint_species = "H2O Cl- Fe+++ >(s)FeOH >(w)FeOH Fe(OH)3(ppd)"
constraint_value = " 1.0 1.0E-6 1.0E-6 1.0E-6 1.0E-6 1.0E-6"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition free_concentration free_concentration free_mineral"
constraint_unit = "kg moles moles molal molal moles"
ramp_max_ionic_strength_initial = 0
abs_tol = 1E-20
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Cl- Fe+++ >(s)FeOH >(w)FeOH"
equilibrium_minerals = "Fe(OH)3(ppd)"
[]
[]
[AuxVariables]
[the_aux]
[]
[]
[AuxKernels]
[the_aux]
type = GeochemistryQuantityAux
species = "Fe(OH)3(ppd)"
reactor = geochemistry_reactor
variable = the_aux
quantity = surface_potential
[]
[]
[Postprocessors]
[value]
type = PointValue
point = '0 0 0'
variable = the_aux
[]
[value_from_action]
type = PointValue
point = '0 0 0'
variable = "surface_potential_Fe(OH)3(ppd)"
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/time_dependent_reactions/simple_no_action.i)
# This example is simple.i but without using an Action
# Simple example of time-dependent reaction path.
# This example involves an HCl solution that is initialized at pH=2, then the pH is controlled via controlled_activity, and finally HCl is titrated into the solution
[GlobalParams]
point = '0 0 0'
[]
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[u]
type = Diffusion
variable = u
[]
[]
[AuxVariables]
[act_H+]
[]
[solution_temperature]
[]
[kg_solvent_H2O]
[]
[activity_H2O]
[]
[bulk_moles_H2O]
[]
[pH]
[]
[molal_H+]
[]
[molal_Cl-]
[]
[molal_HCl]
[]
[molal_OH-]
[]
[mg_per_kg_H+]
[]
[mg_per_kg_Cl-]
[]
[mg_per_kg_HCl]
[]
[mg_per_kg_OH-]
[]
[activity_H+]
[]
[activity_Cl-]
[]
[activity_HCl]
[]
[activity_OH-]
[]
[bulk_moles_H+]
[]
[bulk_moles_Cl-]
[]
[bulk_moles_HCl]
[]
[bulk_moles_OH-]
[]
[]
[AuxKernels]
[act_H+]
type = FunctionAux
variable = act_H+
function = '10^(-2 - t)'
execute_on = timestep_begin
[]
[solution_temperature]
type = GeochemistryQuantityAux
species = 'H+'
reactor = reactor
variable = solution_temperature
quantity = temperature
[]
[kg_solvent_H2O]
type = GeochemistryQuantityAux
species = 'H2O'
reactor = reactor
variable = kg_solvent_H2O
quantity = molal
[]
[activity_H2O]
type = GeochemistryQuantityAux
species = 'H2O'
reactor = reactor
variable = activity_H2O
quantity = activity
[]
[bulk_moles_H2O]
type = GeochemistryQuantityAux
species = 'H2O'
reactor = reactor
variable = bulk_moles_H2O
quantity = bulk_moles
[]
[pH]
type = GeochemistryQuantityAux
species = 'H+'
reactor = reactor
variable = pH
quantity = neglog10a
[]
[molal_H+]
type = GeochemistryQuantityAux
species = 'H+'
reactor = reactor
variable = 'molal_H+'
quantity = molal
[]
[molal_Cl-]
type = GeochemistryQuantityAux
species = 'Cl-'
reactor = reactor
variable = 'molal_Cl-'
quantity = molal
[]
[molal_HCl]
type = GeochemistryQuantityAux
species = 'HCl'
reactor = reactor
variable = 'molal_HCl'
quantity = molal
[]
[molal_OH-]
type = GeochemistryQuantityAux
species = 'OH-'
reactor = reactor
variable = 'molal_OH-'
quantity = molal
[]
[mg_per_kg_H+]
type = GeochemistryQuantityAux
species = 'H+'
reactor = reactor
variable = 'mg_per_kg_H+'
quantity = mg_per_kg
[]
[mg_per_kg_Cl-]
type = GeochemistryQuantityAux
species = 'Cl-'
reactor = reactor
variable = 'mg_per_kg_Cl-'
quantity = mg_per_kg
[]
[mg_per_kg_HCl]
type = GeochemistryQuantityAux
species = 'HCl'
reactor = reactor
variable = 'mg_per_kg_HCl'
quantity = mg_per_kg
[]
[mg_per_kg_OH-]
type = GeochemistryQuantityAux
species = 'OH-'
reactor = reactor
variable = 'mg_per_kg_OH-'
quantity = mg_per_kg
[]
[activity_H+]
type = GeochemistryQuantityAux
species = 'H+'
reactor = reactor
variable = 'activity_H+'
quantity = activity
[]
[activity_Cl-]
type = GeochemistryQuantityAux
species = 'Cl-'
reactor = reactor
variable = 'activity_Cl-'
quantity = activity
[]
[activity_HCl]
type = GeochemistryQuantityAux
species = 'HCl'
reactor = reactor
variable = 'activity_HCl'
quantity = activity
[]
[activity_OH-]
type = GeochemistryQuantityAux
species = 'OH-'
reactor = reactor
variable = 'activity_OH-'
quantity = activity
[]
[bulk_moles_H+]
type = GeochemistryQuantityAux
species = 'H+'
reactor = reactor
variable = 'bulk_moles_H+'
quantity = bulk_moles
[]
[bulk_moles_Cl-]
type = GeochemistryQuantityAux
species = 'Cl-'
reactor = reactor
variable = 'bulk_moles_Cl-'
quantity = bulk_moles
[]
[bulk_moles_HCl]
type = GeochemistryQuantityAux
species = 'HCl'
reactor = reactor
variable = 'bulk_moles_HCl'
quantity = bulk_moles
[]
[bulk_moles_OH-]
type = GeochemistryQuantityAux
species = 'OH-'
reactor = reactor
variable = 'bulk_moles_OH-'
quantity = bulk_moles
[]
[]
[Postprocessors]
[pH]
type = PointValue
variable = 'pH'
[]
[solvent_mass]
type = PointValue
variable = 'kg_solvent_H2O'
[]
[molal_Cl-]
type = PointValue
variable = 'molal_Cl-'
[]
[mg_per_kg_HCl]
type = PointValue
variable = 'mg_per_kg_HCl'
[]
[activity_OH-]
type = PointValue
variable = 'activity_OH-'
[]
[bulk_H+]
type = PointValue
variable = 'bulk_moles_H+'
[]
[temperature]
type = PointValue
variable = 'solution_temperature'
[]
[]
[Executioner]
type = Transient
dt = 1
end_time = 10
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
[]
[reactor]
type = GeochemistryTimeDependentReactor
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 1.0 -2 1E-2"
constraint_meaning = "kg_solvent_water log10activity bulk_composition"
constraint_unit = " kg dimensionless moles"
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
# close the system at time = 0
close_system_at_time = 0
# control pH. This sets pH = 2 + t (see the act_H+ AuxKernel)
controlled_activity_name = 'H+'
controlled_activity_value = 'act_H+'
# remove the constraint on H+ activity at time = 5, when, from the previous time-step, pH = 2 + 4 = 6
remove_fixed_activity_name = 'H+'
remove_fixed_activity_time = 5
# add 1E-5 moles of HCl every second of the simulation: this has no impact before time = 5 when the fixed-activity constraint it turned off, but then, molality_H+ ~ 1E-6 + 1E-4 * (t - 4), so
# time, approx_pH
# 5, -log10(1E-4) = 4
# 10, -log10(6E-4) = 3.2
source_species_names = 'HCl'
source_species_rates = '1E-4'
[]
[nnn]
type = NearestNodeNumberUO
[]
[]
[Outputs]
csv = true
file_base = simple_out
[console_output]
type = GeochemistryConsoleOutput
geochemistry_reactor = reactor
nearest_node_number_UO = nnn
solver_info = true
execute_on = 'final'
[]
[]
(modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/eqm_model_25degC_no_precip.i)
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../../geochemistry/database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- SO4-- HCO3- SiO2(aq) Al+++ Ca++ Mg++ Fe++ K+ Na+ Sr++ F- B(OH)3 Br- Ba++ Li+ NO3- O2(aq)"
equilibrium_minerals = "Siderite Pyrrhotite Dolomite Illite Anhydrite Calcite Quartz K-feldspar Kaolinite Barite Celestite Fluorite Albite Chalcedony Goethite"
[]
[]
[TimeIndependentReactionSolver]
model_definition = definition
swap_out_of_basis = "NO3- O2(aq)"
swap_into_basis = " NH3 HS-"
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl- SO4-- HCO3- HS- SiO2(aq) Al+++ Ca++ Mg++ Fe++ K+ Na+ Sr++ F- B(OH)3 Br- Ba++ Li+ NH3"
constraint_value = " 1.0 3.467E-7 1.619044933 0.062774835 0.065489838 0.003840583 0.001597755 0.000129719 0.013448104 0.001851471 0.000787867 0.048851229 1.587660615 0.000159781 0.00032108 0.006663119 0.001238987 0.000101944 0.013110503 0.001937302"
constraint_meaning = "kg_solvent_water activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = "kg dimensionless moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles"
prevent_precipitation = "Barite Siderite Pyrrhotite Dolomite Illite Anhydrite Calcite Quartz K-feldspar Kaolinite Celestite Fluorite Albite Chalcedony Goethite"
ramp_max_ionic_strength_initial = 0 # not needed in this simple problem
temperature = 25
stoichiometric_ionic_str_using_Cl_only = true
precision = 5
[]
(modules/geochemistry/test/tests/geochemistry_quantity_aux/mg_per_kg.i)
#Extract mg_per_kg
[TimeIndependentReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 1.0 1.0E-4 1.0E-4"
constraint_meaning = "kg_solvent_water free_concentration bulk_composition"
constraint_unit = "kg molal moles"
ramp_max_ionic_strength_initial = 0
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Cl-"
[]
[]
[AuxVariables]
[the_aux]
[]
[]
[AuxKernels]
[the_aux]
type = GeochemistryQuantityAux
species = 'H+'
reactor = geochemistry_reactor
variable = the_aux
quantity = mg_per_kg
[]
[]
[Postprocessors]
[value]
type = PointValue
point = '0 0 0'
variable = the_aux
[]
[value_from_action]
type = PointValue
point = '0 0 0'
variable = "mg_per_kg_H+"
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/solubilities_and_activities/gypsum_solubility.i)
[TimeDependentReactionSolver]
model_definition = definition
swap_out_of_basis = "Ca++"
swap_into_basis = "Gypsum"
charge_balance_species = "SO4--"
constraint_species = "H2O Cl- Na+ SO4-- Gypsum"
constraint_value = " 1.0 1E-10 1E-10 1E-6 0.5814"
constraint_meaning = "kg_solvent_water free_concentration free_concentration bulk_composition free_mineral"
constraint_unit = " kg molal molal moles moles"
source_species_names = 'NaCl'
source_species_rates = '1.0'
add_aux_pH = false # there is no H+ in the problem
ramp_max_ionic_strength_initial = 0 # not needed in this simple problem
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
abs_tol = 1E-12
execute_console_output_on = '' # only CSV output in this example
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O Cl- Na+ SO4-- Ca++"
equilibrium_minerals = "Gypsum"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
[Functions]
[timestepper]
type = PiecewiseLinear
x = '0 0.1'
y = '0.01 0.1'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = FunctionDT
function = timestepper
[]
end_time = 3
[]
[Outputs]
csv = true
[]
[AuxVariables]
[dissolved_gypsum_moles]
[]
[]
[AuxKernels]
[dissolved_gypsum_moles]
type = ParsedAux
coupled_variables = 'bulk_moles_Gypsum free_mg_Gypsum'
expression = 'bulk_moles_Gypsum - free_mg_Gypsum / 1000 / 172.168 '
variable = dissolved_gypsum_moles
execute_on = 'timestep_end'
[]
[]
[Postprocessors]
[cl_molal]
type = PointValue
point = '0 0 0'
variable = 'molal_Cl-'
[]
[dissolved_gypsum_mol]
type = PointValue
point = '0 0 0'
variable = dissolved_gypsum_moles
[]
[]
(modules/geochemistry/test/tests/kinetics/quartz_dissolution.i)
# Example of quartz dissolution.
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl- SiO2(aq)"
constraint_value = " 1.0 1E-10 1E-10 1E-9"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition free_concentration"
constraint_unit = " kg moles moles molal"
initial_temperature = 100.0
temperature = 100.0
kinetic_species_name = Quartz
kinetic_species_initial_value = 5
kinetic_species_unit = kg
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
execute_console_output_on = '' # only CSV output for this example
[]
[UserObjects]
[rate_quartz]
type = GeochemistryKineticRate
kinetic_species_name = Quartz
intrinsic_rate_constant = 1.728E-10 # 2.0E-15mol/s/cm^2 = 1.728E-10mol/day/cm^2
multiply_by_mass = true
area_quantity = 1000
[]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O SiO2(aq) H+ Cl-"
kinetic_minerals = "Quartz"
kinetic_rate_descriptions = "rate_quartz"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
[Functions]
[timestepper]
type = PiecewiseLinear
x = '0 0.5 3'
y = '0.01 0.05 0.1'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = FunctionDT
function = timestepper
[]
end_time = 5.0
[]
[AuxVariables]
[diss]
[]
[]
[AuxKernels]
[diss]
type = ParsedAux
coupled_variables = moles_Quartz
expression = '83.216414271 - moles_Quartz'
variable = diss
[]
[]
[Postprocessors]
[dissolved_moles]
type = PointValue
point = '0 0 0'
variable = diss
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/geochemistry_quantity_aux/kinetic_moles.i)
#Extract kinetic moles
[TimeDependentReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl- Fe+++ >(s)FeOH >(w)FeOH"
constraint_value = " 1.0 4.0 1.0 0.1 1.0E-6 1.0E-6"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition free_concentration free_concentration free_concentration"
constraint_unit = "kg moles moles molal molal molal"
kinetic_species_name = "Fe(OH)3(ppd)"
kinetic_species_initial_value = "1.0"
kinetic_species_unit = "moles"
max_ionic_strength = 0.0
ramp_max_ionic_strength_initial = 0
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Cl- Fe+++ >(s)FeOH >(w)FeOH"
kinetic_minerals = "Fe(OH)3(ppd)"
[]
[]
[Executioner]
type = Transient
dt = 1
end_time = 1
[]
[AuxVariables]
[the_aux]
[]
[]
[AuxKernels]
[the_aux]
type = GeochemistryQuantityAux
species = "Fe(OH)3(ppd)"
reactor = geochemistry_reactor
variable = the_aux
quantity = kinetic_moles
[]
[]
[Postprocessors]
[value]
type = PointValue
point = '0 0 0'
variable = the_aux
[]
[value_from_action]
type = PointValue
point = '0 0 0'
variable = "moles_Fe(OH)3(ppd)"
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/spatial_reactor/spatial_8.i)
# Sources are spatially-dependent and adaptive timestepping is needed to ensure convergence
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
[]
[]
[SpatialReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 55.5 1E-5 1E-5"
constraint_meaning = "bulk_composition bulk_composition bulk_composition"
constraint_unit = "moles moles moles"
source_species_names = HCl
source_species_rates = HCl_rate
execute_console_output_on = ''
ramp_max_ionic_strength_initial = 0
max_iter = 2
adaptive_timestepping = true
[]
[VectorPostprocessors]
[bulk_Cl]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
sort_by = x
num_points = 2
variable = 'bulk_moles_Cl-'
[]
[]
[AuxVariables]
[HCl_rate]
[]
[]
[AuxKernels]
[HCl_rate]
type = FunctionAux
variable = HCl_rate
function = '1 * x'
execute_on = timestep_begin # so the Reactor gets the correct value
[]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
xmax = 1
[]
[Executioner]
type = Transient
dt = 1
end_time = 1
[]
[Outputs]
csv = true
[]
(modules/combined/examples/geochem-porous_flow/forge/water_60degC.i)
# Equilibrium model "Water 1" from "Subtask 2C.4.7 Geochemical Modeling SSimmons-VPatil.pdf"
# At 60degC K-feldspar and Quartz both precipitate
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = '../../../../geochemistry/database/moose_geochemdb.json'
basis_species = 'H2O H+ Na+ K+ Ca++ Mg++ SiO2(aq) Al+++ Cl- SO4-- HCO3-'
remove_all_extrapolated_secondary_species = true
equilibrium_minerals = 'Albite Anhydrite Anorthite Calcite Chalcedony Clinochl-7A Illite K-feldspar Kaolinite Quartz Paragonite Phlogopite Zoisite Laumontite'
[]
[]
[TimeIndependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = 'Cl-'
constraint_species = 'H2O H+ Na+ K+ Ca++ Mg++ SiO2(aq) Al+++ Cl- SO4-- HCO3-'
constraint_value = ' 1.0 3.16E-8 0.12 0.016 0.68E-3 0.0008E-3 3.7E-3 0.004E-3 0.15 0.5E-3 1.4E-3'
constraint_meaning = 'kg_solvent_water activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition'
constraint_unit = 'kg dimensionless moles moles moles moles moles moles moles moles moles'
temperature = 60
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
[]
[Postprocessors]
[bulk_H+]
type = PointValue
point = '0 0 0'
variable = 'bulk_moles_H+'
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/interrogate_reactions/clinoptilolite2.i)
# Outputs activity ratios for reactions involving Clinoptil-Ca
[GeochemicalModelInterrogator]
model_definition = definition
swap_out_of_basis = "Al+++ SiO2(aq)"
swap_into_basis = " Prehnite Quartz"
activity_species = "H2O"
activity_values = "1"
equilibrium_species = "Clinoptil-Ca"
temperature = 200
interrogation = activity
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O Ca++ Al+++ SiO2(aq) H+ K+"
equilibrium_minerals = "Clinoptil-Ca Prehnite Quartz"
piecewise_linear_interpolation = true # to get exact logK at 200degC with no best-fit interpolation
[]
[]
(modules/geochemistry/test/tests/sorption_and_surface_complexation/ferric_hydroxide.i)
# Sorption onto FerricHydroxide.
[TimeIndependentReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
swap_out_of_basis = "Fe+++"
swap_into_basis = "Fe(OH)3(ppd)"
constraint_species = "H2O H+ Na+ Cl- Hg++ Pb++ SO4-- Fe(OH)3(ppd) >(s)FeOH >(w)FeOH"
constraint_value = " 1.0 1E-4 10E-3 10E-3 0.1E-3 0.1E-3 0.2E-3 9.3573E-3 4.6786E-5 1.87145E-3"
constraint_meaning = "kg_solvent_water activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition free_mineral bulk_composition bulk_composition"
constraint_unit = " kg dimensionless moles moles moles moles moles moles moles moles"
ramp_max_ionic_strength_initial = 0 # not needed in this simple problem
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
mol_cutoff = 1E-10
abs_tol = 1E-15
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Na+ Cl- Hg++ Pb++ SO4-- Fe+++ >(s)FeOH >(w)FeOH"
equilibrium_minerals = "Fe(OH)3(ppd)"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
(modules/combined/examples/geochem-porous_flow/geotes_2D/aquifer_equilibrium.i)
# Finds the equilibrium free molality of SiO2(aq) when in contact with QuartzLike at 50degC
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "small_database.json"
basis_species = "H2O SiO2(aq) Na+ Cl-"
equilibrium_minerals = "QuartzLike"
[]
[]
[TimeIndependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
swap_out_of_basis = "SiO2(aq)"
swap_into_basis = QuartzLike
constraint_species = "H2O Na+ Cl- QuartzLike"
constraint_value = " 1.0 0.1 0.1 396.685" # amount of QuartzLike is unimportant (provided it is positive). 396.685 is used simply because the other geotes_2D input files use this amount
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition free_mineral"
constraint_unit = " kg moles moles moles"
temperature = 50.0
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
add_aux_pH = false # there is no H+ in this system
precision = 12
[]
[Postprocessors]
[free_moles_SiO2]
type = PointValue
point = '0 0 0'
variable = 'molal_SiO2(aq)'
[]
[]
[Outputs]
csv = true
[]
(modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/exchanger.i)
#########################################
# #
# File written by create_input_files.py #
# #
#########################################
# Model of the heat-exchanger
# The input fluid to the heat exchanger is determined by AuxVariables called production_temperature, production_rate_H, production_rate_Cl, production_rate_SO4, production_rate_HCO3, production_rate_SiO2aq, production_rate_Al, production_rate_Ca, production_rate_Mg, production_rate_Fe, production_rate_K, production_rate_Na, production_rate_Sr, production_rate_F, production_rate_BOH, production_rate_Br, production_rate_Ba, production_rate_Li, production_rate_NO3, production_rate_O2aq, production_rate_H2O. These come from Postprocessors in the porous_flow.i simulation that measure the fluid composition at the production well.
# Given the input fluid, the exchanger cools/heats the fluid, removing any precipitates, and injects fluid back to porous_flow.i at temperature output_temperature and composition given by massfrac_H, etc.
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = '../../../../geochemistry/database/moose_geochemdb.json'
basis_species = 'H2O H+ Cl- SO4-- HCO3- SiO2(aq) Al+++ Ca++ Mg++ Fe++ K+ Na+ Sr++ F- B(OH)3 Br- Ba++ Li+ NO3- O2(aq)'
equilibrium_minerals = 'Siderite Pyrrhotite Dolomite Illite Anhydrite Calcite Quartz K-feldspar Kaolinite Barite Celestite Fluorite Albite Chalcedony Goethite'
[]
[]
[TimeDependentReactionSolver]
model_definition = definition
include_moose_solve = false
geochemistry_reactor_name = reactor
swap_out_of_basis = 'NO3- O2(aq)'
swap_into_basis = ' NH3 HS-'
charge_balance_species = 'Cl-'
# initial conditions are unimportant because in exchanger mode all existing fluid is flushed from the system before adding the produced water
constraint_species = 'H2O H+ Cl- SO4-- HCO3- SiO2(aq) Al+++ Ca++ Mg++ Fe++ K+ Na+ Sr++ F- B(OH)3 Br- Ba++ Li+ NH3 HS-'
constraint_value = '1.0 1E-6 1E-6 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18 1E-18'
constraint_meaning = 'kg_solvent_water bulk_composition bulk_composition free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration'
constraint_unit = "kg moles moles molal molal molal molal molal molal molal molal molal molal molal molal molal molal molal molal molal"
prevent_precipitation = 'Fluorite Albite Goethite'
initial_temperature = 92
mode = 4
temperature = ramp_temperature # ramp up to 160degC over ~1 day so that aquifer geochemistry simulation can easily converge
cold_temperature = 92
heating_increments = 10
source_species_names = ' H+ Cl- SO4-- HCO3- SiO2(aq) Al+++ Ca++ Mg++ Fe++ K+ Na+ Sr++ F- B(OH)3 Br- Ba++ Li+ NO3- O2(aq) H2O'
source_species_rates = ' production_rate_H production_rate_Cl production_rate_SO4 production_rate_HCO3 production_rate_SiO2aq production_rate_Al production_rate_Ca production_rate_Mg production_rate_Fe production_rate_K production_rate_Na production_rate_Sr production_rate_F production_rate_BOH production_rate_Br production_rate_Ba production_rate_Li production_rate_NO3 production_rate_O2aq production_rate_H2O'
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
[]
[GlobalParams]
point = '0 0 0'
reactor = reactor
[]
[AuxVariables]
[ramp_temperature]
initial_condition = 92
[]
[production_temperature]
initial_condition = 92 # the production_T Transfer lags one timestep behind for some reason, so give this a reasonable initial condition
[]
[transported_H]
[]
[transported_Cl]
[]
[transported_SO4]
[]
[transported_HCO3]
[]
[transported_SiO2aq]
[]
[transported_Al]
[]
[transported_Ca]
[]
[transported_Mg]
[]
[transported_Fe]
[]
[transported_K]
[]
[transported_Na]
[]
[transported_Sr]
[]
[transported_F]
[]
[transported_BOH]
[]
[transported_Br]
[]
[transported_Ba]
[]
[transported_Li]
[]
[transported_NO3]
[]
[transported_O2aq]
[]
[transported_H2O]
[]
[transported_mass]
[]
[massfrac_H]
[]
[massfrac_Cl]
[]
[massfrac_SO4]
[]
[massfrac_HCO3]
[]
[massfrac_SiO2aq]
[]
[massfrac_Al]
[]
[massfrac_Ca]
[]
[massfrac_Mg]
[]
[massfrac_Fe]
[]
[massfrac_K]
[]
[massfrac_Na]
[]
[massfrac_Sr]
[]
[massfrac_F]
[]
[massfrac_BOH]
[]
[massfrac_Br]
[]
[massfrac_Ba]
[]
[massfrac_Li]
[]
[massfrac_NO3]
[]
[massfrac_O2aq]
[]
[massfrac_H2O]
[]
[dumped_Siderite]
[]
[dumped_Pyrrhotite]
[]
[dumped_Dolomite]
[]
[dumped_Illite]
[]
[dumped_Anhydrite]
[]
[dumped_Calcite]
[]
[dumped_Quartz]
[]
[dumped_K-feldspar]
[]
[dumped_Kaolinite]
[]
[dumped_Barite]
[]
[dumped_Celestite]
[]
[dumped_Fluorite]
[]
[dumped_Albite]
[]
[dumped_Chalcedony]
[]
[dumped_Goethite]
[]
# The production_* Transfers lag one timestep behind for some reason (when the porous_flow simulation has finished, it correctly computes mole_rate_*_produced, but the Transfer gets the mole_rate_*_produced from the previous timestep), so give the production_rate_* reasonable initial conditions, otherwise they will be zero at the start of the simulation.
[production_rate_H]
initial_condition = -0.00058596786807342
[]
[production_rate_Cl]
initial_condition = 0.274767413291287
[]
[production_rate_SO4]
initial_condition = 0.012567456786868922
[]
[production_rate_HCO3]
initial_condition = 0.0001668295857850308
[]
[production_rate_SiO2aq]
initial_condition = 0.00010068057668449495
[]
[production_rate_Al]
initial_condition = 2.4224219572143877e-07
[]
[production_rate_Ca]
initial_condition = 0.0040997718654983036
[]
[production_rate_Mg]
initial_condition = 0.00015261342984691217
[]
[production_rate_Fe]
initial_condition = 0.0001550375425863269
[]
[production_rate_K]
initial_condition = 0.0003500651859998926
[]
[production_rate_Na]
initial_condition = 0.2896767602995328
[]
[production_rate_Sr]
initial_condition = 2.915285700108879e-05
[]
[production_rate_F]
initial_condition = 5.8582680830041476e-05
[]
[production_rate_BOH]
initial_condition = 0.0012157199878760335
[]
[production_rate_Br]
initial_condition = 0.00022605948665165203
[]
[production_rate_Ba]
initial_condition = 2.2773554030672105e-07
[]
[production_rate_Li]
initial_condition = 0.0023920780265869763
[]
[production_rate_NO3]
initial_condition = 0.000353470613973057
[]
[production_rate_O2aq]
initial_condition = -0.00044255942331181803
[]
[production_rate_H2O]
initial_condition = 10.10458252764496
[]
[]
[AuxKernels]
[ramp_temperature]
type = FunctionAux
variable = ramp_temperature
function = 'min(160, max(92, 92 + (160 - 92) * t / 1E5))'
[]
[transported_H_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_H
species = 'H+'
[]
[transported_Cl_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Cl
species = 'Cl-'
[]
[transported_SO4_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_SO4
species = 'SO4--'
[]
[transported_HCO3_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_HCO3
species = 'HCO3-'
[]
[transported_SiO2aq_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_SiO2aq
species = 'SiO2(aq)'
[]
[transported_Al_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Al
species = 'Al+++'
[]
[transported_Ca_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Ca
species = 'Ca++'
[]
[transported_Mg_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Mg
species = 'Mg++'
[]
[transported_Fe_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Fe
species = 'Fe++'
[]
[transported_K_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_K
species = 'K+'
[]
[transported_Na_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Na
species = 'Na+'
[]
[transported_Sr_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Sr
species = 'Sr++'
[]
[transported_F_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_F
species = 'F-'
[]
[transported_BOH_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_BOH
species = 'B(OH)3'
[]
[transported_Br_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Br
species = 'Br-'
[]
[transported_Ba_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Ba
species = 'Ba++'
[]
[transported_Li_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_Li
species = 'Li+'
[]
[transported_NO3_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_NO3
species = 'NO3-'
[]
[transported_O2aq_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_O2aq
species = 'O2(aq)'
[]
[transported_H2O_auxk]
type = GeochemistryQuantityAux
quantity = transported_moles_in_original_basis
variable = transported_H2O
species = 'H2O'
[]
[transported_mass_auxk]
type = ParsedAux
coupled_variables = ' transported_H transported_Cl transported_SO4 transported_HCO3 transported_SiO2aq transported_Al transported_Ca transported_Mg transported_Fe transported_K transported_Na transported_Sr transported_F transported_BOH transported_Br transported_Ba transported_Li transported_NO3 transported_O2aq transported_H2O'
variable = transported_mass
expression = ' transported_H * 1.0079 + transported_Cl * 35.453 + transported_SO4 * 96.0576 + transported_HCO3 * 61.0171 + transported_SiO2aq * 60.0843 + transported_Al * 26.9815 + transported_Ca * 40.08 + transported_Mg * 24.305 + transported_Fe * 55.847 + transported_K * 39.0983 + transported_Na * 22.9898 + transported_Sr * 87.62 + transported_F * 18.9984 + transported_BOH * 61.8329 + transported_Br * 79.904 + transported_Ba * 137.33 + transported_Li * 6.941 + transported_NO3 * 62.0049 + transported_O2aq * 31.9988 + transported_H2O * 18.01801802'
[]
[massfrac_H_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_H'
variable = massfrac_H
expression = '1.0079 * transported_H / transported_mass'
[]
[massfrac_Cl_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Cl'
variable = massfrac_Cl
expression = '35.453 * transported_Cl / transported_mass'
[]
[massfrac_SO4_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_SO4'
variable = massfrac_SO4
expression = '96.0576 * transported_SO4 / transported_mass'
[]
[massfrac_HCO3_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_HCO3'
variable = massfrac_HCO3
expression = '61.0171 * transported_HCO3 / transported_mass'
[]
[massfrac_SiO2aq_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_SiO2aq'
variable = massfrac_SiO2aq
expression = '60.0843 * transported_SiO2aq / transported_mass'
[]
[massfrac_Al_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Al'
variable = massfrac_Al
expression = '26.9815 * transported_Al / transported_mass'
[]
[massfrac_Ca_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Ca'
variable = massfrac_Ca
expression = '40.08 * transported_Ca / transported_mass'
[]
[massfrac_Mg_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Mg'
variable = massfrac_Mg
expression = '24.305 * transported_Mg / transported_mass'
[]
[massfrac_Fe_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Fe'
variable = massfrac_Fe
expression = '55.847 * transported_Fe / transported_mass'
[]
[massfrac_K_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_K'
variable = massfrac_K
expression = '39.0983 * transported_K / transported_mass'
[]
[massfrac_Na_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Na'
variable = massfrac_Na
expression = '22.9898 * transported_Na / transported_mass'
[]
[massfrac_Sr_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Sr'
variable = massfrac_Sr
expression = '87.62 * transported_Sr / transported_mass'
[]
[massfrac_F_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_F'
variable = massfrac_F
expression = '18.9984 * transported_F / transported_mass'
[]
[massfrac_BOH_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_BOH'
variable = massfrac_BOH
expression = '61.8329 * transported_BOH / transported_mass'
[]
[massfrac_Br_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Br'
variable = massfrac_Br
expression = '79.904 * transported_Br / transported_mass'
[]
[massfrac_Ba_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Ba'
variable = massfrac_Ba
expression = '137.33 * transported_Ba / transported_mass'
[]
[massfrac_Li_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_Li'
variable = massfrac_Li
expression = '6.941 * transported_Li / transported_mass'
[]
[massfrac_NO3_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_NO3'
variable = massfrac_NO3
expression = '62.0049 * transported_NO3 / transported_mass'
[]
[massfrac_O2aq_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_O2aq'
variable = massfrac_O2aq
expression = '31.9988 * transported_O2aq / transported_mass'
[]
[massfrac_H2O_auxk]
type = ParsedAux
coupled_variables = 'transported_mass transported_H2O'
variable = massfrac_H2O
expression = '18.01801802 * transported_H2O / transported_mass'
[]
[dumped_Siderite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Siderite
species = Siderite
quantity = moles_dumped
[]
[dumped_Pyrrhotite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Pyrrhotite
species = Pyrrhotite
quantity = moles_dumped
[]
[dumped_Dolomite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Dolomite
species = Dolomite
quantity = moles_dumped
[]
[dumped_Illite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Illite
species = Illite
quantity = moles_dumped
[]
[dumped_Anhydrite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Anhydrite
species = Anhydrite
quantity = moles_dumped
[]
[dumped_Calcite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Calcite
species = Calcite
quantity = moles_dumped
[]
[dumped_Quartz_auxk]
type = GeochemistryQuantityAux
variable = dumped_Quartz
species = Quartz
quantity = moles_dumped
[]
[dumped_K-feldspar_auxk]
type = GeochemistryQuantityAux
variable = dumped_K-feldspar
species = K-feldspar
quantity = moles_dumped
[]
[dumped_Kaolinite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Kaolinite
species = Kaolinite
quantity = moles_dumped
[]
[dumped_Barite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Barite
species = Barite
quantity = moles_dumped
[]
[dumped_Celestite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Celestite
species = Celestite
quantity = moles_dumped
[]
[dumped_Fluorite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Fluorite
species = Fluorite
quantity = moles_dumped
[]
[dumped_Albite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Albite
species = Albite
quantity = moles_dumped
[]
[dumped_Chalcedony_auxk]
type = GeochemistryQuantityAux
variable = dumped_Chalcedony
species = Chalcedony
quantity = moles_dumped
[]
[dumped_Goethite_auxk]
type = GeochemistryQuantityAux
variable = dumped_Goethite
species = Goethite
quantity = moles_dumped
[]
[]
[Postprocessors]
[cumulative_moles_precipitated_Siderite]
type = PointValue
variable = dumped_Siderite
[]
[cumulative_moles_precipitated_Pyrrhotite]
type = PointValue
variable = dumped_Pyrrhotite
[]
[cumulative_moles_precipitated_Dolomite]
type = PointValue
variable = dumped_Dolomite
[]
[cumulative_moles_precipitated_Illite]
type = PointValue
variable = dumped_Illite
[]
[cumulative_moles_precipitated_Anhydrite]
type = PointValue
variable = dumped_Anhydrite
[]
[cumulative_moles_precipitated_Calcite]
type = PointValue
variable = dumped_Calcite
[]
[cumulative_moles_precipitated_Quartz]
type = PointValue
variable = dumped_Quartz
[]
[cumulative_moles_precipitated_K-feldspar]
type = PointValue
variable = dumped_K-feldspar
[]
[cumulative_moles_precipitated_Kaolinite]
type = PointValue
variable = dumped_Kaolinite
[]
[cumulative_moles_precipitated_Barite]
type = PointValue
variable = dumped_Barite
[]
[cumulative_moles_precipitated_Celestite]
type = PointValue
variable = dumped_Celestite
[]
[cumulative_moles_precipitated_Fluorite]
type = PointValue
variable = dumped_Fluorite
[]
[cumulative_moles_precipitated_Albite]
type = PointValue
variable = dumped_Albite
[]
[cumulative_moles_precipitated_Chalcedony]
type = PointValue
variable = dumped_Chalcedony
[]
[cumulative_moles_precipitated_Goethite]
type = PointValue
variable = dumped_Goethite
[]
[production_temperature]
type = PointValue
variable = production_temperature
[]
[mass_heated_this_timestep]
type = PointValue
variable = transported_mass
[]
[]
[Outputs]
csv = true
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 7.76E6 # 90 days
[TimeStepper]
type = FunctionDT
function = 'min(3E4, max(1E4, 0.2 * t))'
[]
[]
[MultiApps]
[porous_flow_sim]
type = TransientMultiApp
input_files = porous_flow.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[injection_T]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'solution_temperature'
variable = 'injection_temperature'
[]
[injection_H]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_H'
variable = 'injection_rate_massfrac_H'
[]
[injection_Cl]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Cl'
variable = 'injection_rate_massfrac_Cl'
[]
[injection_SO4]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_SO4'
variable = 'injection_rate_massfrac_SO4'
[]
[injection_HCO3]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_HCO3'
variable = 'injection_rate_massfrac_HCO3'
[]
[injection_SiO2aq]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_SiO2aq'
variable = 'injection_rate_massfrac_SiO2aq'
[]
[injection_Al]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Al'
variable = 'injection_rate_massfrac_Al'
[]
[injection_Ca]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Ca'
variable = 'injection_rate_massfrac_Ca'
[]
[injection_Mg]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Mg'
variable = 'injection_rate_massfrac_Mg'
[]
[injection_Fe]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Fe'
variable = 'injection_rate_massfrac_Fe'
[]
[injection_K]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_K'
variable = 'injection_rate_massfrac_K'
[]
[injection_Na]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Na'
variable = 'injection_rate_massfrac_Na'
[]
[injection_Sr]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Sr'
variable = 'injection_rate_massfrac_Sr'
[]
[injection_F]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_F'
variable = 'injection_rate_massfrac_F'
[]
[injection_BOH]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_BOH'
variable = 'injection_rate_massfrac_BOH'
[]
[injection_Br]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Br'
variable = 'injection_rate_massfrac_Br'
[]
[injection_Ba]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Ba'
variable = 'injection_rate_massfrac_Ba'
[]
[injection_Li]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_Li'
variable = 'injection_rate_massfrac_Li'
[]
[injection_NO3]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_NO3'
variable = 'injection_rate_massfrac_NO3'
[]
[injection_O2aq]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_O2aq'
variable = 'injection_rate_massfrac_O2aq'
[]
[injection_H2O]
type = MultiAppNearestNodeTransfer
direction = TO_MULTIAPP
multi_app = porous_flow_sim
fixed_meshes = true
source_variable = 'massfrac_H2O'
variable = 'injection_rate_massfrac_H2O'
[]
[production_T]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = production_temperature
variable = production_temperature
[]
[production_H]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_H_produced
variable = production_rate_H
[]
[production_Cl]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Cl_produced
variable = production_rate_Cl
[]
[production_SO4]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_SO4_produced
variable = production_rate_SO4
[]
[production_HCO3]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_HCO3_produced
variable = production_rate_HCO3
[]
[production_SiO2aq]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_SiO2aq_produced
variable = production_rate_SiO2aq
[]
[production_Al]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Al_produced
variable = production_rate_Al
[]
[production_Ca]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Ca_produced
variable = production_rate_Ca
[]
[production_Mg]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Mg_produced
variable = production_rate_Mg
[]
[production_Fe]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Fe_produced
variable = production_rate_Fe
[]
[production_K]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_K_produced
variable = production_rate_K
[]
[production_Na]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Na_produced
variable = production_rate_Na
[]
[production_Sr]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Sr_produced
variable = production_rate_Sr
[]
[production_F]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_F_produced
variable = production_rate_F
[]
[production_BOH]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_BOH_produced
variable = production_rate_BOH
[]
[production_Br]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Br_produced
variable = production_rate_Br
[]
[production_Ba]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Ba_produced
variable = production_rate_Ba
[]
[production_Li]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_Li_produced
variable = production_rate_Li
[]
[production_NO3]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_NO3_produced
variable = production_rate_NO3
[]
[production_O2aq]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_O2aq_produced
variable = production_rate_O2aq
[]
[production_H2O]
type = MultiAppPostprocessorInterpolationTransfer
direction = FROM_MULTIAPP
multi_app = porous_flow_sim
postprocessor = mole_rate_H2O_produced
variable = production_rate_H2O
[]
[]
(modules/geochemistry/test/tests/spatial_reactor/spatial_2.i)
# demonstrating that controlled-activity can be spatially-dependent and that adding sources of such species leaves the system unchanged
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
[]
[]
[SpatialReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 55.5 1E-5 1E-5"
constraint_meaning = "bulk_composition activity bulk_composition"
constraint_unit = "moles dimensionless moles"
controlled_activity_name = 'H+'
controlled_activity_value = 'act_H+'
source_species_names = 'H+'
source_species_rates = '1.0'
[]
[VectorPostprocessors]
[pH]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
sort_by = x
num_points = 11
variable = pH
[]
[]
[AuxVariables]
[act_H+]
[]
[]
[AuxKernels]
[act_H+]
type = FunctionAux
variable = 'act_H+'
function = '10^(-5 + x)'
execute_on = timestep_begin # so the Reactor gets the correct value
[]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 1
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
execute_on = final
[]
(modules/geochemistry/test/tests/geochemistry_quantity_aux/molal.i)
#Extract molal
[TimeIndependentReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 1.0 1.0E-4 1.0E-4"
constraint_meaning = "kg_solvent_water free_concentration bulk_composition"
constraint_unit = "kg molal moles"
ramp_max_ionic_strength_initial = 0
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Cl-"
[]
[]
[AuxVariables]
[the_aux]
[]
[]
[AuxKernels]
[the_aux]
type = GeochemistryQuantityAux
species = 'H+'
reactor = geochemistry_reactor
variable = the_aux
[]
[]
[Postprocessors]
[value]
type = PointValue
point = '0 0 0'
variable = the_aux
[]
[value_from_action]
type = PointValue
point = '0 0 0'
variable = "molal_H+"
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/sorption_and_surface_complexation/selenate.i)
# Langmuir sorption of Selenate
[TimeIndependentReactionSolver]
model_definition = definition
charge_balance_species = "Na+"
constraint_species = "H2O H+ Na+ SorbingSite SeO4--"
constraint_value = " 1.0 -7.5 10E-6 310E-9 5E-6"
constraint_meaning = "kg_solvent_water log10activity bulk_composition bulk_composition free_concentration"
constraint_unit = " kg dimensionless moles moles molal"
ramp_max_ionic_strength_initial = 0 # not needed in this simple problem
execute_console_output_on = '' # only CSV output for this problem
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/selenate_sorption.json"
basis_species = "H2O H+ Na+ SeO4-- SorbingSite"
[]
[]
[AuxVariables]
[mol_sorbed_selenate_per_g_dry_soil]
[]
[]
[AuxKernels]
[mol_sorbed_selenate_per_g_dry_soil]
type = ParsedAux
coupled_variables = molal_SorbedSelenate
expression = 'molal_SorbedSelenate / 500.0'
variable = mol_sorbed_selenate_per_g_dry_soil
[]
[]
[Postprocessors]
[mol_sorbed_selenate_per_g_dry_soil]
type = PointValue
point = '0 0 0'
variable = mol_sorbed_selenate_per_g_dry_soil
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/interrogate_reactions/muscovite2.i)
# Output activity ratios for reactions involving muscovite
[GeochemicalModelInterrogator]
model_definition = definition
swap_out_of_basis = "SiO2(aq) Al+++ Quartz SiO2(aq) Tridymite SiO2(aq)"
swap_into_basis = " Quartz Maximum SiO2(aq) Tridymite SiO2(aq) Amrph^silica"
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 Quartz Maximum Tridymite Amrph^silica"
piecewise_linear_interpolation = true # to get exact logK at 25degC with no best-fit interpolation
[]
[]
(modules/combined/examples/geochem-porous_flow/forge/kinetic.i)
# Simulation to check that the output of water_60_to_220degC is indeed at equilibrium with the mineral assemblage.
# The initial mole numbers of the kinetic species are unimportant for this simulation, but are chosen to be consistent with other input files. The numerical values are such that:
# - the mass fractions are: Albite 0.44; Anorthite 0.05; K-feldspar 0.29; Quartz 0.18, Phlgoptite 0.04 with trace amounts of Calcite and Anhydrite. These are similar to that measured in bulk X-ray diffraction results of 10 samples from well 58-32, assuming that "plagioclase feldspar" consists of Albite and Anorthite in the ratio 9:1, and that Biotite is Phlogoptite, and the 2% Illite is added to Phlogoptite. Precisely:
# - it is assumed that water_60_to_220degC consists of 1 litre of water (there is 1kg of solvent water) and that the porosity is 0.01, so the amount of rock should be 99000cm^3
# - the cm^3 of the trace minerals Calcite and Anhydrite is exactly given by water_60_to_220degC (0.016 and 0.018 respectively)
# - the total mineral volume is 99000cm^3, so that the porosity is 0.01
# - see initial_kinetic_moles.xlsx for the remaining mole numbers
[UserObjects]
[rate_Albite]
type = GeochemistryKineticRate
kinetic_species_name = Albite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 69.8E3
one_over_T0 = 0.003354
[]
[rate_Anhydrite]
type = GeochemistryKineticRate
kinetic_species_name = Anhydrite
intrinsic_rate_constant = 1.0E-7
multiply_by_mass = true
area_quantity = 10
activation_energy = 14.3E3
one_over_T0 = 0.003354
[]
[rate_Anorthite]
type = GeochemistryKineticRate
kinetic_species_name = Anorthite
intrinsic_rate_constant = 1.0E-13
multiply_by_mass = true
area_quantity = 10
activation_energy = 17.8E3
one_over_T0 = 0.003354
[]
[rate_Calcite]
type = GeochemistryKineticRate
kinetic_species_name = Calcite
intrinsic_rate_constant = 1.0E-10
multiply_by_mass = true
area_quantity = 10
activation_energy = 23.5E3
one_over_T0 = 0.003354
[]
[rate_Chalcedony]
type = GeochemistryKineticRate
kinetic_species_name = Chalcedony
intrinsic_rate_constant = 1.0E-18
multiply_by_mass = true
area_quantity = 10
activation_energy = 90.1E3
one_over_T0 = 0.003354
[]
[rate_Clinochl-7A]
type = GeochemistryKineticRate
kinetic_species_name = Clinochl-7A
intrinsic_rate_constant = 1.0E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 88.0E3
one_over_T0 = 0.003354
[]
[rate_Illite]
type = GeochemistryKineticRate
kinetic_species_name = Illite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 29E3
one_over_T0 = 0.003354
[]
[rate_K-feldspar]
type = GeochemistryKineticRate
kinetic_species_name = K-feldspar
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 38E3
one_over_T0 = 0.003354
[]
[rate_Kaolinite]
type = GeochemistryKineticRate
kinetic_species_name = Kaolinite
intrinsic_rate_constant = 1E-18
multiply_by_mass = true
area_quantity = 10
activation_energy = 22.2E3
one_over_T0 = 0.003354
[]
[rate_Quartz]
type = GeochemistryKineticRate
kinetic_species_name = Quartz
intrinsic_rate_constant = 1E-18
multiply_by_mass = true
area_quantity = 10
activation_energy = 90.1E3
one_over_T0 = 0.003354
[]
[rate_Paragonite]
type = GeochemistryKineticRate
kinetic_species_name = Paragonite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 22E3
one_over_T0 = 0.003354
[]
[rate_Phlogopite]
type = GeochemistryKineticRate
kinetic_species_name = Phlogopite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 22E3
one_over_T0 = 0.003354
[]
[rate_Zoisite]
type = GeochemistryKineticRate
kinetic_species_name = Zoisite
intrinsic_rate_constant = 1E-16
multiply_by_mass = true
area_quantity = 10
activation_energy = 66.1E3
one_over_T0 = 0.003354
[]
[definition]
type = GeochemicalModelDefinition
database_file = '../../../../geochemistry/database/moose_geochemdb.json'
basis_species = 'H2O H+ Na+ K+ Ca++ Mg++ SiO2(aq) Al+++ Cl- SO4-- HCO3-'
remove_all_extrapolated_secondary_species = true
kinetic_minerals = 'Albite Anhydrite Anorthite Calcite Chalcedony Clinochl-7A Illite K-feldspar Kaolinite Quartz Paragonite Phlogopite'
kinetic_rate_descriptions = 'rate_Albite rate_Anhydrite rate_Anorthite rate_Calcite rate_Chalcedony rate_Clinochl-7A rate_Illite rate_K-feldspar rate_Kaolinite rate_Quartz rate_Paragonite rate_Phlogopite'
[]
[]
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = 'Cl-'
constraint_species = 'H2O H+ Na+ K+ Ca++ Mg++ SiO2(aq) Al+++ Cl- SO4-- HCO3-'
# Following numbers are from water_60_to_220degC_out.csv
constraint_value = ' 1.0006383866109 9.5165072498215e-07 0.100020379171 0.0059389061065 0.011570884507621 4.6626763057447e-06 0.0045110404925255 5.8096968688789e-17 0.13500708594394 6.6523540147676e-05 7.7361407898089e-05'
constraint_meaning = 'kg_solvent_water free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration bulk_composition free_concentration free_concentration'
constraint_unit = ' kg molal molal molal molal molal molal molal moles molal molal'
initial_temperature = 220
temperature = 220
kinetic_species_name = ' Albite Anorthite K-feldspar Quartz Phlogopite Paragonite Calcite Anhydrite Chalcedony Illite Kaolinite Clinochl-7A'
kinetic_species_initial_value = '4.3511787009E+02 4.660402064E+01 2.701846444E+02 7.7684884497E+02 2.4858697344E+01 1E-10 0.000423465 0.000400049 1E-10 1E-10 1E-10 1E-10'
kinetic_species_unit = ' moles moles moles moles moles moles moles moles moles moles moles moles'
evaluate_kinetic_rates_always = true # otherwise will easily "run out" of dissolving species
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
mol_cutoff = 0.1
execute_console_output_on = ''
[]
[Executioner]
type = Transient
[TimeStepper]
type = FunctionDT
function = '1E8'
[]
end_time = 4E8
[]
[GlobalParams]
point = '0 0 0'
[]
[Postprocessors]
[cm3_Albite]
type = PointValue
variable = 'free_cm3_Albite'
[]
[cm3_Anhydrite]
type = PointValue
variable = 'free_cm3_Anhydrite'
[]
[cm3_Anorthite]
type = PointValue
variable = 'free_cm3_Anorthite'
[]
[cm3_Calcite]
type = PointValue
variable = 'free_cm3_Calcite'
[]
[cm3_Chalcedony]
type = PointValue
variable = 'free_cm3_Chalcedony'
[]
[cm3_Clinochl-7A]
type = PointValue
variable = 'free_cm3_Clinochl-7A'
[]
[cm3_Illite]
type = PointValue
variable = 'free_cm3_Illite'
[]
[cm3_K-feldspar]
type = PointValue
variable = 'free_cm3_K-feldspar'
[]
[cm3_Kaolinite]
type = PointValue
variable = 'free_cm3_Kaolinite'
[]
[cm3_Quartz]
type = PointValue
variable = 'free_cm3_Quartz'
[]
[cm3_Paragonite]
type = PointValue
variable = 'free_cm3_Paragonite'
[]
[cm3_Phlogopite]
type = PointValue
variable = 'free_cm3_Phlogopite'
[]
[cm3_mineral]
type = LinearCombinationPostprocessor
pp_names = 'cm3_Albite cm3_Anhydrite cm3_Anorthite cm3_Calcite cm3_Chalcedony cm3_Clinochl-7A cm3_Illite cm3_K-feldspar cm3_Kaolinite cm3_Quartz cm3_Paragonite cm3_Phlogopite'
pp_coefs = '1 1 1 1 1 1 1 1 1 1 1 1'
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/equilibrium_models/red_sea_no_precip.i)
# Time-independent model of water from the Red Sea without precipitation
[TimeIndependentReactionSolver]
model_definition = definition
swap_out_of_basis = "O2(aq) Ba++"
swap_into_basis = "Sphalerite Barite"
prevent_precipitation = "Sphalerite Barite Fluorite Chalcocite Bornite Chalcopyrite Pyrite Galena Covellite"
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Na+ K+ Mg++ Ca++ Cl- SO4-- HCO3- Cu+ F- Fe++ Pb++ Zn++ Sphalerite Barite"
constraint_value = " 1.0 -5.6 5.42 0.0643 0.0423 0.173 5.89 0.0118 0.00309 5.50E-06 0.000354 0.00195 4.09E-06 0.000111 1E-11 0.5E-11"
constraint_meaning = "kg_solvent_water log10activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition free_mineral free_mineral"
constraint_unit = " kg dimensionless moles moles moles moles moles moles moles moles moles moles moles moles moles moles"
ramp_max_ionic_strength_initial = 0 # not needed in this simple example
temperature = 60
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
mol_cutoff = 1E-7
abs_tol = 1E-12
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Na+ K+ Mg++ Ca++ Cl- SO4-- HCO3- Cu+ F- Fe++ Pb++ Zn++ O2(aq) Ba++"
equilibrium_minerals = "Sphalerite Barite Fluorite Chalcocite Bornite Chalcopyrite Pyrite Galena Covellite"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
(modules/geochemistry/test/tests/geochemistry_quantity_aux/kinetic_rate.i)
#Extract -(kinetic rate times dt)
[TimeDependentReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl- Fe+++ >(s)FeOH >(w)FeOH"
constraint_value = " 1.0 4.0 1.0 0.1 1.0E-6 1.0E-6"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition free_concentration free_concentration free_concentration"
constraint_unit = "kg moles moles molal molal molal"
kinetic_species_name = "Fe(OH)3(ppd)"
kinetic_species_initial_value = "1.0"
kinetic_species_unit = "moles"
max_ionic_strength = 0.0
ramp_max_ionic_strength_initial = 0
[]
[UserObjects]
[constant_rate]
type = GeochemistryKineticRate
kinetic_species_name = "Fe(OH)3(ppd)"
intrinsic_rate_constant = 1E-3
eta = 0.0
[]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Cl- Fe+++ >(s)FeOH >(w)FeOH"
kinetic_minerals = "Fe(OH)3(ppd)"
kinetic_rate_descriptions = "constant_rate"
[]
[]
[Executioner]
type = Transient
dt = 2
end_time = 2
[]
[AuxVariables]
[the_aux]
[]
[]
[AuxKernels]
[the_aux]
type = GeochemistryQuantityAux
species = "Fe(OH)3(ppd)"
reactor = geochemistry_reactor
variable = the_aux
quantity = kinetic_additions
[]
[]
[Postprocessors]
[value]
type = PointValue
point = '0 0 0'
variable = the_aux
[]
[value_from_action]
type = PointValue
point = '0 0 0'
variable = "mol_change_Fe(OH)3(ppd)"
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/spatial_reactor/spatial_1.i)
# Example demonstrating that controlled-activity can be spatially-dependent
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
[]
[]
[SpatialReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 1 -5 1E-5"
constraint_meaning = "bulk_composition log10activity bulk_composition"
constraint_unit = " kg dimensionless moles"
controlled_activity_name = 'H+'
controlled_activity_value = 'act_H+'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 1
[]
[Executioner]
type = Transient
num_steps = 1
[]
[AuxVariables]
[act_H+]
[]
[]
[AuxKernels]
[act_H+]
type = FunctionAux
variable = 'act_H+'
function = '10^(-5 + x)'
execute_on = timestep_begin # so the Reactor gets the correct value
[]
[]
[VectorPostprocessors]
[pH]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
sort_by = x
num_points = 11
variable = pH
[]
[]
[Outputs]
csv = true
execute_on = final
[]
(modules/geochemistry/test/tests/time_dependent_reactions/flushing_equilibrium_at70degC.i)
# Alkali flushing of a reservoir (an example of flushing)
# This input file finds the molality of SiO2(aq), which is needed because when Quartz is specified as kinetic it cannot appear in the basis
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- Na+ Ca++ HCO3- Mg++ K+ Al+++ SiO2(aq)"
equilibrium_minerals = "Calcite Dolomite-ord Muscovite Kaolinite Quartz"
[]
[]
[TimeIndependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
swap_into_basis = "Calcite Dolomite-ord Muscovite Kaolinite Quartz"
swap_out_of_basis = "HCO3- Mg++ K+ Al+++ SiO2(aq)"
constraint_species = "H2O H+ Cl- Na+ Ca++ Calcite Dolomite-ord Muscovite Kaolinite Quartz"
constraint_value = " 1.0 -5 1.0 1.0 0.2 9.88249 3.652471265 1.2792268 1.2057878 226.99243"
constraint_meaning = "kg_solvent_water log10activity bulk_composition bulk_composition bulk_composition free_mineral free_mineral free_mineral free_mineral free_mineral"
constraint_unit = " kg dimensionless moles moles moles moles moles moles moles moles"
temperature = 70.0
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
execute_console_output_on = ''
abs_tol = 1E-14
[]
[GlobalParams]
point = '0 0 0'
[]
[Postprocessors]
[pH]
type = PointValue
variable = "pH"
[]
[molality_sio2]
type = PointValue
variable = 'molal_SiO2(aq)'
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/spatial_reactor/except2.i)
# exception testing: unknown source_species
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
[]
[]
[SpatialReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 55.5 1E-5 1E-5"
constraint_meaning = "bulk_composition bulk_composition bulk_composition"
constraint_unit = "moles moles moles"
source_species_names = 'Ca++'
source_species_rates = '1'
[]
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Executioner]
type = Transient
num_steps = 1
[]
(modules/geochemistry/test/tests/spatial_reactor/except1.i)
# exception testing: incorrect source_species_rates size
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
[]
[]
[SpatialReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 55.5 1E-5 1E-5"
constraint_meaning = "bulk_composition bulk_composition bulk_composition"
constraint_unit = "moles moles moles"
source_species_names = 'H2O'
source_species_rates = '1 1'
[]
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Executioner]
type = Transient
num_steps = 1
[]
(modules/geochemistry/test/tests/redox_disequilibrium/morro.i)
[TimeIndependentReactionSolver]
model_definition = definition
temperature = 22
charge_balance_species = "Cl-" # this means the bulk moles of Cl- will not be exactly as set below
constraint_species = "H2O H+ O2(aq) Cl- HCO3- Ca++ Mg++ Na+ K+ Fe++ Mn++ Zn++ SO4--"
constraint_value = " 1.0 -6.05 0.13438E-3 3.041E-5 0.0295E-3 0.005938E-3 0.01448E-3 0.0018704E-3 0.005115E-3 0.01307E-3 0.005042E-3 0.001897E-3 0.01562E-4"
constraint_meaning = "kg_solvent_water log10activity free_concentration bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = " kg dimensionless molal moles moles moles moles moles moles moles moles moles moles"
max_initial_residual = 1E-2
ramp_max_ionic_strength_initial = 10
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
mol_cutoff = 1E-5
abs_tol = 1E-15
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- O2(aq) HCO3- Ca++ Mg++ Na+ K+ Fe++ Mn++ Zn++ SO4--"
[]
[]
(modules/geochemistry/test/tests/equilibrium_models/amazon.i)
[TimeIndependentReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ O2(aq) SiO2(aq) Al+++ Fe++ Ca++ Mg++ Na+ HCO3- SO4-- Cl- "
constraint_value = " 1.0 -6.5 1.813E-4 0.0001165 2.5945E-6 1.0744E-6 0.0001073 4.526E-5 7.83E-5 0.0003114 3.1233E-5 1.383E-4"
constraint_meaning = "kg_solvent_water log10activity free_concentration bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = " kg dimensionless molal moles moles moles moles moles moles moles moles moles"
max_initial_residual = 0.1 # this small value is needed so that the charge-balance species is not switched to Ca++ (which, by the way, does not make a huge difference to the result)
prevent_precipitation = "Nontronit-Ca Nontronit-Mg Nontronit-Na Hematite Kaolinite Beidellit-Ca Beidellit-H Beidellit-Mg Beidellit-Na Pyrophyllite Gibbsite Paragonite Quartz"
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
mol_cutoff = 1E-7
abs_tol = 1E-15
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ SiO2(aq) Al+++ Fe++ Ca++ Mg++ Na+ HCO3- SO4-- Cl- O2(aq)"
equilibrium_minerals = "Nontronit-Ca Nontronit-Mg Nontronit-Na Hematite Kaolinite Beidellit-Ca Beidellit-H Beidellit-Mg Beidellit-Na Pyrophyllite Gibbsite Paragonite Quartz"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
(modules/geochemistry/test/tests/time_dependent_reactions/flushing_case1.i)
# Alkali flushing of a reservoir (an example of flushing): adding NaOH
# To determine the initial constraint_values, run flushing_equilibrium_at70degC.i
# Note that flushing_equilibrium_at70degC.i will have to be re-run when temperature-dependence has been added to geochemistry
# Note that Dawsonite is currently not included as an equilibrium_mineral, otherwise it is supersaturated in the initial configuration, so precipitates. Bethke does not report this in Fig30.4, so I assume it is due to temperature dependence
[GlobalParams]
point = '0 0 0'
[]
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
swap_into_basis = "Calcite Dolomite-ord Muscovite Kaolinite"
swap_out_of_basis = "HCO3- Mg++ K+ Al+++"
constraint_species = "H2O H+ Cl- Na+ Ca++ Calcite Dolomite-ord Muscovite Kaolinite SiO2(aq)"
constraint_value = " 1.0 1E-5 2.1716946 1.0288941 0.21650572 10.177537 3.6826177 1.320907 1.1432682 6.318e-05"
constraint_meaning = "kg_solvent_water activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition free_concentration"
constraint_unit = " kg dimensionless moles moles moles moles moles moles moles molal"
initial_temperature = 70.0
temperature = 70.0
kinetic_species_name = Quartz
kinetic_species_initial_value = 226.992243
kinetic_species_unit = moles
evaluate_kinetic_rates_always = true # implicit time-marching used for stability
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
close_system_at_time = 0.0
remove_fixed_activity_name = "H+"
remove_fixed_activity_time = 0.0
mode = 3 # flush through the NaOH solution specified below:
source_species_names = "H2O Na+ OH-"
source_species_rates = "27.755 0.25 0.25" # 1kg water/2days = 27.755moles/day. 0.5mol Na+/2days = 0.25mol/day
[]
[UserObjects]
[rate_quartz]
type = GeochemistryKineticRate
kinetic_species_name = Quartz
intrinsic_rate_constant = 1.3824E-13 # 1.6E-19mol/s/cm^2 = 1.3824E-13mol/day/cm^2
multiply_by_mass = true
area_quantity = 1000
promoting_species_names = "H+"
promoting_indices = "-0.5"
[]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- Na+ Ca++ HCO3- Mg++ K+ Al+++ SiO2(aq)"
equilibrium_minerals = "Calcite Dolomite-ord Muscovite Kaolinite Paragonite Analcime Phlogopite Tridymite" # Dawsonite
kinetic_minerals = "Quartz"
kinetic_rate_descriptions = "rate_quartz"
[]
[]
[AuxVariables]
[diss_rate]
[]
[]
[AuxKernels]
[diss_rate]
type = ParsedAux
coupled_variables = mol_change_Quartz
expression = '-mol_change_Quartz / 1.0' # 1.0 = timestep size
variable = diss_rate
[]
[]
[Postprocessors]
[pH]
type = PointValue
variable = "pH"
[]
[rate_mole_per_day]
type = PointValue
variable = diss_rate
[]
[cm3_Calcite]
type = PointValue
variable = free_cm3_Calcite
[]
[cm3_Dolomite]
type = PointValue
variable = free_cm3_Dolomite-ord
[]
[cm3_Muscovite]
type = PointValue
variable = free_cm3_Muscovite
[]
[cm3_Kaolinite]
type = PointValue
variable = free_cm3_Kaolinite
[]
[cm3_Quartz]
type = PointValue
variable = free_cm3_Quartz
[]
[cm3_Paragonite]
type = PointValue
variable = free_cm3_Paragonite
[]
[cm3_Analcime]
type = PointValue
variable = free_cm3_Analcime
[]
[cm3_Phlogopite]
type = PointValue
variable = free_cm3_Phlogopite
[]
[cm3_Tridymite]
type = PointValue
variable = free_cm3_Tridymite
[]
[]
[Executioner]
type = Transient
dt = 1
end_time = 20 # measured in days
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/spatial_reactor/spatial_4.i)
# demonstrating that sources may be spatially-dependent
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
[]
[]
[SpatialReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 55.5 1E-5 1E-5"
constraint_meaning = "bulk_composition bulk_composition bulk_composition"
constraint_unit = "moles moles moles"
source_species_names = HCl
source_species_rates = HCl_rate
[]
[VectorPostprocessors]
[bulk_Cl]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
sort_by = x
num_points = 11
variable = 'bulk_moles_Cl-'
[]
[]
[AuxVariables]
[HCl_rate]
[]
[]
[AuxKernels]
[HCl_rate]
type = FunctionAux
variable = HCl_rate
function = '1E-5 * x'
execute_on = timestep_begin # so the Reactor gets the correct value
[]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 1
[]
[Executioner]
type = Transient
dt = 1
end_time = 2
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/spatial_reactor/except4.i)
# exception testing: attempt to remove a fixed activity from a basis species whose activity was never fixed
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
[]
[]
[SpatialReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 55.5 1E-5 1E-5"
constraint_meaning = "bulk_composition bulk_composition bulk_composition"
constraint_unit = "moles moles moles"
remove_fixed_activity_name = 'H+'
remove_fixed_activity_time = 0
[]
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Executioner]
type = Transient
num_steps = 1
[]
(modules/geochemistry/test/tests/interrogate_reactions/pyrite.i)
# Output equilibrium reactions for pyrite using different basis components
[GeochemicalModelInterrogator]
model_definition = definition
swap_out_of_basis = "Fe++ Fe(OH)3(ppd) SO4-- O2(aq)"
swap_into_basis = " Fe(OH)3(ppd) Fe++ H2S(aq) SO4--"
equilibrium_species = Pyrite
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O Fe++ SO4-- H+ O2(aq)"
equilibrium_minerals = "Pyrite Fe(OH)3(ppd)"
piecewise_linear_interpolation = true # to get exact logK at 25degC with no best-fit interpolation
[]
[]
(modules/geochemistry/test/tests/equilibrium_models/seawater_no_precip.i)
[TimeIndependentReactionSolver]
model_definition = definition
swap_out_of_basis = "H+ O2(aq)"
swap_into_basis = " CO2(g) O2(g)"
charge_balance_species = "Cl-" # this means the bulk moles of Cl- will not be exactly as set below
constraint_species = "H2O CO2(g) O2(g) Cl- Na+ SO4-- Mg++ Ca++ K+ HCO3- SiO2(aq)"
constraint_value = " 1.0 0.0003162 0.2 0.566 0.485 0.0292 0.055 0.0106 0.0106 0.00241 0.000103"
constraint_meaning = "kg_solvent_water fugacity fugacity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = " kg dimensionless dimensionless moles moles moles moles moles moles moles moles"
prevent_precipitation = "Antigorite Tremolite Talc Chrysotile Sepiolite Anthophyllite Dolomite Dolomite-ord Huntite Dolomite-dis Magnesite Calcite Aragonite Quartz"
ramp_max_ionic_strength_initial = 0 # not needed in this simple problem
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
mol_cutoff = 1E-5
abs_tol = 1E-15
precision = 7
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- Na+ SO4-- Mg++ Ca++ K+ HCO3- SiO2(aq) O2(aq)"
equilibrium_minerals = "Antigorite Tremolite Talc Chrysotile Sepiolite Anthophyllite Dolomite Dolomite-ord Huntite Dolomite-dis Magnesite Calcite Aragonite Quartz"
equilibrium_gases = "O2(g) CO2(g)"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
(modules/geochemistry/test/tests/time_dependent_reactions/flushing.i)
# Alkali flushing of a reservoir (an example of flushing): adding NaOH solution
[UserObjects]
[rate_quartz]
type = GeochemistryKineticRate
kinetic_species_name = Quartz
intrinsic_rate_constant = 1.5552E-13 # 1.8E-18mol/s/cm^2 = 1.5552E-13mol/day/cm^2
multiply_by_mass = true
area_quantity = 1000
promoting_species_names = "H+"
promoting_indices = "-0.5"
[]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- Na+ Ca++ HCO3- Mg++ K+ Al+++ SiO2(aq)"
equilibrium_minerals = "Analcime Calcite Dawsonite Dolomite-ord Gibbsite Kaolinite Muscovite Paragonite Phlogopite"
kinetic_minerals = "Quartz"
kinetic_rate_descriptions = "rate_quartz"
[]
[]
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
swap_into_basis = "Calcite Dolomite-ord Muscovite Kaolinite"
swap_out_of_basis = "HCO3- Mg++ K+ Al+++"
constraint_species = "H2O H+ Cl- Na+ Ca++ Calcite Dolomite-ord Muscovite Kaolinite SiO2(aq)"
constraint_value = " 1.0 -5 1.0 1.0 0.2 9.88249 3.652471265 1.2792268 1.2057878 0.000301950628974"
constraint_meaning = "kg_solvent_water log10activity bulk_composition bulk_composition bulk_composition free_mineral free_mineral free_mineral free_mineral free_concentration"
constraint_unit = " kg dimensionless moles moles moles moles moles moles moles molal"
initial_temperature = 70.0
temperature = 70.0
kinetic_species_name = Quartz
kinetic_species_initial_value = 226.992243
kinetic_species_unit = moles
evaluate_kinetic_rates_always = true # implicit time-marching used for stability
close_system_at_time = 0.0
remove_fixed_activity_name = "H+"
remove_fixed_activity_time = 0.0
mode = 3 # flush through the NaOH solution specified below:
source_species_names = "H2O Na+ OH-"
source_species_rates = "27.75 0.25 0.25" # 1kg water/2days = 27.75moles/day. 0.5mol Na+/2days = 0.25mol/day
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
stoichiometric_ionic_str_using_Cl_only = true
execute_console_output_on = '' # only CSV output for this test
abs_tol = 1E-12
[]
[Executioner]
type = Transient
dt = 1
end_time = 20 # measured in days
[]
[GlobalParams]
point = '0 0 0'
[]
[Postprocessors]
[pH]
type = PointValue
variable = "pH"
[]
[cm3_Analcime]
type = PointValue
variable = free_cm3_Analcime
[]
[cm3_Calcite]
type = PointValue
variable = free_cm3_Calcite
[]
[cm3_Dawsonite]
type = PointValue
variable = free_cm3_Dawsonite
[]
[cm3_Dolomite]
type = PointValue
variable = free_cm3_Dolomite-ord
[]
[cm3_Gibbsite]
type = PointValue
variable = free_cm3_Gibbsite
[]
[cm3_Kaolinite]
type = PointValue
variable = free_cm3_Kaolinite
[]
[cm3_Muscovite]
type = PointValue
variable = free_cm3_Muscovite
[]
[cm3_Paragonite]
type = PointValue
variable = free_cm3_Paragonite
[]
[cm3_Phlogopite]
type = PointValue
variable = free_cm3_Phlogopite
[]
[cm3_Quartz]
type = PointValue
variable = free_cm3_Quartz
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/equilibrium_models/HCl.i)
# Simple example of time-independent problem involving an HCl solution at pH = 2
[GlobalParams]
point = '0 0 0'
[]
[TimeIndependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 1.0 -2 1E-2"
constraint_meaning = "kg_solvent_water log10activity bulk_composition"
constraint_unit = " kg dimensionless moles"
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
execute_console_output_on = initial
abs_tol = 1E-15
[]
[Postprocessors]
[pH]
type = PointValue
variable = 'pH'
[]
[solvent_mass]
type = PointValue
variable = 'kg_solvent_H2O'
[]
[molal_Cl-]
type = PointValue
variable = 'molal_Cl-'
[]
[mg_per_kg_HCl]
type = PointValue
variable = 'mg_per_kg_HCl'
[]
[activity_OH-]
type = PointValue
variable = 'activity_OH-'
[]
[bulk_H+]
type = PointValue
variable = 'bulk_moles_H+'
[]
[temperature]
type = PointValue
variable = 'solution_temperature'
[]
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
piecewise_linear_interpolation = true # to reproduce the GWB result
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/geochemistry_quantity_aux/except1.i)
#Exception test: species does not exist
[TimeIndependentReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 1.0 1.0 1.0"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition"
constraint_unit = "kg moles moles"
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Cl-"
[]
[]
[AuxVariables]
[error]
[]
[]
[AuxKernels]
[error]
type = GeochemistryQuantityAux
species = Na
reactor = geochemistry_reactor
variable = error
[]
[]
(modules/combined/examples/geochem-porous_flow/geotes_2D/aquifer_un_quartz_equilibrium.i)
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "small_database.json"
basis_species = "H2O SiO2(aq) Na+ Cl-"
equilibrium_minerals = "QuartzUnlike"
[]
[]
[TimeIndependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
swap_out_of_basis = "SiO2(aq)"
swap_into_basis = QuartzUnlike
constraint_species = "H2O Na+ Cl- QuartzUnlike"
constraint_value = " 1.0 0.1 0.1 396.685"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition free_mineral"
constraint_unit = " kg moles moles moles"
temperature = 50.0
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
add_aux_pH = false # there is no H+ in this system
precision = 12
[]
[Postprocessors]
[free_moles_SiO2]
type = PointValue
point = '0 0 0'
variable = 'molal_SiO2(aq)'
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/spatial_reactor/spatial_7.i)
# temperature is x and t dependent. This simulation only converges if adaptive_timestepping = true
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
[]
[]
[SpatialReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 55.5 1E-1 1E-1"
constraint_meaning = "bulk_composition bulk_composition bulk_composition"
constraint_unit = "moles moles moles"
temperature = temp_controller
execute_console_output_on = 'timestep_end'
point = '10 0 0'
ramp_max_ionic_strength_initial = 0
max_iter = 4
adaptive_timestepping = true
[]
[VectorPostprocessors]
[temperature]
type = LineValueSampler
start_point = '0 0 0'
end_point = '10 0 0'
sort_by = x
num_points = 2
variable = 'solution_temperature'
[]
[]
[AuxVariables]
[temp_controller]
[]
[]
[AuxKernels]
[temp_controller]
type = FunctionAux
variable = temp_controller
function = 'if(t <= 1, 25, 25 + 18 * x)'
execute_on = timestep_begin # so the Reactor gets the correct value
[]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
xmax = 10
[]
[Executioner]
type = Transient
dt = 1
end_time = 2
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/kinetics/quartz_equilibrium_at300degC.i)
# Finds the equilibrium free-concentration of SiO2(aq) in contact with Quartz at 300degC
[TimeIndependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
swap_into_basis = "Quartz"
swap_out_of_basis = "SiO2(aq)"
charge_balance_species = "Cl-"
constraint_species = "H2O Na+ Cl- Quartz"
# the amount of free quartz is irrelevant to the equilibrium system, provided it is large enough, but here 400g is used to make the connection with quartz_deposition.i
constraint_value = " 1.0 1E-10 1E-10 0.4"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition free_mineral"
constraint_unit = " kg moles moles kg"
temperature = 300.0
add_aux_pH = false # there is no H+ in this system
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O SiO2(aq) Na+ Cl-"
equilibrium_minerals = "Quartz"
[]
[]
(modules/geochemistry/test/tests/solubilities_and_activities/sebkhat_el_melah.i)
[TimeIndependentReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl- Mg++ Na+ SO4-- K+ Br- Ca++ HCO3-"
# assume that g/l means g/kg(solvent water)
constraint_value = " 1.0 -7.15 5.500 2.1436 1.8747 0.2852 0.17648 0.02816 0.00499 0.00229"
constraint_meaning = "kg_solvent_water log10activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = " kg dimensionless moles moles moles moles moles moles moles moles"
prevent_precipitation = "Halite Anhydrite"
max_ionic_strength = 10.0
ramp_max_ionic_strength_initial = 0 # not needed in this simple example
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
abs_tol = 1E-12
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- Mg++ Na+ SO4-- K+ Br- Ca++ HCO3-"
equilibrium_minerals = "Halite Anhydrite"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
(modules/geochemistry/test/tests/time_dependent_reactions/add_feldspar.i)
#Add K-feldspar and observe precipiates forming
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Na+ K+ Ca++ Mg++ Al+++ SiO2(aq) Cl- SO4-- HCO3-"
constraint_value = " 1.0 -5 5 1 15 3 1 3 30 8 50"
constraint_meaning = "kg_solvent_water log10activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = " kg dimensionless mg mg mg mg ug mg mg mg mg"
source_species_names = "K-feldspar"
source_species_rates = "1.37779E-3" # 0.15cm^3 of K-feldspar (molar volume = 108.87 cm^3/mol) = 1.37779E-3 mol
remove_fixed_activity_name = "H+"
remove_fixed_activity_time = 0
ramp_max_ionic_strength_initial = 0 # not needed for this simple problem
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
execute_console_output_on = '' # only CSV output for this example
[]
[Postprocessors]
[cm3_K-feldspar]
type = PointValue
point = '0 0 0'
variable = 'free_cm3_K-feldspar'
[]
[cm3_Kaolinite]
type = PointValue
point = '0 0 0'
variable = 'free_cm3_Kaolinite'
[]
[cm3_Muscovite]
type = PointValue
point = '0 0 0'
variable = 'free_cm3_Muscovite'
[]
[cm3_Quartz]
type = PointValue
point = '0 0 0'
variable = 'free_cm3_Quartz'
[]
[cm3_Phengite]
type = PointValue
point = '0 0 0'
variable = 'free_cm3_Phengite'
[]
[]
[Executioner]
type = Transient
dt = 0.01
end_time = 1
[]
[Outputs]
csv = true
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Na+ K+ Ca++ Mg++ Al+++ SiO2(aq) Cl- SO4-- HCO3-"
equilibrium_minerals = "K-feldspar Kaolinite Muscovite Quartz Phengite"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
(modules/geochemistry/test/tests/time_dependent_reactions/changing_fugacity_calcite.i)
#CO2(g) fugacity is changed over time
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
swap_out_of_basis = "Ca++ H+"
swap_into_basis = "Calcite CO2(g)"
charge_balance_species = "HCO3-"
constraint_species = "H2O Calcite CO2(g) Na+ Cl- HCO3-"
constraint_value = " 1.0 0.01354 -3.5 1E-2 1E-2 0"
constraint_meaning = "kg_solvent_water free_mineral log10fugacity bulk_composition bulk_composition bulk_composition"
constraint_unit = " kg moles dimensionless moles moles moles"
ramp_max_ionic_strength_initial = 10
controlled_activity_name = 'CO2(g)'
controlled_activity_value = fug_co2
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
execute_console_output_on = '' # only CSV output required for this example
[]
[AuxVariables]
[fug_co2]
[]
[]
[AuxKernels]
[fug_co2]
type = FunctionAux
variable = fug_co2
function = '10^(-3.5*(1 - t))'
execute_on = timestep_begin # so the correct value is provided to the reactor
[]
[]
[Postprocessors]
[cm3_Calcite]
type = PointValue
point = '0 0 0'
variable = 'free_cm3_Calcite'
[]
[pH]
type = PointValue
point = '0 0 0'
variable = 'pH'
[]
[molal_CO2aq]
type = PointValue
point = '0 0 0'
variable = 'molal_CO2(aq)'
[]
[molal_HCO3-]
type = PointValue
point = '0 0 0'
variable = 'molal_HCO3-'
[]
[molal_Ca++]
type = PointValue
point = '0 0 0'
variable = 'molal_Ca++'
[]
[fug_co2]
type = PointValue
point = '0 0 0'
variable = 'activity_CO2(g)'
[]
[]
[Outputs]
csv = true
[]
[Executioner]
type = Transient
dt = 0.1
end_time = 1
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Na+ Cl- Ca++ HCO3-"
equilibrium_minerals = "Calcite"
equilibrium_gases = "CO2(g)"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
(modules/geochemistry/test/tests/time_dependent_reactions/dissolution_pyrite_1.i)
#Pyrite is added, and the fugacity of O2(g) is not fixed
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
swap_out_of_basis = "O2(aq) Fe++"
swap_into_basis = "O2(g) Hematite"
charge_balance_species = "Cl-"
constraint_species = "H2O Hematite H+ Ca++ Mg++ Na+ HCO3- SO4-- Cl- O2(g)"
constraint_value = " 1.0 1 -6.5 4 1 2 18 3 5 0.2"
constraint_meaning = "kg_solvent_water free_mineral log10activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition fugacity"
constraint_unit = " kg mg dimensionless mg mg mg mg mg mg dimensionless"
remove_fixed_activity_name = "H+ O2(g)"
remove_fixed_activity_time = '0 0'
source_species_names = "Pyrite"
source_species_rates = 8.336E-6 # = 1mg(pyrite)/second, 1mg(pyrite) = 8.34E-6
ramp_max_ionic_strength_initial = 0 # not needed in this simple problem
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
abs_tol = 1E-13
execute_console_output_on = '' # only CSV output is required
[]
[Executioner]
type = Transient
dt = 1
end_time = 10
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Fe++ Ca++ Mg++ Na+ HCO3- SO4-- Cl- O2(aq)"
equilibrium_minerals = "Hematite Pyrite"
equilibrium_gases = "O2(g)"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
[Postprocessors]
[mg_Hematite]
type = PointValue
point = '0 0 0'
variable = 'free_mg_Hematite'
[]
[mg_Pyrite]
type = PointValue
point = '0 0 0'
variable = 'free_mg_Pyrite'
[]
[pH]
type = PointValue
point = '0 0 0'
variable = 'pH'
[]
[molal_CO2aq]
type = PointValue
point = '0 0 0'
variable = 'molal_CO2(aq)'
[]
[molal_HCO3-]
type = PointValue
point = '0 0 0'
variable = 'molal_HCO3-'
[]
[molal_SO4--]
type = PointValue
point = '0 0 0'
variable = 'molal_SO4--'
[]
[molal_Fe++]
type = PointValue
point = '0 0 0'
variable = 'molal_Fe++'
[]
[molal_O2aq]
type = PointValue
point = '0 0 0'
variable = 'molal_O2(aq)'
[]
[]
[Outputs]
csv = true
[]
(modules/combined/examples/geochem-porous_flow/forge/water_3.i)
# Equilibrium model "Water 3" from "Subtask 2C.4.7 Geochemical Modeling SSimmons-VPatil.pdf". The steps followed in this input file are:
# 1. The initial equilibrium is found at 20degC. This is the temperature at which the bulk composition was measured, and at this temperature most species are supersaturated. However, since measurements were performed in the absence of free minerals, their precipitation must be retarded in some way, so all minerals are prevented from precipitating in the model
# 2. The pH constraint is removed and the system is raised to 70degC, which is the injection temperature. This causes the pH to drop from 6.2 to 6.1, and only Kaolinite and Illite are supersaturated
# 3. The free molality of the species is measured for use in other models
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = '../../../../geochemistry/database/moose_geochemdb.json'
basis_species = 'H2O H+ Na+ K+ Ca++ Mg++ SiO2(aq) Al+++ Cl- SO4-- HCO3-'
equilibrium_minerals = 'Albite Anhydrite Anorthite Calcite Chalcedony Clinochl-7A Illite K-feldspar Kaolinite Quartz Paragonite Phlogopite Zoisite Laumontite'
remove_all_extrapolated_secondary_species = true
[]
[]
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = 'Cl-'
constraint_species = 'H2O H+ Na+ K+ Ca++ Mg++ SiO2(aq) Al+++ Cl- SO4-- HCO3-'
constraint_value = ' 1.0 6.31E-7 1.32E-4 2.81E-5 7.76E-5 2.88E-5 2.73E-4 3.71E-6 1.41E-5 1.04E-5 3.28E-4'
constraint_meaning = 'kg_solvent_water activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition'
constraint_unit = ' kg dimensionless moles moles moles moles moles moles moles moles moles'
prevent_precipitation = 'Albite Anhydrite Anorthite Calcite Chalcedony Clinochl-7A Illite K-feldspar Kaolinite Quartz Paragonite Phlogopite Zoisite Laumontite'
initial_temperature = 20
remove_fixed_activity_name = 'H+'
remove_fixed_activity_time = 0
temperature = 70
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
execute_console_output_on = 'final' # only CSV output needed
[]
[Executioner]
type = Transient
dt = 1
end_time = 1
[]
[GlobalParams]
point = '0 0 0'
reactor = reactor
[]
[AuxVariables]
[transported_H2O]
[]
[transported_H+]
[]
[transported_Na+]
[]
[transported_K+]
[]
[transported_Ca++]
[]
[transported_Mg++]
[]
[transported_SiO2]
[]
[transported_Al+++]
[]
[transported_Cl-]
[]
[transported_SO4--]
[]
[transported_HCO3-]
[]
[]
[AuxKernels]
[transported_H2O]
type = GeochemistryQuantityAux
species = 'H2O'
variable = transported_H2O
quantity = transported_moles_in_original_basis
[]
[transported_H+]
type = GeochemistryQuantityAux
species = 'H+'
variable = transported_H+
quantity = transported_moles_in_original_basis
[]
[transported_Na+]
type = GeochemistryQuantityAux
species = 'Na+'
variable = transported_Na+
quantity = transported_moles_in_original_basis
[]
[transported_K+]
type = GeochemistryQuantityAux
species = 'K+'
variable = transported_K+
quantity = transported_moles_in_original_basis
[]
[transported_Ca++]
type = GeochemistryQuantityAux
species = 'Ca++'
variable = transported_Ca++
quantity = transported_moles_in_original_basis
[]
[transported_Mg++]
type = GeochemistryQuantityAux
species = 'Mg++'
variable = transported_Mg++
quantity = transported_moles_in_original_basis
[]
[transported_SiO2]
type = GeochemistryQuantityAux
species = 'SiO2(aq)'
variable = transported_SiO2
quantity = transported_moles_in_original_basis
[]
[transported_Al+++]
type = GeochemistryQuantityAux
species = 'Al+++'
variable = transported_Al+++
quantity = transported_moles_in_original_basis
[]
[transported_Cl-]
type = GeochemistryQuantityAux
species = 'Cl-'
variable = transported_Cl-
quantity = transported_moles_in_original_basis
[]
[transported_SO4--]
type = GeochemistryQuantityAux
species = 'SO4--'
variable = transported_SO4--
quantity = transported_moles_in_original_basis
[]
[transported_HCO3-]
type = GeochemistryQuantityAux
species = 'HCO3-'
variable = transported_HCO3-
quantity = transported_moles_in_original_basis
[]
[]
[Postprocessors]
[temperature]
type = PointValue
variable = 'solution_temperature'
[]
[bulk_Cl]
type = PointValue
variable = 'bulk_moles_Cl-'
[]
[kg_solvent_H2O]
type = PointValue
variable = 'kg_solvent_H2O'
[]
[molal_H+]
type = PointValue
variable = 'molal_H+'
[]
[molal_Na+]
type = PointValue
variable = 'molal_Na+'
[]
[molal_K+]
type = PointValue
variable = 'molal_K+'
[]
[molal_Ca++]
type = PointValue
variable = 'molal_Ca++'
[]
[molal_Mg++]
type = PointValue
variable = 'molal_Mg++'
[]
[molal_SiO2aq]
type = PointValue
variable = 'molal_SiO2(aq)'
[]
[molal_Al+++]
type = PointValue
variable = 'molal_Al+++'
[]
[molal_Cl-]
type = PointValue
variable = 'molal_Cl-'
[]
[molal_SO4--]
type = PointValue
variable = 'molal_SO4--'
[]
[molal_HCO3-]
type = PointValue
variable = 'molal_HCO3-'
[]
[transported_H2O]
type = PointValue
variable = transported_H2O
[]
[transported_H+]
type = PointValue
variable = transported_H+
[]
[transported_Na+]
type = PointValue
variable = transported_Na+
[]
[transported_K+]
type = PointValue
variable = transported_K+
[]
[transported_Ca++]
type = PointValue
variable = transported_Ca++
[]
[transported_Mg++]
type = PointValue
variable = transported_Mg++
[]
[transported_SiO2]
type = PointValue
variable = transported_SiO2
[]
[transported_Al+++]
type = PointValue
variable = transported_Al+++
[]
[transported_Cl-]
type = PointValue
variable = transported_Cl-
[]
[transported_SO4--]
type = PointValue
variable = transported_SO4--
[]
[transported_HCO3-]
type = PointValue
variable = transported_HCO3-
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/time_dependent_reactions/mixing.i)
# Seawater at temperature=4degC is slowly mixed with this fluid initially at temperature=273degC until a 10:1 ratio is achieved
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
swap_into_basis = "H2S(aq)"
swap_out_of_basis = "O2(aq)"
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl- Na+ Mg++ SO4-- Ca++ K+ HCO3- Ba++ SiO2(aq) Sr++ Zn++ Cu+ Al+++ Fe++ Mn++ H2S(aq)"
constraint_value = " 1.0 6.309573E-5 600E-3 529E-3 0.01E-6 0.01E-6 21.6E-3 26.7E-3 2.0E-3 15E-6 20.2E-3 100.5E-6 41E-6 0.02E-6 4.1E-6 903E-6 1039E-6 6.81E-3"
constraint_meaning = "kg_solvent_water activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = " kg dimensionless moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles"
close_system_at_time = -0.01
remove_fixed_activity_name = 'H+'
remove_fixed_activity_time = -0.01
initial_temperature = 273
temperature = T
# The following source species and rates are taken from the Geochemists Workbench (see output from mixing.rea)
# An alternative is to run the seawater_mixing MOOSE input files and extract the source species and rates
source_species_names = "H2O Al+++ Ba++ Ca++ Cl- Cu+ Fe++ H+ HCO3- K+ Mg++ Mn++ Na+ O2(aq) SO4-- SiO2(aq) Sr++ Zn++"
source_species_rates = "H2O_rate Al+++_rate Ba++_rate Ca++_rate Cl-_rate Cu+_rate Fe++_rate H+_rate HCO3-_rate K+_rate Mg++_rate Mn++_rate Na+_rate O2aq_rate SO4--_rate SiO2aq_rate Sr++_rate Zn++_rate"
mode = mode
execute_console_output_on = '' # only CSV output needed for this example
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
[]
[AuxVariables]
[T]
[]
[mode]
[]
[H2O_rate]
[]
[Al+++_rate]
[]
[Ba++_rate]
[]
[Ca++_rate]
[]
[Cl-_rate]
[]
[Cu+_rate]
[]
[Fe++_rate]
[]
[H+_rate]
[]
[HCO3-_rate]
[]
[K+_rate]
[]
[Mg++_rate]
[]
[Mn++_rate]
[]
[Na+_rate]
[]
[O2aq_rate]
[]
[SO4--_rate]
[]
[SiO2aq_rate]
[]
[Sr++_rate]
[]
[Zn++_rate]
[]
[]
[AuxKernels]
[mode_auxk]
type = FunctionAux
variable = mode
function = 'if(t<=0, 1, 0)' # dump at start of first timestep
execute_on = timestep_begin
[]
[T_auxk]
type = FunctionAux
variable = T
function = 'if(t<=0, 273, 4)' # during initialisation and dumping, T=273, while during adding T=temperature of reactants
execute_on = timestep_begin
[]
[H2O_rate_auxk]
type = FunctionAux
variable = H2O_rate
execute_on = timestep_begin
function = 'if(t<=0, 0, 55.510000000000005)'
[]
[Al+++_rate]
type = FunctionAux
variable = Al+++_rate
execute_on = timestep_begin
function = 'if(t<=0, 0, 3.643e-10)'
[]
[Ba++_rate]
type = FunctionAux
variable = Ba++_rate
execute_on = timestep_begin
function = 'if(t<=0, 0, 8.831e-08)'
[]
[Ca++_rate]
type = FunctionAux
variable = Ca++_rate
execute_on = timestep_begin
function = 'if(t<=0, 0, 0.0104)'
[]
[Cl-_rate]
type = FunctionAux
variable = Cl-_rate
execute_on = timestep_begin
function = 'if(t<=0, 0, 0.559)'
[]
[Cu+_rate]
type = FunctionAux
variable = Cu+_rate
execute_on = timestep_begin
function = 'if(t<=0, 0, 7.000000000000001e-09)'
[]
[Fe++_rate]
type = FunctionAux
variable = Fe++_rate
execute_on = timestep_begin
function = 'if(t<=0, 0, 4.746e-15)'
[]
[H+_rate]
type = FunctionAux
variable = H+_rate
execute_on = timestep_begin
function = 'if(t<=0, 0, 0.0002005)'
[]
[HCO3-_rate]
type = FunctionAux
variable = HCO3-_rate
execute_on = timestep_begin
function = 'if(t<=0, 0, 0.002153)'
[]
[K+_rate]
type = FunctionAux
variable = K+_rate
execute_on = timestep_begin
function = 'if(t<=0, 0, 0.010100000000000001)'
[]
[Mg++_rate]
type = FunctionAux
variable = Mg++_rate
execute_on = timestep_begin
function = 'if(t<=0, 0, 0.054400000000000004)'
[]
[Mn++_rate]
type = FunctionAux
variable = Mn++_rate
execute_on = timestep_begin
function = 'if(t<=0, 0, 6.79e-14)'
[]
[Na+_rate]
type = FunctionAux
variable = Na+_rate
execute_on = timestep_begin
function = 'if(t<=0, 0, 0.48019999999999996)'
[]
[O2aq_rate]
type = FunctionAux
variable = O2aq_rate
execute_on = timestep_begin
function = 'if(t<=0, 0, 0.000123)'
[]
[SO4--_rate]
type = FunctionAux
variable = SO4--_rate
execute_on = timestep_begin
function = 'if(t<=0, 0, 0.0295)'
[]
[SiO2aq_rate]
type = FunctionAux
variable = SiO2aq_rate
execute_on = timestep_begin
function = 'if(t<=0, 0, 0.00017)'
[]
[Sr++_rate]
type = FunctionAux
variable = Sr++_rate
execute_on = timestep_begin
function = 'if(t<=0, 0, 3.8350000000000004e-05)'
[]
[Zn++_rate]
type = FunctionAux
variable = Zn++_rate
execute_on = timestep_begin
function = 'if(t<=0, 0, 1e-08)'
[]
[]
[Postprocessors]
[temperature]
type = PointValue
point = '0 0 0'
variable = "solution_temperature"
[]
[fugactity_O2]
type = PointValue
point = '0 0 0'
variable = "activity_O2(g)"
[]
[molal_SO4--]
type = PointValue
point = '0 0 0'
variable = "molal_SO4--"
[]
[molal_NaSO4]
type = PointValue
point = '0 0 0'
variable = "molal_NaSO4-"
[]
[molal_H2Saq]
type = PointValue
point = '0 0 0'
variable = "molal_H2S(aq)"
[]
[molal_HSO4-]
type = PointValue
point = '0 0 0'
variable = "molal_HSO4-"
[]
[cm3_Anhydrite]
type = PointValue
point = '0 0 0'
variable = "free_cm3_Anhydrite"
[]
[cm3_Pyrite]
type = PointValue
point = '0 0 0'
variable = "free_cm3_Pyrite"
[]
[cm3_Talc]
type = PointValue
point = '0 0 0'
variable = "free_cm3_Talc"
[]
[cm3_AmSil]
type = PointValue
point = '0 0 0'
variable = "free_cm3_Amrph^silica"
[]
[]
[Functions]
[timestepper]
type = PiecewiseLinear
x = '0 0.1 1 10'
y = '0.01 0.01 0.5 10'
[]
[]
[Executioner]
type = Transient
start_time = -0.01 # to allow initial dump to occur
[TimeStepper]
type = FunctionDT
function = timestepper
[]
end_time = 10
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- Na+ Mg++ SO4-- Ca++ K+ HCO3- Ba++ SiO2(aq) Sr++ Zn++ Cu+ Al+++ Fe++ Mn++ O2(aq)"
equilibrium_minerals = "Anhydrite Pyrite Talc Amrph^silica Barite Dolomite-ord Muscovite Nontronit-Na Pyrolusite Strontianite"
equilibrium_gases = "O2(g)"
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/kinetics/bio_sulfate_1.i)
# Example of a microbe-catalysed reaction (see Bethke Section 18.5 for further details):
# CH3COO- + SO4-- -> 2HCO3- + HS-
# at pH = 7.2
# at temperature = 25degC
# This file treats CH3COO- as a kinetic species, not at equilibrium with the aqueous solution
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
swap_into_basis = 'HS-'
swap_out_of_basis = 'O2(aq)'
charge_balance_species = "Cl-"
constraint_species = "H2O Na+ Ca++ Fe++ Cl- SO4-- HCO3- HS- H+ Biomass1"
constraint_value = " 1.0 501E-3 20E-3 2E-3 500E-3 20E-3 2E-3 0.3E-6 -7.2 1E-4"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition log10activity bulk_composition"
constraint_unit = " kg moles moles moles moles moles moles moles dimensionless moles"
controlled_activity_name = 'H+'
controlled_activity_value = 6.30957E-8 # this is pH=7.2
kinetic_species_name = "CH3COO-"
# note that the free molality of CH3COO- would be 0.0008643, if it were in equilibrium with the aqueous solution described above, if the bulk composition was 1E-3 moles.
kinetic_species_initial_value = 1E-3
kinetic_species_unit = moles
ramp_max_ionic_strength_initial = 0
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
execute_console_output_on = ''
mol_cutoff = 1E-20
solver_info = true
evaluate_kinetic_rates_always = true
prevent_precipitation = 'Pyrite Troilite'
[]
[UserObjects]
[rate_sulfate_reducer]
type = GeochemistryKineticRate
kinetic_species_name = "CH3COO-"
intrinsic_rate_constant = 0.0864 # 1E-9 mol/mg/s = 0.0864 mol/g/day
multiply_by_mass = false
kinetic_molal_index = 1.0
kinetic_monod_index = 1.0
kinetic_half_saturation = 70E-6
promoting_species_names = 'H2O Biomass1'
promoting_indices = '1 1'
direction = dissolution
non_kinetic_biological_catalyst = Biomass1
non_kinetic_biological_efficiency = 4.3
energy_captured = 45E3
theta = 0.2
eta = 1
[]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O Na+ Ca++ Fe++ Cl- SO4-- HCO3- O2(aq) H+ Biomass1"
equilibrium_minerals = "Mackinawite" # other minerals make marginal difference
kinetic_redox = "CH3COO-"
kinetic_rate_descriptions = "rate_sulfate_reducer"
piecewise_linear_interpolation = true # comparison with GWB
[]
[]
[Functions]
[timestepper]
type = PiecewiseLinear
x = '0 10 18 21'
y = '1E-2 1E-2 1 1'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = FunctionDT
function = timestepper
[]
end_time = 21
[]
[AuxVariables]
[moles_acetate]
[]
[biomass_mg]
[]
[]
[AuxKernels]
[moles_acetate]
type = GeochemistryQuantityAux
species = 'CH3COO-'
reactor = reactor
variable = moles_acetate
quantity = kinetic_moles
[]
[biomass_mg]
type = GeochemistryQuantityAux
species = 'Biomass1'
reactor = reactor
variable = biomass_mg
quantity = mg_per_kg
[]
[]
[Postprocessors]
[moles_acetate]
type = PointValue
point = '0 0 0'
variable = moles_acetate
[]
[biomass_mg]
type = PointValue
point = '0 0 0'
variable = biomass_mg
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/spatial_reactor/spatial_1_console.i)
# demonstrating that controlled-activity can be spatially-dependent
# Here we output to the console at point (0.5, 0, 0)
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl-"
[]
[]
[SpatialReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 1.0 -5 1E-5"
constraint_meaning = "bulk_composition log10activity bulk_composition"
constraint_unit = " kg dimensionless moles"
controlled_activity_name = 'H+'
controlled_activity_value = 'act_H+'
execute_console_output_on = 'initial timestep_end'
point = '0.8 0 0'
[]
[AuxVariables]
[act_H+]
[]
[]
[AuxKernels]
[act_H+]
type = FunctionAux
variable = 'act_H+'
function = '10^(-5 + x)'
execute_on = timestep_begin # so the Reactor gets the correct value
[]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 1
[]
[Executioner]
type = Transient
num_steps = 1
[]
(modules/geochemistry/test/tests/interrogate_reactions/hematite.i)
# 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/kinetics/bio_zoning_conc.i)
rate_Ca_diffuse = 6.66667E-9 # 2E-6 mol.m^-3.yr^-1 = 2E-9 mol.litre^-1.yr^-1 divided by porosity of 0.3
rate_CH3COO_diffuse = 13.3333E-9 # 4E-6 mol.m^-3.yr^-1 = 4E-9 mol.litre^-1.yr^-1 divided by porosity of 0.3
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmin = 0
xmax = 200000
[]
[]
[GlobalParams]
point = '100000 0 0'
reactor = reactor
[]
[SpatialReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
swap_into_basis = 'Siderite'
swap_out_of_basis = 'Fe++'
prevent_precipitation = 'Pyrite Troilite'
charge_balance_species = "HCO3-"
constraint_species = "H2O Ca++ HCO3- SO4-- CH3COO- HS- CH4(aq) Siderite H+"
# ASSUME that 1 litre of solution initially contains:
constraint_value = " 1.0 1E-3 2E-3 0.04E-3 1E-9 1E-9 1E-9 1 -7.5"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition free_mineral log10activity"
constraint_unit = " kg moles moles moles moles moles moles cm3 dimensionless"
controlled_activity_name = 'H+'
controlled_activity_value = 3.16227E-8 # this is pH=7.5
kinetic_species_name = "sulfate_reducer methanogen"
kinetic_species_initial_value = '1E-6 1E-6'
kinetic_species_unit = 'mg mg'
source_species_names = "H2O Ca++ SO4-- CH3COO- HS- CH4(aq) Fe++"
source_species_rates = "rate_H2O_per_1l rate_Ca_per_1l_with_source rate_SO4_per_1l rate_CH3COO_per_1l_with_source rate_HS_per_1l rate_CH4_per_1l rate_Fe_per_1l"
ramp_max_ionic_strength_initial = 1
ramp_max_ionic_strength_subsequent = 1
execute_console_output_on = ''
solver_info = true
evaluate_kinetic_rates_always = true
adaptive_timestepping = true
abs_tol = 1E-14
precision = 16
[]
[UserObjects]
[rate_sulfate_reducer]
type = GeochemistryKineticRate
kinetic_species_name = "sulfate_reducer"
intrinsic_rate_constant = 31.536 # 1E-9 mol(acetate)/mg(biomass)/s = 31.536 mol(acetate)/g(biomass)/year
multiply_by_mass = true
promoting_species_names = 'CH3COO- SO4--'
promoting_indices = '1 1'
promoting_monod_indices = '1 1'
promoting_half_saturation = '70E-6 200E-6'
direction = dissolution
kinetic_biological_efficiency = 4.3E-3 # 4.3 g(biomass)/mol(acetate) = 4.3E-3 mol(biomass)/mol(acetate) (because sulfate_reducer has molar mass of 1E3 g/mol)
energy_captured = 45E3
theta = 0.2
eta = 1
[]
[death_sulfate_reducer]
type = GeochemistryKineticRate
kinetic_species_name = "sulfate_reducer"
intrinsic_rate_constant = 0.031536E-3 # 1E-9 g(biomass)/g(biomass)/s = 0.031536 g(biomass)/g(biomass)/year = 0.031536E-3 mol(biomass)/g(biomass)/year (because sulfate_reducer has molar mass of 1E3 g/mol)
multiply_by_mass = true
direction = death
eta = 0.0
[]
[rate_methanogen]
type = GeochemistryKineticRate
kinetic_species_name = "methanogen"
intrinsic_rate_constant = 63.072 # 2E-9 mol(acetate)/mg(biomass)/s = 63.072 mol(acetate)/g(biomass)/year
multiply_by_mass = true
promoting_species_names = 'CH3COO-'
promoting_indices = '1'
promoting_monod_indices = '1'
promoting_half_saturation = '20E-3'
direction = dissolution
kinetic_biological_efficiency = 2.0E-9 # 2 g(biomass)/mol(acetate) = 2E-9 mol(biomass)/mol(acetate) (because methanogen has molar mass of 1E9 g/mol)
energy_captured = 24E3
theta = 0.5
eta = 1
[]
[death_methanogen]
type = GeochemistryKineticRate
kinetic_species_name = "methanogen"
intrinsic_rate_constant = 0.031536E-9 # 1E-9 g(biomass)/g(biomass)/s = 0.031536 g(biomass)/g(biomass)/year = 0.031536E-9 mol(biomass)/g(biomass)/year (because methanogen has molar mass of 1E9 g/mol)
multiply_by_mass = true
direction = death
eta = 0.0
[]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ CH3COO- CH4(aq) HS- Ca++ HCO3- SO4-- Fe++"
kinetic_minerals = "sulfate_reducer methanogen"
equilibrium_minerals = "*"
kinetic_rate_descriptions = "rate_sulfate_reducer death_sulfate_reducer rate_methanogen death_methanogen"
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = FunctionDT
function = 'min(0.1 * (t + 1), 100)'
[]
end_time = 20000
[]
[AuxVariables]
[rate_H2O_per_1l] # change in H2O per 1 litre of aqueous solution that we consider at each node
[]
[rate_CH3COO_per_1l] # change in CH3COO- per 1 litre of aqueous solution that we consider at each node
[]
[rate_CH4_per_1l] # change in CH4(aq) per 1 litre of aqueous solution that we consider at each node
[]
[rate_HS_per_1l] # change in HS- per 1 litre of aqueous solution that we consider at each node
[]
[rate_Ca_per_1l] # change in Ca++ per 1 litre of aqueous solution that we consider at each node
[]
[rate_SO4_per_1l] # change in SO4-- per 1 litre of aqueous solution that we consider at each node
[]
[rate_Fe_per_1l] # change in Fe++ per 1 litre of aqueous solution that we consider at each node
[]
[rate_CH3COO_per_1l_with_source] # change in CH3COO- per 1 litre of aqueous solution that we consider at each node, including the diffuse source
[]
[rate_Ca_per_1l_with_source] # change in Ca per 1 litre of aqueous solution that we consider at each node, including the diffuse source
[]
[transported_H2O]
[]
[transported_CH3COO]
[]
[transported_CH4]
[]
[transported_HS]
[]
[transported_Ca]
[]
[transported_SO4]
[]
[transported_Fe]
[]
[]
[AuxKernels]
[rate_CH3COO_per_1l_with_source]
type = ParsedAux
args = 'rate_CH3COO_per_1l'
variable = rate_CH3COO_per_1l_with_source
function = 'rate_CH3COO_per_1l + ${rate_CH3COO_diffuse}'
execute_on = 'timestep_begin timestep_end'
[]
[rate_Ca_per_1l_with_source]
type = ParsedAux
args = 'rate_Ca_per_1l'
variable = rate_Ca_per_1l_with_source
function = 'rate_Ca_per_1l + ${rate_Ca_diffuse}'
execute_on = 'timestep_begin timestep_end'
[]
[transported_H2O]
type = GeochemistryQuantityAux
variable = transported_H2O
species = H2O
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_CH3COO]
type = GeochemistryQuantityAux
variable = transported_CH3COO
species = "CH3COO-"
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_CH4]
type = GeochemistryQuantityAux
variable = transported_CH4
species = "CH4(aq)"
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_HS]
type = GeochemistryQuantityAux
variable = transported_HS
species = "HS-"
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Ca]
type = GeochemistryQuantityAux
variable = transported_Ca
species = "Ca++"
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_SO4]
type = GeochemistryQuantityAux
variable = transported_SO4
species = "SO4--"
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Fe]
type = GeochemistryQuantityAux
variable = transported_Fe
species = "Fe++"
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[]
[Postprocessors]
[time]
type = TimePostprocessor
[]
[]
[VectorPostprocessors]
[data]
type = LineValueSampler
start_point = '0 0 0'
end_point = '200000 0 0'
num_points = 501 # NOTE
sort_by = x
variable = 'transported_CH4 transported_CH3COO transported_SO4 free_mg_sulfate_reducer free_mg_methanogen'
[]
[]
[Outputs]
exodus = true
[csv]
type = CSV
time_step_interval = 10
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
[]
(modules/geochemistry/test/tests/kinetics/bio_death.i)
# Example of biomass death
# In this example, the methanogen does NOT metabolize CH3COO- + H2O -> CH4(aq) + HCO3- because it is not provided with an appropriate GeochemistryKineticRate. Instead, it simply dies, via:
# d(moles)/dt = -0.5 * moles
# In the database file, the methanogen is provided with a molecular weight 1E9 g/mol, so
# -0.5 * moles = -0.5E-9 * mass
# This is encoded in the rate_biomass_death object below
# Note that the DE is solved using an implicit method, so the solution is
# moles(t + dt) = moles(t) / (1 + 0.5 * dt)
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "HCO3-"
constraint_species = "H2O HCO3- CH3COO- CH4(aq) H+"
constraint_value = " 1.0 2E-3 1E-6 1E-6 -6"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition bulk_composition log10activity"
constraint_unit = " kg moles moles moles dimensionless"
kinetic_species_name = methanogen
kinetic_species_initial_value = 1
kinetic_species_unit = moles
ramp_max_ionic_strength_initial = 0
execute_console_output_on = '' # only CSV output for this example
[]
[UserObjects]
[rate_biomass_death]
type = GeochemistryKineticRate
kinetic_species_name = methanogen
intrinsic_rate_constant = 0.5E-9
multiply_by_mass = true
eta = 0
direction = DEATH
[]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ CH3COO- CH4(aq) HCO3-"
kinetic_minerals = methanogen
kinetic_rate_descriptions = rate_biomass_death
[]
[]
[Executioner]
type = Transient
dt = 1E-2
end_time = 10
[]
[AuxVariables]
[moles_biomass]
[]
[transported_acetate]
[]
[]
[AuxKernels]
[moles_biomass]
type = GeochemistryQuantityAux
species = methanogen
reactor = reactor
variable = moles_biomass
quantity = kinetic_moles
[]
[transported_acetate]
type = GeochemistryQuantityAux
species = "CH3COO-"
reactor = reactor
variable = transported_acetate
quantity = transported_moles_in_original_basis
[]
[]
[Postprocessors]
[moles_biomass]
type = PointValue
point = '0 0 0'
variable = moles_biomass
[]
[transported_acetate]
type = PointValue
point = '0 0 0'
variable = transported_acetate
[]
[]
[Outputs]
time_step_interval = 100
csv = true
[]
(modules/geochemistry/test/tests/time_dependent_reactions/except2.i)
#Exception: bad source-species name
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Na+ K+ Ca++ Mg++ Al+++ SiO2(aq) Cl- SO4-- HCO3-"
constraint_value = " 1.0 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5 1E-5"
constraint_meaning = "kg_solvent_water activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = "kg dimensionless moles moles moles moles moles moles moles moles moles"
source_species_names = "badname"
source_species_rates = "1"
[]
[Executioner]
type = Steady
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Na+ K+ Ca++ Mg++ Al+++ SiO2(aq) Cl- SO4-- HCO3-"
[]
[]
(modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/scaling.i)
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../../geochemistry/database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- SO4-- HCO3- SiO2(aq) Al+++ Ca++ Mg++ Fe++ K+ Na+ Sr++ F- B(OH)3 Br- Ba++ Li+ NO3- O2(aq)"
equilibrium_minerals = "Siderite Pyrrhotite Dolomite Illite Anhydrite Calcite Quartz K-feldspar Kaolinite Barite Celestite Fluorite Albite Chalcedony Goethite"
[]
[]
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
swap_out_of_basis = "NO3- H+ Fe++ Ba++ SiO2(aq) Mg++ O2(aq) Al+++ K+ Ca++ HCO3-"
swap_into_basis = " NH3 Pyrrhotite K-feldspar Barite Quartz Dolomite Siderite Calcite Illite Anhydrite Kaolinite"
charge_balance_species = "Cl-"
constraint_species = "H2O Quartz Calcite K-feldspar Siderite Dolomite Anhydrite Pyrrhotite Illite Kaolinite Barite Na+ Cl- SO4-- Li+ B(OH)3 Br- F- Sr++ NH3"
constraint_value = " 0.99778351 322.177447 12.111108 6.8269499 6.2844304 2.8670301 1.1912027 0.51474767 0.3732507 0.20903322 0.0001865889 1.5876606 1.5059455 0.046792579 0.013110503 0.006663119 0.001238987 0.00032108 0.000159781 0.001937302"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = "kg moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles"
prevent_precipitation = "Fluorite Albite Goethite"
ramp_max_ionic_strength_initial = 0 # not needed in this simple problem
initial_temperature = 92
mode = 1 # dump all minerals at the start of each time-step
temperature = temp_controller
execute_console_output_on = '' # only CSV output for this problem
stoichiometric_ionic_str_using_Cl_only = true
[]
[Executioner]
type = Transient
dt = 0.01
end_time = 1.0
[]
[AuxVariables]
[temp_controller]
[]
[Anhydrite_mol]
[]
[Dolomite_mol]
[]
[Pyrrhotite_mol]
[]
[K-feldspar_mol]
[]
[Barite_mol]
[]
[Quartz_mol]
[]
[Calcite_mol]
[]
[Illite_mol]
[]
[Kaolinite_mol]
[]
[]
[AuxKernels]
[temp_controller_auxk]
type = FunctionAux
variable = temp_controller
function = '92 + (160 - 92) * t'
execute_on = timestep_begin
[]
[Anhydrite_mol_auxk]
type = GeochemistryQuantityAux
reactor = reactor
variable = Anhydrite_mol
species = Anhydrite
quantity = moles_dumped
[]
[Dolomite_mol_auxk]
type = GeochemistryQuantityAux
reactor = reactor
variable = Dolomite_mol
species = Dolomite
quantity = moles_dumped
[]
[Pyrrhotite_mol]
type = GeochemistryQuantityAux
reactor = reactor
variable = Pyrrhotite_mol
species = Pyrrhotite
quantity = moles_dumped
[]
[K-feldspar_mol]
type = GeochemistryQuantityAux
reactor = reactor
variable = K-feldspar_mol
species = K-feldspar
quantity = moles_dumped
[]
[Barite_mol]
type = GeochemistryQuantityAux
reactor = reactor
variable = Barite_mol
species = Barite
quantity = moles_dumped
[]
[Quartz_mol]
type = GeochemistryQuantityAux
reactor = reactor
variable = Quartz_mol
species = Quartz
quantity = moles_dumped
[]
[Calcite_mol]
type = GeochemistryQuantityAux
reactor = reactor
variable = Calcite_mol
species = Calcite
quantity = moles_dumped
[]
[Illite_mol]
type = GeochemistryQuantityAux
reactor = reactor
variable = Illite_mol
species = Illite
quantity = moles_dumped
[]
[Kaolinite_mol]
type = GeochemistryQuantityAux
reactor = reactor
variable = Kaolinite_mol
species = Kaolinite
quantity = moles_dumped
[]
[]
[GlobalParams]
point = '0 0 0'
[]
[Postprocessors]
[temperature]
type = PointValue
variable = temp_controller
[]
[Anhydrite_mol]
type = PointValue
variable = Anhydrite_mol
[]
[Dolomite_mol]
type = PointValue
variable = Dolomite_mol
[]
[Pyrrhotite_mol]
type = PointValue
variable = Pyrrhotite_mol
[]
[K-feldspar_mol]
type = PointValue
variable = K-feldspar_mol
[]
[Barite_mol]
type = PointValue
variable = Barite_mol
[]
[Quartz_mol]
type = PointValue
variable = Quartz_mol
[]
[Calcite_mol]
type = PointValue
variable = Calcite_mol
[]
[Illite_mol]
type = PointValue
variable = Illite_mol
[]
[Kaolinite_mol]
type = PointValue
variable = Kaolinite_mol
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/equilibrium_models/ph_constraint.i)
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O Cl- Ca++ H+ HCO3-"
equilibrium_minerals = "Calcite"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
[TimeIndependentReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Ca++ Cl- HCO3-"
constraint_value = " 1.0 1E-6 1 1 1"
constraint_meaning = "kg_solvent_water activity bulk_composition bulk_composition bulk_composition"
constraint_unit = " kg dimensionless moles moles moles"
ramp_max_ionic_strength_initial = 0 # not needed in this simple problem
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
mol_cutoff = 1E-5
abs_tol = 1E-13
[]
(modules/geochemistry/test/tests/geochemistry_quantity_aux/except2.i)
#Exception test: illegal quantity type
[TimeIndependentReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 1.0 1.0 1.0"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition"
constraint_unit = "kg moles moles"
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Cl-"
[]
[]
[AuxVariables]
[error]
[]
[]
[AuxKernels]
[error]
type = GeochemistryQuantityAux
species = 'H+'
quantity = free_mg
reactor = geochemistry_reactor
variable = error
[]
[]
(modules/combined/examples/geochem-porous_flow/geotes_2D/aquifer_geochemistry.i)
# Simulates geochemistry in the aquifer. This input file may be run in standalone fashion but it does not do anything of interest. To simulate something interesting, run the porous_flow.i simulation which couples to this input file using MultiApps.
# This file receives pf_rate_H2O, pf_rate_Na, pf_rate_Cl, pf_rate_SiO2 and temperature as AuxVariables from porous_flow.i.
# The pf_rate quantities are kg/s changes of fluid-component mass at each node, but the geochemistry module expects rates-of-changes of moles at every node. Secondly, since this input file considers just 1 litre of aqueous solution at every node, the nodal_void_volume is used to convert pf_rate_* into rate_*_per_1l, which is measured in mol/s/1_litre_of_aqueous_solution.
# This file sends massfrac_Na, massfrac_Cl and massfrac_SiO2 to porous_flow.i. These are computed from the corresponding transported_* quantities.
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 14 # for better resolution, use 56 or 112
ny = 8 # for better resolution, use 32 or 64
xmin = -70
xmax = 70
ymin = -40
ymax = 40
[]
[]
[GlobalParams]
point = '0 0 0'
reactor = reactor
[]
[SpatialReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
constraint_species = "H2O Na+ Cl- SiO2(aq)"
# ASSUME that 1 litre of solution contains:
constraint_value = " 1.0 0.1 0.1 0.000555052386"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition free_concentration"
constraint_unit = " kg moles moles molal"
initial_temperature = 50.0
kinetic_species_name = QuartzLike
# Per 1 litre (1000cm^3) of aqueous solution (1kg of solvent water), there is 9000cm^3 of QuartzLike, which means the initial porosity is 0.1.
kinetic_species_initial_value = 9000
kinetic_species_unit = cm3
temperature = temperature
source_species_names = 'H2O Na+ Cl- SiO2(aq)'
source_species_rates = 'rate_H2O_per_1l rate_Na_per_1l rate_Cl_per_1l rate_SiO2_per_1l'
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
add_aux_pH = false # there is no H+ in this system
evaluate_kinetic_rates_always = true # implicit time-marching used for stability
execute_console_output_on = ''
[]
[UserObjects]
[rate_quartz]
type = GeochemistryKineticRate
kinetic_species_name = QuartzLike
intrinsic_rate_constant = 1.0E-2
multiply_by_mass = true
area_quantity = 1
activation_energy = 72800.0
[]
[definition]
type = GeochemicalModelDefinition
database_file = "small_database.json"
basis_species = "H2O SiO2(aq) Na+ Cl-"
kinetic_minerals = "QuartzLike"
kinetic_rate_descriptions = "rate_quartz"
[]
[nodal_void_volume_uo]
type = NodalVoidVolume
porosity = porosity
execute_on = 'initial timestep_end' # "initial" means this is evaluated properly for the first timestep
[]
[]
[Executioner]
type = Transient
dt = 1E5
end_time = 7.76E6 # 90 days
[]
[AuxVariables]
[temperature]
initial_condition = 50.0
[]
[porosity]
initial_condition = 0.1
[]
[nodal_void_volume]
[]
[pf_rate_H2O] # change in H2O mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Na] # change in H2O mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Cl] # change in H2O mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_SiO2] # change in H2O mass (kg/s) at each node provided by the porous-flow simulation
[]
[rate_H2O_per_1l] # rate per 1 litre of aqueous solution that we consider at each node
[]
[rate_Na_per_1l]
[]
[rate_Cl_per_1l]
[]
[rate_SiO2_per_1l]
[]
[transported_H2O]
[]
[transported_Na]
[]
[transported_Cl]
[]
[transported_SiO2]
[]
[transported_mass]
[]
[massfrac_Na]
[]
[massfrac_Cl]
[]
[massfrac_SiO2]
[]
[massfrac_H2O]
[]
[]
[AuxKernels]
[porosity]
type = ParsedAux
coupled_variables = free_cm3_QuartzLike
expression = '1000.0 / (1000.0 + free_cm3_QuartzLike)'
variable = porosity
execute_on = 'timestep_end'
[]
[nodal_void_volume_auxk]
type = NodalVoidVolumeAux
variable = nodal_void_volume
nodal_void_volume_uo = nodal_void_volume_uo
execute_on = 'initial timestep_end' # "initial" to ensure it is properly evaluated for the first timestep
[]
[rate_H2O_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_H2O nodal_void_volume'
variable = rate_H2O_per_1l
# pf_rate = change in kg at every node
# pf_rate * 1000 / molar_mass_in_g_per_mole = change in moles at every node
# pf_rate * 1000 / molar_mass / (nodal_void_volume_in_m^3 * 1000) = change in moles per litre of aqueous solution
expression = 'pf_rate_H2O / 18.0152 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_Na_per_1l]
type = ParsedAux
coupled_variables = 'pf_rate_Na nodal_void_volume'
variable = rate_Na_per_1l
expression = 'pf_rate_Na / 22.9898 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_Cl_per_1l]
type = ParsedAux
coupled_variables = 'pf_rate_Cl nodal_void_volume'
variable = rate_Cl_per_1l
expression = 'pf_rate_Cl / 35.453 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_SiO2_per_1l]
type = ParsedAux
coupled_variables = 'pf_rate_SiO2 nodal_void_volume'
variable = rate_SiO2_per_1l
expression = 'pf_rate_SiO2 / 60.0843 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[transported_H2O_auxk]
type = GeochemistryQuantityAux
variable = transported_H2O
species = H2O
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Na]
type = GeochemistryQuantityAux
variable = transported_Na
species = Na+
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Cl]
type = GeochemistryQuantityAux
variable = transported_Cl
species = Cl-
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_SiO2]
type = GeochemistryQuantityAux
variable = transported_SiO2
species = 'SiO2(aq)'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_mass_auxk]
type = ParsedAux
coupled_variables = 'transported_H2O transported_Na transported_Cl transported_SiO2'
variable = transported_mass
expression = 'transported_H2O * 18.0152 + transported_Na * 22.9898 + transported_Cl * 35.453 + transported_SiO2 * 60.0843'
execute_on = 'timestep_end'
[]
[massfrac_H2O]
type = ParsedAux
coupled_variables = 'transported_H2O transported_mass'
variable = massfrac_H2O
expression = 'transported_H2O * 18.0152 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Na]
type = ParsedAux
coupled_variables = 'transported_Na transported_mass'
variable = massfrac_Na
expression = 'transported_Na * 22.9898 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Cl]
type = ParsedAux
coupled_variables = 'transported_Cl transported_mass'
variable = massfrac_Cl
expression = 'transported_Cl * 35.453 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_SiO2]
type = ParsedAux
coupled_variables = 'transported_SiO2 transported_mass'
variable = massfrac_SiO2
expression = 'transported_SiO2 * 60.0843 / transported_mass'
execute_on = 'timestep_end'
[]
[]
[Postprocessors]
[cm3_quartz]
type = PointValue
variable = free_cm3_QuartzLike
[]
[porosity]
type = PointValue
variable = porosity
[]
[solution_temperature]
type = PointValue
variable = solution_temperature
[]
[massfrac_H2O]
type = PointValue
variable = massfrac_H2O
[]
[massfrac_Na]
type = PointValue
variable = massfrac_Na
[]
[massfrac_Cl]
type = PointValue
variable = massfrac_Cl
[]
[massfrac_SiO2]
type = PointValue
variable = massfrac_SiO2
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/geochemistry/test/tests/time_dependent_reactions/flushing_case2.i)
# Alkali flushing of a reservoir (an example of flushing): adding Na2CO3
# To determine the initial constraint_values, run flushing_equilibrium_at70degC.i
# Note that flushing_equilibrium_at70degC.i will have to be re-run when temperature-dependence has been added to geochemistry
# Note that Dawsonite is currently not included as an equilibrium_mineral, otherwise it is supersaturated in the initial configuration, so precipitates. Bethke does not report this in Fig30.4, so I assume it is due to temperature dependence
[GlobalParams]
point = '0 0 0'
[]
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
swap_into_basis = "Calcite Dolomite-ord Muscovite Kaolinite"
swap_out_of_basis = "HCO3- Mg++ K+ Al+++"
constraint_species = "H2O H+ Cl- Na+ Ca++ Calcite Dolomite-ord Muscovite Kaolinite SiO2(aq)"
constraint_value = " 1.0 1E-5 2.1716946 1.0288941 0.21650572 10.177537 3.6826177 1.320907 1.1432682 6.318e-05"
constraint_meaning = "kg_solvent_water activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition free_concentration"
constraint_unit = " kg dimensionless moles moles moles moles moles moles moles molal"
initial_temperature = 70.0
temperature = 70.0
kinetic_species_name = Quartz
kinetic_species_initial_value = 226.992243
kinetic_species_unit = moles
evaluate_kinetic_rates_always = true # implicit time-marching used for stability
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
close_system_at_time = 0.0
remove_fixed_activity_name = "H+"
remove_fixed_activity_time = 0.0
mode = 3 # flush through the NaOH solution specified below:
source_species_names = "H2O Na+ CO3--"
source_species_rates = "27.755 0.25 0.125" # 1kg water/2days = 27.755moles/day. 0.5mol Na+/2days = 0.25mol/day
[]
[UserObjects]
[rate_quartz]
type = GeochemistryKineticRate
kinetic_species_name = Quartz
intrinsic_rate_constant = 1.3824E-13 # 1.6E-19mol/s/cm^2 = 1.3824E-13mol/day/cm^2
multiply_by_mass = true
area_quantity = 1000
promoting_species_names = "H+"
promoting_indices = "-0.5"
[]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- Na+ Ca++ HCO3- Mg++ K+ Al+++ SiO2(aq)"
equilibrium_minerals = "Calcite Dolomite-ord Muscovite Kaolinite Paragonite Analcime Phlogopite Tridymite" # Dawsonite
kinetic_minerals = "Quartz"
kinetic_rate_descriptions = "rate_quartz"
[]
[]
[AuxVariables]
[diss_rate]
[]
[]
[AuxKernels]
[diss_rate]
type = ParsedAux
coupled_variables = mol_change_Quartz
expression = '-mol_change_Quartz / 1.0' # 1.0 = timestep size
variable = diss_rate
[]
[]
[Postprocessors]
[pH]
type = PointValue
variable = "pH"
[]
[rate_mole_per_day]
type = PointValue
variable = diss_rate
[]
[cm3_Calcite]
type = PointValue
variable = free_cm3_Calcite
[]
[cm3_Dolomite]
type = PointValue
variable = free_cm3_Dolomite-ord
[]
[cm3_Muscovite]
type = PointValue
variable = free_cm3_Muscovite
[]
[cm3_Kaolinite]
type = PointValue
variable = free_cm3_Kaolinite
[]
[cm3_Quartz]
type = PointValue
variable = free_cm3_Quartz
[]
[cm3_Paragonite]
type = PointValue
variable = free_cm3_Paragonite
[]
[cm3_Analcime]
type = PointValue
variable = free_cm3_Analcime
[]
[cm3_Phlogopite]
type = PointValue
variable = free_cm3_Phlogopite
[]
[cm3_Tridymite]
type = PointValue
variable = free_cm3_Tridymite
[]
[]
[Executioner]
type = Transient
dt = 1
end_time = 20 # measured in days
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/interrogate_reactions/gypsum.i)
# 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/redox_disequilibrium/microbial.i)
[TimeIndependentReactionSolver]
model_definition = definition
temperature = 25
swap_out_of_basis = 'HCO3- Fe+++'
swap_into_basis = ' CO2(g) Fe(OH)3(ppd)'
charge_balance_species = "Cl-"
# TDS = 80.5mg/g (roughly) = (mass_non-water) / (mass_solvent_water + mass_non-water),
# so with mass_solvent_water = 1kg, mass_non-water = 87.6mg and total_mass = 1.0876
constraint_species = "H2O H+ CO2(g) Fe(OH)3(ppd) Cl- Na+ Ca++ Mg++ SO4-- Fe++ H2(aq) HS- O2(aq) CH4(aq) NO3- NO2- NH4+ CH3COO-"
constraint_value = " 1.0 1E-6 0.01 0.02914 0.46E-3 0.473E-3 0.407E-3 0.0895E-3 0.3963E-3 3.895E-6 0.004E-6 1.6445E-6 3.399E-6 2.712E-5 3.508E-5 9.456E-6 6.029E-6 5.5526E-6"
constraint_meaning = "kg_solvent_water activity fugacity free_mineral bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition free_concentration bulk_composition free_concentration bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = " kg dimensionless dimensionless moles moles moles moles moles moles moles molal moles molal moles moles moles moles moles"
ramp_max_ionic_strength_initial = 0 # not needed in this simple problem
max_initial_residual = 1E-2
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
mol_cutoff = 1E-5
abs_tol = 1E-17
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- Na+ Ca++ Mg++ SO4-- Fe++ H2(aq) HS- O2(aq) Fe+++ HCO3- CH3COO- CH4(aq) NH4+ NO2- NO3-"
equilibrium_minerals = "Fe(OH)3(ppd)"
equilibrium_gases = "CO2(g)"
piecewise_linear_interpolation = true # for comparison with GWB
[]
[]
(modules/geochemistry/test/tests/time_dependent_reactions/cooling.i)
#Temperature is changed and precipitates are observed
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
swap_out_of_basis = "Al+++ K+ H+ SiO2(aq)"
swap_into_basis = "Albite Maximum Muscovite Quartz"
charge_balance_species = "Cl-"
constraint_species = "H2O Muscovite Na+ Cl- Albite Maximum Quartz"
constraint_value = " 1.0 5 1.14093 1.14093 20 10 2"
constraint_meaning = "kg_solvent_water free_mineral bulk_composition bulk_composition free_mineral free_mineral free_mineral"
constraint_unit = "kg cm3 moles moles cm3 cm3 cm3"
initial_temperature = 300
temperature = temperature
ramp_max_ionic_strength_initial = 0 # not needed in this simple problem
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
abs_tol = 1E-14
execute_console_output_on = '' # only CSV output for this example
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
variable = temperature
function = '300 - t'
execute_on = 'timestep_begin' # so that it is correct when we solve the system
[]
[]
[Postprocessors]
[solution_temperature]
type = PointValue
point = '0 0 0'
variable = 'temperature'
[]
[cm3_Max_Micro]
type = PointValue
point = '0 0 0'
variable = 'free_cm3_Maximum'
[]
[cm3_Albite]
type = PointValue
point = '0 0 0'
variable = 'free_cm3_Albite'
[]
[cm3_Muscovite]
type = PointValue
point = '0 0 0'
variable = 'free_cm3_Muscovite'
[]
[cm3_Quartz]
type = PointValue
point = '0 0 0'
variable = 'free_cm3_Quartz'
[]
[]
[Executioner]
type = Transient
start_time = -10 # so that the output at 300degC is easily captured
dt = 10
end_time = 275
[]
[Outputs]
csv = true
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Na+ Cl- Al+++ K+ SiO2(aq)"
equilibrium_minerals = "Albite Maximum Muscovite Quartz"
remove_all_extrapolated_secondary_species = true # this removes Al13O4(OH)24(7+) that has extreme logK values
[]
[]
(modules/geochemistry/test/tests/time_dependent_reactions/mixing_seawater_step1.i)
# Finds the equilibrium configuration for seawater, step 1. (The fluid can then mixed into the fluid defined in mixing.i)
# Note:
# The Geochemists Workbench software first equilibrates the system at pH=8.1 without allowing precipitates to form,
# THEN closes the system and allows precipitates to form.
# This MOOSE input file does the first stage: equilibration of the system at pH=8.1 without any precipitation
# The key quantities to find are the bulk moles for H+ and O2(aq)
[TimeIndependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl- Na+ Mg++ SO4-- Ca++ K+ HCO3- Ba++ SiO2(aq) Sr++ Zn++ Cu+ Al+++ Fe++ Mn++ O2(aq)"
constraint_value = "1.0 7.943282E-9 559E-3 480E-3 54.5E-3 29.5E-3 10.5E-3 10.1E-3 2.4E-3 0.20E-6 0.17E-3 0.09E-3 0.01E-6 0.007E-6 0.005E-6 0.001E-6 0.001E-6 123E-6"
constraint_meaning = "kg_solvent_water activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition free_concentration"
constraint_unit = "kg dimensionless moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles molal"
temperature = 4
abs_tol = 1e-14
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
mol_cutoff = 1E-5
[]
[Postprocessors]
[H+]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_H+"
[]
[O2aq]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_O2(aq)"
[]
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- Na+ Mg++ SO4-- Ca++ K+ HCO3- Ba++ SiO2(aq) Sr++ Zn++ Cu+ Al+++ Fe++ Mn++ O2(aq)"
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/geochemistry_quantity_aux/free_mg.i)
#Extract free mg
[TimeIndependentReactionSolver]
model_definition = definition
swap_out_of_basis = 'H+'
swap_into_basis = 'Fe(OH)3(ppd)_nosorb'
charge_balance_species = "Cl-"
constraint_species = "H2O Cl- Fe+++ Fe(OH)3(ppd)_nosorb"
constraint_value = " 1.0 1.0E-6 1.0E-6 1.0"
constraint_meaning = "kg_solvent_water bulk_composition free_concentration free_mineral"
constraint_unit = "kg moles molal moles"
ramp_max_ionic_strength_initial = 0
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Cl- Fe+++"
equilibrium_minerals = "Fe(OH)3(ppd)_nosorb"
[]
[]
[AuxVariables]
[the_aux]
[]
[]
[AuxKernels]
[the_aux]
type = GeochemistryQuantityAux
species = "Fe(OH)3(ppd)_nosorb"
reactor = geochemistry_reactor
variable = the_aux
quantity = free_mg
[]
[]
[Postprocessors]
[value]
type = PointValue
point = '0 0 0'
variable = the_aux
[]
[value_from_action]
type = PointValue
point = '0 0 0'
variable = "free_mg_Fe(OH)3(ppd)_nosorb"
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/interrogate_reactions/clinoptilolite.i)
# 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/geochemistry_quantity_aux/activity.i)
#Extract activity
[TimeIndependentReactionSolver]
model_definition = definition
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl-"
constraint_value = " 1.0 1.0E-2 1.0E-2"
constraint_meaning = "kg_solvent_water activity bulk_composition"
constraint_unit = "kg dimensionless moles"
ramp_max_ionic_strength_initial = 0
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../database/ferric_hydroxide_sorption.json"
basis_species = "H2O H+ Cl-"
[]
[]
[AuxVariables]
[the_aux]
[]
[]
[AuxKernels]
[the_aux]
type = GeochemistryQuantityAux
species = 'H+'
reactor = geochemistry_reactor
variable = the_aux
quantity = activity
[]
[]
[Postprocessors]
[value]
type = PointValue
point = '0 0 0'
variable = the_aux
[]
[value_from_action]
type = PointValue
point = '0 0 0'
variable = "activity_H+"
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/interrogate_reactions/invalid_swap.i)
[GeochemicalModelInterrogator]
model_definition = definition
swap_out_of_basis = "Al+++"
swap_into_basis = " Quartz"
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O K+ Al+++ SiO2(aq) H+"
equilibrium_minerals = "Muscovite Quartz Maximum Tridymite Amrph^silica"
[]
[]
(modules/geochemistry/test/tests/kinetics/quartz_deposition.i)
# Example of quartz deposition in a fracture, as the temperature is reduced from 300degC to 25degC
# The initial free molality of SiO2(aq) is determined using quartz_equilibrium_at300degC
[GlobalParams]
point = '0 0 0'
[]
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
constraint_species = "H2O Na+ Cl- SiO2(aq)"
constraint_value = " 1.0 1E-10 1E-10 0.009722905"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition free_concentration"
constraint_unit = " kg moles moles molal"
initial_temperature = 300.0
temperature = temp_controller
kinetic_species_name = Quartz
kinetic_species_initial_value = 400
kinetic_species_unit = g
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
add_aux_pH = false # there is no H+ in this system
evaluate_kinetic_rates_always = true # implicit time-marching used for stability
execute_console_output_on = '' # only CSV output used in this example
[]
[UserObjects]
[rate_quartz]
type = GeochemistryKineticRate
kinetic_species_name = Quartz
intrinsic_rate_constant = 7.4112E2 # 2.35E-5mol/s/cm^2 = 7.411E2mol/yr/cm^2
multiply_by_mass = true
area_quantity = 1
activation_energy = 72800.0
[]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O SiO2(aq) Na+ Cl-"
kinetic_minerals = "Quartz"
kinetic_rate_descriptions = "rate_quartz"
[]
[]
[Executioner]
type = Transient
dt = 0.02
end_time = 1 # measured in years
[]
[AuxVariables]
[temp_controller]
[]
[diss_rate]
[]
[]
[AuxKernels]
[temp_controller_auxk]
type = FunctionAux
function = '300 - 275 * t'
variable = temp_controller
execute_on = 'timestep_begin'
[]
[diss_rate]
type = ParsedAux
coupled_variables = mol_change_Quartz
expression = '-mol_change_Quartz / 0.02' # 0.02 = timestep size
variable = diss_rate
[]
[]
[Postprocessors]
[mg_per_kg_sio2]
type = PointValue
variable = "mg_per_kg_SiO2(aq)"
[]
[rate_mole_per_year]
type = PointValue
variable = diss_rate
[]
[temperature]
type = PointValue
variable = "solution_temperature"
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/time_dependent_reactions/mixing_seawater_step2.i)
# Finds the equilibrium configuration for seawater, step 2. (The fluid can then mixed into the fluid defined in mixing.i)
# Note:
# The Geochemists Workbench software first equilibrates the system at pH=8.1 without allowing precipitates to form,
# THEN closes the system and allows precipitates to form.
# This MOOSE input file does the second stage: precipitation with fixed H+ and O2(aq) bulk moles
[TimeIndependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Cl- Na+ Mg++ SO4-- Ca++ K+ HCO3- Ba++ SiO2(aq) Sr++ Zn++ Cu+ Al+++ Fe++ Mn++ O2(aq)"
constraint_value = "1.0 -4.6588015784953e-05 559E-3 480E-3 54.5E-3 29.5E-3 10.5E-3 10.1E-3 2.4E-3 0.20E-6 0.17E-3 0.09E-3 0.01E-6 0.007E-6 0.005E-6 0.001E-6 0.001E-6 0.00012300200124001"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = "kg moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles"
min_initial_molality = 1E-15
temperature = 4
abs_tol = 1e-14
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
execute_console_output_on = ''
[]
[Postprocessors]
[H2O]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_H2O"
[]
[Cl-]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_Cl-"
[]
[Na+]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_Na+"
[]
[Mg++]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_Mg++"
[]
[SO4--]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_SO4--"
[]
[K+]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_K+"
[]
[Ca++]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_Ca++"
[]
[HCO3-]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_HCO3-"
[]
[O2aq]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_O2(aq)"
[]
[SiO2aq]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_SiO2(aq)"
[]
[bulk_Dolomite-ord]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_Dolomite-ord"
[]
[free_mg_Dolomite-ord]
type = PointValue
point = '0 0 0'
variable = "free_mg_Dolomite-ord"
[]
[bulk_Strontianite]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_Strontianite"
[]
[free_mg_Strontianite]
type = PointValue
point = '0 0 0'
variable = "free_mg_Strontianite"
[]
[bulk_Barite]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_Barite"
[]
[free_mg_Barite]
type = PointValue
point = '0 0 0'
variable = "free_mg_Barite"
[]
[Zn++]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_Zn++"
[]
[bulk_Pyrolusite]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_Pyrolusite"
[]
[free_mg_Pyrolusite]
type = PointValue
point = '0 0 0'
variable = "free_mg_Pyrolusite"
[]
[bulk_Muscovite]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_Muscovite"
[]
[free_mg_Muscovite]
type = PointValue
point = '0 0 0'
variable = "free_mg_Muscovite"
[]
[bulk_Nontronit-Na]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_Nontronit-Na"
[]
[free_mg_Nontronit-Na]
type = PointValue
point = '0 0 0'
variable = "free_mg_Nontronit-Na"
[]
[Cu+]
type = PointValue
point = '0 0 0'
variable = "bulk_moles_Cu+"
[]
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Cl- Na+ Mg++ SO4-- Ca++ K+ HCO3- Ba++ SiO2(aq) Sr++ Zn++ Cu+ Al+++ Fe++ Mn++ O2(aq)"
equilibrium_minerals = "Anhydrite Pyrite Talc Amrph^silica Barite Dolomite-ord Muscovite Nontronit-Na Pyrolusite Strontianite"
[]
[]
[Outputs]
csv = true
[]
(modules/geochemistry/test/tests/time_dependent_reactions/add_NaCl.i)
#Add K-feldspar and observe precipiates forming
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = "Cl-"
constraint_species = "H2O H+ Na+ K+ Ca++ Mg++ Al+++ SiO2(aq) Cl- SO4-- HCO3-"
constraint_value = " 1.0 1E-5 2.175E-04 2.558E-05 3.743E-04 1.234E-04 3.706E-08 4.993E-05 8.463E-04 8.328E-05 8.194E-04"
constraint_meaning = "kg_solvent_water activity bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition"
constraint_unit = " kg dimensionless moles moles moles moles moles moles moles moles moles"
ramp_max_ionic_strength_initial = 0
close_system_at_time = 0
source_species_names = "K-feldspar"
source_species_rates = "1.37779E-3" # 0.15cm^3 of K-feldspar (molar volume = 108.87 cm^3/mol) = 1.37779E-3 mol
remove_fixed_activity_name = "H+"
remove_fixed_activity_time = 0
execute_console_output_on = 'final'
[]
[Postprocessors]
[cm3_K-feldspar]
type = PointValue
point = '0 0 0'
variable = 'free_cm3_K-feldspar'
[]
[cm3_Kaolinite]
type = PointValue
point = '0 0 0'
variable = 'free_cm3_Kaolinite'
[]
[cm3_Muscovite]
type = PointValue
point = '0 0 0'
variable = 'free_cm3_Muscovite'
[]
[cm3_Quartz]
type = PointValue
point = '0 0 0'
variable = 'free_cm3_Quartz'
[]
[cm3_Phengite]
type = PointValue
point = '0 0 0'
variable = 'free_cm3_Phengite'
[]
[]
[Executioner]
type = Transient
dt = 0.1
end_time = 1
[]
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O H+ Na+ K+ Ca++ Mg++ Al+++ SiO2(aq) Cl- SO4-- HCO3-"
equilibrium_minerals = "K-feldspar Kaolinite Muscovite Quartz Phengite"
[]
[]