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