OGS
CreateLiquidViscosityVogels.cpp
Go to the documentation of this file.
1
12
#include "
CreateLiquidViscosityVogels.h
"
13
14
#include "
BaseLib/ConfigTree.h
"
15
#include "
LiquidViscosityVogels.h
"
16
#include "
MaterialLib/MPL/Property.h
"
17
18
namespace
MaterialPropertyLib
19
{
20
std::unique_ptr<Property>
createLiquidViscosityVogels
(
21
BaseLib::ConfigTree
const
& config)
22
{
24
config.
checkConfigParameter
(
"type"
,
"LiquidViscosityVogels"
);
25
INFO
(
"Using Vogels model, which gives viscosity in SI unit, Pa s"
);
26
27
// Second access for storage.
29
auto
property_name = config.
peekConfigParameter
<std::string>(
"name"
);
30
31
auto
const
fluid_type =
33
config.
peekConfigParameter
<std::string>(
"liquid_type"
);
34
35
if
(fluid_type ==
"Water"
)
36
{
38
config.
checkConfigParameter
(
"liquid_type"
,
"Water"
);
39
40
const
VogelsViscosityConstantsWater
constants;
41
return
std::make_unique<
42
LiquidViscosityVogels<VogelsViscosityConstantsWater>
>(
43
std::move(property_name), std::move(constants));
44
}
45
if
(fluid_type ==
"CO2"
)
46
{
48
config.
checkConfigParameter
(
"liquid_type"
,
"CO2"
);
49
const
VogelsViscosityConstantsCO2
constants;
50
return
std::make_unique<
51
LiquidViscosityVogels<VogelsViscosityConstantsCO2>
>(
52
std::move(property_name), std::move(constants));
53
}
54
if
(fluid_type ==
"CH4"
)
55
{
57
config.
checkConfigParameter
(
"liquid_type"
,
"CH4"
);
58
const
VogelsViscosityConstantsCH4
constants;
59
return
std::make_unique<
60
LiquidViscosityVogels<VogelsViscosityConstantsCH4>
>(
61
std::move(property_name), std::move(constants));
62
}
63
OGS_FATAL
(
64
"The fluid type {:s} for Vogels model is unavailable.\n"
65
"The available fluid types are Water, CO2 and CH4\n"
,
66
fluid_type.data());
67
}
68
}
// namespace MaterialPropertyLib
ConfigTree.h
CreateLiquidViscosityVogels.h
OGS_FATAL
#define OGS_FATAL(...)
Definition
Error.h:26
LiquidViscosityVogels.h
INFO
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
Definition
Logging.h:35
Property.h
BaseLib::ConfigTree
Definition
ConfigTree.h:107
BaseLib::ConfigTree::peekConfigParameter
T peekConfigParameter(std::string const ¶m) const
Definition
ConfigTree-impl.h:126
BaseLib::ConfigTree::checkConfigParameter
void checkConfigParameter(std::string const ¶m, std::string_view const value) const
Definition
ConfigTree.cpp:151
MaterialPropertyLib::LiquidViscosityVogels
Definition
LiquidViscosityVogels.h:26
MaterialPropertyLib
Definition
ChemicalSolverInterface.h:21
MaterialPropertyLib::createLiquidViscosityVogels
std::unique_ptr< Property > createLiquidViscosityVogels(BaseLib::ConfigTree const &config)
Definition
CreateLiquidViscosityVogels.cpp:20
MaterialPropertyLib::VogelsViscosityConstantsCH4
Definition
LiquidViscosityVogels.h:81
MaterialPropertyLib::VogelsViscosityConstantsCO2
Definition
LiquidViscosityVogels.h:73
MaterialPropertyLib::VogelsViscosityConstantsWater
Definition
LiquidViscosityVogels.h:65
MaterialLib
MPL
Properties
Viscosity
CreateLiquidViscosityVogels.cpp
Generated by
1.12.0