OGS
PhreeqcIOData/CreateAqueousSolution.cpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2
// SPDX-License-Identifier: BSD-3-Clause
3
4
#include "
CreateAqueousSolution.h
"
5
6
#include "
AqueousSolution.h
"
7
#include "
BaseLib/ConfigTree.h
"
8
#include "
ChemistryLib/Common/CreateChargeBalance.h
"
9
#include "
CreateSolutionComponent.h
"
10
#include "
MeshLib/Mesh.h
"
11
#include "
MeshLib/Utils/getOrCreateMeshProperty.h
"
12
13
namespace
ChemistryLib
14
{
15
namespace
PhreeqcIOData
16
{
17
std::unique_ptr<AqueousSolution>
createAqueousSolution
(
18
BaseLib::ConfigTree
const
& config,
MeshLib::Mesh
& mesh)
19
{
21
auto
const
fixing_pe = config.
getConfigAttribute
<
bool
>(
"fixing_pe"
,
false
);
22
24
auto
const
temperature = config.
getConfigParameter
<
double
>(
"temperature"
);
25
27
auto
const
pressure = config.
getConfigParameter
<
double
>(
"pressure"
);
28
30
auto
const
pe0 = config.
getConfigParameter
<
double
>(
"pe"
);
31
32
auto
pe
=
MeshLib::getOrCreateMeshProperty<double>
(
33
mesh,
"pe"
,
MeshLib::MeshItemType::IntegrationPoint
, 1);
34
35
auto
components =
createSolutionComponents
(config);
36
37
auto
charge_balance =
createChargeBalance
(config);
38
39
return
std::make_unique<AqueousSolution>(fixing_pe, temperature, pressure,
40
pe
, pe0, std::move(components),
41
charge_balance);
42
}
43
}
// namespace PhreeqcIOData
44
}
// namespace ChemistryLib
ConfigTree.h
CreateChargeBalance.h
CreateSolutionComponent.h
Mesh.h
AqueousSolution.h
Per-system aqueous state exchanged with PHREEQC.
CreateAqueousSolution.h
BaseLib::ConfigTree
Definition
ConfigTree.h:101
BaseLib::ConfigTree::getConfigParameter
T getConfigParameter(std::string const ¶m) const
Definition
ConfigTree-impl.h:35
BaseLib::ConfigTree::getConfigAttribute
T getConfigAttribute(std::string const &attr) const
Definition
ConfigTree-impl.h:157
MeshLib::Mesh
Definition
Mesh.h:34
getOrCreateMeshProperty.h
ChemistryLib::PhreeqcIOData
Definition
PhreeqcIO.cpp:35
ChemistryLib::PhreeqcIOData::createAqueousSolution
std::unique_ptr< AqueousSolution > createAqueousSolution(BaseLib::ConfigTree const &config, MeshLib::Mesh &mesh)
Definition
PhreeqcIOData/CreateAqueousSolution.cpp:17
ChemistryLib::PhreeqcIOData::ItemType::pe
@ pe
Definition
ChemistryLib/PhreeqcIOData/Output.h:74
ChemistryLib::PhreeqcIOData::createSolutionComponents
std::vector< Component > createSolutionComponents(BaseLib::ConfigTree const &config)
Definition
CreateSolutionComponent.cpp:13
ChemistryLib
Definition
ChemicalSolverInterface.h:108
ChemistryLib::createChargeBalance
ChargeBalance createChargeBalance(BaseLib::ConfigTree const &config)
Definition
CreateChargeBalance.cpp:12
MeshLib::getOrCreateMeshProperty
PropertyVector< T > * getOrCreateMeshProperty(Mesh &mesh, std::string const &property_name, MeshItemType const item_type, int const number_of_components)
Definition
getOrCreateMeshProperty.h:17
MeshLib::MeshItemType::IntegrationPoint
@ IntegrationPoint
Definition
MeshEnums.h:17
ChemistryLib
PhreeqcIOData
CreateAqueousSolution.cpp
Generated by
1.14.0