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,
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,
97 const Scalar shapeFactor)
noexcept
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
Dune::ReservedVector< Scalar, 4 > cornerHalfAngles(Shape shape)
Returns the corner half angle.
Definition throatproperties.hh:97
Shape
Collection of different pore-throat shapes.
Definition throatproperties.hh:38
@ square
Definition throatproperties.hh:38
@ equilateralTriangle
Definition throatproperties.hh:38
bool isRegularShape(Shape shape)
Returns if a shape is regular.
Definition throatproperties.hh:194