OGS
CreatePengRobinson.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
8#include "PengRobinson.h"
9
10namespace MaterialPropertyLib
11{
12std::unique_ptr<Property> createPengRobinson(BaseLib::ConfigTree const& config)
13{
15 config.checkConfigParameter("type", "PengRobinson");
16 DBUG("Create PengRobinson EOS.");
17
18 auto const Tc =
20 config.getConfigParameter<double>("critical_temperature");
21
22 auto const pc =
24 config.getConfigParameter<double>("critical_pressure");
25
26 auto const omega =
28 config.getConfigParameter<double>("acentric_factor");
29
30 return std::make_unique<PengRobinson>(Tc, pc, omega);
31}
32} // namespace MaterialPropertyLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
T getConfigParameter(std::string const &param) const
void checkConfigParameter(std::string const &param, std::string_view const value) const
std::unique_ptr< Property > createPengRobinson(BaseLib::ConfigTree const &config)