3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
27#ifndef DIMENSIONLESS_NUMBERS_HH
28#define DIMENSIONLESS_NUMBERS_HH
29
30#include <cmath>
31#include <iostream>
32
33#include <dune/common/exceptions.hh>
34
35namespace Dumux {
36
42{
44};
45
51{
53};
54
62template <class Scalar>
64{
65
66public:
87static Scalar reynoldsNumber(const Scalar darcyMagVelocity,
88 const Scalar charcteristicLength,
89 const Scalar kinematicViscosity)
90{
91 return darcyMagVelocity * charcteristicLength / kinematicViscosity ;
92}
93
117static Scalar prandtlNumber(const Scalar dynamicViscosity,
118 const Scalar heatCapacity,
119 const Scalar thermalConductivity)
120{
121 return dynamicViscosity * heatCapacity / thermalConductivity;
122}
123
150static Scalar nusseltNumberForced(const Scalar reynoldsNumber,
151 const Scalar prandtlNumber,
152 const Scalar porosity,
153 NusseltFormulation formulation)
154{
155 if (formulation == NusseltFormulation::dittusBoelter){
156 /* example: very common and simple case: flow straight circular pipe, only convection (no boiling),
157 * 10000<Re<120000, 0.7<Pr<120, far from pipe entrance, smooth surface of pipe ...
158 * Dittus, F.W and Boelter, L.M.K, Heat Transfer in Automobile Radiators of the Tubular Type,
159 * Publications in Engineering, Vol. 2, pages 443-461, 1930
160 */
161 using std::pow;
162 return 0.023 * pow(reynoldsNumber, 0.8) * pow(prandtlNumber,0.33);
163 }
164
165 else if (formulation == NusseltFormulation::WakaoKaguei){
166 /* example: flow through porous medium *single phase*, fit to many different data
167 * Wakao and Kaguei, Heat and mass Transfer in Packed Beds, Gordon and Breach Science Publishers, page 293
168 */
169 using std::pow;
170 return 2. + 1.1 * pow(prandtlNumber,(1./3.)) * pow(reynoldsNumber, 0.6);
171 }
172
173 else if (formulation == NusseltFormulation::VDI){
174 /* example: VDI Waermeatlas 10. Auflage 2006, flow in packed beds, page Gj1, see also other sources and limitations therein.
175 * valid for 0.1<Re<10000, 0.6<Pr/Sc<10000, packed beds of perfect spheres.
176 *
177 */
178 using std::sqrt;
179 using std::pow;
180 Scalar numerator = 0.037 * pow(reynoldsNumber,0.8) * prandtlNumber ;
181 Scalar reToMin01 = pow(reynoldsNumber,-0.1);
182 Scalar prTo23 = pow(prandtlNumber, (2./3. ) ) ; // MIND THE pts! :-( otherwise the integer exponent version is chosen
183 Scalar denominator = 1+ 2.443 * reToMin01 * (prTo23 -1.) ;
184
185 Scalar nusseltTurbular = numerator / denominator;
186 Scalar nusseltLaminar = 0.664 * sqrt(reynoldsNumber) * pow(prandtlNumber, (1./3.) );
187 Scalar nusseltSingleSphere = 2 + sqrt( pow(nusseltLaminar,2.) + pow(nusseltTurbular,2.));
188
189 Scalar funckyFactor = 1 + 1.5 * (1.-porosity); // for spheres of same size
190 Scalar nusseltNumber = funckyFactor * nusseltSingleSphere ;
191
192 return nusseltNumber;
193 }
194
195 else {
196 DUNE_THROW(Dune::NotImplemented, "wrong index");
197 }
198}
199
200
222static Scalar schmidtNumber(const Scalar dynamicViscosity,
223 const Scalar massDensity,
224 const Scalar diffusionCoefficient)
225{
226 return dynamicViscosity / (massDensity * diffusionCoefficient);
227}
228
258static Scalar sherwoodNumber(const Scalar reynoldsNumber,
259 const Scalar schmidtNumber,
260 SherwoodFormulation formulation)
261{
262 if (formulation == SherwoodFormulation::WakaoKaguei){
263 /* example: flow through porous medium *single phase*
264 * Wakao and Kaguei, Heat and mass Transfer in Packed Beds, Gordon and Breach Science Publishers, page 156
265 */
266 using std::cbrt;
267 using std::pow;
268 return 2. + 1.1 * cbrt(schmidtNumber) * pow(reynoldsNumber, 0.6);
269 }
270
271 else {
272 DUNE_THROW(Dune::NotImplemented, "wrong index");
273 }
274}
275
276
292static Scalar thermalDiffusivity(const Scalar & thermalConductivity ,
293 const Scalar & phaseDensity ,
294 const Scalar & heatCapacity)
295{
296 return thermalConductivity / (phaseDensity * heatCapacity);
297}
298
299}; // end class DimensionlessNumbers
300
301} // end namespace Dumux
302
303#endif // DIMENSIONLESS_NUMBERS_HH
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
NusseltFormulation
A container for possible values of the property for selecting which nusselt parametrization to choose...
Definition: dimensionlessnumbers.hh:42
SherwoodFormulation
A container for possible values of the property for selecting which sherwood parametrization to choos...
Definition: dimensionlessnumbers.hh:51
std::string porosity() noexcept
I/O name of porosity.
Definition: name.hh:139
Collection of functions which calculate dimensionless numbers. Each number has it's own function....
Definition: dimensionlessnumbers.hh:64
static Scalar nusseltNumberForced(const Scalar reynoldsNumber, const Scalar prandtlNumber, const Scalar porosity, NusseltFormulation formulation)
Calculate the Nusselt Number [-] (Nu).
Definition: dimensionlessnumbers.hh:150
static Scalar reynoldsNumber(const Scalar darcyMagVelocity, const Scalar charcteristicLength, const Scalar kinematicViscosity)
Calculate the Reynolds Number [-] (Re).
Definition: dimensionlessnumbers.hh:87
static Scalar prandtlNumber(const Scalar dynamicViscosity, const Scalar heatCapacity, const Scalar thermalConductivity)
Calculate the Prandtl Number [-] (Pr).
Definition: dimensionlessnumbers.hh:117
static Scalar schmidtNumber(const Scalar dynamicViscosity, const Scalar massDensity, const Scalar diffusionCoefficient)
Calculate the Schmidt Number [-] (Sc).
Definition: dimensionlessnumbers.hh:222
static Scalar thermalDiffusivity(const Scalar &thermalConductivity, const Scalar &phaseDensity, const Scalar &heatCapacity)
Calculate the thermal diffusivity alpha [m^2/s].
Definition: dimensionlessnumbers.hh:292
static Scalar sherwoodNumber(const Scalar reynoldsNumber, const Scalar schmidtNumber, SherwoodFormulation formulation)
Calculate the Sherwood Number [-] (Sh).
Definition: dimensionlessnumbers.hh:258