OGS
ChemistryLib::PhreeqcIOData::AqueousSolution Struct Reference

Detailed Description

Definition at line 46 of file 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::unique_ptr< GlobalVectorpH
 
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

Definition at line 48 of file AqueousSolution.h.

52 : fixing_pe(fixing_pe_),
53 temperature(temperature_),
54 pressure(pressure_),
55 pe(pe_),
56 pe0(pe0_),
57 components(std::move(components_)),
58 charge_balance(charge_balance_)
59 {
60 }
MeshLib::PropertyVector< double > * pe

Member Function Documentation

◆ print()

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

Definition at line 24 of file AqueousSolution.cpp.

26{
27 os << "temp " << temperature << "\n";
28
29 os << "pressure " << pressure << "\n";
30
32 switch (charge_balance)
33 {
35 os << "pH " << -std::log10((*pH)[chemical_system_id]) << " charge"
36 << "\n";
37 os << "pe " << (*pe)[chemical_system_id] << "\n";
38 break;
40 os << "pH " << -std::log10((*pH)[chemical_system_id]) << "\n";
41 os << "pe " << (*pe)[chemical_system_id] << " charge"
42 << "\n";
43 break;
45 os << "pH " << -std::log10((*pH)[chemical_system_id]) << "\n";
46 os << "pe " << (*pe)[chemical_system_id] << "\n";
47 break;
48 }
49
50 os << "units mol/kgw\n";
51
52 for (auto const& component : components)
53 {
55 os << component.name << " " << (*component.amount)[chemical_system_id];
56 component.chemical_formula.empty()
57 ? os << "\n"
58 : os << " as " << component.chemical_formula << "\n";
59 }
60
61 os << "\n\n";
62}
void setLocalAccessibleVector(PETScVector const &x)
Definition LinAlg.cpp:27

References charge_balance, components, ChemistryLib::pe, ChemistryLib::pH, pH, pressure, MathLib::LinAlg::setLocalAccessibleVector(), temperature, and ChemistryLib::Unspecified.

Member Data Documentation

◆ charge_balance

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

Definition at line 73 of file AqueousSolution.h.

Referenced by 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 66 of file AqueousSolution.h.

◆ pe

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

Definition at line 70 of file AqueousSolution.h.

◆ pe0

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

Definition at line 71 of file AqueousSolution.h.

◆ pH

std::unique_ptr<GlobalVector> ChemistryLib::PhreeqcIOData::AqueousSolution::pH

◆ pressure

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

Definition at line 68 of file AqueousSolution.h.

Referenced by print().

◆ temperature

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

Definition at line 67 of file AqueousSolution.h.

Referenced by print().


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