version 3.8
dimensionlessnumbers.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3//
4// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
15#ifndef DUMUX_COMMON_DIMENSIONLESS_NUMBERS_HH
16#define DUMUX_COMMON_DIMENSIONLESS_NUMBERS_HH
17
18#include <cmath>
19#include <iostream>
20
21#include <dune/common/exceptions.hh>
22#include <dune/common/math.hh>
23
24namespace Dumux {
25
31{
33};
34
40{
42};
43
51template <class Scalar>
53{
54
55public:
76 static Scalar reynoldsNumber(const Scalar darcyMagVelocity,
77 const Scalar charcteristicLength,
78 const Scalar kinematicViscosity)
79 {
80 return darcyMagVelocity * charcteristicLength / kinematicViscosity ;
81 }
82
106 static Scalar prandtlNumber(const Scalar dynamicViscosity,
107 const Scalar heatCapacity,
108 const Scalar thermalConductivity)
109 {
110 return dynamicViscosity * heatCapacity / thermalConductivity;
111 }
112
139 static Scalar nusseltNumberForced(const Scalar reynoldsNumber,
140 const Scalar prandtlNumber,
141 const Scalar porosity,
142 NusseltFormulation formulation)
143 {
144 if (formulation == NusseltFormulation::dittusBoelter){
145 /* example: very common and simple case: flow straight circular pipe, only convection (no boiling),
146 * 10000<Re<120000, 0.7<Pr<120, far from pipe entrance, smooth surface of pipe ...
147 * Dittus, F.W and Boelter, L.M.K, Heat Transfer in Automobile Radiators of the Tubular Type,
148 * Publications in Engineering, Vol. 2, pages 443-461, 1930
149 */
150 using std::pow;
151 return 0.023 * pow(reynoldsNumber, 0.8) * pow(prandtlNumber,0.33);
152 }
153
154 else if (formulation == NusseltFormulation::WakaoKaguei){
155 /* example: flow through porous medium *single phase*, fit to many different data
156 * Wakao and Kaguei, Heat and mass Transfer in Packed Beds, Gordon and Breach Science Publishers, page 293
157 */
158 using std::pow;
159 return 2. + 1.1 * pow(prandtlNumber,(1./3.)) * pow(reynoldsNumber, 0.6);
160 }
161
162 else if (formulation == NusseltFormulation::VDI){
163 /* example: VDI Waermeatlas 10. Auflage 2006, flow in packed beds, page Gj1, see also other sources and limitations therein.
164 * valid for 0.1<Re<10000, 0.6<Pr/Sc<10000, packed beds of perfect spheres.
165 *
166 */
167 using std::sqrt;
168 using std::pow;
169 using Dune::power;
170 Scalar numerator = 0.037 * pow(reynoldsNumber,0.8) * prandtlNumber ;
171 Scalar reToMin01 = pow(reynoldsNumber,-0.1);
172 Scalar prTo23 = pow(prandtlNumber, (2./3. ) ) ; // MIND THE pts! :-( otherwise the integer exponent version is chosen
173 Scalar denominator = 1+ 2.443 * reToMin01 * (prTo23 -1.) ;
174
175 Scalar nusseltTurbular = numerator / denominator;
176 Scalar nusseltLaminar = 0.664 * sqrt(reynoldsNumber) * pow(prandtlNumber, (1./3.) );
177 Scalar nusseltSingleSphere = 2 + sqrt( power(nusseltLaminar,2) + power(nusseltTurbular,2));
178
179 Scalar funckyFactor = 1 + 1.5 * (1.-porosity); // for spheres of same size
180 Scalar nusseltNumber = funckyFactor * nusseltSingleSphere ;
181
182 return nusseltNumber;
183 }
184
185 else {
186 DUNE_THROW(Dune::NotImplemented, "wrong index");
187 }
188 }
189
190
212 static Scalar schmidtNumber(const Scalar dynamicViscosity,
213 const Scalar massDensity,
214 const Scalar diffusionCoefficient)
215 {
216 return dynamicViscosity / (massDensity * diffusionCoefficient);
217 }
218
248 static Scalar sherwoodNumber(const Scalar reynoldsNumber,
249 const Scalar schmidtNumber,
250 SherwoodFormulation formulation)
251 {
252 if (formulation == SherwoodFormulation::WakaoKaguei){
253 /* example: flow through porous medium *single phase*
254 * Wakao and Kaguei, Heat and mass Transfer in Packed Beds, Gordon and Breach Science Publishers, page 156
255 */
256 using std::cbrt;
257 using std::pow;
258 return 2. + 1.1 * cbrt(schmidtNumber) * pow(reynoldsNumber, 0.6);
259 }
260
261 else {
262 DUNE_THROW(Dune::NotImplemented, "wrong index");
263 }
264 }
265
266
282 static Scalar thermalDiffusivity(const Scalar & thermalConductivity ,
283 const Scalar & phaseDensity ,
284 const Scalar & heatCapacity)
285 {
286 return thermalConductivity / (phaseDensity * heatCapacity);
287 }
288
289};
290
291} // end namespace Dumux
292
293#endif
Collection of functions which calculate dimensionless numbers. Each number has it's own function....
Definition: dimensionlessnumbers.hh:53
static Scalar nusseltNumberForced(const Scalar reynoldsNumber, const Scalar prandtlNumber, const Scalar porosity, NusseltFormulation formulation)
Calculate the Nusselt Number [-] (Nu).
Definition: dimensionlessnumbers.hh:139
static Scalar reynoldsNumber(const Scalar darcyMagVelocity, const Scalar charcteristicLength, const Scalar kinematicViscosity)
Calculate the Reynolds Number [-] (Re).
Definition: dimensionlessnumbers.hh:76
static Scalar prandtlNumber(const Scalar dynamicViscosity, const Scalar heatCapacity, const Scalar thermalConductivity)
Calculate the Prandtl Number [-] (Pr).
Definition: dimensionlessnumbers.hh:106
static Scalar schmidtNumber(const Scalar dynamicViscosity, const Scalar massDensity, const Scalar diffusionCoefficient)
Calculate the Schmidt Number [-] (Sc).
Definition: dimensionlessnumbers.hh:212
static Scalar thermalDiffusivity(const Scalar &thermalConductivity, const Scalar &phaseDensity, const Scalar &heatCapacity)
Calculate the thermal diffusivity alpha [m^2/s].
Definition: dimensionlessnumbers.hh:282
static Scalar sherwoodNumber(const Scalar reynoldsNumber, const Scalar schmidtNumber, SherwoodFormulation formulation)
Calculate the Sherwood Number [-] (Sh).
Definition: dimensionlessnumbers.hh:248
std::string porosity() noexcept
I/O name of porosity.
Definition: name.hh:127
Definition: adapt.hh:17
NusseltFormulation
A container for possible values of the property for selecting which Nusselt parametrization to choose...
Definition: dimensionlessnumbers.hh:31
SherwoodFormulation
A container for possible values of the property for selecting which Sherwood parametrization to choos...
Definition: dimensionlessnumbers.hh:40