12#ifndef DUMUX_MATERIAL_FLUIDMATRIX_TWO_P_INTERFACIAL_AREA_HH
13#define DUMUX_MATERIAL_FLUIDMATRIX_TWO_P_INTERFACIAL_AREA_HH
38template<
class ScalarType,
40 template<
class>
class InterfaceType,
41 class Regularization = NoRegularization,
42 class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
43class InterfacialArea :
public Adapter<InterfacialArea<ScalarType, BaseLaw, InterfaceType, Regularization, EffToAbsPolicy>, InterfaceType>
49 using BasicParams =
typename BaseLaw::template Params<Scalar>;
59 {
return !std::is_same<Regularization, NoRegularization>::value; }
76 regularization_.init(
this, paramGroup);
86 : basicParams_(baseParams)
96 template<
bool enableRegularization = isRegularized()>
99 const auto swe = EffToAbs::swToSwe(sw, effToAbsParams_);
100 if constexpr (enableRegularization)
102 const auto regularized = regularization_.area(swe, pc);
104 return regularized.value();
107 return BaseLaw::area(swe, pc, basicParams_);
113 template<
bool enableRegularization = isRegularized()>
116 if constexpr (enableRegularization)
118 const auto regularized = regularization_.darea_dpc(sw, pc);
120 return regularized.value();
123 return BaseLaw::darea_dpc(sw, pc, basicParams_);
129 template<
bool enableRegularization = isRegularized()>
132 if constexpr (enableRegularization)
134 const auto regularized = regularization_.darea_dsw(sw, pc);
136 return regularized.value();
139 return BaseLaw::darea_dsw(sw, pc, basicParams_);
147 return basicParams_ == o.basicParams_
148 && effToAbsParams_ == o.effToAbsParams_
149 && regularization_ == o.regularization_;
158 return BaseLaw::template makeParams<Scalar>(paramGroup);
165 {
return basicParams_; }
173 return EffToAbs::template makeParams<Scalar>(paramGroup);
180 {
return effToAbsParams_; }
185 Regularization regularization_;
Wrapper class to implement regularized laws (pc-sw-a) with a conversion policy between absolution and...
Definition: interfacialarea.hh:44
EffToAbsPolicy EffToAbs
Definition: interfacialarea.hh:53
const BasicParams & basicParams() const
Return the base law's parameters.
Definition: interfacialarea.hh:164
bool operator==(const InterfacialArea &o) const
Equality comparison with another instance.
Definition: interfacialarea.hh:145
ScalarType Scalar
Definition: interfacialarea.hh:47
Scalar darea_dpc(const Scalar sw, const Scalar pc) const
The partial derivative of the capillary pressure w.r.t. the saturation.
Definition: interfacialarea.hh:114
const EffToAbsParams & effToAbsParams() const
Return the parameters of the EffToAbs policy.
Definition: interfacialarea.hh:179
typename EffToAbsPolicy::template Params< Scalar > EffToAbsParams
Definition: interfacialarea.hh:50
InterfacialArea()=delete
Deleted default constructor (so we are never in an undefined state)
Scalar area(const Scalar sw, const Scalar pc) const
The capillary pressure-saturation curve.
Definition: interfacialarea.hh:97
Scalar darea_dsw(const Scalar sw, const Scalar pc) const
The partial derivative of the saturation to the capillary pressure.
Definition: interfacialarea.hh:130
static EffToAbsParams makeEffToAbsParams(const std::string ¶mGroup)
Create the parameters of the EffToAbs policy using input file parameters.
Definition: interfacialarea.hh:171
InterfacialArea(const BasicParams &baseParams, const EffToAbsParams &effToAbsParams={}, const RegularizationParams ®Params={})
Construct from parameter structs.
Definition: interfacialarea.hh:83
static constexpr bool isRegularized()
Return whether this law is regularized.
Definition: interfacialarea.hh:58
static BasicParams makeBasicParams(const std::string ¶mGroup)
Create the base law's parameters using input file parameters.
Definition: interfacialarea.hh:156
InterfacialArea(const std::string ¶mGroup)
Construct from a subgroup from the global parameter tree.
Definition: interfacialarea.hh:71
typename Regularization::template Params< Scalar > RegularizationParams
Definition: interfacialarea.hh:51
typename BaseLaw::template Params< Scalar > BasicParams
Definition: interfacialarea.hh:49
This is a policy for 2p material laws how to convert absolute to relative saturations and vice versa.
Wrapper type to combine an arbitrary number of different laws for fluid-matrix interaction (e....
Definition: brookscorey.hh:23
A tag to turn off regularization and it's overhead.
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
Adapter to inherit from, allowing the inheriting class to be wrapped by the makeFluidMatrixInteractio...
Definition: fluidmatrixinteraction.hh:55