OGS
AqueousSolution.h File Reference

Detailed Description

Per-system aqueous state exchanged with PHREEQC.

OpenGeoSys maps each reactive control volume to a local chemical system identified externally by chemical_system_id. Each local chemical system is treated as a closed, well-mixed batch reactor during the chemistry step: no mass is exchanged with any other system while PHREEQC is running.

This file defines two core data structures:

  • Component: Represents one transported component (e.g. Na, Cl, Ca). For each chemical_system_id, Component::amount holds the total inventory of that component in that local chemical system. These totals \(c_{T\alpha}\) are passed to PHREEQC as input and are updated after the chemistry step.
  • AqueousSolution: Collects the input state needed to build the PHREEQC SOLUTION block for one local chemical system:

    • temperature \(T\) [K],
    • pressure \(p\) [Pa],
    • redox control (pe, fixing_pe, pe0),
    • charge-balance mode,
    • the per-component totals \(c_{T\alpha}\).

    After PHREEQC runs, AqueousSolution is also used to store the reacted output for that same chemical_system_id (updated pH, pe, etc.).

Notes:

  • Component::amount, pH, and pe are stored per chemical_system_id. After each PHREEQC call, these per-system values are updated and then written back into OpenGeoSys for the next transport step.

Definition in file PhreeqcIOData/AqueousSolution.h.

#include <iosfwd>
#include <memory>
#include <string>
#include <vector>
#include "MathLib/LinAlg/GlobalMatrixVectorTypes.h"
#include "Output.h"
Include dependency graph for PhreeqcIOData/AqueousSolution.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ChemistryLib::PhreeqcIOData::Component
struct  ChemistryLib::PhreeqcIOData::AqueousSolution

Namespaces

namespace  MeshLib
namespace  ChemistryLib
namespace  ChemistryLib::PhreeqcIOData