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

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