OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

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-2009 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 the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     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, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 \*---------------------------------------------------------------------------*/
00026 
00027 #include "error.H"
00028 
00029 #include "standardEvaporationModel.H"
00030 #include "addToRunTimeSelectionTable.H"
00031 
00032 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00033 
00034 namespace Foam
00035 {
00036 
00037 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
00038 
00039 defineTypeNameAndDebug(standardEvaporationModel, 0);
00040 
00041 addToRunTimeSelectionTable
00042 (
00043     evaporationModel,
00044     standardEvaporationModel,
00045     dictionary
00046 );
00047 
00048 
00049 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00050 
00051 // Construct from dictionary
00052 standardEvaporationModel::standardEvaporationModel
00053 (
00054     const dictionary& dict
00055 )
00056 :
00057     evaporationModel(dict),
00058     evapDict_(dict.subDict(typeName + "Coeffs")),
00059     preReScFactor_(readScalar(evapDict_.lookup("preReScFactor"))),
00060     ReExponent_(readScalar(evapDict_.lookup("ReExponent"))),
00061     ScExponent_(readScalar(evapDict_.lookup("ScExponent"))),
00062     evaporationScheme_(evapDict_.lookup("evaporationScheme")),
00063     nEvapIter_(0)
00064 {
00065     if (evaporationScheme_ == "implicit") 
00066     {
00067         nEvapIter_ = 2;
00068     }
00069     else if (evaporationScheme_ == "explicit") 
00070     {
00071         nEvapIter_ = 1;
00072     }
00073     else 
00074     {
00075         FatalError
00076             << "evaporationScheme type " << evaporationScheme_
00077             << " unknown.\n"
00078             << "Use implicit or explicit."
00079             << abort(FatalError);
00080     }
00081 }
00082 
00083 
00084 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
00085 
00086 standardEvaporationModel::~standardEvaporationModel()
00087 {}
00088 
00089 
00090 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00091 
00092 bool standardEvaporationModel::evaporation() const
00093 {
00094     return true;
00095 }
00096 
00097 // Correlation for the Sherwood Number
00098 scalar standardEvaporationModel::Sh
00099 (
00100     const scalar ReynoldsNumber,
00101     const scalar SchmidtNumber
00102 ) const
00103 {
00104     return 2.0 + preReScFactor_*pow(ReynoldsNumber,ReExponent_)*pow(SchmidtNumber,ScExponent_);
00105 }
00106 
00107 scalar standardEvaporationModel::relaxationTime
00108 (
00109     const scalar diameter,
00110     const scalar liquidDensity,
00111     const scalar rhoFuelVapor,
00112     const scalar massDiffusionCoefficient,
00113     const scalar ReynoldsNumber,
00114     const scalar SchmidtNumber,
00115     const scalar Xs,
00116     const scalar Xf,
00117     const scalar m0,
00118     const scalar dm,
00119     const scalar dt
00120 ) const
00121 {
00122     scalar time = GREAT;
00123     scalar lgExpr = 0.0;
00124 
00125     /*
00126         (pressure - partialFuelVaporPressure)/
00127         (pressure - pressureAtSurface)
00128       = 1 + Xratio
00129 
00130         if the pressure @ Surface > pressure
00131         this lead to boiling
00132         and Xratio -> infinity (as it should)
00133         ... this is numerically nasty
00134 
00135     NB! by N. Nordin
00136         X_v,s = (p_v,s/p) X_v,d
00137         where X_v,d = 1 for single component fuel
00138         according to eq (3.136)
00139         in D. Clerides Thesis
00140     */
00141 
00142     scalar Xratio = (Xs - Xf)/max(SMALL, 1.0 - Xs);
00143 
00144     if (Xratio > 0.0)
00145     {
00146         lgExpr = log(1.0 + Xratio);
00147     }
00148 
00149     // From Equation (3.79) in C. Kralj's Thesis:
00150     // Note that the 2.0 (instead of 6.0) below is correct, since evaporation
00151     // is d(diameter)/dt and not d(mass)/dt
00152 
00153     scalar denominator =
00154         6.0 * massDiffusionCoefficient
00155       * Sh(ReynoldsNumber, SchmidtNumber)
00156       * rhoFuelVapor * lgExpr;
00157 
00158     if (denominator > SMALL)
00159     {
00160         time = max(VSMALL, liquidDensity * pow(diameter, 2.0)/denominator);
00161     }
00162 
00163     return time;
00164 }
00165 
00166 
00167 scalar standardEvaporationModel::boilingTime
00168 (
00169     const scalar liquidDensity,
00170     const scalar cpFuel,
00171     const scalar heatOfVapour,
00172     const scalar kappa,
00173     const scalar Nusselt,
00174     const scalar deltaTemp,
00175     const scalar diameter,
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 scalar 
00185 ) const
00186 {
00187     scalar time = GREAT;
00188 
00189     // the deltaTemperature is limited to not go below .5 deg K
00190     // for numerical reasons.
00191     // This is probably not important, since it results in an upper
00192     // limit for the boiling time... which we have anyway.
00193     scalar deltaT = max(0.5, deltaTemp);
00194 
00195     time = liquidDensity*cpFuel*sqr(diameter)/
00196     (
00197         6.0 * kappa * Nusselt * log(1.0 + cpFuel * deltaT/max(SMALL, heatOfVapour))
00198     );
00199 
00200     time = max(VSMALL, time);
00201 
00202     return time;
00203 }
00204 
00205 inline label standardEvaporationModel::nEvapIter() const
00206 {
00207     return nEvapIter_;
00208 }
00209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00210 
00211 } // End namespace Foam
00212 
00213 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd