19 "Extracts information from the Reactor and records it in the AuxVariable");
21 MooseEnum quantity_choice(
"molal mg_per_kg free_mg free_cm3 neglog10a activity bulk_moles "
22 "surface_charge surface_potential temperature kinetic_moles "
23 "kinetic_additions moles_dumped transported_moles_in_original_basis",
28 "Type of quantity to output. These are available for non-kinetic species: activity (which "
30 "fugacity for gases); bulk moles (this will be zero if the species is not in the basis); "
31 "neglog10a = -log10(activity); transported_moles_in_original_basis (will throw an error if "
32 "species is not in original basis). These are available only for non-kinetic non-minerals: "
34 "mol(species)/kg(solvent_water); mg_per_kg = mg(species)/kg(solvent_water). These are "
35 "available only for minerals: "
36 "free_mg = free mg; free_cm3 = free cubic-centimeters; moles_dumped = moles dumped when "
37 "special dump and flow-through modes are active. These are available for minerals "
38 "that host sorbing sites: surface_charge (C/m^2); surface_potential (V). These are "
39 "available for kinetic species: kinetic_moles; kinetic_additions (-dt * rate = mole "
40 "increment in kinetic species for this timestep). If "
41 "quantity=temperature, then the 'species' is ignored and the AuxVariable will record the "
42 "aqueous solution temperature in degC");
44 "The name of the Geochemistry*Reactor user object.");
51 _species(getParam<
std::string>(
"species")),
54 _surface_sorption_mineral_index(0)
63 " does not appear in the model's geochemical system either as a basis or equilibrium "
64 "or kinetic species, but you requested an Aux involving it");
66 bool is_mineral =
false;
82 "the free_mg, free_cm3, moles_dumped and surface-related quantities are only available for "
87 "the molal and mg_per_kg quantities are only available for "
88 "non-kinetic, non-mineral species");
97 "cannot record surface charge or surface potential for a species that is not "
98 "involved in surface sorption");
103 "the kinetic_moles and kinetic_additions quantities are only available for kinetic "
108 paramError(
"species",
"cannot record activity, neglog10a or bulk_moles for a kinetic species");
const ModelGeochemicalDatabase mgd
registerMooseObject("GeochemistryApp", GeochemistryQuantityAux)
const Node *const & _current_node
static InputParameters validParams()
This class holds information about bulk composition, molalities, activities, activity coefficients,...
Real getEquilibriumActivity(unsigned eqm_ind) const
Returns the value of activity for the equilibrium species with index eqm_index.
Real getSurfacePotential(unsigned sp) const
unsigned getNumInBasis() const
returns the number of species in the basis
Real getKineticMoles(unsigned kin) const
DenseVector< Real > getTransportedBulkInOriginalBasis() const
const std::vector< Real > & getBulkMolesOld() const
const ModelGeochemicalDatabase & getModelGeochemicalDatabase() const
const std::vector< Real > & getSolventMassAndFreeMolalityAndMineralMoles() const
Real getSurfaceCharge(unsigned sp) const
Real getBasisActivity(unsigned i) const
Real getEquilibriumMolality(unsigned j) const
Real getTemperature() const
AuxKernel to extract information from a Geochemistry*Reactor to record into an AuxVariable.
const GeochemistryReactorBase & _reactor
virtual Real computeValue() override
unsigned _surface_sorption_mineral_index
index into mgd.surface_sorption_name corresponding to the species: this is used if quantity is surfac...
enum GeochemistryQuantityAux::QuantityChoiceEnum _quantity_choice
static InputParameters validParams()
@ TRANSPORTED_MOLES_IN_ORIGINAL_BASIS
const std::string & _species
The species of interest.
GeochemistryQuantityAux(const InputParameters ¶meters)
Base class that controls the spatio-temporal solution of geochemistry reactions.
virtual const GeochemicalSystem & getGeochemicalSystem(dof_id_type node_id) const =0
virtual const DenseVector< Real > & getMoleAdditions(dof_id_type node_id) const =0
const PertinentGeochemicalSystem & getPertinentGeochemicalSystem() const
returns a reference to the PertinentGeochemicalSystem used to creat the ModelGeochemicalDatabase
virtual Real getMolesDumped(dof_id_type node_id, const std::string &species) const =0
void paramError(const std::string ¶m, Args... args) const
Constructs and stores a minimal amount of information that is pertinent to the user-defined geochemic...
unsigned getIndexOfOriginalBasisSpecies(const std::string &name) const
const ModelGeochemicalDatabase & modelGeochemicalDatabase() const
Return a reference to the ModelGeochemicalDatabase structure.
Data structure to hold all relevant information from the database file.
std::vector< bool > eqm_species_mineral
eqm_species_mineral[i] = true iff the i^th equilibrium species is a mineral
std::vector< Real > basis_species_molecular_weight
all quantities have a molecular weight (g)
std::vector< Real > eqm_species_molecular_volume
all quantities have a molecular volume (cm^3) (only nonzero for minerals, however)
std::vector< bool > kin_species_mineral
kin_species_mineral[j] = true iff the j^th kinetic species is a mineral
std::vector< Real > eqm_species_molecular_weight
all quantities have a molecular weight (g)
std::vector< bool > basis_species_mineral
basis_species_mineral[j] = true iff the j^th basis species is a mineral
std::vector< Real > kin_species_molecular_volume
all quantities have a molecular volume (cm^3/mol) (only nonzero for minerals, however)
std::vector< Real > basis_species_molecular_volume
all quantities have a molecular volume (cm^3) (only nonzero for minerals, however)
std::unordered_map< std::string, unsigned > eqm_species_index
eqm_species_index[name] = index of the equilibrium species (secondary aqueous species,...
std::unordered_map< std::string, unsigned > basis_species_index
basis_species_index[name] = index of the basis species, within all ModelGeochemicalDatabase internal ...
std::vector< std::string > surface_sorption_name
surface_sorption_name[k] = name of the mineral involved in surface sorption.
std::unordered_map< std::string, unsigned > kin_species_index
kin_species_index[name] = index of the kinetic species, within all ModelGeochemicalDatabase internal ...
std::vector< Real > kin_species_molecular_weight
all quantities have a molecular weight (g/mol)