OGS 6.1.0-1699-ge946d4c5f
CreateSpecificFluidHeatCapacityModel.cpp
Go to the documentation of this file.
1 
15 
16 #include "BaseLib/Error.h"
17 #include "BaseLib/ConfigTree.h"
18 
21 
22 namespace MaterialLib
23 {
24 namespace Fluid
25 {
26 std::unique_ptr<FluidProperty> createSpecificFluidHeatCapacityModel(
27  BaseLib::ConfigTree const& config)
28 {
30  auto const type = config.getConfigParameter<std::string>("type");
31 
32  if (type == "Constant")
33  return std::make_unique<ConstantFluidProperty>(
35  config.getConfigParameter<double>("value"));
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 } // end namespace
45 } // end namespace
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:71