3.4
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy > Class Template Reference

Wrapper class to implement regularized material laws (pc-sw, kr-sw) with a conversion policy between absolution and effective saturations. More...

#include <dumux/material/fluidmatrixinteractions/2p/materiallaw.hh>

Inheritance diagram for Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >:

Description

template<class ScalarType, class BaseLaw, class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
class Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >

Wrapper class to implement regularized material laws (pc-sw, kr-sw) with a conversion policy between absolution and effective saturations.

Note
See vangenuchten.hh / brookscorey.hh for default configurations using this class
Template Parameters
ScalarTypethe scalar type
BaseLawthe base law (e.g. VanGenuchten, BrooksCorey, Linear, ...)
Regularizationthe regularization type (set to NoRegularization to turn it off)
EffToAbsPolicythe policy how to convert effective <-> absolute saturations
Note
The regularization interface is expected to return Dumux::OptionalScalars which are wrappers around a Scalar type that provide a boolean operator to check whether the result is valid. If the regularization returns a non-valid value, it means that the given parameter range is outside the regularized region. For that case we forward to the call to the standard law.

Public Types

using Scalar = ScalarType
 
using BasicParams = typename BaseLaw::template Params< Scalar >
 
using EffToAbsParams = typename EffToAbsPolicy::template Params< Scalar >
 
using RegularizationParams = typename Regularization::template Params< Scalar >
 
using EffToAbs = EffToAbsPolicy
 

Public Member Functions

 TwoPMaterialLaw ()=delete
 Deleted default constructor (so we are never in an undefined state) More...
 
 TwoPMaterialLaw (const std::string &paramGroup)
 Construct from a subgroup from the global parameter tree. More...
 
 TwoPMaterialLaw (const BasicParams &baseParams, const EffToAbsParams &effToAbsParams={}, const RegularizationParams &regParams={})
 Construct from parameter structs. More...
 
template<bool enableRegularization = isRegularized()>
Scalar pc (const Scalar sw) const
 The capillary pressure-saturation curve. More...
 
template<bool enableRegularization = isRegularized()>
Scalar dpc_dsw (const Scalar sw) const
 The partial derivative of the capillary pressure w.r.t. the saturation. More...
 
Scalar endPointPc () const
 The capillary pressure at Swe = 1.0 also called end point capillary pressure. More...
 
template<bool enableRegularization = isRegularized()>
Scalar sw (const Scalar pc) const
 The saturation-capillary pressure curve. More...
 
template<bool enableRegularization = isRegularized()>
Scalar dsw_dpc (const Scalar pc) const
 The partial derivative of the saturation to the capillary pressure. More...
 
template<bool enableRegularization = isRegularized()>
Scalar krw (const Scalar sw) const
 The relative permeability for the wetting phase. More...
 
template<bool enableRegularization = isRegularized()>
Scalar dkrw_dsw (const Scalar sw) const
 The derivative of the relative permeability for the wetting phase w.r.t. saturation. More...
 
template<bool enableRegularization = isRegularized()>
Scalar krn (const Scalar sw) const
 The relative permeability for the non-wetting phase. More...
 
template<bool enableRegularization = isRegularized()>
Scalar dkrn_dsw (const Scalar sw) const
 The derivative of the relative permeability for the non-wetting phase w.r.t. saturation. More...
 
bool operator== (const TwoPMaterialLaw &o) const
 Equality comparison with another instance. More...
 
const BasicParamsbasicParams () const
 Return the base law's parameters. More...
 
const EffToAbsParamseffToAbsParams () const
 Return the parameters of the EffToAbs policy. More...
 

Static Public Member Functions

static constexpr int numFluidPhases ()
 Return the number of fluid phases. More...
 
static constexpr bool isRegularized ()
 Return whether this law is regularized. More...
 
static BasicParams makeBasicParams (const std::string &paramGroup)
 Create the base law's parameters using input file parameters. More...
 
static EffToAbsParams makeEffToAbsParams (const std::string &paramGroup)
 Create the parameters of the EffToAbs policy using input file parameters. More...
 

Member Typedef Documentation

◆ BasicParams

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
using Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::BasicParams = typename BaseLaw::template Params<Scalar>

◆ EffToAbs

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
using Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::EffToAbs = EffToAbsPolicy

◆ EffToAbsParams

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
using Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::EffToAbsParams = typename EffToAbsPolicy::template Params<Scalar>

◆ RegularizationParams

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
using Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::RegularizationParams = typename Regularization::template Params<Scalar>

◆ Scalar

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
using Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::Scalar = ScalarType

Constructor & Destructor Documentation

◆ TwoPMaterialLaw() [1/3]

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::TwoPMaterialLaw ( )
delete

Deleted default constructor (so we are never in an undefined state)

Note
store owning pointers to laws instead if you need default-constructible objects

◆ TwoPMaterialLaw() [2/3]

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::TwoPMaterialLaw ( const std::string &  paramGroup)
inlineexplicit

Construct from a subgroup from the global parameter tree.

Note
This will give you nice error messages if a mandatory parameter is missing

◆ TwoPMaterialLaw() [3/3]

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::TwoPMaterialLaw ( const BasicParams baseParams,
const EffToAbsParams effToAbsParams = {},
const RegularizationParams regParams = {} 
)
inline

Construct from parameter structs.

Note
More efficient constructor but you need to ensure all parameters are initialized

Member Function Documentation

◆ basicParams()

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
const BasicParams & Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::basicParams ( ) const
inline

Return the base law's parameters.

◆ dkrn_dsw()

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
template<bool enableRegularization = isRegularized()>
Scalar Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::dkrn_dsw ( const Scalar  sw) const
inline

The derivative of the relative permeability for the non-wetting phase w.r.t. saturation.

◆ dkrw_dsw()

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
template<bool enableRegularization = isRegularized()>
Scalar Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::dkrw_dsw ( const Scalar  sw) const
inline

The derivative of the relative permeability for the wetting phase w.r.t. saturation.

◆ dpc_dsw()

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
template<bool enableRegularization = isRegularized()>
Scalar Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::dpc_dsw ( const Scalar  sw) const
inline

The partial derivative of the capillary pressure w.r.t. the saturation.

◆ dsw_dpc()

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
template<bool enableRegularization = isRegularized()>
Scalar Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::dsw_dpc ( const Scalar  pc) const
inline

The partial derivative of the saturation to the capillary pressure.

◆ effToAbsParams()

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
const EffToAbsParams & Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::effToAbsParams ( ) const
inline

Return the parameters of the EffToAbs policy.

◆ endPointPc()

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
Scalar Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::endPointPc ( ) const
inline

The capillary pressure at Swe = 1.0 also called end point capillary pressure.

◆ isRegularized()

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
static constexpr bool Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::isRegularized ( )
inlinestaticconstexpr

Return whether this law is regularized.

◆ krn()

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
template<bool enableRegularization = isRegularized()>
Scalar Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::krn ( const Scalar  sw) const
inline

The relative permeability for the non-wetting phase.

◆ krw()

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
template<bool enableRegularization = isRegularized()>
Scalar Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::krw ( const Scalar  sw) const
inline

The relative permeability for the wetting phase.

◆ makeBasicParams()

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
static BasicParams Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::makeBasicParams ( const std::string &  paramGroup)
inlinestatic

Create the base law's parameters using input file parameters.

◆ makeEffToAbsParams()

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
static EffToAbsParams Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::makeEffToAbsParams ( const std::string &  paramGroup)
inlinestatic

Create the parameters of the EffToAbs policy using input file parameters.

◆ numFluidPhases()

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
static constexpr int Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::numFluidPhases ( )
inlinestaticconstexpr

Return the number of fluid phases.

◆ operator==()

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
bool Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::operator== ( const TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy > &  o) const
inline

Equality comparison with another instance.

◆ pc()

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
template<bool enableRegularization = isRegularized()>
Scalar Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::pc ( const Scalar  sw) const
inline

The capillary pressure-saturation curve.

◆ sw()

template<class ScalarType , class BaseLaw , class Regularization = NoRegularization, class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
template<bool enableRegularization = isRegularized()>
Scalar Dumux::FluidMatrix::TwoPMaterialLaw< ScalarType, BaseLaw, Regularization, EffToAbsPolicy >::sw ( const Scalar  pc) const
inline

The saturation-capillary pressure curve.


The documentation for this class was generated from the following file: