OGS
CreateRelPermUdell.cpp
Go to the documentation of this file.
1
13#include "BaseLib/ConfigTree.h"
14#include "RelPermUdell.h"
15
16namespace MaterialPropertyLib
17{
18std::unique_ptr<RelPermUdell> createRelPermUdell(
19 BaseLib::ConfigTree const& config)
20{
22 config.checkConfigParameter("type", "RelativePermeabilityUdell");
23
24 // Second access for storage.
26 auto property_name = config.peekConfigParameter<std::string>("name");
27
28 DBUG("Create RelPermUdell medium property {:s}.", property_name);
29
32 config.getConfigParameter<double>("residual_liquid_saturation");
33 auto const residual_gas_saturation =
35 config.getConfigParameter<double>("residual_gas_saturation");
36 auto const min_relative_permeability =
38 config.getConfigParameter<double>("min_relative_permeability");
39
40 if (min_relative_permeability < 0)
41 {
42 OGS_FATAL("Minimal relative permeability must be non-negative.");
43 }
44
45 return std::make_unique<RelPermUdell>(
46 std::move(property_name), residual_liquid_saturation,
47 residual_gas_saturation, min_relative_permeability);
48}
49} // namespace MaterialPropertyLib
#define OGS_FATAL(...)
Definition Error.h:26
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< RelPermUdell > createRelPermUdell(BaseLib::ConfigTree const &config)