1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
29 #include "standardEvaporationModel.H"
30 #include "addToRunTimeSelectionTable.H"
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
37 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
39 defineTypeNameAndDebug(standardEvaporationModel, 0);
41 addToRunTimeSelectionTable
44 standardEvaporationModel,
49 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
51 // Construct from dictionary
52 standardEvaporationModel::standardEvaporationModel
54 const dictionary& dict
57 evaporationModel(dict),
58 evapDict_(dict.subDict(typeName + "Coeffs")),
59 preReScFactor_(readScalar(evapDict_.lookup("preReScFactor"))),
60 ReExponent_(readScalar(evapDict_.lookup("ReExponent"))),
61 ScExponent_(readScalar(evapDict_.lookup("ScExponent"))),
62 evaporationScheme_(evapDict_.lookup("evaporationScheme")),
65 if (evaporationScheme_ == "implicit")
69 else if (evaporationScheme_ == "explicit")
76 << "evaporationScheme type " << evaporationScheme_
78 << "Use implicit or explicit."
84 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
86 standardEvaporationModel::~standardEvaporationModel()
90 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
92 bool standardEvaporationModel::evaporation() const
97 // Correlation for the Sherwood Number
98 scalar standardEvaporationModel::Sh
100 const scalar ReynoldsNumber,
101 const scalar SchmidtNumber
104 return 2.0 + preReScFactor_*pow(ReynoldsNumber,ReExponent_)*pow(SchmidtNumber,ScExponent_);
107 scalar standardEvaporationModel::relaxationTime
109 const scalar diameter,
110 const scalar liquidDensity,
111 const scalar rhoFuelVapor,
112 const scalar massDiffusionCoefficient,
113 const scalar ReynoldsNumber,
114 const scalar SchmidtNumber,
126 (pressure - partialFuelVaporPressure)/
127 (pressure - pressureAtSurface)
130 if the pressure @ Surface > pressure
132 and Xratio -> infinity (as it should)
133 ... this is numerically nasty
136 X_v,s = (p_v,s/p) X_v,d
137 where X_v,d = 1 for single component fuel
138 according to eq (3.136)
139 in D. Clerides Thesis
142 scalar Xratio = (Xs - Xf)/max(SMALL, 1.0 - Xs);
146 lgExpr = log(1.0 + Xratio);
149 // From Equation (3.79) in C. Kralj's Thesis:
150 // Note that the 2.0 (instead of 6.0) below is correct, since evaporation
151 // is d(diameter)/dt and not d(mass)/dt
154 6.0 * massDiffusionCoefficient
155 * Sh(ReynoldsNumber, SchmidtNumber)
156 * rhoFuelVapor * lgExpr;
158 if (denominator > SMALL)
160 time = max(VSMALL, liquidDensity * pow(diameter, 2.0)/denominator);
167 scalar standardEvaporationModel::boilingTime
169 const scalar liquidDensity,
171 const scalar heatOfVapour,
173 const scalar Nusselt,
174 const scalar deltaTemp,
175 const scalar diameter,
189 // the deltaTemperature is limited to not go below .5 deg K
190 // for numerical reasons.
191 // This is probably not important, since it results in an upper
192 // limit for the boiling time... which we have anyway.
193 scalar deltaT = max(0.5, deltaTemp);
195 time = liquidDensity*cpFuel*sqr(diameter)/
197 6.0 * kappa * Nusselt * log(1.0 + cpFuel * deltaT/max(SMALL, heatOfVapour))
200 time = max(VSMALL, time);
205 inline label standardEvaporationModel::nEvapIter() const
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 } // End namespace Foam
213 // ************************************************************************* //