OGS
CreateRelPermGeneralizedPowerNonwettingPhase.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
6
8{
9std::unique_ptr<RelPermGeneralizedPowerNonwettingPhase>
11{
14 "type", "RelativePermeabilityGeneralizedPowerNonwettingPhase");
15
16 // Second access for storage.
18 auto property_name = config.peekConfigParameter<std::string>("name");
19
20 DBUG("Create RelPermGeneralizedPowerNonwettingPhase medium property {:s}.",
21 property_name);
22
25 config.getConfigParameter<double>("residual_liquid_saturation");
26 auto const residual_gas_saturation =
28 config.getConfigParameter<double>("residual_gas_saturation");
29 auto const min_relative_permeability =
31 config.getConfigParameter<double>("min_relative_permeability");
32 double const a =
34 config.getConfigParameter<double>("enhancement_factor", 1000);
35 double const lambda =
37 config.getConfigParameter<double>("exponent", 0.8);
38
39 if (min_relative_permeability < 0)
40 {
41 OGS_FATAL("Minimal relative permeability must be non-negative.");
42 }
43
44 return std::make_unique<RelPermGeneralizedPowerNonwettingPhase>(
45 std::move(property_name), residual_liquid_saturation,
46 residual_gas_saturation, min_relative_permeability, a, lambda);
47}
48} // namespace MaterialPropertyLib
#define OGS_FATAL(...)
Definition Error.h:19
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
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)