OGS
CreatePengRobinson.cpp
Go to the documentation of this file.
1
10#include "CreatePengRobinson.h"
11
12#include "BaseLib/ConfigTree.h"
13#include "ParameterLib/Utils.h"
14#include "PengRobinson.h"
15
16namespace MaterialPropertyLib
17{
18std::unique_ptr<Property> createPengRobinson(BaseLib::ConfigTree const& config)
19{
21 config.checkConfigParameter("type", "PengRobinson");
22 DBUG("Create PengRobinson EOS.");
23
24 auto const Tc =
26 config.getConfigParameter<double>("critical_temperature");
27
28 auto const pc =
30 config.getConfigParameter<double>("critical_pressure");
31
32 auto const omega =
34 config.getConfigParameter<double>("acentric_factor");
35
36 return std::make_unique<PengRobinson>(Tc, pc, omega);
37}
38} // namespace MaterialPropertyLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
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)