12#ifndef DUMUX_PNM_BASE_PORE_PROPERTIES_HH 
   13#define DUMUX_PNM_BASE_PORE_PROPERTIES_HH 
   17#include <dune/common/exceptions.hh> 
   39        default: DUNE_THROW(Dune::InvalidStateException, 
"Unknown shape!");
 
 
   55    else DUNE_THROW(Dune::InvalidStateException, s << 
" is not a valid shape");
 
 
   65        case Shape::cube: 
return 8*inscribedRadius*inscribedRadius*inscribedRadius; 
break;
 
   66        case Shape::sphere: 
return 4.0/3.0*M_PI*inscribedRadius*inscribedRadius*inscribedRadius; 
break;
 
   67        case Shape::circle: 
return M_PI*inscribedRadius*inscribedRadius; 
break;
 
   68        case Shape::square: 
return 4.0*inscribedRadius*inscribedRadius; 
break;
 
   69        case Shape::tetrahedron: 
return 13.85*inscribedRadius*inscribedRadius*inscribedRadius; 
break;
 
   70        case Shape::octahedron: 
return 6.93*inscribedRadius*inscribedRadius*inscribedRadius; 
break;
 
   71        case Shape::icosahedron: 
return 5.05*inscribedRadius*inscribedRadius*inscribedRadius; 
break;
 
   72        case Shape::dodecahedron: 
return 5.55*inscribedRadius*inscribedRadius*inscribedRadius; 
break;
 
   73        default : DUNE_THROW(Dune::InvalidStateException, 
"Unsupported geometry");
 
 
   80inline Scalar 
volume(
Shape shape, Scalar inscribedRadius, Scalar height)
 
   84        case Shape::cylinder: 
return M_PI*inscribedRadius*inscribedRadius*height; 
break;
 
   85        default : DUNE_THROW(Dune::InvalidStateException, 
"Unsupported geometry");
 
 
 
Definition poreproperties.hh:19
Shape shapeFromString(const std::string &s)
Get the shape from a string description of the shape.
Definition poreproperties.hh:44
std::string shapeToString(Shape s)
Get the shape from a string description of the shape.
Definition poreproperties.hh:26
Scalar volume(Shape shape, Scalar inscribedRadius)
Returns the volume of a given geometry based on the inscribed radius.
Definition poreproperties.hh:61
Shape
Collection of different pore-body shapes.
Definition poreproperties.hh:23
@ cube
Definition poreproperties.hh:23
@ square
Definition poreproperties.hh:23
@ sphere
Definition poreproperties.hh:23
@ octahedron
Definition poreproperties.hh:23
@ tetrahedron
Definition poreproperties.hh:23
@ circle
Definition poreproperties.hh:23
@ cylinder
Definition poreproperties.hh:23
@ icosahedron
Definition poreproperties.hh:23
@ dodecahedron
Definition poreproperties.hh:23