![]() |
OGS
|
|
Definition at line 109 of file ChemicalSolverInterface.h.
#include <ChemicalSolverInterface.h>
Public Member Functions | |
| ChemicalSolverInterface (MeshLib::Mesh const &mesh, GlobalLinearSolver &linear_solver_) | |
| std::vector< std::size_t > const & | activeElementIDs () const |
| virtual void | initialize () |
| virtual void | initializeChemicalSystemConcrete (std::vector< double > const &, GlobalIndexType const &, MaterialPropertyLib::Medium const &, ParameterLib::SpatialPosition const &, double const) |
| virtual void | setChemicalSystemConcrete (std::vector< double > const &, GlobalIndexType const &, MaterialPropertyLib::Medium const *, MaterialPropertyLib::VariableArray const &, ParameterLib::SpatialPosition const &, double const, double const) |
| virtual void | setAqueousSolutionsPrevFromDumpFile () |
| virtual void | executeSpeciationCalculation (double const dt) |
| virtual double | getConcentration (int const, GlobalIndexType const) const |
| virtual std::vector< std::string > const | getComponentList () const |
| virtual Eigen::SparseMatrix< double > const * | getStoichiometricMatrix () const |
| virtual double | getKineticPrefactor (std::size_t reaction_id) const |
| virtual void | updateVolumeFractionPostReaction (GlobalIndexType const &, MaterialPropertyLib::Medium const &, ParameterLib::SpatialPosition const &, double const, double const, double const) |
| virtual void | updatePorosityPostReaction (GlobalIndexType const &, MaterialPropertyLib::Medium const &, double &) |
| virtual void | computeSecondaryVariable (std::size_t const, std::vector< GlobalIndexType > const &) |
| virtual | ~ChemicalSolverInterface ()=default |
Public Attributes | |
| std::vector< GlobalIndexType > | chemical_system_index_map |
| MeshLib::Mesh const & | _mesh |
| GlobalLinearSolver & | linear_solver |
Private Attributes | |
| std::vector< std::size_t > | active_element_ids_ |
|
inline |
Definition at line 112 of file ChemicalSolverInterface.h.
References _mesh, active_element_ids_, linear_solver, and OGS_FATAL.
Referenced by ChemistryLib::PhreeqcIOData::PhreeqcIO::PhreeqcIO(), ChemistryLib::PhreeqcKernelData::PhreeqcKernel::PhreeqcKernel(), and ChemistryLib::SelfContainedSolverData::SelfContainedSolver::SelfContainedSolver().
|
virtualdefault |
|
inline |
Definition at line 128 of file ChemicalSolverInterface.h.
References active_element_ids_.
|
inlinevirtual |
Reimplemented in ChemistryLib::PhreeqcIOData::PhreeqcIO.
Definition at line 236 of file ChemicalSolverInterface.h.
|
inlinevirtual |
Run PHREEQC for all local chemical systems for the current timestep.
Uses the state previously provided by initializeChemicalSystemConcrete() / setChemicalSystemConcrete() for each chemical_system_id. Each local system is advanced as an isolated batch reactor over \(\Delta t\): no mass is exchanged between different systems inside PHREEQC.
PHREEQC returns, for each system:
After this call completes, these reacted values are available for porosity update and for assembling the reaction/source term in the transport equation.
| dt | Timestep size \(\Delta t\) used for kinetic reactions. |
Reimplemented in ChemistryLib::PhreeqcIOData::PhreeqcIO, and ChemistryLib::PhreeqcKernelData::PhreeqcKernel.
Definition at line 175 of file ChemicalSolverInterface.h.
|
inlinevirtual |
Reimplemented in ChemistryLib::PhreeqcIOData::PhreeqcIO.
Definition at line 186 of file ChemicalSolverInterface.h.
|
inlinevirtual |
Reimplemented in ChemistryLib::PhreeqcIOData::PhreeqcIO.
Definition at line 179 of file ChemicalSolverInterface.h.
|
inlinevirtual |
Reimplemented in ChemistryLib::SelfContainedSolverData::SelfContainedSolver.
Definition at line 196 of file ChemicalSolverInterface.h.
|
inlinevirtual |
Reimplemented in ChemistryLib::SelfContainedSolverData::SelfContainedSolver.
Definition at line 191 of file ChemicalSolverInterface.h.
|
inlinevirtual |
Reimplemented in ChemistryLib::PhreeqcIOData::PhreeqcIO.
Definition at line 133 of file ChemicalSolverInterface.h.
|
inlinevirtual |
Reimplemented in ChemistryLib::PhreeqcIOData::PhreeqcIO.
Definition at line 135 of file ChemicalSolverInterface.h.
|
inlinevirtual |
Reimplemented in ChemistryLib::PhreeqcIOData::PhreeqcIO.
Definition at line 153 of file ChemicalSolverInterface.h.
|
inlinevirtual |
Reimplemented in ChemistryLib::PhreeqcIOData::PhreeqcIO.
Definition at line 143 of file ChemicalSolverInterface.h.
|
inlinevirtual |
Update porosity after chemical reactions.
This applies porosity changes caused by precipitation / dissolution in the local chemical system. The updated porosity can then be used to update flow parameters (e.g. permeability) in the next timestep.
Reimplemented in ChemistryLib::PhreeqcIOData::PhreeqcIO.
Definition at line 229 of file ChemicalSolverInterface.h.
|
inlinevirtual |
Apply mineral precipitation / dissolution to the solid fraction in OGS.
Called after executeSpeciationCalculation(). For a given chemical_system_id, this function updates the solid / mineral inventory and related volume fractions based on the PHREEQC results for the last timestep.
Typical effect:
Reimplemented in ChemistryLib::PhreeqcIOData::PhreeqcIO.
Definition at line 214 of file ChemicalSolverInterface.h.
| MeshLib::Mesh const& ChemistryLib::ChemicalSolverInterface::_mesh |
Definition at line 246 of file ChemicalSolverInterface.h.
Referenced by ChemicalSolverInterface().
|
private |
Definition at line 252 of file ChemicalSolverInterface.h.
Referenced by ChemicalSolverInterface(), and activeElementIDs().
| std::vector<GlobalIndexType> ChemistryLib::ChemicalSolverInterface::chemical_system_index_map |
Definition at line 245 of file ChemicalSolverInterface.h.
Referenced by ChemistryLib::PhreeqcIOData::PhreeqcIO::initialize().
| GlobalLinearSolver& ChemistryLib::ChemicalSolverInterface::linear_solver |
specify the linear solver used to solve the linearized reaction equation.
Definition at line 249 of file ChemicalSolverInterface.h.
Referenced by ChemicalSolverInterface(), ChemistryLib::PhreeqcIOData::PhreeqcIO::PhreeqcIO(), ChemistryLib::PhreeqcKernelData::PhreeqcKernel::PhreeqcKernel(), and ChemistryLib::SelfContainedSolverData::SelfContainedSolver::SelfContainedSolver().