FreeFOAM The Cross-Platform CFD Toolkit
standardEvaporationModel.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 <OpenFOAM/error.H>
27 
30 
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 
36 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
37 
38 defineTypeNameAndDebug(standardEvaporationModel, 0);
39 
41 (
42  evaporationModel,
43  standardEvaporationModel,
44  dictionary
45 );
46 
47 
48 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
49 
50 // Construct from dictionary
52 (
53  const dictionary& dict
54 )
55 :
56  evaporationModel(dict),
57  evapDict_(dict.subDict(typeName + "Coeffs")),
58  preReScFactor_(readScalar(evapDict_.lookup("preReScFactor"))),
59  ReExponent_(readScalar(evapDict_.lookup("ReExponent"))),
60  ScExponent_(readScalar(evapDict_.lookup("ScExponent"))),
61  evaporationScheme_(evapDict_.lookup("evaporationScheme")),
62  nEvapIter_(0)
63 {
64  if (evaporationScheme_ == "implicit")
65  {
66  nEvapIter_ = 2;
67  }
68  else if (evaporationScheme_ == "explicit")
69  {
70  nEvapIter_ = 1;
71  }
72  else
73  {
75  << "evaporationScheme type " << evaporationScheme_
76  << " unknown.\n"
77  << "Use implicit or explicit."
78  << abort(FatalError);
79  }
80 }
81 
82 
83 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
84 
86 {}
87 
88 
89 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
90 
92 {
93  return true;
94 }
95 
96 // Correlation for the Sherwood Number
98 (
99  const scalar ReynoldsNumber,
100  const scalar SchmidtNumber
101 ) const
102 {
103  return 2.0 + preReScFactor_*pow(ReynoldsNumber,ReExponent_)*pow(SchmidtNumber,ScExponent_);
104 }
105 
107 (
108  const scalar diameter,
109  const scalar liquidDensity,
110  const scalar rhoFuelVapor,
111  const scalar massDiffusionCoefficient,
112  const scalar ReynoldsNumber,
113  const scalar SchmidtNumber,
114  const scalar Xs,
115  const scalar Xf,
116  const scalar m0,
117  const scalar dm,
118  const scalar dt
119 ) const
120 {
121  scalar time = GREAT;
122  scalar lgExpr = 0.0;
123 
124  /*
125  (pressure - partialFuelVaporPressure)/
126  (pressure - pressureAtSurface)
127  = 1 + Xratio
128 
129  if the pressure @ Surface > pressure
130  this lead to boiling
131  and Xratio -> infinity (as it should)
132  ... this is numerically nasty
133 
134  NB! by N. Nordin
135  X_v,s = (p_v,s/p) X_v,d
136  where X_v,d = 1 for single component fuel
137  according to eq (3.136)
138  in D. Clerides Thesis
139  */
140 
141  scalar Xratio = (Xs - Xf)/max(SMALL, 1.0 - Xs);
142 
143  if (Xratio > 0.0)
144  {
145  lgExpr = log(1.0 + Xratio);
146  }
147 
148  // From Equation (3.79) in C. Kralj's Thesis:
149  // Note that the 2.0 (instead of 6.0) below is correct, since evaporation
150  // is d(diameter)/dt and not d(mass)/dt
151 
152  scalar denominator =
153  6.0 * massDiffusionCoefficient
154  * Sh(ReynoldsNumber, SchmidtNumber)
155  * rhoFuelVapor * lgExpr;
156 
157  if (denominator > SMALL)
158  {
159  time = max(VSMALL, liquidDensity * pow(diameter, 2.0)/denominator);
160  }
161 
162  return time;
163 }
164 
165 
167 (
168  const scalar liquidDensity,
169  const scalar cpFuel,
170  const scalar heatOfVapour,
171  const scalar kappa,
172  const scalar Nusselt,
173  const scalar deltaTemp,
174  const scalar diameter,
175  const scalar,
176  const scalar,
177  const scalar,
178  const scalar,
179  const scalar,
180  const scalar,
181  const scalar,
182  const scalar,
183  const scalar
184 ) const
185 {
186  scalar time = GREAT;
187 
188  // the deltaTemperature is limited to not go below .5 deg K
189  // for numerical reasons.
190  // This is probably not important, since it results in an upper
191  // limit for the boiling time... which we have anyway.
192  scalar deltaT = max(0.5, deltaTemp);
193 
194  time = liquidDensity*cpFuel*sqr(diameter)/
195  (
196  6.0 * kappa * Nusselt * log(1.0 + cpFuel * deltaT/max(SMALL, heatOfVapour))
197  );
198 
199  time = max(VSMALL, time);
200 
201  return time;
202 }
203 
205 {
206  return nEvapIter_;
207 }
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 
210 } // End namespace Foam
211 
212 // ************************ vim: set sw=4 sts=4 et: ************************ //