24#ifndef DUMUX_PNM_BASE_PORE_PROPERTIES_HH
25#define DUMUX_PNM_BASE_PORE_PROPERTIES_HH
29#include <dune/common/exceptions.hh>
51 default: DUNE_THROW(Dune::InvalidStateException,
"Unknown shape!");
67 else DUNE_THROW(Dune::InvalidStateException, s <<
" is not a valid shape");
77 case Shape::cube:
return 8*inscribedRadius*inscribedRadius*inscribedRadius;
break;
78 case Shape::sphere:
return 4.0/3.0*M_PI*inscribedRadius*inscribedRadius*inscribedRadius;
break;
79 case Shape::circle:
return M_PI*inscribedRadius*inscribedRadius;
break;
80 case Shape::square:
return 4.0*inscribedRadius*inscribedRadius;
break;
81 case Shape::tetrahedron:
return 13.85*inscribedRadius*inscribedRadius*inscribedRadius;
break;
82 case Shape::octahedron:
return 6.93*inscribedRadius*inscribedRadius*inscribedRadius;
break;
83 case Shape::icosahedron:
return 5.05*inscribedRadius*inscribedRadius*inscribedRadius;
break;
84 case Shape::dodecahedron:
return 5.55*inscribedRadius*inscribedRadius*inscribedRadius;
break;
85 default : DUNE_THROW(Dune::InvalidStateException,
"Unsupported geometry");
96 case Shape::cylinder:
return M_PI*inscribedRadius*inscribedRadius*height;
break;
97 default : DUNE_THROW(Dune::InvalidStateException,
"Unsupported geometry");
Definition: poreproperties.hh:31
Shape shapeFromString(const std::string &s)
Get the shape from a string description of the shape.
Definition: poreproperties.hh:56
std::string shapeToString(Shape s)
Get the shape from a string description of the shape.
Definition: poreproperties.hh:38
Scalar volume(Shape shape, Scalar inscribedRadius)
Returns the volume of a given geometry based on the inscribed radius.
Definition: poreproperties.hh:73
Shape
Collection of different pore-body shapes.
Definition: poreproperties.hh:35
constexpr Shape shape(const Scalar shapeFactor) noexcept
Returns the shape for a given shape factor.
Definition: throatproperties.hh:176