Loading [MathJax]/extensions/MathMenu.js
OGS
CreateRelPermNonWettingPhaseVanGenuchtenMualem.cpp
Go to the documentation of this file.
1
13
14#include "BaseLib/ConfigTree.h"
17
18namespace MaterialPropertyLib
19{
21 BaseLib::ConfigTree const& config)
22{
25 "type", "RelativePermeabilityNonWettingPhaseVanGenuchtenMualem");
26 DBUG("Create RelPermNonWettingPhaseVanGenuchtenMualem medium property");
27
28 // Second access for storage.
30 auto property_name = config.peekConfigParameter<std::string>("name");
31
34 config.getConfigParameter<double>("residual_liquid_saturation");
35 auto const residual_gas_saturation =
37 config.getConfigParameter<double>("residual_gas_saturation");
38
39 auto const exponent =
41 config.getConfigParameter<double>("exponent");
42
43 auto const min_relative_permeability =
45 config.getConfigParameter<double>("min_relative_permeability");
46 double const a =
48 config.getConfigParameter<double>("enhancement_factor", 1.0);
49
50 if (min_relative_permeability <= 0.0 || min_relative_permeability > 1.0)
51 {
53 "The value for min_relative_permeability of "
54 "RelativePermeabilityNonWettingPhaseVanGenuchtenMualem is {:g}, "
55 "which falls outside of the range of (0, 1]",
56 min_relative_permeability);
57 }
58 if (a < 0 || !std::isfinite(a))
59 {
61 "The value of the enhancement_factor for the nonwetting relative "
62 "permeability must be non-negative and finite."
63 "The value is {:g}, which is out of bounds.",
64 a);
65 }
66
67 return std::make_unique<RelPermNonWettingPhaseVanGenuchtenMualem>(
69 exponent, min_relative_permeability, a);
70}
71} // 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< Property > createRelPermNonWettingPhaseVanGenuchtenMualem(BaseLib::ConfigTree const &config)