OGS
CreateClausiusClapeyron.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
5#include "ClausiusClapeyron.h"
6
8{
9std::unique_ptr<ClausiusClapeyron> createClausiusClapeyron(
10 BaseLib::ConfigTree const& config)
11{
13 config.checkConfigParameter("type", "ClausiusClapeyron");
14
16 auto property_name = config.peekConfigParameter<std::string>("name");
17
18 DBUG("Create ClausiusClapeyron property {:s}.", property_name);
19
20 auto const triple_temperature =
22 config.getConfigParameter<double>("triple_temperature");
23
24 auto const triple_pressure =
26 config.getConfigParameter<double>("triple_pressure");
27
28 auto const critical_temperature =
30 config.getConfigParameter<double>("critical_temperature");
31
32 auto const critical_pressure =
34 config.getConfigParameter<double>("critical_pressure");
35
36 auto const ref_temperature =
38 config.getConfigParameter<double>("reference_temperature");
39
40 auto const ref_pressure =
42 config.getConfigParameter<double>("reference_pressure");
43
45 return std::make_unique<ClausiusClapeyron>(
46 std::move(property_name), triple_temperature, triple_pressure,
47 critical_temperature, critical_pressure, ref_temperature, ref_pressure);
48}
49} // namespace MaterialPropertyLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
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)