OGS
ChemistryLib::PhreeqcIOData::ChemicalSystem Struct Reference

Detailed Description

Definition at line 27 of file ChemicalSystem.h.

#include <ChemicalSystem.h>

Public Member Functions

 ChemicalSystem (std::unique_ptr< AqueousSolution > &&aqueous_solution_, std::vector< KineticReactant > &&kinetic_reactants_, std::vector< EquilibriumReactant > &&equilibrium_reactants_, std::vector< ExchangeSite > &&exchangers_, std::vector< std::variant< DensityBasedSurfaceSite, MoleBasedSurfaceSite > > &&surface_)
 
void initialize (std::size_t const num_chemical_systems)
 

Public Attributes

std::unique_ptr< AqueousSolutionaqueous_solution
 
std::vector< KineticReactantkinetic_reactants
 
std::vector< EquilibriumReactantequilibrium_reactants
 
std::vector< ExchangeSiteexchangers
 
std::vector< std::variant< DensityBasedSurfaceSite, MoleBasedSurfaceSite > > surface
 

Constructor & Destructor Documentation

◆ ChemicalSystem()

ChemistryLib::PhreeqcIOData::ChemicalSystem::ChemicalSystem ( std::unique_ptr< AqueousSolution > && aqueous_solution_,
std::vector< KineticReactant > && kinetic_reactants_,
std::vector< EquilibriumReactant > && equilibrium_reactants_,
std::vector< ExchangeSite > && exchangers_,
std::vector< std::variant< DensityBasedSurfaceSite, MoleBasedSurfaceSite > > && surface_ )
inline

Definition at line 29 of file ChemicalSystem.h.

35 : aqueous_solution(std::move(aqueous_solution_)),
36 kinetic_reactants(std::move(kinetic_reactants_)),
37 equilibrium_reactants(std::move(equilibrium_reactants_)),
38 exchangers(std::move(exchangers_)),
39 surface(std::move(surface_))
40 {
41 }
std::unique_ptr< AqueousSolution > aqueous_solution
std::vector< KineticReactant > kinetic_reactants
std::vector< EquilibriumReactant > equilibrium_reactants
std::vector< std::variant< DensityBasedSurfaceSite, MoleBasedSurfaceSite > > surface

Member Function Documentation

◆ initialize()

void ChemistryLib::PhreeqcIOData::ChemicalSystem::initialize ( std::size_t const num_chemical_systems)

Definition at line 21 of file ChemicalSystem.cpp.

22{
25 num_chemical_systems);
26
27 aqueous_solution->pe->resize(num_chemical_systems, aqueous_solution->pe0);
28
29 auto& components = aqueous_solution->components;
30 for (auto& component : components)
31 {
32 component.amount =
34 num_chemical_systems);
35 }
36
37 for (auto& kinetic_reactant : kinetic_reactants)
38 {
39 kinetic_reactant.molality->resize(num_chemical_systems);
40 kinetic_reactant.molality_prev->resize(num_chemical_systems);
41 kinetic_reactant.volume_fraction->resize(num_chemical_systems);
42 kinetic_reactant.volume_fraction_prev->resize(num_chemical_systems);
43 }
44
45 for (auto& equilibrium_reactant : equilibrium_reactants)
46 {
47 equilibrium_reactant.molality->resize(num_chemical_systems);
48 equilibrium_reactant.molality_prev->resize(num_chemical_systems);
49 equilibrium_reactant.volume_fraction->resize(num_chemical_systems);
50 equilibrium_reactant.volume_fraction_prev->resize(num_chemical_systems);
51 }
52
53 for (auto& exchanger : exchangers)
54 {
55 exchanger.molality->resize(num_chemical_systems);
56 }
57
58 for (auto& surface_site : surface)
59 {
60 if (auto const surface_site_ptr =
61 std::get_if<MoleBasedSurfaceSite>(&surface_site))
62 {
63 surface_site_ptr->molality->resize(num_chemical_systems);
64 }
65 }
66}

References aqueous_solution, equilibrium_reactants, exchangers, kinetic_reactants, and surface.

Member Data Documentation

◆ aqueous_solution

std::unique_ptr<AqueousSolution> ChemistryLib::PhreeqcIOData::ChemicalSystem::aqueous_solution

Definition at line 45 of file ChemicalSystem.h.

Referenced by ChemistryLib::PhreeqcIOData::createOutput(), and initialize().

◆ equilibrium_reactants

std::vector<EquilibriumReactant> ChemistryLib::PhreeqcIOData::ChemicalSystem::equilibrium_reactants

Definition at line 47 of file ChemicalSystem.h.

Referenced by ChemistryLib::PhreeqcIOData::createOutput(), and initialize().

◆ exchangers

std::vector<ExchangeSite> ChemistryLib::PhreeqcIOData::ChemicalSystem::exchangers

Definition at line 48 of file ChemicalSystem.h.

Referenced by initialize().

◆ kinetic_reactants

std::vector<KineticReactant> ChemistryLib::PhreeqcIOData::ChemicalSystem::kinetic_reactants

Definition at line 46 of file ChemicalSystem.h.

Referenced by ChemistryLib::PhreeqcIOData::createOutput(), and initialize().

◆ surface

std::vector<std::variant<DensityBasedSurfaceSite, MoleBasedSurfaceSite> > ChemistryLib::PhreeqcIOData::ChemicalSystem::surface

Definition at line 50 of file ChemicalSystem.h.

Referenced by initialize().


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