OGS
CreateCapillaryPressureVanGenuchten.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
9
10namespace MaterialPropertyLib
11{
12std::unique_ptr<Property> createCapillaryPressureVanGenuchten(
13 BaseLib::ConfigTree const& config)
14{
16 config.checkConfigParameter("type", "CapillaryPressureVanGenuchten");
17
18 // Second access for storage.
20 auto property_name = config.peekConfigParameter<std::string>("name");
21
22 DBUG("Create CapillaryPressureVanGenuchten medium property {:s}.",
23 property_name);
24
27 config.getConfigParameter<double>("residual_liquid_saturation");
28 auto const residual_gas_saturation =
30 config.getConfigParameter<double>("residual_gas_saturation");
31 auto const exponent =
33 config.getConfigParameter<double>("exponent");
34 auto const p_b =
36 config.getConfigParameter<double>("p_b");
37 auto const maximum_capillary_pressure =
39 config.getConfigParameter<double>("maximum_capillary_pressure");
40
41 return std::make_unique<CapillaryPressureVanGenuchten>(
42 std::move(property_name), residual_liquid_saturation,
43 residual_gas_saturation, exponent, p_b, maximum_capillary_pressure);
44}
45} // namespace MaterialPropertyLib
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< Property > createCapillaryPressureVanGenuchten(BaseLib::ConfigTree const &config)