Commit 895f5ebb authored by wenqing's avatar wenqing

[MPL/VanGenuchtenMualem] Added name argument to ctor

parent 07a592c5
Pipeline #1114 passed with stages
in 31 minutes and 44 seconds
......@@ -25,6 +25,10 @@ std::unique_ptr<Property> createRelPermNonWettingPhaseVanGenuchtenMualem(
"type", "RelativePermeabilityNonWettingPhaseVanGenuchtenMualem");
DBUG("Create RelPermNonWettingPhaseVanGenuchtenMualem medium property");
// Second access for storage.
//! \ogs_file_param{properties__property__name}
auto property_name = config.peekConfigParameter<std::string>("name");
auto const residual_saturation =
//! \ogs_file_param{properties__property__RelativePermeabilityNonWettingPhaseVanGenuchtenMualem__residual_saturation}
config.getConfigParameter<double>("residual_saturation");
......@@ -41,7 +45,7 @@ std::unique_ptr<Property> createRelPermNonWettingPhaseVanGenuchtenMualem(
config.getConfigParameter<double>("minimum_relative_permeability");
return std::make_unique<RelPermNonWettingPhaseVanGenuchtenMualem>(
residual_saturation, maximum_saturation, exponent,
min_relative_permeability);
std::move(property_name), residual_saturation, maximum_saturation,
exponent, min_relative_permeability);
}
} // namespace MaterialPropertyLib
......@@ -22,7 +22,8 @@
namespace MaterialPropertyLib
{
RelPermNonWettingPhaseVanGenuchtenMualem::
RelPermNonWettingPhaseVanGenuchtenMualem(const double S_n_r,
RelPermNonWettingPhaseVanGenuchtenMualem(std::string name,
const double S_n_r,
const double S_n_max,
const double m,
const double krel_min)
......@@ -32,6 +33,7 @@ RelPermNonWettingPhaseVanGenuchtenMualem::
krel_min_(krel_min),
S_l_for_krel_min_(computeSaturationForMinimumRelativePermeability())
{
name_ = std::move(name);
checkVanGenuchtenExponentRange(m_);
}
......
......@@ -38,14 +38,17 @@ class RelPermNonWettingPhaseVanGenuchtenMualem final : public Property
{
public:
/**
* @param S_n_r Residual saturation of the non-wetting phase,
* @param name Name of the property,
* @param S_n_r Residual saturation of the non-wetting phase,
* \f$ S^n_r \f$
* @param S_n_max Maximum saturation of the non-wetting phase,
* @param S_n_max Maximum saturation of the non-wetting phase,
* \f$ S^n_{\mbox{max}} \f$
* @param m Exponent, \f$ m \in [0,1]\f$
* @param krel_min Minimum relative permeability,
* @param m Exponent, \f$ m \in [0,1]\f$
* @param krel_min Minimum relative permeability,
* \f$ k_{rel}^n_{\mbox{min}}\f$
*/
RelPermNonWettingPhaseVanGenuchtenMualem(const double S_n_r,
RelPermNonWettingPhaseVanGenuchtenMualem(std::string name,
const double S_n_r,
const double S_n_max,
const double m,
const double krel_min);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment