FreeFOAM The Cross-Platform CFD Toolkit
parcelFunctions.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "parcel.H"
28 
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33 
34 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
35 
36 // The diameter based Reynolds number
37 scalar parcel::Re
38 (
39  const vector& U,
40  const scalar nu
41 ) const
42 {
43  return mag(Urel(U))*d_/nu;
44 }
45 
46 // The diameter based Reynolds number
47 scalar parcel::Re
48 (
49  const scalar rho,
50  const vector& U,
51  const scalar mu
52 ) const
53 {
54 
55  return rho*mag(Urel(U))*d_/mu;
56 }
57 
58 // The diameter based Weber number
59 scalar parcel::We
60 (
61  const vector& U,
62  const scalar rho,
63  const scalar sigma
64 ) const
65 {
66  return 0.5*rho*pow(mag(Urel(U)),2)*d_/sigma;
67 }
68 
69 
70 scalar parcel::Sc
71 (
72  const scalar mu,
73  const scalar rho,
74  const scalar massDiffusion
75 ) const
76 {
77  return mu/(rho*massDiffusion);
78 }
79 
80 
81 scalar parcel::Sc
82 (
83  const scalar nu,
84  const scalar massDiffusion
85 ) const
86 {
87  return nu/massDiffusion;
88 }
89 
90 
91 scalar parcel::Pr
92 (
93  const scalar cp,
94  const scalar mu,
95  const scalar kappa
96 ) const
97 {
98  return cp*mu/kappa;
99 }
100 
101 
102 scalar parcel::N(const scalar rho) const
103 {
104  return 6.0*m_/(rho*pow(d_, 3.0)*mathematicalConstant::pi);
105 }
106 
107 
108 scalar parcel::Vd() const
109 {
110  return pow(d_, 3.0)*mathematicalConstant::pi/6.0;
111 }
112 
113 
114 scalar parcel::V(const scalar rho) const
115 {
116  return m_/rho;
117 }
118 
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 } // End namespace Foam
123 
124 // ************************ vim: set sw=4 sts=4 et: ************************ //