https://mooseframework.inl.gov
Public Member Functions | Public Attributes | List of all members
ModelGeochemicalDatabase Struct Reference

Data structure to hold all relevant information from the database file. More...

#include <PertinentGeochemicalSystem.h>

Public Member Functions

 ModelGeochemicalDatabase (const GeochemicalDatabaseReader &db)
 Constructor sets original_database. More...
 
bool operator== (const ModelGeochemicalDatabase &rhs) const
 

Public Attributes

const GeochemicalDatabaseReaderoriginal_database
 a pointer to the original database used to build this ModelGeochemicalDatabase More...
 
std::unordered_map< std::string, unsigned > basis_species_index
 basis_species_index[name] = index of the basis species, within all ModelGeochemicalDatabase internal datastrcutres, with given name More...
 
std::vector< std::string > basis_species_name
 basis_species_name[j] = name of the j^th basis species More...
 
std::vector< bool > basis_species_mineral
 basis_species_mineral[j] = true iff the j^th basis species is a mineral More...
 
std::vector< bool > basis_species_gas
 basis_species_gas[j] = true iff the j^th basis species is a gas More...
 
std::vector< bool > basis_species_transported
 basis_species_transported[j] = true iff the j^th basis species is transported in reactive-transport sims More...
 
std::vector< Realbasis_species_charge
 all quantities have a charge (mineral charge = 0, gas charge = 0, oxide charge = 0) More...
 
std::vector< Realbasis_species_radius
 all quantities have an ionic radius (Angstrom) for computing activity (mineral radius = 0, gas radius = 0, surface species radius = 0) More...
 
std::vector< Realbasis_species_molecular_weight
 all quantities have a molecular weight (g) More...
 
std::vector< Realbasis_species_molecular_volume
 all quantities have a molecular volume (cm^3) (only nonzero for minerals, however) More...
 
std::unordered_map< std::string, unsigned > eqm_species_index
 eqm_species_index[name] = index of the equilibrium species (secondary aqueous species, redox couples in equilibrium with the aqueous solution, minerals in equilibrium with the aqueous solution, gases in equilibrium with the aqueous solution) within all ModelGeochemicalDatabase internal datastrcutres, with given name More...
 
std::vector< std::string > eqm_species_name
 eqm_species_name[i] = name of the i^th eqm species More...
 
std::vector< bool > eqm_species_mineral
 eqm_species_mineral[i] = true iff the i^th equilibrium species is a mineral More...
 
std::vector< bool > eqm_species_gas
 eqm_species_gas[i] = true iff the i^th equilibrium species is a gas More...
 
std::vector< bool > eqm_species_transported
 eqm_species_transported[i] = true iff the i^th eqm species is transported in reactive-transport sims More...
 
std::vector< Realeqm_species_charge
 all quantities have a charge (mineral charge = 0, gas charge = 0, oxide charge = 0) More...
 
std::vector< Realeqm_species_radius
 all quantities have an ionic radius (Angstrom) for computing activity (mineral radius = 0, gas radius = 0, surface species radius = 0) More...
 
std::vector< Realeqm_species_molecular_weight
 all quantities have a molecular weight (g) More...
 
std::vector< Realeqm_species_molecular_volume
 all quantities have a molecular volume (cm^3) (only nonzero for minerals, however) More...
 
DenseMatrix< Realeqm_stoichiometry
 eqm_stoichiometry(i, j) = stoichiometric coefficient for equilibrium species "i" in terms of the basis species "j" More...
 
DenseMatrix< Realeqm_log10K
 eqm_log10K(i, j) = log10(equilibrium constant) for i^th equilibrium species at the j^th temperature point More...
 
std::vector< std::string > surface_sorption_name
 surface_sorption_name[k] = name of the mineral involved in surface sorption. More...
 
std::vector< Realsurface_sorption_area
 surface_sorption_area[k] = specific surface area [m^2/g] for the k^th mineral involved in surface sorption. More...
 
std::vector< bool > surface_sorption_related
 surface_sorption_related[j] = true iff the j^th equilibrium species is involved in surface sorption More...
 
std::vector< unsigned > surface_sorption_number
 surface_sorption_number[j] = the index of the surface potential that should be used to modify the equilibrium constant for the j^th equilibrium species. More...
 
std::string redox_lhs
 the name of the species on the left-hand side of the redox equations. More...
 
DenseMatrix< Realredox_stoichiometry
 redox_stoichiometry(i, j) = stoichiometric coefficients for i^th redox species that is in disequilibrium in terms of the j basis species. More...
 
DenseMatrix< Realredox_log10K
 redox_log10K(i, j) = log10(equilibrium constant) for i^th redox species at the j^th temperature point More...
 
std::unordered_map< std::string, SurfaceComplexationInfosurface_complexation_info
 Holds info on surface complexation, if any, in the model. More...
 
std::unordered_map< std::string, std::vector< Real > > gas_chi
 Holds info on gas fugacity "chi" parameters. More...
 
std::unordered_map< std::string, unsigned > kin_species_index
 kin_species_index[name] = index of the kinetic species, within all ModelGeochemicalDatabase internal datastrcutres, with given name More...
 
std::vector< std::string > kin_species_name
 kin_species_name[j] = name of the j^th kinetic species More...
 
std::vector< bool > kin_species_mineral
 kin_species_mineral[j] = true iff the j^th kinetic species is a mineral More...
 
std::vector< bool > kin_species_transported
 kin_species_transported[j] = true iff the j^th kinetic species is transported in reactive-transport sims More...
 
std::vector< Realkin_species_charge
 all kinetic quantities have a charge (mineral charge = 0) More...
 
std::vector< Realkin_species_molecular_weight
 all quantities have a molecular weight (g/mol) More...
 
std::vector< Realkin_species_molecular_volume
 all quantities have a molecular volume (cm^3/mol) (only nonzero for minerals, however) More...
 
DenseMatrix< Realkin_log10K
 kin_log10K(i, j) = log10(equilibrium constant for the i^th kinetic species at the j^th temperature point More...
 
DenseMatrix< Realkin_stoichiometry
 kin_stoichiometry(i, j) = stoichiometric coefficient for kinetic species "i" in terms of the basis species "j" More...
 
std::vector< KineticRateDefinitionkin_rate
 rates given to kinetic species. More...
 
std::vector< unsigned > have_swapped_out_of_basis
 Species that have been swapped out of the basis. More...
 
std::vector< unsigned > have_swapped_into_basis
 Species that have been swapped into the basis. More...
 
DenseMatrix< Realswap_to_original_basis
 Swap matrix that allows expression in terms of the original basis. More...
 

Detailed Description

Data structure to hold all relevant information from the database file.

Generally, the database file contains information on a lot more species than any numerical model considers. The ModelGeochemicalDatabase only holds the minimal information required for the numerical model. It also holds the information as std::vector and DenseMatrix data structures for numerical efficiency. This makes the ModelGeochemicalDatabase a little more obscure compared with the database file, but considering this information is used hundreds, maybe millions, of times per node during a single timestep, numerical efficiency is paramount.

Definition at line 99 of file PertinentGeochemicalSystem.h.

Constructor & Destructor Documentation

◆ ModelGeochemicalDatabase()

ModelGeochemicalDatabase::ModelGeochemicalDatabase ( const GeochemicalDatabaseReader db)
inline

Constructor sets original_database.

Also initializes swap_to_original_basis to "nothing" in an attempt to reduce memory consumption

Definition at line 105 of file PertinentGeochemicalSystem.h.

DenseMatrix< Real > swap_to_original_basis
Swap matrix that allows expression in terms of the original basis.
const GeochemicalDatabaseReader db("database/moose_testdb.json", true, true, false)
const GeochemicalDatabaseReader * original_database
a pointer to the original database used to build this ModelGeochemicalDatabase

Member Function Documentation

◆ operator==()

bool ModelGeochemicalDatabase::operator== ( const ModelGeochemicalDatabase rhs) const
inline

Definition at line 108 of file PertinentGeochemicalSystem.h.

109  {
110  return (original_database == rhs.original_database) &&
123  (eqm_species_gas == rhs.eqm_species_gas) &&
135  (redox_log10K == rhs.redox_log10K) &&
137  (gas_chi == rhs.gas_chi) && (kin_species_index == rhs.kin_species_index) &&
145  (kin_rate == rhs.kin_rate) &&
149  };
std::vector< bool > surface_sorption_related
surface_sorption_related[j] = true iff the j^th equilibrium species is involved in surface sorption ...
std::vector< Real > surface_sorption_area
surface_sorption_area[k] = specific surface area [m^2/g] for the k^th mineral involved in surface sor...
DenseMatrix< Real > redox_stoichiometry
redox_stoichiometry(i, j) = stoichiometric coefficients for i^th redox species that is in disequilibr...
std::vector< Real > eqm_species_molecular_weight
all quantities have a molecular weight (g)
std::string redox_lhs
the name of the species on the left-hand side of the redox equations.
std::vector< bool > kin_species_mineral
kin_species_mineral[j] = true iff the j^th kinetic species is a mineral
std::vector< bool > basis_species_transported
basis_species_transported[j] = true iff the j^th basis species is transported in reactive-transport s...
std::vector< Real > kin_species_charge
all kinetic quantities have a charge (mineral charge = 0)
std::vector< std::string > surface_sorption_name
surface_sorption_name[k] = name of the mineral involved in surface sorption.
std::vector< bool > eqm_species_gas
eqm_species_gas[i] = true iff the i^th equilibrium species is a gas
std::unordered_map< std::string, unsigned > basis_species_index
basis_species_index[name] = index of the basis species, within all ModelGeochemicalDatabase internal ...
DenseMatrix< Real > kin_stoichiometry
kin_stoichiometry(i, j) = stoichiometric coefficient for kinetic species "i" in terms of the basis sp...
std::vector< Real > kin_species_molecular_weight
all quantities have a molecular weight (g/mol)
std::vector< Real > kin_species_molecular_volume
all quantities have a molecular volume (cm^3/mol) (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, redox couples in equilibrium with the aqueous solution, minerals in equilibrium with the aqueous solution, gases in equilibrium with the aqueous solution) within all ModelGeochemicalDatabase internal datastrcutres, with given name
DenseMatrix< Real > redox_log10K
redox_log10K(i, j) = log10(equilibrium constant) for i^th redox species at the j^th temperature point...
DenseMatrix< Real > swap_to_original_basis
Swap matrix that allows expression in terms of the original basis.
std::unordered_map< std::string, unsigned > kin_species_index
kin_species_index[name] = index of the kinetic species, within all ModelGeochemicalDatabase internal ...
DenseMatrix< Real > eqm_stoichiometry
eqm_stoichiometry(i, j) = stoichiometric coefficient for equilibrium species "i" in terms of the basi...
std::vector< Real > basis_species_radius
all quantities have an ionic radius (Angstrom) for computing activity (mineral radius = 0...
std::vector< unsigned > surface_sorption_number
surface_sorption_number[j] = the index of the surface potential that should be used to modify the equ...
std::unordered_map< std::string, std::vector< Real > > gas_chi
Holds info on gas fugacity "chi" parameters.
DenseMatrix< Real > kin_log10K
kin_log10K(i, j) = log10(equilibrium constant for the i^th kinetic species at the j^th temperature po...
std::vector< bool > kin_species_transported
kin_species_transported[j] = true iff the j^th kinetic species is transported in reactive-transport s...
std::vector< Real > eqm_species_radius
all quantities have an ionic radius (Angstrom) for computing activity (mineral radius = 0...
DenseMatrix< Real > eqm_log10K
eqm_log10K(i, j) = log10(equilibrium constant) for i^th equilibrium species at the j^th temperature p...
std::vector< Real > basis_species_molecular_weight
all quantities have a molecular weight (g)
const GeochemicalDatabaseReader * original_database
a pointer to the original database used to build this ModelGeochemicalDatabase
std::vector< bool > eqm_species_transported
eqm_species_transported[i] = true iff the i^th eqm species is transported in reactive-transport sims ...
std::vector< Real > eqm_species_molecular_volume
all quantities have a molecular volume (cm^3) (only nonzero for minerals, however) ...
std::vector< Real > basis_species_charge
all quantities have a charge (mineral charge = 0, gas charge = 0, oxide charge = 0) ...
std::vector< unsigned > have_swapped_into_basis
Species that have been swapped into the basis.
std::vector< bool > basis_species_gas
basis_species_gas[j] = true iff the j^th basis species is a gas
std::vector< bool > basis_species_mineral
basis_species_mineral[j] = true iff the j^th basis species is a mineral
std::vector< Real > eqm_species_charge
all quantities have a charge (mineral charge = 0, gas charge = 0, oxide charge = 0) ...
std::vector< std::string > kin_species_name
kin_species_name[j] = name of the j^th kinetic species
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_volume
all quantities have a molecular volume (cm^3) (only nonzero for minerals, however) ...
std::unordered_map< std::string, SurfaceComplexationInfo > surface_complexation_info
Holds info on surface complexation, if any, in the model.
std::vector< std::string > eqm_species_name
eqm_species_name[i] = name of the i^th eqm species
std::vector< std::string > basis_species_name
basis_species_name[j] = name of the j^th basis species
std::vector< unsigned > have_swapped_out_of_basis
Species that have been swapped out of the basis.
std::vector< KineticRateDefinition > kin_rate
rates given to kinetic species.

Member Data Documentation

◆ basis_species_charge

std::vector<Real> ModelGeochemicalDatabase::basis_species_charge

◆ basis_species_gas

std::vector<bool> ModelGeochemicalDatabase::basis_species_gas

◆ basis_species_index

std::unordered_map<std::string, unsigned> ModelGeochemicalDatabase::basis_species_index

basis_species_index[name] = index of the basis species, within all ModelGeochemicalDatabase internal datastrcutres, with given name

Definition at line 158 of file PertinentGeochemicalSystem.h.

Referenced by PertinentGeochemicalSystem::addKineticRate(), GeochemistrySpeciesSwapper::alterMGD(), GeochemicalSystem::buildAlgebraicInfo(), PertinentGeochemicalSystem::buildRedoxeInfo(), GeochemicalSystem::checkAndInitialize(), GeochemistrySpeciesSwapper::checkSwap(), GeochemicalSystem::computeSorbingSurfaceArea(), GeochemistryQuantityAux::computeValue(), GeochemistrySpeciesSwapper::constructInverseMatrix(), PertinentGeochemicalSystem::createModel(), GeochemistryTimeDependentReactor::execute(), GeochemistrySpatialReactor::execute(), GeochemistryUnitConverter::fromMoles(), GeochemistryQuantityAux::GeochemistryQuantityAux(), GeochemistrySpatialReactor::GeochemistrySpatialReactor(), GeochemistryTimeDependentReactor::GeochemistryTimeDependentReactor(), GeochemicalModelInterrogator::knownActivity(), operator==(), GeochemistryConsoleOutput::output(), GeochemicalModelInterrogator::outputActivity(), GeochemicalModelInterrogator::outputTemperature(), GeochemistrySpeciesSwapper::performSwap(), GeochemicalSystem::performSwapNoCheck(), GeochemicalSystem::revertToOriginalChargeBalanceSpecies(), GeochemistryActivityCoefficientsDebyeHuckel::setInternalParameters(), GeochemicalSystem::setMineralRelatedFreeMoles(), GeochemicalSystem::setSolventMassAndFreeMolalityAndMineralMolesAndSurfacePotsAndKineticMoles(), GeochemistryIonicStrength::stoichiometricIonicStrength(), TEST(), and TEST_F().

◆ basis_species_mineral

std::vector<bool> ModelGeochemicalDatabase::basis_species_mineral

◆ basis_species_molecular_volume

std::vector<Real> ModelGeochemicalDatabase::basis_species_molecular_volume

all quantities have a molecular volume (cm^3) (only nonzero for minerals, however)

Definition at line 182 of file PertinentGeochemicalSystem.h.

Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemistryQuantityAux::computeValue(), PertinentGeochemicalSystem::createModel(), GeochemistryUnitConverter::fromMoles(), operator==(), and TEST().

◆ basis_species_molecular_weight

std::vector<Real> ModelGeochemicalDatabase::basis_species_molecular_weight

◆ basis_species_name

std::vector<std::string> ModelGeochemicalDatabase::basis_species_name

◆ basis_species_radius

std::vector<Real> ModelGeochemicalDatabase::basis_species_radius

all quantities have an ionic radius (Angstrom) for computing activity (mineral radius = 0, gas radius = 0, surface species radius = 0)

Definition at line 176 of file PertinentGeochemicalSystem.h.

Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemistryActivityCoefficientsDebyeHuckel::buildActivityCoefficients(), PertinentGeochemicalSystem::createModel(), operator==(), and TEST().

◆ basis_species_transported

std::vector<bool> ModelGeochemicalDatabase::basis_species_transported

basis_species_transported[j] = true iff the j^th basis species is transported in reactive-transport sims

Definition at line 170 of file PertinentGeochemicalSystem.h.

Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemicalSystem::computeTransportedBulkFromMolalities(), PertinentGeochemicalSystem::createModel(), operator==(), and TEST().

◆ eqm_log10K

DenseMatrix<Real> ModelGeochemicalDatabase::eqm_log10K

◆ eqm_species_charge

std::vector<Real> ModelGeochemicalDatabase::eqm_species_charge

◆ eqm_species_gas

std::vector<bool> ModelGeochemicalDatabase::eqm_species_gas

◆ eqm_species_index

std::unordered_map<std::string, unsigned> ModelGeochemicalDatabase::eqm_species_index

eqm_species_index[name] = index of the equilibrium species (secondary aqueous species, redox couples in equilibrium with the aqueous solution, minerals in equilibrium with the aqueous solution, gases in equilibrium with the aqueous solution) within all ModelGeochemicalDatabase internal datastrcutres, with given name

Definition at line 190 of file PertinentGeochemicalSystem.h.

Referenced by PertinentGeochemicalSystem::addKineticRate(), GeochemistrySpeciesSwapper::alterMGD(), PertinentGeochemicalSystem::buildRedoxeInfo(), GeochemistrySpeciesSwapper::checkSwap(), GeochemistryQuantityAux::computeValue(), PertinentGeochemicalSystem::createModel(), GeochemicalModelInterrogator::eqmSpeciesOfInterest(), GeochemistryTimeDependentReactor::execute(), GeochemistrySpatialReactor::execute(), GeochemistryUnitConverter::fromMoles(), GeochemistryQuantityAux::GeochemistryQuantityAux(), GeochemistrySpatialReactor::GeochemistrySpatialReactor(), GeochemistryTimeDependentReactor::GeochemistryTimeDependentReactor(), GeochemicalModelInterrogator::knownActivity(), operator==(), GeochemistryConsoleOutput::output(), GeochemicalModelInterrogator::outputActivity(), GeochemicalModelInterrogator::outputReaction(), GeochemicalModelInterrogator::outputTemperature(), GeochemistrySpeciesSwapper::performSwap(), GeochemistryActivityCoefficientsDebyeHuckel::setInternalParameters(), GeochemicalSystem::setMineralRelatedFreeMoles(), GeochemicalSystem::setSolventMassAndFreeMolalityAndMineralMolesAndSurfacePotsAndKineticMoles(), GeochemistryIonicStrength::stoichiometricIonicStrength(), TEST(), and TEST_F().

◆ eqm_species_mineral

std::vector<bool> ModelGeochemicalDatabase::eqm_species_mineral

◆ eqm_species_molecular_volume

std::vector<Real> ModelGeochemicalDatabase::eqm_species_molecular_volume

all quantities have a molecular volume (cm^3) (only nonzero for minerals, however)

Definition at line 214 of file PertinentGeochemicalSystem.h.

Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemistryQuantityAux::computeValue(), PertinentGeochemicalSystem::createModel(), GeochemistryUnitConverter::fromMoles(), operator==(), and TEST().

◆ eqm_species_molecular_weight

std::vector<Real> ModelGeochemicalDatabase::eqm_species_molecular_weight

◆ eqm_species_name

std::vector<std::string> ModelGeochemicalDatabase::eqm_species_name

◆ eqm_species_radius

std::vector<Real> ModelGeochemicalDatabase::eqm_species_radius

all quantities have an ionic radius (Angstrom) for computing activity (mineral radius = 0, gas radius = 0, surface species radius = 0)

Definition at line 208 of file PertinentGeochemicalSystem.h.

Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemistryActivityCoefficientsDebyeHuckel::buildActivityCoefficients(), PertinentGeochemicalSystem::createModel(), operator==(), and TEST().

◆ eqm_species_transported

std::vector<bool> ModelGeochemicalDatabase::eqm_species_transported

eqm_species_transported[i] = true iff the i^th eqm species is transported in reactive-transport sims

Definition at line 202 of file PertinentGeochemicalSystem.h.

Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemicalSystem::computeTransportedBulkFromMolalities(), PertinentGeochemicalSystem::createModel(), operator==(), and TEST().

◆ eqm_stoichiometry

DenseMatrix<Real> ModelGeochemicalDatabase::eqm_stoichiometry

◆ gas_chi

std::unordered_map<std::string, std::vector<Real> > ModelGeochemicalDatabase::gas_chi

Holds info on gas fugacity "chi" parameters.

Note this is slow compared with storing info in a DenseMatrix, but it also saves memory over storing a lot of "zeroes" for non-gas species. I believe the slowness will not present a problem because fugacity parameters are typically only queried at the start of the simulation, or at most once per timestep. If the lookup becomes burdensome, change from unordered_map to DenseMatrix

Definition at line 294 of file PertinentGeochemicalSystem.h.

Referenced by PertinentGeochemicalSystem::createModel(), and operator==().

◆ have_swapped_into_basis

std::vector<unsigned> ModelGeochemicalDatabase::have_swapped_into_basis

Species that have been swapped into the basis.

Every time a swap is performed on the ModelGeochemicalDatabase, the equilibrium-index of the species added to the basis is appended to this list

Definition at line 351 of file PertinentGeochemicalSystem.h.

Referenced by GeochemistrySpeciesSwapper::alterMGD(), operator==(), GeochemistryConsoleOutput::outputNernstInfo(), and TEST().

◆ have_swapped_out_of_basis

std::vector<unsigned> ModelGeochemicalDatabase::have_swapped_out_of_basis

Species that have been swapped out of the basis.

Every time a swap is performed on the ModelGeochemicalDatabase, the basis-index of the species removed from the basis is appended to this list

Definition at line 344 of file PertinentGeochemicalSystem.h.

Referenced by GeochemistrySpeciesSwapper::alterMGD(), operator==(), GeochemistryConsoleOutput::outputNernstInfo(), and TEST().

◆ kin_log10K

DenseMatrix<Real> ModelGeochemicalDatabase::kin_log10K

kin_log10K(i, j) = log10(equilibrium constant for the i^th kinetic species at the j^th temperature point

Definition at line 324 of file PertinentGeochemicalSystem.h.

Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemicalSystem::buildTemperatureDependentQuantities(), PertinentGeochemicalSystem::createModel(), operator==(), and TEST().

◆ kin_rate

std::vector<KineticRateDefinition> ModelGeochemicalDatabase::kin_rate

rates given to kinetic species.

See the method addKineticRate for a detailed description. This quantity is organised in such a way that a solver can loop through kin_rate, calculting the rates and applying them to the kin_rate[i].kinetic_species_index species

Definition at line 337 of file PertinentGeochemicalSystem.h.

Referenced by PertinentGeochemicalSystem::addKineticRate(), GeochemicalSystem::addKineticRates(), GeochemistrySpeciesSwapper::alterMGD(), operator==(), and TEST().

◆ kin_species_charge

std::vector<Real> ModelGeochemicalDatabase::kin_species_charge

◆ kin_species_index

std::unordered_map<std::string, unsigned> ModelGeochemicalDatabase::kin_species_index

◆ kin_species_mineral

std::vector<bool> ModelGeochemicalDatabase::kin_species_mineral

◆ kin_species_molecular_volume

std::vector<Real> ModelGeochemicalDatabase::kin_species_molecular_volume

all quantities have a molecular volume (cm^3/mol) (only nonzero for minerals, however)

Definition at line 318 of file PertinentGeochemicalSystem.h.

Referenced by GeochemistryQuantityAux::computeValue(), PertinentGeochemicalSystem::createModel(), GeochemistryUnitConverter::fromMoles(), operator==(), GeochemistryConsoleOutput::output(), and TEST().

◆ kin_species_molecular_weight

std::vector<Real> ModelGeochemicalDatabase::kin_species_molecular_weight

◆ kin_species_name

std::vector<std::string> ModelGeochemicalDatabase::kin_species_name

◆ kin_species_transported

std::vector<bool> ModelGeochemicalDatabase::kin_species_transported

kin_species_transported[j] = true iff the j^th kinetic species is transported in reactive-transport sims

Definition at line 309 of file PertinentGeochemicalSystem.h.

Referenced by PertinentGeochemicalSystem::createModel(), operator==(), and TEST().

◆ kin_stoichiometry

DenseMatrix<Real> ModelGeochemicalDatabase::kin_stoichiometry

◆ original_database

const GeochemicalDatabaseReader* ModelGeochemicalDatabase::original_database

◆ redox_lhs

std::string ModelGeochemicalDatabase::redox_lhs

the name of the species on the left-hand side of the redox equations.

Upon creation of the model this is e-, but it may change due to swaps

Definition at line 257 of file PertinentGeochemicalSystem.h.

Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemicalSystem::checkAndInitialize(), PertinentGeochemicalSystem::createModel(), operator==(), GeochemistryConsoleOutput::outputNernstInfo(), and TEST().

◆ redox_log10K

DenseMatrix<Real> ModelGeochemicalDatabase::redox_log10K

redox_log10K(i, j) = log10(equilibrium constant) for i^th redox species at the j^th temperature point

Definition at line 278 of file PertinentGeochemicalSystem.h.

Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemicalSystem::buildTemperatureDependentQuantities(), PertinentGeochemicalSystem::createModel(), operator==(), and TEST().

◆ redox_stoichiometry

DenseMatrix<Real> ModelGeochemicalDatabase::redox_stoichiometry

redox_stoichiometry(i, j) = stoichiometric coefficients for i^th redox species that is in disequilibrium in terms of the j basis species.

These equations are all written with their left-hand sides being e-. For instance, the database contains the reactions Fe+++ = -0.5H20 + Fe++ + H+ + 0.25*O2(aq) e- = 0.5H2O - 0.25O2(aq)- H+ The first is a redox reaction, and assume the user has specified it is in disquilibrium (by specifying it is in the basis). If Fe++, H+ and O2(aq) are also in the basis then the two equations yield the single redox equation e- = -Fe+++ + Fe++ Then redox_stoichiometry will be -1 for j = Fe+++, and +1 for j = Fe++.

Definition at line 272 of file PertinentGeochemicalSystem.h.

Referenced by GeochemistrySpeciesSwapper::alterMGD(), PertinentGeochemicalSystem::createModel(), GeochemicalSystem::log10RedoxActivityProduct(), operator==(), GeochemistryConsoleOutput::output(), GeochemistryConsoleOutput::outputNernstInfo(), and TEST().

◆ surface_complexation_info

std::unordered_map<std::string, SurfaceComplexationInfo> ModelGeochemicalDatabase::surface_complexation_info

Holds info on surface complexation, if any, in the model.

Note this is slow compared with storing information in a std::vector or DenseMatrix, but it also saves memory over storing a lot of "zeroes" for all species not involved in surface complexation

Definition at line 285 of file PertinentGeochemicalSystem.h.

Referenced by PertinentGeochemicalSystem::createModel(), operator==(), GeochemistryConsoleOutput::output(), and GeochemicalSystem::setMineralRelatedFreeMoles().

◆ surface_sorption_area

std::vector<Real> ModelGeochemicalDatabase::surface_sorption_area

surface_sorption_area[k] = specific surface area [m^2/g] for the k^th mineral involved in surface sorption.

Each mineral involved in surface sorption must have a surface_sorption_area prescribed it (in the database) and will be associated with a unique surface potential.

Definition at line 239 of file PertinentGeochemicalSystem.h.

Referenced by GeochemicalSystem::computeSorbingSurfaceArea(), PertinentGeochemicalSystem::createModel(), and operator==().

◆ surface_sorption_name

std::vector<std::string> ModelGeochemicalDatabase::surface_sorption_name

◆ surface_sorption_number

std::vector<unsigned> ModelGeochemicalDatabase::surface_sorption_number

surface_sorption_number[j] = the index of the surface potential that should be used to modify the equilibrium constant for the j^th equilibrium species.

surface_sorption_number is only meaningful if surface_sorption_related[j] = true. 0 <= surface_sorption_number[:] < surface_sorption_name.size() = number of minerals involved in surface sorption = number of surface potentials in the simulation = surface_sorption_area.size().

Definition at line 251 of file PertinentGeochemicalSystem.h.

Referenced by GeochemicalSystem::computeJacobian(), PertinentGeochemicalSystem::createModel(), GeochemicalSystem::getResidualComponent(), operator==(), GeochemicalSystem::surfaceSorptionModifier(), and TEST().

◆ surface_sorption_related

std::vector<bool> ModelGeochemicalDatabase::surface_sorption_related

◆ swap_to_original_basis

DenseMatrix<Real> ModelGeochemicalDatabase::swap_to_original_basis

Swap matrix that allows expression in terms of the original basis.

When a swap is performed bulk_new = S^-1^T * bulk_old, where S is the swap matrix (and S^-1^T is the transposed inverse of S) Hence, upon multiple swaps (S_1 followed by S_2 followed by S_3, etc) bulk_new = S_n^-1^T * S_{n-1}^-1^T * ... * S_1^-1^T * bulk_original So bulk_original = (S_n * S_{n-1} * ... * S_1)^T * bulk_new swap_to_original_basis = S_n * S_{n-1} * ... * S_1 swap_to_original_basis is initialized to DenseMatrix<Real>(), ie, a zero-sized matrix, to reduce memory usage. The first time a swap is performed, it is set to the swap matrix generated in the GeochemistrySpeciesSwapper, and every time a swap is performed on the ModelGeochemicalDatabase this is updated

Definition at line 367 of file PertinentGeochemicalSystem.h.

Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemicalSystem::getBulkOldInOriginalBasis(), GeochemicalSystem::getTransportedBulkInOriginalBasis(), operator==(), and TEST().


The documentation for this struct was generated from the following file: