15#ifndef DUMUX_MP_ADAPTER_HH
16#define DUMUX_MP_ADAPTER_HH
18#include <dune/common/fvector.hh>
28template <class MaterialLaw, int numFluidPhases = std::decay_t<MaterialLaw>::numFluidPhases()>
35template<
class MaterialLaw>
37:
public Adapter<MPAdapter<MaterialLaw, 2>, MultiPhasePcKrSw>
40 using Scalar =
typename std::decay_t<MaterialLaw>::Scalar;
43 : pcKrS_(std::forward<MaterialLaw>(pcKrS))
51 template <
class Flu
idState>
54 Dune::FieldVector<typename FluidState::Scalar, 2> values;
56 const int nPhaseIdx = 1 - wPhaseIdx;
58 values[nPhaseIdx] = 0;
60 values[wPhaseIdx] = - pcKrS_.pc(state.saturation(wPhaseIdx));
70 template <
class Flu
idState>
73 Dune::FieldVector<typename FluidState::Scalar, 2> values;
75 const int nPhaseIdx = 1 - wPhaseIdx;
76 values[wPhaseIdx] = pcKrS_.krw(state.saturation(wPhaseIdx));
77 values[nPhaseIdx] = pcKrS_.krn(state.saturation(wPhaseIdx));
auto capillaryPressures(const FluidState &state, int wPhaseIdx) const
The capillary pressure-saturation curve.
Definition: mpadapter.hh:52
auto relativePermeabilities(const FluidState &state, int wPhaseIdx) const
The relative permeability of all phases.
Definition: mpadapter.hh:71
MPAdapter(MaterialLaw &&pcKrS)
Definition: mpadapter.hh:42
typename std::decay_t< MaterialLaw >::Scalar Scalar
Definition: mpadapter.hh:40
An adapter for mpnc to use the capillary pressure-saturation relationships.
Definition: mpadapter.hh:30
Wrapper type to combine an arbitrary number of different laws for fluid-matrix interaction (e....
MPAdapter(T &&) -> MPAdapter< T >
Deduction guide for the MPAdapter class. Makes sure that MPAdapter stores a copy of T if the construc...
Definition: brookscorey.hh:23
Template which always yields a false value.
Definition: common/typetraits/typetraits.hh:24
Adapter to inherit from, allowing the inheriting class to be wrapped by the makeFluidMatrixInteractio...
Definition: fluidmatrixinteraction.hh:55