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. | |
| bool | operator== (const ModelGeochemicalDatabase &rhs) const |
Public Attributes | |
| const GeochemicalDatabaseReader * | original_database |
| a pointer to the original database used to build this ModelGeochemicalDatabase | |
| 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 | |
| std::vector< std::string > | basis_species_name |
| basis_species_name[j] = name of the j^th basis species | |
| std::vector< bool > | basis_species_mineral |
| basis_species_mineral[j] = true iff the j^th basis species is a mineral | |
| 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_transported |
| basis_species_transported[j] = true iff the j^th basis species is transported in reactive-transport sims | |
| std::vector< Real > | basis_species_charge |
| all quantities have a charge (mineral charge = 0, gas charge = 0, oxide charge = 0) | |
| std::vector< Real > | basis_species_radius |
| all quantities have an ionic radius (Angstrom) for computing activity (mineral radius = 0, gas radius = 0, surface species radius = 0) | |
| std::vector< Real > | basis_species_molecular_weight |
| all quantities have a molecular weight (g) | |
| 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, 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 | |
| std::vector< std::string > | eqm_species_name |
| eqm_species_name[i] = name of the i^th eqm species | |
| std::vector< bool > | eqm_species_mineral |
| eqm_species_mineral[i] = true iff the i^th equilibrium species is a mineral | |
| std::vector< bool > | eqm_species_gas |
| eqm_species_gas[i] = true iff the i^th equilibrium species is a gas | |
| 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_charge |
| all quantities have a charge (mineral charge = 0, gas charge = 0, oxide charge = 0) | |
| std::vector< Real > | eqm_species_radius |
| all quantities have an ionic radius (Angstrom) for computing activity (mineral radius = 0, gas radius = 0, surface species radius = 0) | |
| std::vector< Real > | eqm_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) | |
| DenseMatrix< Real > | eqm_stoichiometry |
| eqm_stoichiometry(i, j) = stoichiometric coefficient for equilibrium species "i" in terms of the basis species "j" | |
| DenseMatrix< Real > | eqm_log10K |
| eqm_log10K(i, j) = log10(equilibrium constant) for i^th equilibrium species at the j^th temperature point | |
| std::vector< std::string > | surface_sorption_name |
| surface_sorption_name[k] = name of the mineral 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 sorption. | |
| std::vector< bool > | surface_sorption_related |
| surface_sorption_related[j] = true iff the j^th equilibrium species is involved in surface sorption | |
| 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. | |
| std::string | redox_lhs |
| the name of the species on the left-hand side of the redox equations. | |
| DenseMatrix< Real > | redox_stoichiometry |
| redox_stoichiometry(i, j) = stoichiometric coefficients for i^th redox species that is in disequilibrium in terms of the j basis species. | |
| DenseMatrix< Real > | redox_log10K |
| redox_log10K(i, j) = log10(equilibrium constant) for i^th redox species at the j^th temperature point | |
| std::unordered_map< std::string, SurfaceComplexationInfo > | surface_complexation_info |
| Holds info on surface complexation, if any, in the model. | |
| std::unordered_map< std::string, std::vector< Real > > | gas_chi |
| Holds info on gas fugacity "chi" parameters. | |
| 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 | |
| std::vector< std::string > | kin_species_name |
| kin_species_name[j] = name of the j^th kinetic species | |
| std::vector< bool > | kin_species_mineral |
| kin_species_mineral[j] = true iff the j^th kinetic species is a mineral | |
| std::vector< bool > | kin_species_transported |
| kin_species_transported[j] = true iff the j^th kinetic species is transported in reactive-transport sims | |
| std::vector< Real > | kin_species_charge |
| all kinetic quantities have a charge (mineral charge = 0) | |
| 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) | |
| DenseMatrix< Real > | kin_log10K |
| kin_log10K(i, j) = log10(equilibrium constant for the i^th kinetic species at the j^th temperature point | |
| DenseMatrix< Real > | kin_stoichiometry |
| kin_stoichiometry(i, j) = stoichiometric coefficient for kinetic species "i" in terms of the basis species "j" | |
| std::vector< KineticRateDefinition > | kin_rate |
| rates given to kinetic species. | |
| std::vector< unsigned > | have_swapped_out_of_basis |
| Species that have been swapped out of the basis. | |
| std::vector< unsigned > | have_swapped_into_basis |
| Species that have been swapped into the basis. | |
| DenseMatrix< Real > | swap_to_original_basis |
| Swap matrix that allows expression in terms of the original basis. | |
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 101 of file PertinentGeochemicalSystem.h.
|
inline |
Constructor sets original_database.
Also initializes swap_to_original_basis to "nothing" in an attempt to reduce memory consumption
Definition at line 107 of file PertinentGeochemicalSystem.h.
|
inline |
Definition at line 112 of file PertinentGeochemicalSystem.h.
| std::vector<Real> ModelGeochemicalDatabase::basis_species_charge |
all quantities have a charge (mineral charge = 0, gas charge = 0, oxide charge = 0)
Definition at line 177 of file PertinentGeochemicalSystem.h.
Referenced by GeochemicalSystem::alterChargeBalanceSpecies(), GeochemistrySpeciesSwapper::alterMGD(), GeochemistryActivityCoefficientsDebyeHuckel::buildActivityCoefficients(), GeochemicalSystem::checkAndInitialize(), GeochemicalSystem::computeJacobian(), PertinentGeochemicalSystem::createModel(), GeochemicalSystem::enforceChargeBalance(), GeochemicalSystem::enforceChargeBalanceIfSimple(), GeochemicalSystem::getResidualComponent(), GeochemicalSystem::getTotalChargeOld(), GeochemistryIonicStrength::ionicStrength(), operator==(), GeochemistryIonicStrength::stoichiometricIonicStrength(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
| std::vector<bool> ModelGeochemicalDatabase::basis_species_gas |
basis_species_gas[j] = true iff the j^th basis species is a gas
Definition at line 171 of file PertinentGeochemicalSystem.h.
Referenced by GeochemicalSystem::addKineticRates(), GeochemistrySpeciesSwapper::alterMGD(), GeochemistryActivityCoefficientsDebyeHuckel::buildActivityCoefficients(), GeochemicalSystem::buildAlgebraicInfo(), GeochemicalSystem::changeConstraintToBulk(), GeochemicalSystem::changeConstraintToBulk(), GeochemicalSystem::checkAndInitialize(), PertinentGeochemicalSystem::createModel(), operator==(), GeochemistryConsoleOutput::output(), GeochemicalSystem::performSwap(), GeochemicalSystem::performSwapNoCheck(), GeochemicalSystem::setSolventMassAndFreeMolalityAndMineralMolesAndSurfacePotsAndKineticMoles(), GeochemicalSolver::swapNeeded(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and GeochemicalSystem::updateBasisMolalityForKnownActivity().
| 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 162 of file PertinentGeochemicalSystem.h.
Referenced by PertinentGeochemicalSystem::addKineticRate(), GeochemistrySpeciesSwapper::alterMGD(), GeochemicalSystem::buildAlgebraicInfo(), PertinentGeochemicalSystem::buildRedoxeInfo(), GeochemicalSystem::checkAndInitialize(), GeochemistrySpeciesSwapper::checkSwap(), GeochemistrySpeciesSwapper::checkSwap(), GeochemicalSystem::computeSorbingSurfaceArea(), GeochemistryQuantityAux::computeValue(), GeochemistrySpeciesSwapper::constructInverseMatrix(), PertinentGeochemicalSystem::createModel(), GeochemistrySpatialReactor::execute(), GeochemistryTimeDependentReactor::execute(), GeochemistryUnitConverter::fromMoles(), GeochemistryQuantityAux::GeochemistryQuantityAux(), GeochemistrySpatialReactor::GeochemistrySpatialReactor(), GeochemistryTimeDependentReactor::GeochemistryTimeDependentReactor(), GeochemicalModelInterrogator::knownActivity(), operator==(), GeochemistryConsoleOutput::output(), GeochemicalModelInterrogator::outputActivity(), GeochemicalModelInterrogator::outputTemperature(), GeochemistrySpeciesSwapper::performSwap(), GeochemistrySpeciesSwapper::performSwap(), GeochemistrySpeciesSwapper::performSwap(), GeochemicalSystem::performSwapNoCheck(), GeochemicalSystem::revertToOriginalChargeBalanceSpecies(), GeochemistryActivityCoefficientsDebyeHuckel::setInternalParameters(), GeochemicalSystem::setMineralRelatedFreeMoles(), GeochemicalSystem::setSolventMassAndFreeMolalityAndMineralMolesAndSurfacePotsAndKineticMoles(), GeochemistryIonicStrength::stoichiometricIonicStrength(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
| std::vector<bool> ModelGeochemicalDatabase::basis_species_mineral |
basis_species_mineral[j] = true iff the j^th basis species is a mineral
Definition at line 168 of file PertinentGeochemicalSystem.h.
Referenced by AddGeochemistrySolverAction::act(), GeochemistrySpeciesSwapper::alterMGD(), GeochemistryActivityCoefficientsDebyeHuckel::buildActivityCoefficients(), GeochemicalSystem::buildAlgebraicInfo(), GeochemicalSystem::buildKnownBasisActivities(), GeochemicalSystem::checkAndInitialize(), GeochemicalSystem::computeBulkFromMolalities(), GeochemicalSystem::computeFreeMineralMoles(), GeochemicalSystem::computeTransportedBulkFromMolalities(), PertinentGeochemicalSystem::createModel(), GeochemistryUnitConverter::fromMoles(), GeochemistryQuantityAux::GeochemistryQuantityAux(), GeochemistryTimeDependentReactor::GeochemistryTimeDependentReactor(), GeochemicalModelInterrogator::knownActivity(), operator==(), GeochemistryConsoleOutput::output(), GeochemicalSystem::performSwapNoCheck(), GeochemistryTimeDependentReactor::postSolveFlowThrough(), GeochemistryTimeDependentReactor::preSolveDump(), GeochemistryTimeDependentReactor::preSolveFlush(), GeochemicalSystem::setMineralRelatedFreeMoles(), GeochemicalSystem::setSolventMassAndFreeMolalityAndMineralMolesAndSurfacePotsAndKineticMoles(), GeochemicalSolver::swapNeeded(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and GeochemicalSystem::updateBasisMolalityForKnownActivity().
| std::vector<Real> ModelGeochemicalDatabase::basis_species_molecular_volume |
all quantities have a molecular volume (cm^3) (only nonzero for minerals, however)
Definition at line 186 of file PertinentGeochemicalSystem.h.
Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemistryQuantityAux::computeValue(), PertinentGeochemicalSystem::createModel(), GeochemistryUnitConverter::fromMoles(), operator==(), TEST(), TEST(), TEST(), and TEST().
| std::vector<Real> ModelGeochemicalDatabase::basis_species_molecular_weight |
all quantities have a molecular weight (g)
Definition at line 183 of file PertinentGeochemicalSystem.h.
Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemicalSystem::computeSorbingSurfaceArea(), GeochemistryQuantityAux::computeValue(), PertinentGeochemicalSystem::createModel(), GeochemistryUnitConverter::fromMoles(), GeochemistryTimeDependentReactor::newTemperature(), operator==(), GeochemistryConsoleOutput::output(), GeochemistryTimeDependentReactor::preSolveFlush(), TEST(), TEST(), TEST(), and TEST().
| std::vector<std::string> ModelGeochemicalDatabase::basis_species_name |
basis_species_name[j] = name of the j^th basis species
Definition at line 165 of file PertinentGeochemicalSystem.h.
Referenced by AddGeochemistrySolverAction::act(), PertinentGeochemicalSystem::addKineticRate(), GeochemicalSystem::addKineticRates(), GeochemistrySpeciesSwapper::alterMGD(), GeochemicalSystem::changeConstraintToBulk(), GeochemicalSystem::checkAndInitialize(), PertinentGeochemicalSystem::createModel(), GeochemistrySpeciesSwapper::findBestEqmSwap(), GeochemistryTimeDependentReactor::GeochemistryTimeDependentReactor(), operator==(), GeochemistryConsoleOutput::output(), GeochemicalModelInterrogator::outputActivity(), GeochemistryConsoleOutput::outputNernstInfo(), GeochemicalModelInterrogator::outputReaction(), GeochemicalModelInterrogator::outputTemperature(), GeochemistryTimeDependentReactor::postSolveFlowThrough(), GeochemistryTimeDependentReactor::preSolveDump(), GeochemicalSystem::setChargeBalanceSpecies(), GeochemicalSolver::solveSystem(), GeochemicalSolver::swapNeeded(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), and TEST_F().
| 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 180 of file PertinentGeochemicalSystem.h.
Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemistryActivityCoefficientsDebyeHuckel::buildActivityCoefficients(), PertinentGeochemicalSystem::createModel(), operator==(), TEST(), TEST(), TEST(), TEST(), and TEST().
| 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 174 of file PertinentGeochemicalSystem.h.
Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemicalSystem::computeTransportedBulkFromMolalities(), PertinentGeochemicalSystem::createModel(), operator==(), TEST(), TEST(), TEST(), and TEST().
| DenseMatrix<Real> ModelGeochemicalDatabase::eqm_log10K |
eqm_log10K(i, j) = log10(equilibrium constant) for i^th equilibrium species at the j^th temperature point
Definition at line 230 of file PertinentGeochemicalSystem.h.
Referenced by GeochemistrySpeciesSwapper::alterMGD(), PertinentGeochemicalSystem::buildRedoxeInfo(), GeochemicalSystem::buildTemperatureDependentQuantities(), PertinentGeochemicalSystem::createModel(), operator==(), GeochemicalModelInterrogator::outputActivity(), GeochemicalModelInterrogator::outputReaction(), GeochemicalModelInterrogator::outputTemperature(), TEST(), TEST(), TEST(), and TEST().
| std::vector<Real> ModelGeochemicalDatabase::eqm_species_charge |
all quantities have a charge (mineral charge = 0, gas charge = 0, oxide charge = 0)
Definition at line 209 of file PertinentGeochemicalSystem.h.
Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemistryActivityCoefficientsDebyeHuckel::buildActivityCoefficients(), GeochemicalSystem::computeJacobian(), PertinentGeochemicalSystem::createModel(), GeochemicalSystem::getResidualComponent(), GeochemistryIonicStrength::ionicStrength(), operator==(), GeochemistryIonicStrength::stoichiometricIonicStrength(), GeochemicalSystem::surfaceSorptionModifier(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
| std::vector<bool> ModelGeochemicalDatabase::eqm_species_gas |
eqm_species_gas[i] = true iff the i^th equilibrium species is a gas
Definition at line 203 of file PertinentGeochemicalSystem.h.
Referenced by GeochemicalSystem::addKineticRates(), GeochemistrySpeciesSwapper::alterMGD(), GeochemistryActivityCoefficientsDebyeHuckel::buildActivityCoefficients(), GeochemicalSystem::changeConstraintToBulk(), GeochemicalSystem::computeEqmMolalities(), PertinentGeochemicalSystem::createModel(), GeochemistrySpeciesSwapper::findBestEqmSwap(), GeochemicalSystem::getEquilibriumActivity(), operator==(), GeochemistryConsoleOutput::output(), GeochemicalSystem::performSwap(), GeochemicalSystem::setSolventMassAndFreeMolalityAndMineralMolesAndSurfacePotsAndKineticMoles(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
| 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 194 of file PertinentGeochemicalSystem.h.
Referenced by PertinentGeochemicalSystem::addKineticRate(), GeochemistrySpeciesSwapper::alterMGD(), PertinentGeochemicalSystem::buildRedoxeInfo(), GeochemistrySpeciesSwapper::checkSwap(), GeochemistrySpeciesSwapper::checkSwap(), GeochemistryQuantityAux::computeValue(), PertinentGeochemicalSystem::createModel(), GeochemicalModelInterrogator::eqmSpeciesOfInterest(), GeochemistrySpatialReactor::execute(), GeochemistryTimeDependentReactor::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(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
| std::vector<bool> ModelGeochemicalDatabase::eqm_species_mineral |
eqm_species_mineral[i] = true iff the i^th equilibrium species is a mineral
Definition at line 200 of file PertinentGeochemicalSystem.h.
Referenced by AddGeochemistrySolverAction::act(), GeochemistrySpeciesSwapper::alterMGD(), GeochemistryActivityCoefficientsDebyeHuckel::buildActivityCoefficients(), GeochemicalSystem::computeEqmMolalities(), PertinentGeochemicalSystem::createModel(), GeochemistrySpeciesSwapper::findBestEqmSwap(), GeochemistryUnitConverter::fromMoles(), GeochemistryQuantityAux::GeochemistryQuantityAux(), GeochemistryTimeDependentReactor::GeochemistryTimeDependentReactor(), GeochemicalSystem::getEquilibriumActivity(), GeochemicalSystem::getSaturationIndices(), GeochemicalModelInterrogator::knownActivity(), operator==(), GeochemistryConsoleOutput::output(), GeochemicalSystem::setMineralRelatedFreeMoles(), GeochemicalSystem::setSolventMassAndFreeMolalityAndMineralMolesAndSurfacePotsAndKineticMoles(), GeochemicalSolver::swapNeeded(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST_F().
| std::vector<Real> ModelGeochemicalDatabase::eqm_species_molecular_volume |
all quantities have a molecular volume (cm^3) (only nonzero for minerals, however)
Definition at line 218 of file PertinentGeochemicalSystem.h.
Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemistryQuantityAux::computeValue(), PertinentGeochemicalSystem::createModel(), GeochemistryUnitConverter::fromMoles(), operator==(), TEST(), TEST(), TEST(), and TEST().
| std::vector<Real> ModelGeochemicalDatabase::eqm_species_molecular_weight |
all quantities have a molecular weight (g)
Definition at line 215 of file PertinentGeochemicalSystem.h.
Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemistryQuantityAux::computeValue(), PertinentGeochemicalSystem::createModel(), GeochemistryUnitConverter::fromMoles(), operator==(), GeochemistryConsoleOutput::output(), TEST(), TEST(), TEST(), and TEST().
| std::vector<std::string> ModelGeochemicalDatabase::eqm_species_name |
eqm_species_name[i] = name of the i^th eqm species
Definition at line 197 of file PertinentGeochemicalSystem.h.
Referenced by AddGeochemistrySolverAction::act(), PertinentGeochemicalSystem::addKineticRate(), GeochemicalSystem::addKineticRates(), GeochemistrySpeciesSwapper::alterMGD(), GeochemistrySpeciesSwapper::checkSwap(), PertinentGeochemicalSystem::createModel(), GeochemicalModelInterrogator::eqmSpeciesOfInterest(), GeochemistrySpeciesSwapper::findBestEqmSwap(), GeochemistryTimeDependentReactor::GeochemistryTimeDependentReactor(), operator==(), GeochemistryConsoleOutput::output(), GeochemistryConsoleOutput::outputNernstInfo(), GeochemicalSystem::performSwap(), GeochemicalSolver::swapNeeded(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST_F().
| 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 212 of file PertinentGeochemicalSystem.h.
Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemistryActivityCoefficientsDebyeHuckel::buildActivityCoefficients(), PertinentGeochemicalSystem::createModel(), operator==(), TEST(), TEST(), TEST(), TEST(), and TEST().
| 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 206 of file PertinentGeochemicalSystem.h.
Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemicalSystem::computeTransportedBulkFromMolalities(), PertinentGeochemicalSystem::createModel(), operator==(), TEST(), TEST(), TEST(), and TEST().
| DenseMatrix<Real> ModelGeochemicalDatabase::eqm_stoichiometry |
eqm_stoichiometry(i, j) = stoichiometric coefficient for equilibrium species "i" in terms of the basis species "j"
Definition at line 224 of file PertinentGeochemicalSystem.h.
Referenced by GeochemicalSystem::addKineticRates(), GeochemistrySpeciesSwapper::alterMGD(), PertinentGeochemicalSystem::buildRedoxeInfo(), GeochemicalSystem::changeConstraintToBulk(), GeochemicalSystem::computeBulkFromMolalities(), GeochemicalSystem::computeFreeMineralMoles(), GeochemicalSystem::computeJacobian(), GeochemicalSystem::computeTransportedBulkFromMolalities(), GeochemistrySpeciesSwapper::constructInverseMatrix(), PertinentGeochemicalSystem::createModel(), GeochemistrySpatialReactor::execute(), GeochemistryTimeDependentReactor::execute(), GeochemistrySpeciesSwapper::findBestEqmSwap(), GeochemicalSystem::getEquilibriumActivity(), GeochemicalSystem::getResidualComponent(), GeochemicalSystem::log10ActivityProduct(), operator==(), GeochemistryConsoleOutput::output(), GeochemicalModelInterrogator::outputActivity(), GeochemicalModelInterrogator::outputReaction(), GeochemicalModelInterrogator::outputTemperature(), GeochemistryIonicStrength::stoichiometricIonicStrength(), GeochemicalSolver::swapNeeded(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), and TEST_F().
| 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 298 of file PertinentGeochemicalSystem.h.
Referenced by PertinentGeochemicalSystem::createModel(), and operator==().
| 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 355 of file PertinentGeochemicalSystem.h.
Referenced by GeochemistrySpeciesSwapper::alterMGD(), operator==(), GeochemistryConsoleOutput::outputNernstInfo(), TEST(), TEST(), TEST(), and TEST().
| 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 348 of file PertinentGeochemicalSystem.h.
Referenced by GeochemistrySpeciesSwapper::alterMGD(), operator==(), GeochemistryConsoleOutput::outputNernstInfo(), TEST(), TEST(), TEST(), and TEST().
| 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 328 of file PertinentGeochemicalSystem.h.
Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemicalSystem::buildTemperatureDependentQuantities(), PertinentGeochemicalSystem::createModel(), operator==(), TEST(), and TEST().
| 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 341 of file PertinentGeochemicalSystem.h.
Referenced by PertinentGeochemicalSystem::addKineticRate(), GeochemicalSystem::addKineticRates(), GeochemistrySpeciesSwapper::alterMGD(), operator==(), TEST(), and TEST().
| std::vector<Real> ModelGeochemicalDatabase::kin_species_charge |
all kinetic quantities have a charge (mineral charge = 0)
Definition at line 316 of file PertinentGeochemicalSystem.h.
Referenced by PertinentGeochemicalSystem::createModel(), GeochemistryIonicStrength::ionicStrength(), operator==(), GeochemistryIonicStrength::stoichiometricIonicStrength(), TEST(), and TEST().
| std::unordered_map<std::string, unsigned> ModelGeochemicalDatabase::kin_species_index |
kin_species_index[name] = index of the kinetic species, within all ModelGeochemicalDatabase internal datastrcutres, with given name
Definition at line 304 of file PertinentGeochemicalSystem.h.
Referenced by PertinentGeochemicalSystem::addKineticRate(), GeochemicalSystem::checkAndInitialize(), GeochemistryQuantityAux::computeValue(), PertinentGeochemicalSystem::createModel(), GeochemistrySpatialReactor::execute(), GeochemistryTimeDependentReactor::execute(), GeochemistryUnitConverter::fromMoles(), GeochemistryQuantityAux::GeochemistryQuantityAux(), GeochemistrySpatialReactor::GeochemistrySpatialReactor(), GeochemistryTimeDependentReactor::GeochemistryTimeDependentReactor(), operator==(), GeochemicalSystem::setSolventMassAndFreeMolalityAndMineralMolesAndSurfacePotsAndKineticMoles(), GeochemistryIonicStrength::stoichiometricIonicStrength(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), and TEST_F().
| std::vector<bool> ModelGeochemicalDatabase::kin_species_mineral |
kin_species_mineral[j] = true iff the j^th kinetic species is a mineral
Definition at line 310 of file PertinentGeochemicalSystem.h.
Referenced by AddGeochemistrySolverAction::act(), PertinentGeochemicalSystem::createModel(), GeochemistryUnitConverter::fromMoles(), GeochemistryQuantityAux::GeochemistryQuantityAux(), GeochemistryTimeDependentReactor::GeochemistryTimeDependentReactor(), operator==(), GeochemistryConsoleOutput::output(), GeochemistryTimeDependentReactor::postSolveFlowThrough(), GeochemistryTimeDependentReactor::preSolveFlush(), GeochemicalSystem::setMineralRelatedFreeMoles(), and TEST().
| 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 322 of file PertinentGeochemicalSystem.h.
Referenced by GeochemistryQuantityAux::computeValue(), PertinentGeochemicalSystem::createModel(), GeochemistryUnitConverter::fromMoles(), operator==(), GeochemistryConsoleOutput::output(), TEST(), and TEST().
| std::vector<Real> ModelGeochemicalDatabase::kin_species_molecular_weight |
all quantities have a molecular weight (g/mol)
Definition at line 319 of file PertinentGeochemicalSystem.h.
Referenced by GeochemicalSystem::addKineticRates(), GeochemistryQuantityAux::computeValue(), PertinentGeochemicalSystem::createModel(), GeochemistryUnitConverter::fromMoles(), GeochemistryTimeDependentReactor::newTemperature(), operator==(), GeochemistryConsoleOutput::output(), GeochemistryTimeDependentReactor::preSolveFlush(), TEST(), and TEST().
| std::vector<std::string> ModelGeochemicalDatabase::kin_species_name |
kin_species_name[j] = name of the j^th kinetic species
Definition at line 307 of file PertinentGeochemicalSystem.h.
Referenced by AddGeochemistrySolverAction::act(), GeochemicalSystem::checkAndInitialize(), PertinentGeochemicalSystem::createModel(), GeochemistryTimeDependentReactor::GeochemistryTimeDependentReactor(), operator==(), GeochemistryConsoleOutput::output(), GeochemistryTimeDependentReactor::postSolveFlowThrough(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
| 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 313 of file PertinentGeochemicalSystem.h.
Referenced by PertinentGeochemicalSystem::createModel(), operator==(), and TEST().
| DenseMatrix<Real> ModelGeochemicalDatabase::kin_stoichiometry |
kin_stoichiometry(i, j) = stoichiometric coefficient for kinetic species "i" in terms of the basis species "j"
Definition at line 334 of file PertinentGeochemicalSystem.h.
Referenced by GeochemicalSystem::addKineticRates(), GeochemistrySpeciesSwapper::alterMGD(), GeochemicalSystem::checkAndInitialize(), GeochemicalSystem::computeBulkFromMolalities(), GeochemicalSystem::computeFreeMineralMoles(), GeochemicalSystem::computeJacobian(), PertinentGeochemicalSystem::createModel(), GeochemicalSystem::getResidualComponent(), GeochemicalSystem::log10KineticActivityProduct(), operator==(), GeochemistryConsoleOutput::output(), GeochemistryTimeDependentReactor::postSolveFlowThrough(), GeochemistryTimeDependentReactor::preSolveFlush(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
| const GeochemicalDatabaseReader* ModelGeochemicalDatabase::original_database |
a pointer to the original database used to build this ModelGeochemicalDatabase
Definition at line 156 of file PertinentGeochemicalSystem.h.
Referenced by GeochemicalSystem::buildTemperatureDependentQuantities(), operator==(), GeochemicalModelInterrogator::outputActivity(), GeochemicalModelInterrogator::outputReaction(), GeochemicalModelInterrogator::outputTemperature(), GeochemicalModelInterrogator::solveForT(), and TEST().
| 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 261 of file PertinentGeochemicalSystem.h.
Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemicalSystem::checkAndInitialize(), PertinentGeochemicalSystem::createModel(), operator==(), GeochemistryConsoleOutput::outputNernstInfo(), and TEST().
| 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 282 of file PertinentGeochemicalSystem.h.
Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemicalSystem::buildTemperatureDependentQuantities(), PertinentGeochemicalSystem::createModel(), operator==(), and TEST().
| 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 276 of file PertinentGeochemicalSystem.h.
Referenced by GeochemistrySpeciesSwapper::alterMGD(), PertinentGeochemicalSystem::createModel(), GeochemicalSystem::log10RedoxActivityProduct(), operator==(), GeochemistryConsoleOutput::output(), GeochemistryConsoleOutput::outputNernstInfo(), and TEST().
| 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 289 of file PertinentGeochemicalSystem.h.
Referenced by PertinentGeochemicalSystem::createModel(), operator==(), GeochemistryConsoleOutput::output(), and GeochemicalSystem::setMineralRelatedFreeMoles().
| 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 243 of file PertinentGeochemicalSystem.h.
Referenced by GeochemicalSystem::computeSorbingSurfaceArea(), PertinentGeochemicalSystem::createModel(), and operator==().
| std::vector<std::string> ModelGeochemicalDatabase::surface_sorption_name |
surface_sorption_name[k] = name of the mineral involved in surface sorption.
Each of these will be associated with a unique surface potential.
Definition at line 236 of file PertinentGeochemicalSystem.h.
Referenced by AddGeochemistrySolverAction::act(), GeochemicalSystem::computeSorbingSurfaceArea(), PertinentGeochemicalSystem::createModel(), GeochemistryQuantityAux::GeochemistryQuantityAux(), operator==(), GeochemistryConsoleOutput::output(), and GeochemicalSystem::setSolventMassAndFreeMolalityAndMineralMolesAndSurfacePotsAndKineticMoles().
| 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 255 of file PertinentGeochemicalSystem.h.
Referenced by GeochemicalSystem::computeJacobian(), PertinentGeochemicalSystem::createModel(), GeochemicalSystem::getResidualComponent(), operator==(), GeochemicalSystem::surfaceSorptionModifier(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
| std::vector<bool> ModelGeochemicalDatabase::surface_sorption_related |
surface_sorption_related[j] = true iff the j^th equilibrium species is involved in surface sorption
Definition at line 246 of file PertinentGeochemicalSystem.h.
Referenced by GeochemicalSystem::changeConstraintToBulk(), GeochemistrySpeciesSwapper::checkSwap(), GeochemicalSystem::computeJacobian(), PertinentGeochemicalSystem::createModel(), GeochemistrySpeciesSwapper::findBestEqmSwap(), GeochemicalSystem::getResidualComponent(), GeochemistryIonicStrength::ionicStrength(), operator==(), GeochemicalSystem::setMineralRelatedFreeMoles(), GeochemistryIonicStrength::stoichiometricIonicStrength(), GeochemicalSystem::surfaceSorptionModifier(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
| 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 371 of file PertinentGeochemicalSystem.h.
Referenced by GeochemistrySpeciesSwapper::alterMGD(), GeochemicalSystem::getBulkOldInOriginalBasis(), GeochemicalSystem::getTransportedBulkInOriginalBasis(), operator==(), TEST(), TEST(), TEST(), TEST(), and TEST().