OGS
ChemicalSystem.h File Reference

Detailed Description

Definition of one reactive chemical system for PHREEQC coupling.

OpenGeoSys treats each reactive control volume as an independent chemical system when calling PHREEQC. That local system includes not only the aqueous fluid, but also solid and sorbed phases associated with that volume (kinetic reactants, equilibrium minerals, ion exchangers, and surface complexation sites).

For each chemical_system_id, PHREEQC is provided with:

  • the aqueous state (AqueousSolution: component totals, pH / pe control, temperature, pressure),
  • kinetic reactants (rate-controlled mass transfer),
  • equilibrium reactants (phases enforced at equilibrium),
  • ion-exchange sites (ExchangeSite),
  • surface complexation / sorption sites (DensityBasedSurfaceSite, MoleBasedSurfaceSite).

PHREEQC advances this local system as a closed, well-mixed batch reactor over the current time increment. After reaction, updated aqueous totals, pH, mineral amounts, etc. are written back into OpenGeoSys and become the starting state for the next transport step.

initialize(num_chemical_systems) prepares internal storage so that per-system quantities (e.g. per-component totals, pH) are allocated for all chemical_system_id in the mesh.

Definition in file ChemicalSystem.h.

#include <memory>
#include <variant>
#include <vector>
#include "AqueousSolution.h"
#include "EquilibriumReactant.h"
#include "Exchange.h"
#include "KineticReactant.h"
#include "Surface.h"
Include dependency graph for ChemicalSystem.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ChemistryLib::PhreeqcIOData::ChemicalSystem
 Complete description of one local reactive system passed to PHREEQC. More...

Namespaces

namespace  ChemistryLib
namespace  ChemistryLib::PhreeqcIOData