27#ifndef DUMUX_MP_ADAPTER_HH
28#define DUMUX_MP_ADAPTER_HH
43template <
class MaterialLaw,
int numFlu
idPhases>
49template <
class MaterialLaw>
50class [[deprecated("Use new material laws and FluidMatrix::
MPAdapter instead!")]]
MPAdapter<MaterialLaw, 2 >
53 using Params =
typename MaterialLaw::Params;
61 template <
class ContainerT,
class Flu
idState>
64 const FluidState &state,
67 assert(values.size() == 2);
68 const int nPhaseIdx = 1 - wPhaseIdx;
70 values[nPhaseIdx] = 0;
72 values[wPhaseIdx] = - MaterialLaw::pc(params, state.saturation(wPhaseIdx));
82 template <
class ContainerT,
class Flu
idState>
85 const FluidState &state,
88 assert(values.size() == 2);
89 const int nPhaseIdx = 1 - wPhaseIdx;
90 values[wPhaseIdx] = MaterialLaw::krw(params, state.saturation(wPhaseIdx));
91 values[nPhaseIdx] = MaterialLaw::krn(params, state.saturation(wPhaseIdx));
100#include <dune/common/fvector.hh>
110template <
class MaterialLaw,
int numFlu
idPhases = MaterialLaw::numFlu
idPhases()>
117template<
class MaterialLaw>
119:
public Adapter<MPAdapter<MaterialLaw, 2>, MultiPhasePcKrSw>
122 using Scalar =
typename MaterialLaw::Scalar;
133 template <
class Flu
idState>
136 Dune::FieldVector<typename FluidState::Scalar, 2> values;
138 const int nPhaseIdx = 1 - wPhaseIdx;
140 values[nPhaseIdx] = 0;
142 values[wPhaseIdx] = - pcKrS_.pc(state.saturation(wPhaseIdx));
152 template <
class Flu
idState>
155 Dune::FieldVector<typename FluidState::Scalar, 2> values;
157 const int nPhaseIdx = 1 - wPhaseIdx;
158 values[wPhaseIdx] = pcKrS_.krw(state.saturation(wPhaseIdx));
159 values[nPhaseIdx] = pcKrS_.krn(state.saturation(wPhaseIdx));
164 const MaterialLaw& pcKrS_;
Wrapper type to combine an arbitrary number of different laws for fluid-matrix interaction (e....
Definition: brookscorey.hh:286
Template which always yields a false value.
Definition: typetraits.hh:36
Adapter to inherit from, allowing the inheriting class to be wrapped by the makeFluidMatrixInteractio...
Definition: fluidmatrixinteraction.hh:67
An adapter for mpnc to use the capillary pressure-saturation relationships.
Definition: mpadapter.hh:45
static void capillaryPressures(ContainerT &values, const Params ¶ms, const FluidState &state, int wPhaseIdx)
The capillary pressure-saturation curve.
Definition: mpadapter.hh:62
static void relativePermeabilities(ContainerT &values, const Params ¶ms, const FluidState &state, int wPhaseIdx)
The relative permeability of all phases.
Definition: mpadapter.hh:83
typename MaterialLaw::Params Params
Definition: mpadapter.hh:53
An adapter for mpnc to use the capillary pressure-saturation relationships.
Definition: mpadapter.hh:112
auto capillaryPressures(const FluidState &state, int wPhaseIdx) const
The capillary pressure-saturation curve.
Definition: mpadapter.hh:134
typename MaterialLaw::Scalar Scalar
Definition: mpadapter.hh:122
auto relativePermeabilities(const FluidState &state, int wPhaseIdx) const
The relative permeability of all phases.
Definition: mpadapter.hh:153
MPAdapter(const MaterialLaw &pcKrS)
Definition: mpadapter.hh:124