Commit d2f582e9 authored by Dennis Gläser's avatar Dennis Gläser Committed by Timo Koch
Browse files

[DimLessNums] pull out Nusselt and sherwood formulation and turn into enum class

This removes their dependency on Scalar
parent 1a215ba7
......@@ -28,11 +28,30 @@
#define DIMENSIONLESS_NUMBERS_HH
#include <cmath>
#include <iostream>
#include <dune/common/exceptions.hh>
namespace Dumux {
/*!
* \brief A container for possible values of the property for selecting which nusselt parametrization to choose.
* The actual value is set vie the property NusseltFormulation
*/
enum class NusseltFormulation
{
dittusBoelter, WakaoKaguei, VDI
};
/*!
* \brief A container for possible values of the property for selecting which sherwood parametrization to choose.
* The actual value is set vie the property SherwoodFormulation
*/
enum class SherwoodFormulation
{
WakaoKaguei
};
/*!
* \brief Collection of functions which calculate dimensionless numbers.
* \ingroup Common
......@@ -102,17 +121,6 @@ static Scalar prandtlNumber(const Scalar dynamicViscosity,
return dynamicViscosity * heatCapacity / thermalConductivity;
}
/*!
* \brief A container for possible values of the property for selecting which nusselt parametrization to choose.
* The actual value is set vie the property NusseltFormulation
*/
struct NusseltFormulation
{
static const int dittusBoelter = 0;
static const int WakaoKaguei = 1;
static const int VDI = 2;
};
/*!
* \brief Calculate the Nusselt Number [-] (Nu).
*
......@@ -142,7 +150,7 @@ struct NusseltFormulation
static Scalar nusseltNumberForced(const Scalar reynoldsNumber,
const Scalar prandtlNumber,
const Scalar porosity,
const int formulation )
NusseltFormulation formulation)
{
if (formulation == NusseltFormulation::dittusBoelter){
/* example: very common and simple case: flow straight circular pipe, only convection (no boiling),
......@@ -218,15 +226,6 @@ static Scalar schmidtNumber(const Scalar dynamicViscosity,
return dynamicViscosity / (massDensity * diffusionCoefficient);
}
/*!
* \brief A container for possible values of the property for selecting which sherwood parametrization to choose.
* The actual value is set vie the property SherwoodFormulation
*/
struct SherwoodFormulation
{
static const int WakaoKaguei = 0;
};
/*!
* \brief Calculate the Sherwood Number [-] (Sh).
*
......@@ -258,7 +257,7 @@ struct SherwoodFormulation
static Scalar sherwoodNumber(const Scalar reynoldsNumber,
const Scalar schmidtNumber,
const int formulation)
SherwoodFormulation formulation)
{
if (formulation == SherwoodFormulation::WakaoKaguei){
/* example: flow through porous medium *single phase*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment