OGS
CreateRelPermBrooksCoreyNonwettingPhase.cpp
Go to the documentation of this file.
1
13
14#include "BaseLib/ConfigTree.h"
16
17namespace MaterialPropertyLib
18{
19std::unique_ptr<RelPermBrooksCoreyNonwettingPhase>
21{
23 config.checkConfigParameter("type", "RelPermBrooksCoreyNonwettingPhase");
24
25 // Second access for storage.
27 auto property_name = config.peekConfigParameter<std::string>("name");
28
29 DBUG("Create RelPermBrooksCoreyNonwettingPhase medium property {:s}.",
30 property_name);
31
34 config.getConfigParameter<double>("residual_liquid_saturation");
35 auto const residual_gas_saturation =
37 config.getConfigParameter<double>("residual_gas_saturation");
38 auto const min_relative_permeability =
40 config.getConfigParameter<double>("min_relative_permeability");
41 auto const exponent =
43 config.getConfigParameter<double>("lambda");
44 if (exponent <= 0.)
45 {
46 OGS_FATAL("Exponent 'lambda' must be positive.");
47 }
48
49 return std::make_unique<RelPermBrooksCoreyNonwettingPhase>(
50 std::move(property_name),
53 min_relative_permeability,
54 exponent);
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< RelPermBrooksCoreyNonwettingPhase > createRelPermBrooksCoreyNonwettingPhase(BaseLib::ConfigTree const &config)