OGS
CreateClausiusClapeyron.cpp
Go to the documentation of this file.
1
13#include "BaseLib/ConfigTree.h"
14#include "ClausiusClapeyron.h"
15
16namespace MaterialPropertyLib
17{
18std::unique_ptr<ClausiusClapeyron> createClausiusClapeyron(
19 BaseLib::ConfigTree const& config)
20{
22 config.checkConfigParameter("type", "ClausiusClapeyron");
23
25 auto property_name = config.peekConfigParameter<std::string>("name");
26
27 DBUG("Create ClausiusClapeyron property {:s}.", property_name);
28
29 auto const triple_temperature =
31 config.getConfigParameter<double>("triple_temperature");
32
33 auto const triple_pressure =
35 config.getConfigParameter<double>("triple_pressure");
36
37 auto const critical_temperature =
39 config.getConfigParameter<double>("critical_temperature");
40
41 auto const critical_pressure =
43 config.getConfigParameter<double>("critical_pressure");
44
45 auto const ref_temperature =
47 config.getConfigParameter<double>("reference_temperature");
48
49 auto const ref_pressure =
51 config.getConfigParameter<double>("reference_pressure");
52
54 return std::make_unique<ClausiusClapeyron>(
55 std::move(property_name), triple_temperature, triple_pressure,
56 critical_temperature, critical_pressure, ref_temperature, ref_pressure);
57}
58} // namespace MaterialPropertyLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
T peekConfigParameter(std::string const &param) const
T getConfigParameter(std::string const &param) const
void checkConfigParameter(std::string const &param, std::string_view const value) const
std::unique_ptr< ClausiusClapeyron > createClausiusClapeyron(BaseLib::ConfigTree const &config)