1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
28 #include "RutlandFlashBoil.H"
29 #include "addToRunTimeSelectionTable.H"
30 #include "mathematicalConstants.H"
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
38 defineTypeNameAndDebug(RutlandFlashBoil, 0);
40 addToRunTimeSelectionTable
48 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
50 // Construct from dictionary
51 RutlandFlashBoil::RutlandFlashBoil
53 const dictionary& dict
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")),
64 if (evaporationScheme_ == "implicit")
68 else if (evaporationScheme_ == "explicit")
75 << "evaporationScheme type " << evaporationScheme_
77 << "Use implicit or explicit."
83 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
85 RutlandFlashBoil::~RutlandFlashBoil()
89 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
91 bool RutlandFlashBoil::evaporation() const
96 // Correlation for the Sherwood Number
97 scalar RutlandFlashBoil::Sh
99 const scalar ReynoldsNumber,
100 const scalar SchmidtNumber
103 return 2.0 + preReScFactor_*pow(ReynoldsNumber,ReExponent_)*pow(SchmidtNumber,ScExponent_);
106 scalar RutlandFlashBoil::relaxationTime
108 const scalar diameter,
109 const scalar liquidDensity,
110 const scalar rhoFuelVapor,
111 const scalar massDiffusionCoefficient,
112 const scalar ReynoldsNumber,
113 const scalar SchmidtNumber,
125 (pressure - partialFuelVaporPressure)/
126 (pressure - pressureAtSurface)
129 if the pressure @ Surface > pressure
131 and Xratio -> infinity (as it should)
132 ... this is numerically nasty
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
141 scalar Xratio = (Xs - Xf)/max(SMALL, 1.0 - Xs);
145 lgExpr = log(1.0 + Xratio);
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
152 scalar Sherwood = Sh(ReynoldsNumber, SchmidtNumber);
156 scalar logXratio = log(1.0+Xratio);
159 if(logXratio > SMALL)
161 Fb = pow((1.0 + Xratio),FbExp) * log(1.0+Xratio)/Xratio;
164 // TL: proposed correction to sherwood number, implemented
166 Sherwood = 2.0 + (Sherwood - 2.0)/Fb;
169 6.0 * massDiffusionCoefficient
171 * rhoFuelVapor * lgExpr;
173 if (denominator > SMALL)
175 time = max(VSMALL, liquidDensity * pow(diameter, 2.0)/denominator);
182 scalar RutlandFlashBoil::boilingTime
184 const scalar liquidDensity,
186 const scalar heatOfVapour,
188 const scalar Nusselt,
189 const scalar deltaTemp,
190 const scalar diameter,
191 const scalar liquidCore,
194 const scalar tBoilingSurface,
195 const scalar vapourSurfaceEnthalpy,
196 const scalar vapourFarEnthalpy,
198 const scalar temperature,
205 // the deltaTemperature is limited to not go below .5 deg K
206 // for numerical reasons.
207 // This is probably not important, since it results in an upper
208 // limit for the boiling time... which we have anyway.
210 // TL kSet to the k value at the droplet temperature, not as in the Rutland Paper
214 if(tDrop > tBoilingSurface)
216 // Evaporation of the liquid sheet
219 scalar kIncreased = psi * kLiq;
220 scalar alfa = psi * kIncreased/(liquidDensity * cpFuel);
221 scalar F = alfa * ct/sqr(0.5 * diameter);
224 scalar expSumOld = expSum;
228 for(label k=0; k < Niter ; k++)
230 expSum += exp(sqr(-k*mathematicalConstant::pi*sqrt(F)/2.0));
231 if(mag(expSum-expSumOld)/expSum < 1.0e-3)
241 scalar dTLB = min(0.5, tDrop - tBoilingSurface);
244 if(dTLB >= 0.0 && dTLB < 5.0)
246 alfaS = 0.76 * pow(dTLB, 0.26);
248 if(dTLB >= 5.0 && dTLB < 25.0)
250 alfaS = 0.027 * pow(dTLB, 2.33);
254 alfaS = 13.8 * pow(dTLB, 0.39);
259 4.0 * alfaS * dTLB * mathematicalConstant::pi * sqr(diameter/2.0)
264 // calculation of the heat transfer vapourization at superheated conditions (temperature>tBoilingSurface)
266 if(temperature > tBoilingSurface)
268 scalar NusseltCorr = Nusselt ;
269 scalar A = mag((vapourFarEnthalpy-vapourSurfaceEnthalpy)/heatOfVapour);
271 // TL : 2.0? or 1.0? try 1!
272 scalar B = 1.0*mathematicalConstant::pi*kappa/cpGas*diameter*NusseltCorr;
273 scalar nPos = B * log(1.0 + A)/Gf + 1.0;
274 scalar nNeg = (1.0/A)*(exp(Gf/B) - 1.0 - A) + 1.0;
276 scalar Gpos = Gf*nPos;
277 scalar Gneg = Gf/nNeg;
279 //scalar FgPos = Gpos + Gf - B * log( 1.0 + ( 1.0 + Gf/Gpos ) * A);
280 scalar FgNeg = Gneg + Gf - B * log( 1.0 + ( 1.0 + Gf/Gneg ) * A);
284 for(label j = 0; j < 20; j++)
287 Gneg = max(Gneg, VSMALL);
288 FgNeg = Gneg + Gf - B * log( 1.0 + ( 1.0 + Gf/Gneg ) * A);
296 FgNeg = Gneg + Gf - B * log( 1.0 + ( 1.0 + Gf/Gneg ) * A);
306 Info << "no convergence" << endl;
313 for(k=0; k<Niter ; k++)
316 scalar Fg = G + Gf - B * log( 1.0 + ( 1.0 + Gf/G ) * A);
330 if(mag(G-Gold)/Gold < 1.0e-3)
338 Info << " No convergence for G " << endl;
347 time = ((4.0/3.0)*mathematicalConstant::pi*pow(diameter/2.0,3.0))*liquidDensity/(G+Gf);
348 time = max(VSMALL, time);
354 inline label RutlandFlashBoil::nEvapIter() const
358 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
360 } // End namespace Foam
362 // ************************************************************************* //