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

reitzDiwakar.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 "reitzDiwakar.H"
00030 #include "addToRunTimeSelectionTable.H"
00031 #include "basicMultiComponentMixture.H"
00032 
00033 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00034 
00035 namespace Foam
00036 {
00037 
00038 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
00039 
00040 defineTypeNameAndDebug(reitzDiwakar, 0);
00041 
00042 addToRunTimeSelectionTable
00043 (
00044     breakupModel,
00045     reitzDiwakar,
00046     dictionary
00047 );
00048 
00049 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00050 
00051 // Construct from components
00052 reitzDiwakar::reitzDiwakar
00053 (
00054     const dictionary& dict,
00055     spray& sm
00056 )
00057 :
00058     breakupModel(dict, sm),
00059     coeffsDict_(dict.subDict(typeName + "Coeffs")),
00060     Cbag_(readScalar(coeffsDict_.lookup("Cbag"))),
00061     Cb_(readScalar(coeffsDict_.lookup("Cb"))),
00062     Cstrip_(readScalar(coeffsDict_.lookup("Cstrip"))),
00063     Cs_(readScalar(coeffsDict_.lookup("Cs")))
00064 {}
00065 
00066 
00067 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
00068 
00069 reitzDiwakar::~reitzDiwakar()
00070 {}
00071 
00072 
00073 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00074 
00075 void reitzDiwakar::breakupParcel
00076 (
00077     parcel& p,
00078     const scalar deltaT,
00079     const vector& vel,
00080     const liquidMixture& fuels
00081 ) const
00082 {
00083     /*
00084         These are the default values for this model...
00085         static const scalar Cbag   = 6.0;
00086         static const scalar Cb     = 0.785;
00087         static const scalar Cstrip = 0.5;
00088         static const scalar Cs     = 10.0;
00089     */
00090 
00091     const PtrList<volScalarField>& Y = spray_.composition().Y();
00092 
00093     label Ns = Y.size();
00094     label cellI = p.cell();
00095     scalar pressure = spray_.p()[cellI];
00096     scalar temperature = spray_.T()[cellI];
00097     scalar Taverage = p.T() + (temperature - p.T())/3.0;
00098 
00099     scalar muAverage = 0.0;
00100     scalar Winv = 0.0;
00101     for(label i=0; i<Ns; i++)
00102     {
00103         Winv += Y[i][cellI]/spray_.gasProperties()[i].W();
00104         muAverage += Y[i][cellI]*spray_.gasProperties()[i].mu(Taverage);
00105     }
00106     scalar R = specie::RR*Winv;
00107 
00108     // ideal gas law to evaluate density
00109     scalar rhoAverage = pressure/R/Taverage;
00110     scalar nuAverage = muAverage/rhoAverage;
00111     scalar sigma = fuels.sigma(pressure, p.T(), p.X());
00112 
00113     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00114     //     The We and Re numbers are to be evaluated using the 1/3 rule.
00115     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00116 
00117     scalar WeberNumber = p.We(vel, rhoAverage, sigma);
00118     scalar ReynoldsNumber = p.Re(vel, nuAverage);
00119 
00120     scalar sqRey = sqrt(ReynoldsNumber);
00121 
00122     if (WeberNumber > Cbag_)
00123     {
00124         if (WeberNumber > Cstrip_*sqRey)
00125         {
00126             scalar dStrip =
00127                 pow(2.0*Cstrip_*sigma, 2.0)/
00128                 (
00129                     rhoAverage
00130                   * pow(mag(p.Urel(vel)), 3.0)
00131                   * muAverage
00132                 );
00133 
00134             scalar tauStrip =
00135                 Cs_ * p.d()
00136               * sqrt
00137                 (
00138                     fuels.rho(pressure, p.T(), p.X())
00139                     / rhoAverage
00140                 )
00141               / mag(p.Urel(vel));
00142 
00143             scalar fraction = deltaT/tauStrip;
00144 
00145             // new droplet diameter, implicit calculation
00146             p.d() = (fraction*dStrip + p.d())/(1.0 + fraction);
00147         }
00148         else
00149         {
00150             scalar dBag =
00151                 2.0 * Cbag_ * sigma
00152               / (
00153                   rhoAverage
00154                 * pow(mag(p.Urel(vel)), 2.0)
00155                 );
00156 
00157             scalar tauBag =
00158                 Cb_ * p.d()
00159                 * sqrt
00160                   (
00161                       fuels.rho(pressure, p.T(), p.X())
00162                     * p.d()
00163                     / sigma
00164                   );
00165 
00166             scalar fraction = deltaT/tauBag;
00167 
00168             // new droplet diameter, implicit calculation
00169             p.d() = (fraction*dBag + p.d())/(1.0 + fraction);
00170         }
00171 
00172     }
00173 
00174 }
00175 
00176 
00177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00178 
00179 } // End namespace Foam
00180 
00181 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd