OGS
CreateRelPermBrooksCoreyNonwettingPhase.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
5
8
10{
11std::unique_ptr<RelPermBrooksCoreyNonwettingPhase>
13{
15 config.checkConfigParameter("type", "RelPermBrooksCoreyNonwettingPhase");
16
17 // Second access for storage.
19 auto property_name = config.peekConfigParameter<std::string>("name");
20
21 DBUG("Create RelPermBrooksCoreyNonwettingPhase medium property {:s}.",
22 property_name);
23
26 config.getConfigParameter<double>("residual_liquid_saturation");
27 auto const residual_gas_saturation =
29 config.getConfigParameter<double>("residual_gas_saturation");
30 auto const min_relative_permeability =
32 config.getConfigParameter<double>("min_relative_permeability");
33 auto const exponent =
35 config.getConfigParameter<double>("lambda");
36 if (exponent <= 0.)
37 {
38 OGS_FATAL("Exponent 'lambda' must be positive.");
39 }
40
41 return std::make_unique<RelPermBrooksCoreyNonwettingPhase>(
42 std::move(property_name),
45 min_relative_permeability,
46 exponent);
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< RelPermBrooksCoreyNonwettingPhase > createRelPermBrooksCoreyNonwettingPhase(BaseLib::ConfigTree const &config)