25 #ifndef OPM_ECL_MULTIPLEXER_MATERIAL_HPP
26 #define OPM_ECL_MULTIPLEXER_MATERIAL_HPP
36 #include <opm/common/Exceptions.hpp>
37 #include <opm/common/ErrorMacros.hpp>
49 template <
class TraitsT,
50 class GasOilMaterialLawT,
51 class OilWaterMaterialLawT,
52 class ParamsT = EclMultiplexerMaterialParams<TraitsT,
54 OilWaterMaterialLawT> >
67 static_assert(TraitsT::numPhases == 3,
68 "The number of phases considered by this capillary pressure "
69 "law is always three!");
70 static_assert(GasOilMaterialLaw::numPhases == 2,
71 "The number of phases considered by the gas-oil capillary "
72 "pressure law must be two!");
73 static_assert(OilWaterMaterialLaw::numPhases == 2,
74 "The number of phases considered by the oil-water capillary "
75 "pressure law must be two!");
76 static_assert(std::is_same<
typename GasOilMaterialLaw::Scalar,
77 typename OilWaterMaterialLaw::Scalar>::value,
78 "The two two-phase capillary pressure laws must use the same "
79 "type of floating point values.");
81 typedef TraitsT Traits;
82 typedef ParamsT Params;
83 typedef typename Traits::Scalar Scalar;
85 static const int numPhases = 3;
86 static const int waterPhaseIdx = Traits::wettingPhaseIdx;
87 static const int oilPhaseIdx = Traits::nonWettingPhaseIdx;
88 static const int gasPhaseIdx = Traits::gasPhaseIdx;
92 static const bool implementsTwoPhaseApi =
false;
96 static const bool implementsTwoPhaseSatApi =
false;
100 static const bool isSaturationDependent =
true;
104 static const bool isPressureDependent =
false;
108 static const bool isTemperatureDependent =
false;
112 static const bool isCompositionDependent =
false;
128 template <
class ContainerT,
class Flu
idState>
129 static void capillaryPressures(ContainerT &values,
130 const Params ¶ms,
131 const FluidState &fluidState)
133 switch (params.approach()) {
135 Stone1Material::capillaryPressures(values,
136 params.template getRealParams<EclStone1Approach>(),
141 Stone2Material::capillaryPressures(values,
142 params.template getRealParams<EclStone2Approach>(),
147 DefaultMaterial::capillaryPressures(values,
148 params.template getRealParams<EclDefaultApproach>(),
153 TwoPhaseMaterial::capillaryPressures(values,
154 params.template getRealParams<EclTwoPhaseApproach>(),
169 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
170 static Evaluation pcgn(
const Params& ,
173 OPM_THROW(std::logic_error,
"Not implemented: pcgn()");
185 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
186 static Evaluation pcnw(
const Params& ,
189 OPM_THROW(std::logic_error,
"Not implemented: pcnw()");
195 template <
class ContainerT,
class Flu
idState>
196 static void saturations(ContainerT& ,
200 OPM_THROW(std::logic_error,
"Not implemented: saturations()");
206 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
207 static Evaluation Sg(
const Params& ,
210 OPM_THROW(std::logic_error,
"Not implemented: Sg()");
216 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
217 static Evaluation Sn(
const Params& ,
220 OPM_THROW(std::logic_error,
"Not implemented: Sn()");
226 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
227 static Evaluation Sw(
const Params& ,
230 OPM_THROW(std::logic_error,
"Not implemented: Sw()");
248 template <
class ContainerT,
class Flu
idState>
249 static void relativePermeabilities(ContainerT &values,
250 const Params ¶ms,
251 const FluidState &fluidState)
253 switch (params.approach()) {
255 Stone1Material::relativePermeabilities(values,
256 params.template getRealParams<EclStone1Approach>(),
261 Stone2Material::relativePermeabilities(values,
262 params.template getRealParams<EclStone2Approach>(),
267 DefaultMaterial::relativePermeabilities(values,
268 params.template getRealParams<EclDefaultApproach>(),
273 TwoPhaseMaterial::relativePermeabilities(values,
274 params.template getRealParams<EclTwoPhaseApproach>(),
283 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
284 static Evaluation krg(
const Params& ,
287 OPM_THROW(std::logic_error,
"Not implemented: krg()");
293 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
294 static Evaluation krw(
const Params& ,
297 OPM_THROW(std::logic_error,
"Not implemented: krw()");
303 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
304 static Evaluation krn(
const Params& ,
307 OPM_THROW(std::logic_error,
"Not implemented: krn()");
318 template <
class Flu
idState>
319 static void updateHysteresis(Params ¶ms,
const FluidState &fluidState)
321 switch (params.approach()) {
323 Stone1Material::updateHysteresis(params.template getRealParams<EclStone1Approach>(),
328 Stone2Material::updateHysteresis(params.template getRealParams<EclStone2Approach>(),
333 DefaultMaterial::updateHysteresis(params.template getRealParams<EclDefaultApproach>(),
338 TwoPhaseMaterial::updateHysteresis(params.template getRealParams<EclTwoPhaseApproach>(),
Implements the second phase capillary pressure/relperm law suggested by Stone as used by the ECLipse ...
Definition: Air_Mesitylene.hpp:31
Definition: EclMultiplexerMaterialParams.hpp:42
Some templates to wrap the valgrind client request macros.
Implements the default three phase capillary pressure law used by the ECLipse simulator.
Definition: EclDefaultMaterial.hpp:59
EclTwoPhaseApproach
Definition: EclTwoPhaseMaterialParams.hpp:33
Implements a multiplexer class that provides all three phase capillary pressure laws used by the ECLi...
Definition: EclMultiplexerMaterial.hpp:55
Opm::EclTwoPhaseMaterial< TraitsT, GasOilMaterialLaw, OilWaterMaterialLaw > TwoPhaseMaterial
Definition: EclMultiplexerMaterial.hpp:64
Multiplexer implementation for the parameters required by the multiplexed three-phase material law...
Implements a multiplexer class that provides ECL saturation functions for twophase simulations...
Definition: EclTwoPhaseMaterial.hpp:55
Definition: EclMultiplexerMaterialParams.hpp:41
Implements the second phase capillary pressure/relperm law suggested by Stone as used by the ECLipse ...
Implements the second phase capillary pressure/relperm law suggested by Stone as used by the ECLipse ...
Definition: EclStone1Material.hpp:60
Implements the second phase capillary pressure/relperm law suggested by Stone as used by the ECLipse ...
Definition: EclStone2Material.hpp:59
Implements a multiplexer class that provides ECL saturation functions for twophase simulations...
OilWaterMaterialLawT OilWaterMaterialLaw
Definition: EclMultiplexerMaterial.hpp:59
Opm::EclDefaultMaterial< TraitsT, GasOilMaterialLaw, OilWaterMaterialLaw > DefaultMaterial
Definition: EclMultiplexerMaterial.hpp:63
Opm::EclStone2Material< TraitsT, GasOilMaterialLaw, OilWaterMaterialLaw > Stone2Material
Definition: EclMultiplexerMaterial.hpp:62
Opm::EclStone1Material< TraitsT, GasOilMaterialLaw, OilWaterMaterialLaw > Stone1Material
Definition: EclMultiplexerMaterial.hpp:61
Definition: EclMultiplexerMaterialParams.hpp:40
GasOilMaterialLawT GasOilMaterialLaw
Definition: EclMultiplexerMaterial.hpp:58
Implements the default three phase capillary pressure law used by the ECLipse simulator.