OGS
CreateRelPermGeneralizedPowerNonwettingPhase.cpp
Go to the documentation of this file.
1
12#include "BaseLib/ConfigTree.h"
14
15namespace MaterialPropertyLib
16{
17std::unique_ptr<RelPermGeneralizedPowerNonwettingPhase>
19{
22 "type", "RelativePermeabilityGeneralizedPowerNonwettingPhase");
23
24 // Second access for storage.
26 auto property_name = config.peekConfigParameter<std::string>("name");
27
28 DBUG("Create RelPermGeneralizedPowerNonwettingPhase medium property {:s}.",
29 property_name);
30
33 config.getConfigParameter<double>("residual_liquid_saturation");
34 auto const residual_gas_saturation =
36 config.getConfigParameter<double>("residual_gas_saturation");
37 auto const min_relative_permeability =
39 config.getConfigParameter<double>("min_relative_permeability");
40 double const a =
42 config.getConfigParameter<double>("multiplier", 1000);
43 double const lambda =
45 config.getConfigParameter<double>("exponent", 0.8);
46
47 if (min_relative_permeability < 0)
48 {
49 OGS_FATAL("Minimal relative permeability must be non-negative.");
50 }
51
52 return std::make_unique<RelPermGeneralizedPowerNonwettingPhase>(
53 std::move(property_name), residual_liquid_saturation,
54 residual_gas_saturation, min_relative_permeability, a, lambda);
55}
56} // 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< RelPermGeneralizedPowerNonwettingPhase > createRelPermGeneralizedPowerNonwettingPhase(BaseLib::ConfigTree const &config)