OGS
CreateSpecificFluidHeatCapacityModel.cpp
Go to the documentation of this file.
1
13
#include "
CreateSpecificFluidHeatCapacityModel.h
"
14
15
#include "
BaseLib/ConfigTree.h
"
16
#include "
BaseLib/Error.h
"
17
#include "
MaterialLib/Fluid/ConstantFluidProperty.h
"
18
#include "
MaterialLib/Fluid/FluidProperty.h
"
19
20
namespace
MaterialLib
21
{
22
namespace
Fluid
23
{
24
std::unique_ptr<FluidProperty>
createSpecificFluidHeatCapacityModel
(
25
BaseLib::ConfigTree
const
& config)
26
{
28
auto
const
type = config.
getConfigParameter
<std::string>(
"type"
);
29
30
if
(type ==
"Constant"
)
31
{
32
return
std::make_unique<ConstantFluidProperty>(
34
config.
getConfigParameter
<
double
>(
"value"
));
35
}
36
// TODO: add more models
37
38
OGS_FATAL
(
39
"The specific heat capacity type {:s} is unavailable.\n"
40
"The available type is \n\tConstant\n"
,
41
type.data());
42
}
43
44
}
// namespace Fluid
45
}
// namespace MaterialLib
ConfigTree.h
ConstantFluidProperty.h
CreateSpecificFluidHeatCapacityModel.h
A function for creating a specific heat capacity model for fluid.
Error.h
OGS_FATAL
#define OGS_FATAL(...)
Definition
Error.h:26
FluidProperty.h
BaseLib::ConfigTree
Definition
ConfigTree.h:107
BaseLib::ConfigTree::getConfigParameter
T getConfigParameter(std::string const ¶m) const
Definition
ConfigTree-impl.h:41
MaterialLib::Fluid::createSpecificFluidHeatCapacityModel
std::unique_ptr< FluidProperty > createSpecificFluidHeatCapacityModel(BaseLib::ConfigTree const &config)
Definition
CreateSpecificFluidHeatCapacityModel.cpp:24
MaterialLib
Definition
ConstantFluidProperty.h:18
MaterialLib
Fluid
SpecificHeatCapacity
CreateSpecificFluidHeatCapacityModel.cpp
Generated by
1.12.0