27 #ifndef OPM_ECL_MULTIPLEXER_MATERIAL_HPP 28 #define OPM_ECL_MULTIPLEXER_MATERIAL_HPP 36 #include <opm/common/Valgrind.hpp> 38 #include <opm/common/Exceptions.hpp> 39 #include <opm/common/ErrorMacros.hpp> 51 template <
class TraitsT,
52 class GasOilMaterialLawT,
53 class OilWaterMaterialLawT,
54 class ParamsT = EclMultiplexerMaterialParams<TraitsT,
56 OilWaterMaterialLawT> >
60 typedef GasOilMaterialLawT GasOilMaterialLaw;
61 typedef OilWaterMaterialLawT OilWaterMaterialLaw;
69 static_assert(TraitsT::numPhases == 3,
70 "The number of phases considered by this capillary pressure " 71 "law is always three!");
72 static_assert(GasOilMaterialLaw::numPhases == 2,
73 "The number of phases considered by the gas-oil capillary " 74 "pressure law must be two!");
75 static_assert(OilWaterMaterialLaw::numPhases == 2,
76 "The number of phases considered by the oil-water capillary " 77 "pressure law must be two!");
78 static_assert(std::is_same<
typename GasOilMaterialLaw::Scalar,
79 typename OilWaterMaterialLaw::Scalar>::value,
80 "The two two-phase capillary pressure laws must use the same " 81 "type of floating point values.");
83 typedef TraitsT Traits;
84 typedef ParamsT Params;
85 typedef typename Traits::Scalar Scalar;
87 static const int numPhases = 3;
88 static const int waterPhaseIdx = Traits::wettingPhaseIdx;
89 static const int oilPhaseIdx = Traits::nonWettingPhaseIdx;
90 static const int gasPhaseIdx = Traits::gasPhaseIdx;
130 template <
class ContainerT,
class Flu
idState>
132 const Params& params,
133 const FluidState& fluidState)
135 switch (params.approach()) {
136 case EclStone1Approach:
138 params.template getRealParams<EclStone1Approach>(),
142 case EclStone2Approach:
144 params.template getRealParams<EclStone2Approach>(),
148 case EclDefaultApproach:
150 params.template getRealParams<EclDefaultApproach>(),
154 case EclTwoPhaseApproach:
156 params.template getRealParams<EclTwoPhaseApproach>(),
168 static void oilWaterHysteresisParams(Scalar& pcSwMdc,
170 const Params& params)
172 switch (params.approach()) {
173 case EclStone1Approach:
174 Stone1Material::oilWaterHysteresisParams(pcSwMdc, krnSwMdc,
175 params.template getRealParams<EclStone1Approach>());
178 case EclStone2Approach:
179 Stone2Material::oilWaterHysteresisParams(pcSwMdc, krnSwMdc,
180 params.template getRealParams<EclStone2Approach>());
183 case EclDefaultApproach:
184 DefaultMaterial::oilWaterHysteresisParams(pcSwMdc, krnSwMdc,
185 params.template getRealParams<EclDefaultApproach>());
188 case EclTwoPhaseApproach:
189 TwoPhaseMaterial::oilWaterHysteresisParams(pcSwMdc, krnSwMdc,
190 params.template getRealParams<EclTwoPhaseApproach>());
201 static void setOilWaterHysteresisParams(
const Scalar& pcSwMdc,
202 const Scalar& krnSwMdc,
205 switch (params.approach()) {
206 case EclStone1Approach:
207 Stone1Material::setOilWaterHysteresisParams(pcSwMdc, krnSwMdc,
208 params.template getRealParams<EclStone1Approach>());
211 case EclStone2Approach:
212 Stone2Material::setOilWaterHysteresisParams(pcSwMdc, krnSwMdc,
213 params.template getRealParams<EclStone2Approach>());
216 case EclDefaultApproach:
217 DefaultMaterial::setOilWaterHysteresisParams(pcSwMdc, krnSwMdc,
218 params.template getRealParams<EclDefaultApproach>());
221 case EclTwoPhaseApproach:
222 TwoPhaseMaterial::setOilWaterHysteresisParams(pcSwMdc, krnSwMdc,
223 params.template getRealParams<EclTwoPhaseApproach>());
234 static void gasOilHysteresisParams(Scalar& pcSwMdc,
236 const Params& params)
238 switch (params.approach()) {
239 case EclStone1Approach:
240 Stone1Material::gasOilHysteresisParams(pcSwMdc, krnSwMdc,
241 params.template getRealParams<EclStone1Approach>());
244 case EclStone2Approach:
245 Stone2Material::gasOilHysteresisParams(pcSwMdc, krnSwMdc,
246 params.template getRealParams<EclStone2Approach>());
249 case EclDefaultApproach:
250 DefaultMaterial::gasOilHysteresisParams(pcSwMdc, krnSwMdc,
251 params.template getRealParams<EclDefaultApproach>());
254 case EclTwoPhaseApproach:
255 TwoPhaseMaterial::gasOilHysteresisParams(pcSwMdc, krnSwMdc,
256 params.template getRealParams<EclTwoPhaseApproach>());
267 static void setGasOilHysteresisParams(
const Scalar& pcSwMdc,
268 const Scalar& krnSwMdc,
271 switch (params.approach()) {
272 case EclStone1Approach:
273 Stone1Material::setGasOilHysteresisParams(pcSwMdc, krnSwMdc,
274 params.template getRealParams<EclStone1Approach>());
277 case EclStone2Approach:
278 Stone2Material::setGasOilHysteresisParams(pcSwMdc, krnSwMdc,
279 params.template getRealParams<EclStone2Approach>());
282 case EclDefaultApproach:
283 DefaultMaterial::setGasOilHysteresisParams(pcSwMdc, krnSwMdc,
284 params.template getRealParams<EclDefaultApproach>());
287 case EclTwoPhaseApproach:
288 TwoPhaseMaterial::setGasOilHysteresisParams(pcSwMdc, krnSwMdc,
289 params.template getRealParams<EclTwoPhaseApproach>());
303 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
304 static Evaluation
pcgn(
const Params& ,
307 OPM_THROW(std::logic_error,
"Not implemented: pcgn()");
319 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
320 static Evaluation
pcnw(
const Params& ,
323 OPM_THROW(std::logic_error,
"Not implemented: pcnw()");
329 template <
class ContainerT,
class Flu
idState>
334 OPM_THROW(std::logic_error,
"Not implemented: saturations()");
340 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
341 static Evaluation
Sg(
const Params& ,
344 OPM_THROW(std::logic_error,
"Not implemented: Sg()");
350 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
351 static Evaluation
Sn(
const Params& ,
354 OPM_THROW(std::logic_error,
"Not implemented: Sn()");
360 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
361 static Evaluation
Sw(
const Params& ,
364 OPM_THROW(std::logic_error,
"Not implemented: Sw()");
382 template <
class ContainerT,
class Flu
idState>
384 const Params& params,
385 const FluidState& fluidState)
387 switch (params.approach()) {
388 case EclStone1Approach:
390 params.template getRealParams<EclStone1Approach>(),
394 case EclStone2Approach:
396 params.template getRealParams<EclStone2Approach>(),
400 case EclDefaultApproach:
402 params.template getRealParams<EclDefaultApproach>(),
406 case EclTwoPhaseApproach:
408 params.template getRealParams<EclTwoPhaseApproach>(),
417 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
418 static Evaluation
krg(
const Params& ,
421 OPM_THROW(std::logic_error,
"Not implemented: krg()");
427 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
428 static Evaluation
krw(
const Params& ,
431 OPM_THROW(std::logic_error,
"Not implemented: krw()");
437 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
438 static Evaluation
krn(
const Params& ,
441 OPM_THROW(std::logic_error,
"Not implemented: krn()");
452 template <
class Flu
idState>
455 switch (params.approach()) {
456 case EclStone1Approach:
461 case EclStone2Approach:
466 case EclDefaultApproach:
471 case EclTwoPhaseApproach:
static const bool isCompositionDependent
Specify whether the quantities defined by this material law are dependent on the phase composition...
Definition: EclMultiplexerMaterial.hpp:114
Implements a multiplexer class that provides ECL saturation functions for twophase simulations...
static Evaluation krw(const Params &, const FluidState &)
The relative permeability of the wetting phase.
Definition: EclMultiplexerMaterial.hpp:428
static void capillaryPressures(ContainerT &values, const Params ¶ms, const FluidState &state)
Implements the default three phase capillary pressure law used by the ECLipse simulator.
Definition: EclDefaultMaterial.hpp:137
static void updateHysteresis(Params ¶ms, const FluidState &fluidState)
Update the hysteresis parameters after a time step.
Definition: EclStone2Material.hpp:367
static Evaluation krn(const Params &, const FluidState &)
The relative permeability of the non-wetting (i.e., oil) phase.
Definition: EclMultiplexerMaterial.hpp:438
static void capillaryPressures(ContainerT &values, const Params ¶ms, const FluidState &fluidState)
Implements the multiplexer three phase capillary pressure law used by the ECLipse simulator...
Definition: EclMultiplexerMaterial.hpp:131
static Evaluation Sw(const Params &, const FluidState &)
The saturation of the wetting (i.e., water) phase.
Definition: EclMultiplexerMaterial.hpp:361
Implements the second phase capillary pressure/relperm law suggested by Stone as used by the ECLipse ...
static const bool isTemperatureDependent
Specify whether the quantities defined by this material law are temperature dependent.
Definition: EclMultiplexerMaterial.hpp:110
static const bool implementsTwoPhaseSatApi
Specify whether this material law implements the two-phase convenience API which only depends on the ...
Definition: EclMultiplexerMaterial.hpp:98
static void capillaryPressures(ContainerT &values, const Params ¶ms, const FluidState &fluidState)
Implements the multiplexer three phase capillary pressure law used by the ECLipse simulator...
Definition: EclTwoPhaseMaterial.hpp:126
static void relativePermeabilities(ContainerT &values, const Params ¶ms, const FluidState &fluidState)
The relative permeability of all phases.
Definition: EclMultiplexerMaterial.hpp:383
Implements the second phase capillary pressure/relperm law suggested by Stone as used by the ECLipse ...
static void updateHysteresis(Params ¶ms, const FluidState &fluidState)
Update the hysteresis parameters after a time step.
Definition: EclMultiplexerMaterial.hpp:453
static void relativePermeabilities(ContainerT &values, const Params ¶ms, const FluidState &fluidState)
The relative permeability of all phases.
Definition: EclStone2Material.hpp:306
Definition: Air_Mesitylene.hpp:33
static void capillaryPressures(ContainerT &values, const Params ¶ms, const FluidState &state)
Implements the default three phase capillary pressure law used by the ECLipse simulator.
Definition: EclStone2Material.hpp:137
static Evaluation pcnw(const Params &, const FluidState &)
Capillary pressure between the non-wetting liquid (i.e., oil) and the wetting liquid (i...
Definition: EclMultiplexerMaterial.hpp:320
static const bool implementsTwoPhaseApi
Specify whether this material law implements the two-phase convenience API.
Definition: EclMultiplexerMaterial.hpp:94
static void relativePermeabilities(ContainerT &values, const Params ¶ms, const FluidState &fluidState)
The relative permeability of all phases.
Definition: EclStone1Material.hpp:305
static void updateHysteresis(Params ¶ms, const FluidState &fluidState)
Update the hysteresis parameters after a time step.
Definition: EclStone1Material.hpp:387
static void capillaryPressures(ContainerT &values, const Params ¶ms, const FluidState &state)
Implements the default three phase capillary pressure law used by the ECLipse simulator.
Definition: EclStone1Material.hpp:136
Implements the second phase capillary pressure/relperm law suggested by Stone as used by the ECLipse ...
Definition: EclStone2Material.hpp:61
Implements the second phase capillary pressure/relperm law suggested by Stone as used by the ECLipse ...
Definition: EclStone1Material.hpp:60
Implements a multiplexer class that provides all three phase capillary pressure laws used by the ECLi...
Definition: EclMultiplexerMaterial.hpp:57
Multiplexer implementation for the parameters required by the multiplexed three-phase material law...
static void relativePermeabilities(ContainerT &values, const Params ¶ms, const FluidState &fluidState)
The relative permeability of all phases.
Definition: EclDefaultMaterial.hpp:304
static const bool isPressureDependent
Specify whether the quantities defined by this material law are dependent on the absolute pressure...
Definition: EclMultiplexerMaterial.hpp:106
static Evaluation pcgn(const Params &, const FluidState &)
Capillary pressure between the gas and the non-wetting liquid (i.e., oil) phase.
Definition: EclMultiplexerMaterial.hpp:304
static void relativePermeabilities(ContainerT &values, const Params ¶ms, const FluidState &fluidState)
The relative permeability of all phases.
Definition: EclTwoPhaseMaterial.hpp:316
static Evaluation Sg(const Params &, const FluidState &)
The saturation of the gas phase.
Definition: EclMultiplexerMaterial.hpp:341
static void saturations(ContainerT &, const Params &, const FluidState &)
The inverse of the capillary pressure.
Definition: EclMultiplexerMaterial.hpp:330
static void updateHysteresis(Params ¶ms, const FluidState &fluidState)
Update the hysteresis parameters after a time step.
Definition: EclTwoPhaseMaterial.hpp:391
Implements the default three phase capillary pressure law used by the ECLipse simulator.
Definition: EclDefaultMaterial.hpp:61
static Evaluation Sn(const Params &, const FluidState &)
The saturation of the non-wetting (i.e., oil) phase.
Definition: EclMultiplexerMaterial.hpp:351
Implements a multiplexer class that provides ECL saturation functions for twophase simulations...
Definition: EclTwoPhaseMaterial.hpp:57
static const bool isSaturationDependent
Specify whether the quantities defined by this material law are saturation dependent.
Definition: EclMultiplexerMaterial.hpp:102
static void updateHysteresis(Params ¶ms, const FluidState &fluidState)
Update the hysteresis parameters after a time step.
Definition: EclDefaultMaterial.hpp:382
Implements the default three phase capillary pressure law used by the ECLipse simulator.
static Evaluation krg(const Params &, const FluidState &)
The relative permeability of the gas phase.
Definition: EclMultiplexerMaterial.hpp:418