1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
24 \*---------------------------------------------------------------------------*/
28 #include "RutlandFlashBoil.H"
29 #include "addToRunTimeSelectionTable.H"
30 #include "mathematicalConstants.H"
32 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
36 defineTypeNameAndDebug(RutlandFlashBoil, 0);
38 addToRunTimeSelectionTable
47 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
49 Foam::RutlandFlashBoil::RutlandFlashBoil( const dictionary& dict)
51 evaporationModel(dict),
52 evapDict_(dict.subDict(typeName + "Coeffs")),
53 preReScFactor_(readScalar(evapDict_.lookup("preReScFactor"))),
54 ReExponent_(readScalar(evapDict_.lookup("ReExponent"))),
55 ScExponent_(readScalar(evapDict_.lookup("ScExponent"))),
56 evaporationScheme_(evapDict_.lookup("evaporationScheme")),
59 if (evaporationScheme_ == "implicit")
63 else if (evaporationScheme_ == "explicit")
70 << "evaporationScheme type " << evaporationScheme_
71 << " unknown. Use implicit or explicit." << nl
77 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
79 Foam::RutlandFlashBoil::~RutlandFlashBoil()
83 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
85 bool Foam::RutlandFlashBoil::evaporation() const
91 // Correlation for the Sherwood Number
92 Foam::scalar Foam::RutlandFlashBoil::Sh
94 const scalar ReynoldsNumber,
95 const scalar SchmidtNumber
101 *pow(ReynoldsNumber, ReExponent_)
102 *pow(SchmidtNumber,ScExponent_);
106 Foam::scalar Foam::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 // proposed correction to sherwood number, implemented
166 Sherwood = 2.0 + (Sherwood - 2.0)/Fb;
169 6.0*massDiffusionCoefficient*Sherwood*rhoFuelVapor*lgExpr;
171 if (denominator > SMALL)
173 time = max(VSMALL, liquidDensity*sqr(diameter)/denominator);
180 Foam::scalar Foam::RutlandFlashBoil::boilingTime
182 const scalar liquidDensity,
184 const scalar heatOfVapour,
186 const scalar Nusselt,
187 const scalar deltaTemp,
188 const scalar diameter,
189 const scalar liquidCore,
192 const scalar tBoilingSurface,
193 const scalar vapourSurfaceEnthalpy,
194 const scalar vapourFarEnthalpy,
196 const scalar temperature,
202 // the deltaTemperature is limited to not go below .5 deg K
203 // for numerical reasons.
204 // This is probably not important, since it results in an upper
205 // limit for the boiling time... which we have anyway.
207 // k set to the k value at the droplet temperature, not as in the Rutland
210 if (liquidCore > 0.5)
212 if (tDrop > tBoilingSurface)
214 // Evaporation of the liquid sheet
217 scalar kIncreased = psi*kLiq;
218 scalar alfa = psi*kIncreased/(liquidDensity*cpFuel);
219 scalar F = alfa*ct/sqr(0.5*diameter);
222 scalar expSumOld = expSum;
226 for (label k=0; k < Niter; k++)
228 expSum += exp(sqr(-k*constant::mathematical::pi*sqrt(F)/2.0));
229 if (mag(expSum-expSumOld)/expSum < 1.0e-3)
239 scalar dTLB = min(0.5, tDrop - tBoilingSurface);
242 if (dTLB >= 0.0 && dTLB < 5.0)
244 alfaS = 0.76*pow(dTLB, 0.26);
246 if (dTLB >= 5.0 && dTLB < 25.0)
248 alfaS = 0.027*pow(dTLB, 2.33);
252 alfaS = 13.8*pow(dTLB, 0.39);
257 *constant::mathematical::pi*sqr(diameter/2.0)
260 // calculation of the heat transfer vapourization at superheated
261 // conditions (temperature>tBoilingSurface)
263 if (temperature > tBoilingSurface)
265 scalar NusseltCorr = Nusselt ;
267 mag((vapourFarEnthalpy-vapourSurfaceEnthalpy)/heatOfVapour);
269 // 2.0? or 1.0? try 1!
271 1.0*constant::mathematical::pi*kappa/cpGas*diameter*NusseltCorr;
272 scalar nPos = B*log(1.0 + A)/Gf + 1.0;
273 scalar nNeg = (1.0/A)*(exp(Gf/B) - 1.0 - A) + 1.0;
275 scalar Gpos = Gf*nPos;
276 scalar Gneg = Gf/nNeg;
278 //scalar FgPos = Gpos + Gf - B * log( 1.0 + ( 1.0 + Gf/Gpos )*A);
279 scalar FgNeg = Gneg + Gf - B*log(1.0 + (1.0 + Gf/Gneg )*A);
283 for (label j = 0; j < 20; j++)
286 Gneg = max(Gneg, VSMALL);
287 FgNeg = Gneg + Gf - B*log(1.0 + (1.0 + Gf/Gneg)*A);
295 FgNeg = Gneg + Gf - B*log( 1.0 + ( 1.0 + Gf/Gneg)*A);
297 G = 0.5*(Gpos + Gneg);
305 Info<< "no convergence" << endl;
311 for (k=0; k<Niter; k++)
313 scalar Fg = G + Gf - B*log( 1.0 + ( 1.0 + Gf/G )*A);
318 G = 0.5*(Gpos + Gneg);
323 G = 0.5*(Gpos + Gneg);
327 if (mag(G - Gold)/Gold < 1.0e-3)
335 Info<< " No convergence for G " << endl;
345 (constant::mathematical::pi*pow3(diameter)/6.0)
349 time = max(VSMALL, time);
356 // ************************************************************************* //