OGS
CreateClausiusClapeyron.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 "
BaseLib/ConfigTree.h
"
5
#include "
ClausiusClapeyron.h
"
6
7
namespace
MaterialPropertyLib
8
{
9
std::unique_ptr<ClausiusClapeyron>
createClausiusClapeyron
(
10
BaseLib::ConfigTree
const
& config)
11
{
13
config.
checkConfigParameter
(
"type"
,
"ClausiusClapeyron"
);
14
16
auto
property_name = config.
peekConfigParameter
<std::string>(
"name"
);
17
18
DBUG
(
"Create ClausiusClapeyron property {:s}."
, property_name);
19
20
auto
const
triple_temperature =
22
config.
getConfigParameter
<
double
>(
"triple_temperature"
);
23
24
auto
const
triple_pressure =
26
config.
getConfigParameter
<
double
>(
"triple_pressure"
);
27
28
auto
const
critical_temperature
=
30
config.
getConfigParameter
<
double
>(
"critical_temperature"
);
31
32
auto
const
critical_pressure
=
34
config.
getConfigParameter
<
double
>(
"critical_pressure"
);
35
36
auto
const
ref_temperature =
38
config.
getConfigParameter
<
double
>(
"reference_temperature"
);
39
40
auto
const
ref_pressure =
42
config.
getConfigParameter
<
double
>(
"reference_pressure"
);
43
45
return
std::make_unique<ClausiusClapeyron>(
46
std::move(property_name), triple_temperature, triple_pressure,
47
critical_temperature
,
critical_pressure
, ref_temperature, ref_pressure);
48
}
49
}
// namespace MaterialPropertyLib
ClausiusClapeyron.h
ConfigTree.h
DBUG
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition
Logging.h:22
BaseLib::ConfigTree
Definition
ConfigTree.h:101
BaseLib::ConfigTree::peekConfigParameter
T peekConfigParameter(std::string const ¶m) const
Definition
ConfigTree-impl.h:116
BaseLib::ConfigTree::getConfigParameter
T getConfigParameter(std::string const ¶m) const
Definition
ConfigTree-impl.h:35
BaseLib::ConfigTree::checkConfigParameter
void checkConfigParameter(std::string const ¶m, std::string_view const value) const
Definition
ConfigTree.cpp:166
MaterialPropertyLib
Definition
ChemicalSolverInterface.h:98
MaterialPropertyLib::createClausiusClapeyron
std::unique_ptr< ClausiusClapeyron > createClausiusClapeyron(BaseLib::ConfigTree const &config)
Definition
CreateClausiusClapeyron.cpp:9
MaterialPropertyLib::critical_pressure
@ critical_pressure
Definition
PropertyType.h:33
MaterialPropertyLib::critical_temperature
@ critical_temperature
Definition
PropertyType.h:34
MaterialLib
MPL
Properties
CreateClausiusClapeyron.cpp
Generated by
1.14.0