dimensionlessnumbers.hh 14.9 KB
 Alexander Kissinger committed Oct 16, 2013 1 2 // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- // vi: set et ts=4 sw=4 sts=4:  Philipp Nuske committed Jul 24, 2013 3 /*****************************************************************************  Alexander Kissinger committed Oct 16, 2013 4  * See the file COPYING for full copying permissions. *  Philipp Nuske committed Jul 24, 2013 5 6 7  * * * This program is free software: you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by *  Timo Koch committed Dec 17, 2018 8  * the Free Software Foundation, either version 3 of the License, or *  Philipp Nuske committed Jul 24, 2013 9 10 11 12  * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of *  Alexander Kissinger committed Oct 16, 2013 13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *  Philipp Nuske committed Jul 24, 2013 14 15 16 17 18 19  * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program. If not, see . * *****************************************************************************/ /*!  Timo Koch committed Dec 20, 2017 20 21  * \file * \ingroup Common  Philipp Nuske committed Jul 24, 2013 22 23  * \brief Collection of functions, calculating dimensionless numbers. *  Timo Koch committed Dec 20, 2017 24 25  * All the input to the dimensionless numbers has to be provided as function arguments. * Rendering this collection generic in the sense that it can be used by any model.  Philipp Nuske committed Jul 24, 2013 26  */  Timo Koch committed Nov 01, 2021 27 28 #ifndef DUMUX_COMMON_DIMENSIONLESS_NUMBERS_HH #define DUMUX_COMMON_DIMENSIONLESS_NUMBERS_HH  Philipp Nuske committed Jul 24, 2013 29   Bernd Flemisch committed Dec 01, 2016 30 #include  31 #include  Bernd Flemisch committed Dec 01, 2016 32   Christoph Grueninger committed Oct 09, 2013 33 #include  Tim Jupe committed Nov 03, 2020 34 #include  Christoph Grueninger committed Oct 09, 2013 35   Timo Koch committed Dec 20, 2017 36 37 namespace Dumux {  38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 /*! * \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 };  Beatrix Becker committed Mar 02, 2016 56 /*!  Timo Koch committed Dec 20, 2017 57  * \ingroup Common  Simon Scholz committed Dec 17, 2018 58  * \brief Collection of functions which calculate dimensionless numbers.  Timo Koch committed Dec 20, 2017 59 60 61  * Each number has it's own function. * All the parameters for the calculation have to be handed over. * Rendering this collection generic in the sense that it can be used by any model.  Philipp Nuske committed Jul 24, 2013 62  */  63 template  Philipp Nuske committed Jul 24, 2013 64 65 66 67 68 69 70 class DimensionlessNumbers { public: /*! * \brief Calculate the Reynolds Number [-] (Re). *  Timo Koch committed Dec 20, 2017 71 72 73  * The Reynolds number is a measure for the relation of inertial to viscous forces. * The bigger the value, the more important inertial (as compared to viscous) effects become. * According to Bear [Dynamics of fluids in porous media (1972)] Darcy's law is valid for Re<1.  Philipp Nuske committed Jul 24, 2013 74  *  Timo Koch committed Dec 20, 2017 75  * Source for Reynolds number definition: http://en.wikipedia.org/wiki/Reynolds_number  Philipp Nuske committed Jul 24, 2013 76 77 78 79 80 81 82  * * \param darcyMagVelocity The absolute value of the darcy velocity. In the context of box models this * leads to a problem: the velocities are defined on the faces while other things (storage, sources, output) * are defined for the volume/vertex. Therefore, some sort of decision needs to be made which velocity to put * into this function (e.g.: face-area weighted average). [m/s] * \param charcteristicLength Typically, in the context of porous media flow, the mean grain size is taken as the characteristic length * for calculation of Re. [m]  Thomas Fetzer committed Feb 06, 2014 83 84  * \param kinematicViscosity Is defined as the dynamic (or absolute) viscos ity divided by the density. * http://en.wikipedia.org/wiki/Viscosity#Dynamic_viscosity. [m^2/s]  Philipp Nuske committed Jul 24, 2013 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103  * * \return The Reynolds Number as calculated from the input parameters */ static Scalar reynoldsNumber(const Scalar darcyMagVelocity, const Scalar charcteristicLength, const Scalar kinematicViscosity) { return darcyMagVelocity * charcteristicLength / kinematicViscosity ; } /*! * \brief Calculate the Prandtl Number [-] (Pr). * * The Prandtl Number is a measure for the relation of viscosity and thermal diffusivity (temperaturleitfaehigkeit). * * It is defined as * \f[ * \textnormal{Pr}= \frac{\nu}{\alpha} = \frac{c_p \mu}{\lambda}\, , * \f]  Thomas Fetzer committed Feb 06, 2014 104 105 106 107  * with kinematic viscosity\f$\nu\f$, thermal diffusivity \f$\alpha\f$, heat capacity \f$c_p\f$, * dynamic viscosity \f$\mu\f$ and thermal conductivity \f$\lambda\f$. * Therefore, Pr is a material specific property (i.e.: not a function of flow directly * but only of temperature, pressure and fluid).  Philipp Nuske committed Jul 24, 2013 108 109 110  * * source for Prandtl number definition: http://en.wikipedia.org/wiki/Prandtl_number *  Thomas Fetzer committed Feb 06, 2014 111 112 113 114  * \param dynamicViscosity Dynamic (absolute) viscosity over density. * http://en.wikipedia.org/wiki/Viscosity#Dynamic_viscosity [m^2/s] * \param heatCapacity Heat capacity at constant pressure. * Specifies the energy change for a given temperature change [J / (kg K)]  Philipp Nuske committed Jul 24, 2013 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140  * \param thermalConductivity Conductivity to heat. Specifies how well matter transfers energy without moving. [W/(m K)] * \return The Prandtl Number as calculated from the input parameters. */ static Scalar prandtlNumber(const Scalar dynamicViscosity, const Scalar heatCapacity, const Scalar thermalConductivity) { return dynamicViscosity * heatCapacity / thermalConductivity; } /*! * \brief Calculate the Nusselt Number [-] (Nu). * * The Nusselt Number is a measure for the relation of convective- to conductive heat exchange. * * The Nusselt number is defined as Nu = h d / k, * with h= heat transfer coefficient, d=characteristic length, k=heat conductivity(stagnant). * However, the heat transfer coefficient from one phase to another is typically not known. * Therefore, Nusselt numbers are usually given as *empirical* Nu(Reynolds, Prandtl) for a given flow * field --forced convection-- and *empirical* Nu(Rayleigh, Prandtl) for flow caused by temperature * differences --free convection--. The fluid characteristics enter via the Prandtl number. * * This function implements an *empirical* correlation for the case of porous media flow * (packed bed flow as the chemical engineers call it). * * source for Nusselt number definition: http://en.wikipedia.org/wiki/Nusselt_number  Thomas Fetzer committed Feb 06, 2014 141 142  * source for further empirical correlations for Nusselt Numbers: * VDI-Gesellschaft, VDI-Waermeatlas, VDI-Verlag Duesseldorf, 2006  Philipp Nuske committed Jul 24, 2013 143  *  Philipp Nuske committed Aug 08, 2013 144  * \param reynoldsNumber Dimensionless number relating inertial and viscous forces [-].  Philipp Nuske committed Jul 24, 2013 145  * \param prandtlNumber Dimensionless number relating viscosity and thermal diffusivity (temperaturleitfaehigkeit) [-].  Philipp Nuske committed Aug 08, 2013 146  * \param porosity The fraction of the porous medium which is void space.  Thomas Fetzer committed Feb 06, 2014 147 148  * \param formulation Switch for deciding which parametrization of the Nusselt number is to be used. * Set via the property NusseltFormulation.  Philipp Nuske committed Jul 24, 2013 149 150 151 152  * \return The Nusselt number as calculated from the input parameters [-]. */ static Scalar nusseltNumberForced(const Scalar reynoldsNumber, const Scalar prandtlNumber,  Philipp Nuske committed Sep 19, 2013 153  const Scalar porosity,  154  NusseltFormulation formulation)  Philipp Nuske committed Jul 24, 2013 155 {  Philipp Nuske committed Sep 19, 2013 156  if (formulation == NusseltFormulation::dittusBoelter){  Thomas Fetzer committed Feb 06, 2014 157 158 159 160  /* example: very common and simple case: flow straight circular pipe, only convection (no boiling), * 10000