FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

standardEvaporationModel.C

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 \*---------------------------------------------------------------------------*/
00025 
00026 #include <OpenFOAM/error.H>
00027 
00028 #include "standardEvaporationModel.H"
00029 #include <OpenFOAM/addToRunTimeSelectionTable.H>
00030 
00031 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00032 
00033 namespace Foam
00034 {
00035 
00036 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
00037 
00038 defineTypeNameAndDebug(standardEvaporationModel, 0);
00039 
00040 addToRunTimeSelectionTable
00041 (
00042     evaporationModel,
00043     standardEvaporationModel,
00044     dictionary
00045 );
00046 
00047 
00048 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00049 
00050 // Construct from dictionary
00051 standardEvaporationModel::standardEvaporationModel
00052 (
00053     const dictionary& dict
00054 )
00055 :
00056     evaporationModel(dict),
00057     evapDict_(dict.subDict(typeName + "Coeffs")),
00058     preReScFactor_(readScalar(evapDict_.lookup("preReScFactor"))),
00059     ReExponent_(readScalar(evapDict_.lookup("ReExponent"))),
00060     ScExponent_(readScalar(evapDict_.lookup("ScExponent"))),
00061     evaporationScheme_(evapDict_.lookup("evaporationScheme")),
00062     nEvapIter_(0)
00063 {
00064     if (evaporationScheme_ == "implicit") 
00065     {
00066         nEvapIter_ = 2;
00067     }
00068     else if (evaporationScheme_ == "explicit") 
00069     {
00070         nEvapIter_ = 1;
00071     }
00072     else 
00073     {
00074         FatalError
00075             << "evaporationScheme type " << evaporationScheme_
00076             << " unknown.\n"
00077             << "Use implicit or explicit."
00078             << abort(FatalError);
00079     }
00080 }
00081 
00082 
00083 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
00084 
00085 standardEvaporationModel::~standardEvaporationModel()
00086 {}
00087 
00088 
00089 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00090 
00091 bool standardEvaporationModel::evaporation() const
00092 {
00093     return true;
00094 }
00095 
00096 // Correlation for the Sherwood Number
00097 scalar standardEvaporationModel::Sh
00098 (
00099     const scalar ReynoldsNumber,
00100     const scalar SchmidtNumber
00101 ) const
00102 {
00103     return 2.0 + preReScFactor_*pow(ReynoldsNumber,ReExponent_)*pow(SchmidtNumber,ScExponent_);
00104 }
00105 
00106 scalar standardEvaporationModel::relaxationTime
00107 (
00108     const scalar diameter,
00109     const scalar liquidDensity,
00110     const scalar rhoFuelVapor,
00111     const scalar massDiffusionCoefficient,
00112     const scalar ReynoldsNumber,
00113     const scalar SchmidtNumber,
00114     const scalar Xs,
00115     const scalar Xf,
00116     const scalar m0,
00117     const scalar dm,
00118     const scalar dt
00119 ) const
00120 {
00121     scalar time = GREAT;
00122     scalar lgExpr = 0.0;
00123 
00124     /*
00125         (pressure - partialFuelVaporPressure)/
00126         (pressure - pressureAtSurface)
00127       = 1 + Xratio
00128 
00129         if the pressure @ Surface > pressure
00130         this lead to boiling
00131         and Xratio -> infinity (as it should)
00132         ... this is numerically nasty
00133 
00134     NB! by N. Nordin
00135         X_v,s = (p_v,s/p) X_v,d
00136         where X_v,d = 1 for single component fuel
00137         according to eq (3.136)
00138         in D. Clerides Thesis
00139     */
00140 
00141     scalar Xratio = (Xs - Xf)/max(SMALL, 1.0 - Xs);
00142 
00143     if (Xratio > 0.0)
00144     {
00145         lgExpr = log(1.0 + Xratio);
00146     }
00147 
00148     // From Equation (3.79) in C. Kralj's Thesis:
00149     // Note that the 2.0 (instead of 6.0) below is correct, since evaporation
00150     // is d(diameter)/dt and not d(mass)/dt
00151 
00152     scalar denominator =
00153         6.0 * massDiffusionCoefficient
00154       * Sh(ReynoldsNumber, SchmidtNumber)
00155       * rhoFuelVapor * lgExpr;
00156 
00157     if (denominator > SMALL)
00158     {
00159         time = max(VSMALL, liquidDensity * pow(diameter, 2.0)/denominator);
00160     }
00161 
00162     return time;
00163 }
00164 
00165 
00166 scalar standardEvaporationModel::boilingTime
00167 (
00168     const scalar liquidDensity,
00169     const scalar cpFuel,
00170     const scalar heatOfVapour,
00171     const scalar kappa,
00172     const scalar Nusselt,
00173     const scalar deltaTemp,
00174     const scalar diameter,
00175     const scalar, 
00176     const scalar, 
00177     const scalar, 
00178     const scalar, 
00179     const scalar, 
00180     const scalar, 
00181     const scalar, 
00182     const scalar, 
00183     const scalar 
00184 ) const
00185 {
00186     scalar time = GREAT;
00187 
00188     // the deltaTemperature is limited to not go below .5 deg K
00189     // for numerical reasons.
00190     // This is probably not important, since it results in an upper
00191     // limit for the boiling time... which we have anyway.
00192     scalar deltaT = max(0.5, deltaTemp);
00193 
00194     time = liquidDensity*cpFuel*sqr(diameter)/
00195     (
00196         6.0 * kappa * Nusselt * log(1.0 + cpFuel * deltaT/max(SMALL, heatOfVapour))
00197     );
00198 
00199     time = max(VSMALL, time);
00200 
00201     return time;
00202 }
00203 
00204 inline label standardEvaporationModel::nEvapIter() const
00205 {
00206     return nEvapIter_;
00207 }
00208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00209 
00210 } // End namespace Foam
00211 
00212 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines