OGS
PhreeqcIO.h File Reference

Detailed Description

PHREEQC-backed ChemicalSolverInterface implementation.

PhreeqcIO is the concrete coupling layer between OpenGeoSys and PHREEQC. For each chemical_system_id (one reactive control volume / local chemical system), it:

  • prepares PHREEQC input blocks (SOLUTION, EQUILIBRIUM_PHASES, KINETICS, EXCHANGE, SURFACE, etc.) from the transported component totals \(c_{T\alpha}\), the porous-medium state (porosity, mineral fractions, reactive surface area), and the process variables (e.g. temperature, pressure);
  • calls PHREEQC through the IPhreeqc API, advancing each chemical_system_id as a closed, well-mixed batch reactor over the current timestep \(\Delta t\) (i.e. no mass exchange between different chemical_system_id inside PHREEQC during that solve);
  • reads PHREEQC output (updated totals \(c_{T\alpha}\), pH, pe/redox, mineral amounts, etc.) and writes these reacted values back into OpenGeoSys;
  • updates porosity and solid volume fractions to reflect precipitation and dissolution, so that flow / transport / mechanics in the next timestep see the chemically modified medium.

Temperature and pressure: The interface allows passing temperature \(T\) [K] and pressure \(p\) [Pa] for each chemical_system_id via setChemicalSystemConcrete().

Definition in file PhreeqcIO.h.

#include <memory>
#include "ChemicalSolverInterface.h"
#include "PhreeqcIOData/Knobs.h"
Include dependency graph for PhreeqcIO.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ChemistryLib::PhreeqcIOData::PhreeqcIO
 Drives the chemistry step in the operator-split reactive transport loop. More...

Namespaces

namespace  MeshLib
namespace  ChemistryLib
namespace  ChemistryLib::PhreeqcIOData