27#ifndef DUMUX_MP_ADAPTER_HH
28#define DUMUX_MP_ADAPTER_HH
30#include <dune/common/fvector.hh>
40template <class MaterialLaw, int numFluidPhases = std::decay_t<MaterialLaw>::numFluidPhases()>
47template<
class MaterialLaw>
49:
public Adapter<MPAdapter<MaterialLaw, 2>, MultiPhasePcKrSw>
52 using Scalar =
typename std::decay_t<MaterialLaw>::Scalar;
55 : pcKrS_(std::forward<MaterialLaw>(pcKrS))
63 template <
class Flu
idState>
66 Dune::FieldVector<typename FluidState::Scalar, 2> values;
68 const int nPhaseIdx = 1 - wPhaseIdx;
70 values[nPhaseIdx] = 0;
72 values[wPhaseIdx] = - pcKrS_.pc(state.saturation(wPhaseIdx));
82 template <
class Flu
idState>
85 Dune::FieldVector<typename FluidState::Scalar, 2> values;
87 const int nPhaseIdx = 1 - wPhaseIdx;
88 values[wPhaseIdx] = pcKrS_.krw(state.saturation(wPhaseIdx));
89 values[nPhaseIdx] = pcKrS_.krn(state.saturation(wPhaseIdx));
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:35
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:42
auto capillaryPressures(const FluidState &state, int wPhaseIdx) const
The capillary pressure-saturation curve.
Definition: mpadapter.hh:64
auto relativePermeabilities(const FluidState &state, int wPhaseIdx) const
The relative permeability of all phases.
Definition: mpadapter.hh:83
MPAdapter(MaterialLaw &&pcKrS)
Definition: mpadapter.hh:54
typename std::decay_t< MaterialLaw >::Scalar Scalar
Definition: mpadapter.hh:52