OGS
ChemistryLib::PhreeqcIOData::AqueousSolution Struct Reference

Detailed Description

Definition at line 74 of file PhreeqcIOData/AqueousSolution.h.

#include <AqueousSolution.h>

Collaboration diagram for ChemistryLib::PhreeqcIOData::AqueousSolution:
[legend]

Public Member Functions

 AqueousSolution (bool const fixing_pe_, double temperature_, double pressure_, MeshLib::PropertyVector< double > *pe_, double const pe0_, std::vector< Component > &&components_, ChargeBalance charge_balance_)
void print (std::ostream &os, std::size_t const chemical_system_id) const

Public Attributes

bool const fixing_pe
double const temperature
double const pressure
std::vector< double > H_plus_activity
 H+ activity 10^-pH, per chemical_system_id.
MeshLib::PropertyVector< double > * pe
double const pe0
std::vector< Componentcomponents
ChargeBalance const charge_balance

Constructor & Destructor Documentation

◆ AqueousSolution()

ChemistryLib::PhreeqcIOData::AqueousSolution::AqueousSolution ( bool const fixing_pe_,
double temperature_,
double pressure_,
MeshLib::PropertyVector< double > * pe_,
double const pe0_,
std::vector< Component > && components_,
ChargeBalance charge_balance_ )
inline

Member Function Documentation

◆ print()

void ChemistryLib::PhreeqcIOData::AqueousSolution::print ( std::ostream & os,
std::size_t const chemical_system_id ) const

Definition at line 17 of file PhreeqcIOData/AqueousSolution.cpp.

19{
20 os << "temp " << temperature << "\n";
21
22 os << "pressure " << pressure << "\n";
23
24 double const pH_value = -std::log10(H_plus_activity[chemical_system_id]);
25
26 switch (charge_balance)
27 {
29 os << "pH " << pH_value << " charge" << "\n";
30 os << "pe " << (*pe)[chemical_system_id] << "\n";
31 break;
33 os << "pH " << pH_value << "\n";
34 os << "pe " << (*pe)[chemical_system_id] << " charge" << "\n";
35 break;
37 os << "pH " << pH_value << "\n";
38 os << "pe " << (*pe)[chemical_system_id] << "\n";
39 break;
40 }
41
42 os << "units mol/kgw\n";
43
44 for (auto const& component : components)
45 {
46 os << component.name << " " << component.amount[chemical_system_id];
47 component.chemical_formula.empty()
48 ? os << "\n"
49 : os << " as " << component.chemical_formula << "\n";
50 }
51
52 os << "\n\n";
53}
std::vector< double > H_plus_activity
H+ activity 10^-pH, per chemical_system_id.

References charge_balance, components, H_plus_activity, ChemistryLib::pe, ChemistryLib::pH, pressure, temperature, and ChemistryLib::Unspecified.

Member Data Documentation

◆ charge_balance

ChargeBalance const ChemistryLib::PhreeqcIOData::AqueousSolution::charge_balance

Definition at line 102 of file PhreeqcIOData/AqueousSolution.h.

Referenced by AqueousSolution(), and print().

◆ components

std::vector<Component> ChemistryLib::PhreeqcIOData::AqueousSolution::components

◆ fixing_pe

bool const ChemistryLib::PhreeqcIOData::AqueousSolution::fixing_pe

When this option is enabled, the pe value will be fixed over time by adding or removing atmospheric oxygen.

Definition at line 94 of file PhreeqcIOData/AqueousSolution.h.

Referenced by AqueousSolution().

◆ H_plus_activity

std::vector<double> ChemistryLib::PhreeqcIOData::AqueousSolution::H_plus_activity

H+ activity 10^-pH, per chemical_system_id.

Definition at line 98 of file PhreeqcIOData/AqueousSolution.h.

Referenced by print(), and ChemistryLib::PhreeqcIOData::setAqueousSolution().

◆ pe

MeshLib::PropertyVector<double>* ChemistryLib::PhreeqcIOData::AqueousSolution::pe

Definition at line 99 of file PhreeqcIOData/AqueousSolution.h.

Referenced by AqueousSolution().

◆ pe0

double const ChemistryLib::PhreeqcIOData::AqueousSolution::pe0

Definition at line 100 of file PhreeqcIOData/AqueousSolution.h.

Referenced by AqueousSolution().

◆ pressure

double const ChemistryLib::PhreeqcIOData::AqueousSolution::pressure

Definition at line 96 of file PhreeqcIOData/AqueousSolution.h.

Referenced by AqueousSolution(), and print().

◆ temperature

double const ChemistryLib::PhreeqcIOData::AqueousSolution::temperature

Definition at line 95 of file PhreeqcIOData/AqueousSolution.h.

Referenced by AqueousSolution(), and print().


The documentation for this struct was generated from the following files: