27 #ifndef OPM_ECL_HYSTERESIS_TWO_PHASE_LAW_HPP
28 #define OPM_ECL_HYSTERESIS_TWO_PHASE_LAW_HPP
38 template <
class EffectiveLawT,
39 class ParamsT = EclHysteresisTwoPhaseLawParams<EffectiveLawT> >
43 typedef EffectiveLawT EffectiveLaw;
44 typedef typename EffectiveLaw::Params EffectiveLawParams;
46 typedef typename EffectiveLaw::Traits Traits;
47 typedef ParamsT Params;
48 typedef typename EffectiveLaw::Scalar Scalar;
50 enum { wettingPhaseIdx = Traits::wettingPhaseIdx };
51 enum { nonWettingPhaseIdx = Traits::nonWettingPhaseIdx };
54 static const int numPhases = EffectiveLaw::numPhases;
56 "The endpoint scaling applies to the nested twophase laws, not to "
57 "the threephase one!");
63 static_assert(EffectiveLaw::implementsTwoPhaseApi,
64 "The material laws put into EclEpsTwoPhaseLaw must implement the "
65 "two-phase material law API!");
71 static_assert(EffectiveLaw::implementsTwoPhaseSatApi,
72 "The material laws put into EclEpsTwoPhaseLaw must implement the "
73 "two-phase material law saturation API!");
101 template <
class Container,
class Flu
idState>
106 OPM_THROW(NotImplemented,
107 "The capillaryPressures(fs) method is not yet implemented");
120 template <
class Container,
class Flu
idState>
125 OPM_THROW(NotImplemented,
126 "The pcnw(fs) method is not yet implemented");
140 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
141 static Evaluation
pcnw(
const Params& ,
144 OPM_THROW(NotImplemented,
145 "The pcnw(fs) method is not yet implemented");
148 template <
class Evaluation>
149 static Evaluation twoPhaseSatPcnw(
const Params& params,
const Evaluation&
Sw)
152 return EffectiveLaw::twoPhaseSatPcnw(params.drainageParams(),
Sw);
170 template <
class Container,
class Flu
idState>
175 OPM_THROW(NotImplemented,
176 "The saturations(fs) method is not yet implemented");
183 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
184 static Evaluation
Sw(
const Params& ,
187 OPM_THROW(NotImplemented,
188 "The Sw(fs) method is not yet implemented");
191 template <
class Evaluation>
192 static Evaluation twoPhaseSatSw(
const Params& ,
195 OPM_THROW(NotImplemented,
196 "The twoPhaseSatSw(pc) method is not yet implemented");
203 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
204 static Evaluation
Sn(
const Params& ,
207 OPM_THROW(NotImplemented,
208 "The Sn(pc) method is not yet implemented");
211 template <
class Evaluation>
212 static Evaluation twoPhaseSatSn(
const Params& ,
215 OPM_THROW(NotImplemented,
216 "The twoPhaseSatSn(pc) method is not yet implemented");
228 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
229 static Evaluation
krw(
const Params& ,
232 OPM_THROW(NotImplemented,
233 "The krw(fs) method is not yet implemented");
236 template <
class Evaluation>
237 static Evaluation twoPhaseSatKrw(
const Params& params,
const Evaluation& Sw)
241 if (!params.config().enableHysteresis() || params.config().krHysteresisModel() < 0)
242 return EffectiveLaw::twoPhaseSatKrw(params.drainageParams(),
Sw);
246 if (Sw <= params.krwSwMdc())
247 return EffectiveLaw::twoPhaseSatKrw(params.drainageParams(),
Sw);
249 return EffectiveLaw::twoPhaseSatKrw(params.imbibitionParams(),
250 Sw + params.deltaSwImbKrw());
256 template <
class Flu
idState,
class Evaluation =
typename Flu
idState::Scalar>
257 static Evaluation
krn(
const Params& ,
260 OPM_THROW(NotImplemented,
261 "The krn(fs) method is not yet implemented");
264 template <
class Evaluation>
265 static Evaluation twoPhaseSatKrn(
const Params& params,
const Evaluation& Sw)
268 if (!params.config().enableHysteresis() || params.config().krHysteresisModel() < 0)
269 return EffectiveLaw::twoPhaseSatKrn(params.drainageParams(),
Sw);
273 if (Sw <= params.krnSwMdc())
274 return EffectiveLaw::twoPhaseSatKrn(params.drainageParams(),
Sw);
276 return EffectiveLaw::twoPhaseSatKrn(params.imbibitionParams(),
277 Sw + params.deltaSwImbKrn());
static Evaluation krw(const Params &, const FluidState &)
The relative permeability for the wetting phase.
Definition: EclHysteresisTwoPhaseLaw.hpp:229
This material law implements the hysteresis model of the ECL file format.
Definition: EclHysteresisTwoPhaseLaw.hpp:40
static const bool isCompositionDependent
Specify whether the quantities defined by this material law are dependent on the phase composition...
Definition: EclHysteresisTwoPhaseLaw.hpp:89
static Evaluation Sw(const Params &, const FluidState &)
Calculate wetting liquid phase saturation given that the rest of the fluid state has been initialized...
Definition: EclHysteresisTwoPhaseLaw.hpp:184
static void capillaryPressures(Container &, const Params &, const FluidState &)
The capillary pressure-saturation curves depending on absolute saturations.
Definition: EclHysteresisTwoPhaseLaw.hpp:102
static const bool implementsTwoPhaseSatApi
Specify whether this material law implements the two-phase convenience API which only depends on the ...
Definition: EclHysteresisTwoPhaseLaw.hpp:69
static void saturations(Container &, const Params &, const FluidState &)
The saturation-capillary pressure curves.
Definition: EclHysteresisTwoPhaseLaw.hpp:171
static const bool isTemperatureDependent
Specify whether the quantities defined by this material law are temperature dependent.
Definition: EclHysteresisTwoPhaseLaw.hpp:85
static Evaluation Sn(const Params &, const FluidState &)
Calculate non-wetting liquid phase saturation given that the rest of the fluid state has been initial...
Definition: EclHysteresisTwoPhaseLaw.hpp:204
static const int numPhases
The number of fluid phases.
Definition: EclHysteresisTwoPhaseLaw.hpp:54
static Evaluation krn(const Params &, const FluidState &)
The relative permeability of the non-wetting phase.
Definition: EclHysteresisTwoPhaseLaw.hpp:257
static const bool isSaturationDependent
Specify whether the quantities defined by this material law are saturation dependent.
Definition: EclHysteresisTwoPhaseLaw.hpp:77
static void relativePermeabilities(Container &, const Params &, const FluidState &)
The relative permeability-saturation curves depending on absolute saturations.
Definition: EclHysteresisTwoPhaseLaw.hpp:121
static Evaluation pcnw(const Params &, const FluidState &)
The capillary pressure-saturation curve.
Definition: EclHysteresisTwoPhaseLaw.hpp:141
static const bool implementsTwoPhaseApi
Specify whether this material law implements the two-phase convenience API.
Definition: EclHysteresisTwoPhaseLaw.hpp:61
static const bool isPressureDependent
Specify whether the quantities defined by this material law are dependent on the absolute pressure...
Definition: EclHysteresisTwoPhaseLaw.hpp:81
A default implementation of the parameters for the material law which implements the ECL relative per...