OGS
MaterialLib::PorousMedium Namespace Reference

Classes

class  BrooksCoreyCapillaryPressureSaturation
 Brooks-Corey capillary pressure saturation model. More...
 
class  CapillaryPressureSaturation
 Base class of capillary pressure models. More...
 
class  CapillaryPressureSaturationCurve
 
class  DupuitPermeability
 
class  NonWettingPhaseBrooksCoreyOilGas
 BrooksCorey oil-gas model: non-wetting phase. More...
 
class  NonWettingPhaseVanGenuchten
 van Genuchten model: non-wetting phase More...
 
class  Permeability
 
class  PorousMediaProperties
 
class  RelativePermeability
 Base class of relative permeability models. More...
 
class  RelativePermeabilityCurve
 
class  VanGenuchtenCapillaryPressureSaturation
 van Genuchten water retention model More...
 
class  WettingPhaseBrooksCoreyOilGas
 BrooksCorey oil-gas model: wetting phase. More...
 
class  WettingPhaseVanGenuchten
 van Genuchten model model: wetting phase More...
 

Functions

PorousMediaProperties createPorousMediaProperties (MeshLib::Mesh &mesh, BaseLib::ConfigTree const &configs, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters)
 
std::unique_ptr< PermeabilitycreatePermeabilityModel (BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters)
 
static std::unique_ptr< CapillaryPressureSaturationcreateBrooksCorey (BaseLib::ConfigTree const &config)
 
static std::unique_ptr< CapillaryPressureSaturationcreateVanGenuchten (BaseLib::ConfigTree const &config)
 
std::unique_ptr< CapillaryPressureSaturationcreateCapillaryPressureModel (BaseLib::ConfigTree const &config)
 
std::unique_ptr< RelativePermeabilitycreateWettingPhaseVanGenuchten (BaseLib::ConfigTree const &config)
 
std::unique_ptr< RelativePermeabilitycreateNonWettingPhaseVanGenuchten (BaseLib::ConfigTree const &config)
 
std::unique_ptr< RelativePermeabilitycreateWettingPhaseBrooksCoreyOilGas (BaseLib::ConfigTree const &config)
 
std::unique_ptr< RelativePermeabilitycreateNonWettingPhaseBrooksCoreyOilGas (BaseLib::ConfigTree const &config)
 
std::unique_ptr< RelativePermeabilitycreateRelativePermeabilityModel (BaseLib::ConfigTree const &config)
 

Function Documentation

◆ createBrooksCorey()

static std::unique_ptr< CapillaryPressureSaturation > MaterialLib::PorousMedium::createBrooksCorey ( BaseLib::ConfigTree const & config)
static
Parameters
configConfigTree object which contains the input data including <type>BrooksCorey</type> and it has a tag of <capillary_pressure>
Input File Parameter
material__porous_medium__capillary_pressure__type
Input File Parameter
material__porous_medium__capillary_pressure__BrooksCorey__pd
Input File Parameter
material__porous_medium__capillary_pressure__BrooksCorey__sr
Input File Parameter
material__porous_medium__capillary_pressure__BrooksCorey__sg_r
Input File Parameter
material__porous_medium__capillary_pressure__BrooksCorey__smax
Input File Parameter
material__porous_medium__capillary_pressure__BrooksCorey__m
Input File Parameter
material__porous_medium__capillary_pressure__BrooksCorey__pc_max

Definition at line 33 of file CreateCapillaryPressureModel.cpp.

35{
37 config.checkConfigParameter("type", "BrooksCorey");
38
40 const auto pd = config.getConfigParameter<double>("pd");
41
43 const auto Sr = config.getConfigParameter<double>("sr");
44
45 double Sg_r = 0.0;
47 if (auto const Sg_r_ptr = config.getConfigParameterOptional<double>("sg_r"))
48 {
49 DBUG(
50 "Using value {:g} for nonwetting phase residual saturation in "
51 "capillary pressure model.",
52 (*Sg_r_ptr));
53 Sg_r = *Sg_r_ptr;
54 }
56 const auto Smax = config.getConfigParameter<double>("smax");
57
59 const auto m = config.getConfigParameter<double>("m");
60 if (m < 1.0) // m >= 1
61 {
63 "The exponent parameter of BrooksCorey capillary pressure "
64 "saturation model, m, must not be smaller than 1");
65 }
67 const auto Pc_max = config.getConfigParameter<double>("pc_max");
68
69 return std::make_unique<BrooksCoreyCapillaryPressureSaturation>(
70 pd, Sr, Sg_r, Smax, m, Pc_max);
71}
#define OGS_FATAL(...)
Definition Error.h:26
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::getConfigParameterOptional(), and OGS_FATAL.

Referenced by createCapillaryPressureModel().

◆ createCapillaryPressureModel()

std::unique_ptr< CapillaryPressureSaturation > MaterialLib::PorousMedium::createCapillaryPressureModel ( BaseLib::ConfigTree const & config)

Create a capillary pressure model

Parameters
configConfigTree object has a tag of <capillary_pressure>
Input File Parameter
material__porous_medium__capillary_pressure__type
Input File Parameter
material__porous_medium__capillary_pressure__type
Input File Parameter
material__porous_medium__capillary_pressure__Curve__curve

Definition at line 128 of file CreateCapillaryPressureModel.cpp.

130{
132 auto const type = config.peekConfigParameter<std::string>("type");
133
134 if (type == "BrooksCorey")
135 {
136 return createBrooksCorey(config);
137 }
138 if (type == "vanGenuchten")
139 {
140 return createVanGenuchten(config);
141 }
142 if (type == "Curve")
143 {
145 config.checkConfigParameter("type", "Curve");
146
148 auto const& curve_config = config.getConfigSubtree("curve");
149
152
153 return std::make_unique<CapillaryPressureSaturationCurve>(
154 std::move(curve));
155 }
156
157 OGS_FATAL(
158 "The capillary pressure saturation models {:s} are unavailable.\nThe "
159 "available types are: \n\tBrooksCorey, \n\tvanGenuchten,",
160 "\n\tCurve.\n",
161 type.data());
162}
static std::unique_ptr< CapillaryPressureSaturation > createBrooksCorey(BaseLib::ConfigTree const &config)
std::unique_ptr< CurveType > createPiecewiseLinearCurve(BaseLib::ConfigTree const &config)

References BaseLib::ConfigTree::checkConfigParameter(), createBrooksCorey(), MathLib::createPiecewiseLinearCurve(), createVanGenuchten(), BaseLib::ConfigTree::getConfigSubtree(), OGS_FATAL, and BaseLib::ConfigTree::peekConfigParameter().

Referenced by ProcessLib::TwoPhaseFlowWithPrho::createTwoPhaseFlowPrhoMaterialProperties().

◆ createNonWettingPhaseBrooksCoreyOilGas()

std::unique_ptr< RelativePermeability > MaterialLib::PorousMedium::createNonWettingPhaseBrooksCoreyOilGas ( BaseLib::ConfigTree const & config)
Parameters
configConfigTree object which contains the input data including <type>NonWettingPhaseBrooksCoreyOilGas</type> and it has a tag of <relative_permeability>
Input File Parameter
material__porous_medium__relative_permeability__type
Input File Parameter
material__porous_medium__relative_permeability__NonWettingPhaseBrooksCoreyOilGas__sr
Input File Parameter
material__porous_medium__relative_permeability__NonWettingPhaseBrooksCoreyOilGas__smax
Input File Parameter
material__porous_medium__relative_permeability__NonWettingPhaseBrooksCoreyOilGas__m
Input File Parameter
material__porous_medium__relative_permeability__NonWettingPhaseBrooksCoreyOilGas__krel_min

Definition at line 136 of file CreateRelativePermeabilityModel.cpp.

138{
140 config.checkConfigParameter("type", "NonWettingPhaseBrooksCoreyOilGas");
141
143 const auto Sr = config.getConfigParameter<double>("sr");
144
146 const auto Smax = config.getConfigParameter<double>("smax");
147
149 const auto m = config.getConfigParameter<double>("m");
150 if (m < 1.0) // m >= 1
151 {
152 OGS_FATAL(
153 "The exponent parameter of NonWettingPhaseBrooksCoreyOilGas\n"
154 "relative permeability model, m, must not be smaller than 1");
155 }
156
158 const auto krel_min = config.getConfigParameter<double>("krel_min");
159
160 return std::make_unique<NonWettingPhaseBrooksCoreyOilGas>(
161 Sr, Smax, m, krel_min);
162}

References BaseLib::ConfigTree::checkConfigParameter(), BaseLib::ConfigTree::getConfigParameter(), and OGS_FATAL.

Referenced by createRelativePermeabilityModel().

◆ createNonWettingPhaseVanGenuchten()

std::unique_ptr< RelativePermeability > MaterialLib::PorousMedium::createNonWettingPhaseVanGenuchten ( BaseLib::ConfigTree const & config)
Parameters
configConfigTree object which contains the input data including <type>NonWettingPhaseVanGenuchten</type> and it has a tag of <relative_permeability>
Input File Parameter
material__porous_medium__relative_permeability__type
Input File Parameter
material__porous_medium__relative_permeability__NonWettingPhaseVanGenuchten__sr
Input File Parameter
material__porous_medium__relative_permeability__NonWettingPhaseVanGenuchten__smax
Input File Parameter
material__porous_medium__relative_permeability__NonWettingPhaseVanGenuchten__m
Input File Parameter
material__porous_medium__relative_permeability__NonWettingPhaseVanGenuchten__krel_min

Definition at line 71 of file CreateRelativePermeabilityModel.cpp.

73{
75 config.checkConfigParameter("type", "NonWettingPhaseVanGenuchten");
76
78 const auto Sr = config.getConfigParameter<double>("sr");
79
81 const auto Smax = config.getConfigParameter<double>("smax");
82
84 const auto m = config.getConfigParameter<double>("m");
85 if (m < 0. || m > 1.0)
86 {
88 "The exponent parameter of NonWettingPhaseVanGenuchten relative\n"
89 " permeability model, m, must be in an interval of [0, 1]");
90 }
91
93 const auto krel_min = config.getConfigParameter<double>("krel_min");
94
95 return std::make_unique<NonWettingPhaseVanGenuchten>(Sr, Smax, m, krel_min);
96}

References BaseLib::ConfigTree::checkConfigParameter(), BaseLib::ConfigTree::getConfigParameter(), and OGS_FATAL.

Referenced by createRelativePermeabilityModel().

◆ createPermeabilityModel()

std::unique_ptr< Permeability > MaterialLib::PorousMedium::createPermeabilityModel ( BaseLib::ConfigTree const & config,
std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters )

Create a porosity model

Parameters
configConfigTree object has a tag of <permeability> that describes the permeability relationsship and contains the name of the parameter
parametersa vector containing the available parameters
Input File Parameter
material__porous_medium__permeability__type
Input File Parameter
material__porous_medium__permeability__permeability_tensor_entries
Input File Parameter
material__porous_medium__permeability__permeability_tensor_entries

Definition at line 29 of file createPermeabilityModel.cpp.

32{
34 auto const type = config.getConfigParameter<std::string>("type");
35
36 if (type == "Constant")
37 {
38 auto const& permeability_parameter = ParameterLib::findParameter<
39 double>(
40 config,
42 "permeability_tensor_entries", parameters, 0);
43
44 int dimension = static_cast<int>(
45 std::sqrt(permeability_parameter.getNumberOfGlobalComponents()));
46 if (permeability_parameter.getNumberOfGlobalComponents() !=
47 dimension * dimension)
48 {
50 "The given parameter has {:d} components, but the permeability "
51 "tensor is defined for a {:d} dimensional problem.",
52 permeability_parameter.getNumberOfGlobalComponents(),
53 dimension);
54 }
55
56 return std::make_unique<Permeability>(permeability_parameter,
57 dimension);
58 }
59
60 if (type == "Dupuit")
61 {
62 auto const& permeability_parameter = ParameterLib::findParameter<
63 double>(
64 config,
66 "permeability_tensor_entries", parameters, 0);
67
68 int dimension = static_cast<int>(
69 std::sqrt(permeability_parameter.getNumberOfGlobalComponents()));
70 if (permeability_parameter.getNumberOfGlobalComponents() !=
71 dimension * dimension)
72 {
74 "The given parameter has {:d} components, but the permeability "
75 "tensor is defined for a {:d} dimensional problem.",
76 permeability_parameter.getNumberOfGlobalComponents(),
77 dimension);
78 }
79
80 return std::make_unique<DupuitPermeability>(permeability_parameter,
81 dimension);
82 }
83 OGS_FATAL("The permeability type '{:s}' is unavailable.\n",
84 "The available types are \n\tConstant.",
85 type.data());
86}
Parameter< ParameterDataType > & findParameter(std::string const &parameter_name, std::vector< std::unique_ptr< ParameterBase > > const &parameters, int const num_components, MeshLib::Mesh const *const mesh=nullptr)
Definition Utils.h:101

References ParameterLib::findParameter(), BaseLib::ConfigTree::getConfigParameter(), and OGS_FATAL.

Referenced by createPorousMediaProperties().

◆ createPorousMediaProperties()

PorousMediaProperties MaterialLib::PorousMedium::createPorousMediaProperties ( MeshLib::Mesh & mesh,
BaseLib::ConfigTree const & configs,
std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters )
Input File Parameter
material__porous_medium__porous_medium
Input File Parameter
material__porous_medium__porous_medium
Input File Parameter
material__porous_medium__porous_medium__id
Input File Parameter
material__porous_medium__porous_medium__porosity
Input File Parameter
material__porous_medium__porous_medium__permeability
Input File Parameter
material__porous_medium__porous_medium__storage

Definition at line 24 of file CreatePorousMediaProperties.cpp.

27{
28 DBUG("Create PorousMediaProperties.");
29
30 auto const& porous_medium_configs =
32 configs.getConfigSubtree("porous_medium");
33
34 std::vector<std::unique_ptr<MaterialLib::PorousMedium::Permeability>>
35 intrinsic_permeability_models;
36 std::vector<std::unique_ptr<MaterialLib::PorousMedium::Porosity>>
37 porosity_models;
38 std::vector<std::unique_ptr<MaterialLib::PorousMedium::Storage>>
39 storage_models;
40
41 std::vector<int> mat_ids;
42 for (auto const& porous_medium_config :
44 porous_medium_configs.getConfigSubtreeList("porous_medium"))
45 {
47 auto const id = porous_medium_config.getConfigAttribute<int>("id");
48 mat_ids.push_back(id);
49
50 auto const& porosity_config =
52 porous_medium_config.getConfigSubtree("porosity");
53 porosity_models.emplace_back(
54 MaterialLib::PorousMedium::createPorosityModel(porosity_config,
55 parameters));
56
57 // Configuration for the intrinsic permeability (only one scalar per
58 // element, i.e., the isotropic case is handled at the moment)
59 auto const& permeability_config =
61 porous_medium_config.getConfigSubtree("permeability");
62 intrinsic_permeability_models.emplace_back(
64 permeability_config, parameters));
65
66 // Configuration for the specific storage.
67 auto const& storage_config =
69 porous_medium_config.getConfigSubtree("storage");
70 storage_models.emplace_back(
71 MaterialLib::PorousMedium::createStorageModel(storage_config));
72 }
73
74 BaseLib::reorderVector(intrinsic_permeability_models, mat_ids);
75 BaseLib::reorderVector(porosity_models, mat_ids);
76 BaseLib::reorderVector(storage_models, mat_ids);
77
78 auto const material_ids = materialIDs(mesh);
79 int const max_material_id =
80 !material_ids
81 ? 0
82 : *std::max_element(begin(*material_ids), end(*material_ids));
83
84 if (!material_ids && mat_ids.size() > 1)
85 {
87 "More than one porous medium definition (namely {}) is present in "
88 "the project file, but no MaterialIDs are present in the bulk "
89 "mesh.",
90 mat_ids.size());
91 }
92
93 if (max_material_id > static_cast<int>(mat_ids.size() - 1))
94 {
96 "The maximum value of MaterialIDs in mesh is {:d}. As the "
97 "given number of porous media definitions in the project file is "
98 "{:d}, the maximum value of MaterialIDs in mesh must be {:d} "
99 "(index starts with zero).",
100 max_material_id, mat_ids.size(), max_material_id - 1);
101 }
102
103 if (max_material_id < static_cast<int>(mat_ids.size() - 1))
104 WARN(
105 "There are {:d} porous medium definitions in the project file but "
106 "only {:d} different values in the MaterialIDs vector/data_array "
107 "in the mesh.",
108 mat_ids.size(), max_material_id - 1);
109
110 if (mat_ids.back() != static_cast<int>(mat_ids.size()) - 1)
111 {
112 OGS_FATAL(
113 "The ids in the porous media definitions in the project file have "
114 "to be sequential, starting with the id zero.");
115 }
116
117 return PorousMediaProperties{std::move(porosity_models),
118 std::move(intrinsic_permeability_models),
119 std::move(storage_models), material_ids};
120}
void WARN(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:40
void reorderVector(std::vector< ValueType > &v, std::vector< IndexType > const &order)
Definition Algorithm.h:198
std::unique_ptr< Permeability > createPermeabilityModel(BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters)

References createPermeabilityModel(), DBUG(), BaseLib::ConfigTree::getConfigAttribute(), BaseLib::ConfigTree::getConfigSubtree(), OGS_FATAL, BaseLib::reorderVector(), and WARN().

◆ createRelativePermeabilityModel()

std::unique_ptr< RelativePermeability > MaterialLib::PorousMedium::createRelativePermeabilityModel ( BaseLib::ConfigTree const & config)

Create a capillary pressure model

Parameters
configConfigTree object has a tag of <relative_permeability>
Input File Parameter
material__porous_medium__relative_permeability__type
Input File Parameter
material__porous_medium__relative_permeability__type
Input File Parameter
material__porous_medium__relative_permeability__Curve__curve

Definition at line 164 of file CreateRelativePermeabilityModel.cpp.

166{
168 auto const type = config.peekConfigParameter<std::string>("type");
169
170 if (type == "WettingPhaseVanGenuchten")
171 {
172 return createWettingPhaseVanGenuchten(config);
173 }
174 if (type == "NonWettingPhaseVanGenuchten")
175 {
176 return createNonWettingPhaseVanGenuchten(config);
177 }
178 if (type == "WettingPhaseBrooksCoreyOilGas")
179 {
180 return createWettingPhaseBrooksCoreyOilGas(config);
181 }
182 if (type == "NonWettingPhaseBrooksCoreyOilGas")
183 {
185 }
186 if (type == "Curve")
187 {
189 config.checkConfigParameter("type", "Curve");
190
192 auto const& curve_config = config.getConfigSubtree("curve");
193
195 MathLib ::PiecewiseLinearInterpolation>(curve_config);
196 return std::make_unique<RelativePermeabilityCurve>(std::move(curve));
197 }
198
199 OGS_FATAL(
200 "The relative permeability model {:s} is unavailable.\n"
201 "The available models are:"
202 "\n\tWettingPhaseVanGenuchten,"
203 "\n\tNonWettingPhaseVanGenuchten,"
204 "\n\tWettingPhaseBrooksCoreyOilGas,"
205 "\n\tNonWettingPhaseBrooksCoreyOilGas,",
206 "\n\tCurve.\n",
207 type.data());
208}
std::unique_ptr< RelativePermeability > createWettingPhaseVanGenuchten(BaseLib::ConfigTree const &config)
std::unique_ptr< RelativePermeability > createNonWettingPhaseBrooksCoreyOilGas(BaseLib::ConfigTree const &config)

References BaseLib::ConfigTree::checkConfigParameter(), createNonWettingPhaseBrooksCoreyOilGas(), createNonWettingPhaseVanGenuchten(), MathLib::createPiecewiseLinearCurve(), createWettingPhaseBrooksCoreyOilGas(), createWettingPhaseVanGenuchten(), BaseLib::ConfigTree::getConfigSubtree(), OGS_FATAL, and BaseLib::ConfigTree::peekConfigParameter().

Referenced by ProcessLib::TwoPhaseFlowWithPrho::createTwoPhaseFlowPrhoMaterialProperties().

◆ createVanGenuchten()

static std::unique_ptr< CapillaryPressureSaturation > MaterialLib::PorousMedium::createVanGenuchten ( BaseLib::ConfigTree const & config)
static
Parameters
configConfigTree object which contains the input data including <type>vanGenuchten</type> and it has a tag of <capillary_pressure>
Input File Parameter
material__porous_medium__capillary_pressure__type
Input File Parameter
material__porous_medium__capillary_pressure__vanGenuchten__pd
Input File Parameter
material__porous_medium__capillary_pressure__vanGenuchten__sr
Input File Parameter
material__porous_medium__capillary_pressure__vanGenuchten__sg_r
Input File Parameter
material__porous_medium__capillary_pressure__vanGenuchten__smax
Input File Parameter
material__porous_medium__capillary_pressure__vanGenuchten__m
Input File Parameter
material__porous_medium__capillary_pressure__vanGenuchten__pc_max
Input File Parameter
material__porous_medium__capillary_pressure__vanGenuchten__has_regularized

Definition at line 78 of file CreateCapillaryPressureModel.cpp.

80{
82 config.checkConfigParameter("type", "vanGenuchten");
83
85 const auto pd = config.getConfigParameter<double>("pd");
86
88 const auto Sr = config.getConfigParameter<double>("sr");
89
90 double Sg_r = 0.0;
92 if (auto const Sg_r_ptr = config.getConfigParameterOptional<double>("sg_r"))
93 {
94 DBUG(
95 "Using value {:g} for nonwetting phase residual saturation in "
96 "capillary pressure model.",
97 (*Sg_r_ptr));
98 Sg_r = *Sg_r_ptr;
99 }
100
102 const auto Smax = config.getConfigParameter<double>("smax");
103
105 const auto m = config.getConfigParameter<double>("m");
106 if (m < 0. || m > 1.0)
107 {
108 OGS_FATAL(
109 "The exponent parameter of van Genuchten capillary pressure "
110 "saturation model, m, must be in an interval of [0, 1]");
111 }
113 const auto Pc_max = config.getConfigParameter<double>("pc_max");
114
115 bool has_regularized = false;
116 if (auto const has_regularized_conf =
118 config.getConfigParameterOptional<bool>("has_regularized"))
119 {
120 DBUG("capillary pressure model: {:s}",
121 (*has_regularized_conf) ? "true" : "false");
122 has_regularized = *has_regularized_conf;
123 }
124 return std::make_unique<VanGenuchtenCapillaryPressureSaturation>(
125 pd, Sr, Sg_r, Smax, m, Pc_max, has_regularized);
126}

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::getConfigParameterOptional(), and OGS_FATAL.

Referenced by createCapillaryPressureModel().

◆ createWettingPhaseBrooksCoreyOilGas()

std::unique_ptr< RelativePermeability > MaterialLib::PorousMedium::createWettingPhaseBrooksCoreyOilGas ( BaseLib::ConfigTree const & config)
Parameters
configConfigTree object which contains the input data including <type>WettingPhaseBrooksCoreyOilGas</type> and it has a tag of <relative_permeability>
Input File Parameter
material__porous_medium__relative_permeability__type
Input File Parameter
material__porous_medium__relative_permeability__WettingPhaseBrooksCoreyOilGas__sr
Input File Parameter
material__porous_medium__relative_permeability__WettingPhaseBrooksCoreyOilGas__smax
Input File Parameter
material__porous_medium__relative_permeability__WettingPhaseBrooksCoreyOilGas__m
Input File Parameter
material__porous_medium__relative_permeability__WettingPhaseBrooksCoreyOilGas__krel_min

Definition at line 103 of file CreateRelativePermeabilityModel.cpp.

105{
107 config.checkConfigParameter("type", "WettingPhaseBrooksCoreyOilGas");
108
110 const auto Sr = config.getConfigParameter<double>("sr");
111
113 const auto Smax = config.getConfigParameter<double>("smax");
114
116 const auto m = config.getConfigParameter<double>("m");
117 if (m < 1.0) // m >= 1
118 {
119 OGS_FATAL(
120 "The exponent parameter of WettingPhaseBrooksCoreyOilGas\n"
121 "relative permeability model, m, must not be smaller than 1");
122 }
123
125 const auto krel_min = config.getConfigParameter<double>("krel_min");
126
127 return std::make_unique<WettingPhaseBrooksCoreyOilGas>(
128 Sr, Smax, m, krel_min);
129}

References BaseLib::ConfigTree::checkConfigParameter(), BaseLib::ConfigTree::getConfigParameter(), and OGS_FATAL.

Referenced by createRelativePermeabilityModel().

◆ createWettingPhaseVanGenuchten()

std::unique_ptr< RelativePermeability > MaterialLib::PorousMedium::createWettingPhaseVanGenuchten ( BaseLib::ConfigTree const & config)
Parameters
configConfigTree object which contains the input data including <type>WettingPhaseVanGenuchten</type> and it has a tag of <relative_permeability>
Input File Parameter
material__porous_medium__relative_permeability__type
Input File Parameter
material__porous_medium__relative_permeability__WettingPhaseVanGenuchten__sr
Input File Parameter
material__porous_medium__relative_permeability__WettingPhaseVanGenuchten__smax
Input File Parameter
material__porous_medium__relative_permeability__WettingPhaseVanGenuchten__m
Input File Parameter
material__porous_medium__relative_permeability__WettingPhaseVanGenuchten__krel_min

Definition at line 40 of file CreateRelativePermeabilityModel.cpp.

42{
44 config.checkConfigParameter("type", "WettingPhaseVanGenuchten");
45
47 const auto Sr = config.getConfigParameter<double>("sr");
48
50 const auto Smax = config.getConfigParameter<double>("smax");
51
53 const auto m = config.getConfigParameter<double>("m");
54 if (m < 0. || m > 1.0)
55 {
57 "The exponent parameter of WettingPhaseVanGenuchten relative\n"
58 " permeability model, m, must be in an interval of [0, 1]");
59 }
61 const auto krel_min = config.getConfigParameter<double>("krel_min");
62
63 return std::make_unique<WettingPhaseVanGenuchten>(Sr, Smax, m, krel_min);
64}

References BaseLib::ConfigTree::checkConfigParameter(), BaseLib::ConfigTree::getConfigParameter(), and OGS_FATAL.

Referenced by createRelativePermeabilityModel().