14#ifndef DUMUX_PNM_THRESHOLD_CAPILLARY_PRESSURES_HH
15#define DUMUX_PNM_THRESHOLD_CAPILLARY_PRESSURES_HH
19#include <dune/common/exceptions.hh>
30template <
class Scalar>
32 const Scalar contactAngle,
33 const Scalar inscribedRadius,
43 if (cornerHalfAngle + contactAngle >= 0.5*M_PI)
44 return std::numeric_limits<Scalar>::lowest();
46 const Scalar cosContactAngle = cos(contactAngle);
47 const Scalar sinContactAngle = sin(contactAngle);
50 const Scalar tanCornerHalfAngle = [&]{
switch (shape){
53 default:
using std::tan;
return tan(cornerHalfAngle);
56 return surfaceTension / inscribedRadius * (cosContactAngle - sinContactAngle * tanCornerHalfAngle);
64template <
class Scalar>
66 const Scalar contactAngle,
67 const Scalar inscribedRadius,
73 DUNE_THROW(Dune::NotImplemented,
"Pc snap-off is not implemented for this irregular shape");
82Scalar
pcEntry(
const Scalar surfaceTension,
83 const Scalar contactAngle,
84 const Scalar inscribedRadius,
85 const Scalar shapeFactor)
noexcept
91 const Scalar cosContactAngle = cos(contactAngle);
92 const Scalar sinContactAngle = sin(contactAngle);
94 const Scalar D = M_PI - 3*contactAngle + 3*sinContactAngle*cosContactAngle - (cosContactAngle*cosContactAngle) / (4*shapeFactor);
95 const Scalar F = (1 + sqrt(1 + 4*shapeFactor*D / (cosContactAngle*cosContactAngle))) / (1 + 2*sqrt(M_PI*shapeFactor));
96 return surfaceTension / inscribedRadius * cosContactAngle * (1 + 2*sqrt(M_PI*shapeFactor)) * F;
Definition thresholdcapillarypressures.hh:22
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:65
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:82
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:31
Dune::ReservedVector< Scalar, 4 > cornerHalfAngles(Shape shape)
Returns the corner half angle.
Definition throatproperties.hh:85
Shape
Collection of different pore-throat shapes.
Definition throatproperties.hh:26
bool isRegularShape(Shape shape)
Returns if a shape is regular.
Definition throatproperties.hh:182
This file contains functions related to calculate pore-throat properties.