24#ifndef DUMUX_MATERIAL_FLUIDMATRIX_TWO_P_INTERFACIAL_AREA_HH
25#define DUMUX_MATERIAL_FLUIDMATRIX_TWO_P_INTERFACIAL_AREA_HH
50template<
class ScalarType,
52 template<
class>
class InterfaceType,
53 class Regularization = NoRegularization,
54 class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
55class InterfacialArea :
public Adapter<InterfacialArea<ScalarType, BaseLaw, InterfaceType, Regularization, EffToAbsPolicy>, InterfaceType>
61 using BasicParams =
typename BaseLaw::template Params<Scalar>;
71 {
return !std::is_same<Regularization, NoRegularization>::value; }
88 regularization_.init(
this, paramGroup);
98 : basicParams_(baseParams)
102 regularization_.init(
this, baseParams,
effToAbsParams, regParams);
108 template<
bool enableRegularization = isRegularized()>
111 const auto swe = EffToAbs::swToSwe(sw, effToAbsParams_);
112 if constexpr (enableRegularization)
114 const auto regularized = regularization_.area(swe, pc);
116 return regularized.value();
119 return BaseLaw::area(swe, pc, basicParams_);
125 template<
bool enableRegularization = isRegularized()>
128 if constexpr (enableRegularization)
130 const auto regularized = regularization_.darea_dpc(sw, pc);
132 return regularized.value();
135 return BaseLaw::darea_dpc(sw, pc, basicParams_);
141 template<
bool enableRegularization = isRegularized()>
144 if constexpr (enableRegularization)
146 const auto regularized = regularization_.darea_dsw(sw, pc);
148 return regularized.value();
151 return BaseLaw::darea_dsw(sw, pc, basicParams_);
159 return basicParams_ == o.basicParams_
160 && effToAbsParams_ == o.effToAbsParams_
161 && regularization_ == o.regularization_;
170 return BaseLaw::template makeParams<Scalar>(paramGroup);
177 {
return basicParams_; }
185 return EffToAbs::template makeParams<Scalar>(paramGroup);
192 {
return effToAbsParams_; }
197 Regularization regularization_;
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
This is a policy for 2p material laws how to convert absolute to relative saturations and vice versa.
A tag to turn off regularization and it's overhead.
Wrapper type to combine an arbitrary number of different laws for fluid-matrix interaction (e....
Definition: brookscorey.hh:286
Wrapper class to implement regularized laws (pc-sw-a) with a conversion policy between absolution and...
Definition: interfacialarea.hh:56
EffToAbsPolicy EffToAbs
Definition: interfacialarea.hh:65
const BasicParams & basicParams() const
Return the base law's parameters.
Definition: interfacialarea.hh:176
bool operator==(const InterfacialArea &o) const
Equality comparison with another instance.
Definition: interfacialarea.hh:157
ScalarType Scalar
Definition: interfacialarea.hh:59
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:126
const EffToAbsParams & effToAbsParams() const
Return the parameters of the EffToAbs policy.
Definition: interfacialarea.hh:191
typename EffToAbsPolicy::template Params< Scalar > EffToAbsParams
Definition: interfacialarea.hh:62
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:109
Scalar darea_dsw(const Scalar sw, const Scalar pc) const
The partial derivative of the saturation to the capillary pressure.
Definition: interfacialarea.hh:142
static EffToAbsParams makeEffToAbsParams(const std::string ¶mGroup)
Create the parameters of the EffToAbs policy using input file parameters.
Definition: interfacialarea.hh:183
InterfacialArea(const BasicParams &baseParams, const EffToAbsParams &effToAbsParams={}, const RegularizationParams ®Params={})
Construct from parameter structs.
Definition: interfacialarea.hh:95
static constexpr bool isRegularized()
Return whether this law is regularized.
Definition: interfacialarea.hh:70
static BasicParams makeBasicParams(const std::string ¶mGroup)
Create the base law's parameters using input file parameters.
Definition: interfacialarea.hh:168
InterfacialArea(const std::string ¶mGroup)
Construct from a subgroup from the global parameter tree.
Definition: interfacialarea.hh:83
typename Regularization::template Params< Scalar > RegularizationParams
Definition: interfacialarea.hh:63
typename BaseLaw::template Params< Scalar > BasicParams
Definition: interfacialarea.hh:61
Adapter to inherit from, allowing the inheriting class to be wrapped by the makeFluidMatrixInteractio...
Definition: fluidmatrixinteraction.hh:67