26#ifndef DUMUX_PNM_THRESHOLD_CAPILLARY_PRESSURES_HH
27#define DUMUX_PNM_THRESHOLD_CAPILLARY_PRESSURES_HH
31#include <dune/common/exceptions.hh>
42template <
class Scalar>
44 const Scalar contactAngle,
45 const Scalar inscribedRadius,
51 const Scalar cornerHalfAngle = Throat::cornerHalfAngles<Scalar>(
shape)[0];
55 if (cornerHalfAngle + contactAngle >= 0.5*M_PI)
56 return std::numeric_limits<Scalar>::lowest();
58 const Scalar cosContactAngle = cos(contactAngle);
59 const Scalar sinContactAngle = sin(contactAngle);
62 const Scalar tanCornerHalfAngle = [&]{
switch (
shape){
65 default:
using std::tan;
return tan(cornerHalfAngle);
68 return surfaceTension / inscribedRadius * (cosContactAngle - sinContactAngle * tanCornerHalfAngle);
76template <
class Scalar>
78 const Scalar contactAngle,
79 const Scalar inscribedRadius,
85 DUNE_THROW(Dune::NotImplemented,
"Pc snap-off is not implemented for this irregular shape");
94Scalar
pcEntry(
const Scalar surfaceTension,
95 const Scalar contactAngle,
96 const Scalar inscribedRadius,
103 const Scalar cosContactAngle = cos(contactAngle);
104 const Scalar sinContactAngle = sin(contactAngle);
106 const Scalar D = M_PI - 3*contactAngle + 3*sinContactAngle*cosContactAngle - (cosContactAngle*cosContactAngle) / (4*
shapeFactor);
107 const Scalar F = (1 + sqrt(1 + 4*
shapeFactor*D / (cosContactAngle*cosContactAngle))) / (1 + 2*sqrt(M_PI*
shapeFactor));
108 return surfaceTension / inscribedRadius * cosContactAngle * (1 + 2*sqrt(M_PI*
shapeFactor)) * F;
This file contains functions related to calculate pore-throat properties.
Definition: thresholdcapillarypressures.hh:34
Scalar pcSnapoff(const Scalar surfaceTension, const Scalar contactAngle, const Scalar inscribedRadius, const Throat::Shape shape)
The snap-off capillary pressure of a pore throat It checks if the cross section shape of the throat i...
Definition: thresholdcapillarypressures.hh:77
Scalar pcEntry(const Scalar surfaceTension, const Scalar contactAngle, const Scalar inscribedRadius, const Scalar shapeFactor) noexcept
The entry capillary pressure of a pore throat.
Definition: thresholdcapillarypressures.hh:94
Scalar pcSnapoffRegularShape(const Scalar surfaceTension, const Scalar contactAngle, const Scalar inscribedRadius, const Throat::Shape shape) noexcept
The snap-off capillary pressure of a pore throat with regular cross section shape (with same corner a...
Definition: thresholdcapillarypressures.hh:43
constexpr Shape shape(const Scalar shapeFactor) noexcept
Returns the shape for a given shape factor.
Definition: throatproperties.hh:177
Shape
Collection of different pore-throat shapes.
Definition: throatproperties.hh:38
Scalar shapeFactor(Shape shape, const Scalar inscribedRadius)
Returns the value of the shape factor for a given shape.
Definition: throatproperties.hh:162
bool isRegularShape(Shape shape)
Returns if a shape is regular.
Definition: throatproperties.hh:194