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

reitzKHRT.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 "reitzKHRT.H"
00027 #include <OpenFOAM/addToRunTimeSelectionTable.H>
00028 #include <OpenFOAM/mathematicalConstants.H>
00029 
00030 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00031 
00032 namespace Foam
00033 {
00034 
00035 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
00036 
00037 defineTypeNameAndDebug(reitzKHRT, 0);
00038 
00039 addToRunTimeSelectionTable
00040 (
00041     breakupModel,
00042     reitzKHRT,
00043     dictionary
00044 );
00045 
00046 
00047 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00048 
00049 // Construct from components
00050 reitzKHRT::reitzKHRT
00051 (
00052     const dictionary& dict,
00053     spray& sm
00054 )
00055 :
00056     breakupModel(dict, sm),
00057     coeffsDict_(dict.subDict(typeName + "Coeffs")),
00058     g_(sm.g()),
00059     b0_(readScalar(coeffsDict_.lookup("B0"))),
00060     b1_(readScalar(coeffsDict_.lookup("B1"))),
00061     cTau_(readScalar(coeffsDict_.lookup("Ctau"))),
00062     cRT_(readScalar(coeffsDict_.lookup("CRT"))),
00063     msLimit_(readScalar(coeffsDict_.lookup("msLimit"))),
00064     weberLimit_(readScalar(coeffsDict_.lookup("WeberLimit")))
00065 {}
00066 
00067 
00068 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
00069 
00070 reitzKHRT::~reitzKHRT()
00071 {}
00072 
00073 
00074 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00075 
00076 void reitzKHRT::breakupParcel
00077 (
00078     parcel& p,
00079     const scalar deltaT,
00080     const vector& vel,
00081     const liquidMixture& fuels
00082 ) const
00083 {
00084 
00085     label celli = p.cell();
00086     scalar T = p.T();
00087     scalar r = 0.5*p.d();
00088     scalar pc = spray_.p()[celli];
00089 
00090     scalar sigma = fuels.sigma(pc, T, p.X());
00091     scalar rhoLiquid = fuels.rho(pc, T, p.X());
00092     scalar muLiquid = fuels.mu(pc, T, p.X());
00093     scalar rhoGas = spray_.rho()[celli];
00094     scalar Np = p.N(rhoLiquid);
00095     scalar semiMass = Np*pow(p.d(), 3.0);
00096 
00097     scalar weGas      = p.We(vel, rhoGas, sigma);
00098     scalar weLiquid   = p.We(vel, rhoLiquid, sigma);
00099     // correct the Reynolds number. Reitz is using radius instead of diameter
00100     scalar reLiquid   = 0.5*p.Re(rhoLiquid, vel, muLiquid);
00101     scalar ohnesorge  = sqrt(weLiquid)/(reLiquid + VSMALL);
00102     scalar taylor     = ohnesorge*sqrt(weGas);
00103 
00104     vector acceleration = p.Urel(vel)/p.tMom();
00105     vector trajectory = p.U()/mag(p.U());
00106     scalar gt = (g_ + acceleration) & trajectory;
00107 
00108     // frequency of the fastest growing KH-wave
00109     scalar omegaKH =
00110         (0.34 + 0.38*pow(weGas, 1.5))
00111        /((1 + ohnesorge)*(1 + 1.4*pow(taylor, 0.6)))
00112        *sqrt(sigma/(rhoLiquid*pow(r, 3)));
00113 
00114     // corresponding KH wave-length.
00115     scalar lambdaKH =
00116         9.02
00117        *r
00118        *(1.0 + 0.45*sqrt(ohnesorge))
00119        *(1.0 + 0.4*pow(taylor, 0.7))
00120        /pow(1.0 + 0.865*pow(weGas, 1.67), 0.6);
00121 
00122     // characteristic Kelvin-Helmholtz breakup time
00123     scalar tauKH = 3.726*b1_*r/(omegaKH*lambdaKH);
00124 
00125     // stable KH diameter
00126     scalar dc = 2.0*b0_*lambdaKH;
00127 
00128     // the frequency of the fastest growing RT wavelength.
00129     scalar helpVariable = mag(gt*(rhoLiquid - rhoGas));
00130     scalar omegaRT = sqrt
00131     (
00132         2.0*pow(helpVariable, 1.5)
00133        /(3.0*sqrt(3.0*sigma)*(rhoGas + rhoLiquid))
00134     );
00135 
00136     // RT wave number
00137     scalar KRT = sqrt(helpVariable/(3.0*sigma + VSMALL));
00138 
00139     // wavelength of the fastest growing RT frequency
00140     scalar lambdaRT = 2.0*mathematicalConstant::pi*cRT_/(KRT + VSMALL);
00141 
00142     // if lambdaRT < diameter, then RT waves are growing on the surface
00143     // and we start to keep track of how long they have been growing
00144     if ((p.ct() > 0) || (lambdaRT < p.d()))
00145     {
00146         p.ct() += deltaT;
00147     }
00148 
00149     // characteristic RT breakup time
00150     scalar tauRT = cTau_/(omegaRT + VSMALL);
00151 
00152     // check if we have RT breakup
00153     if ((p.ct() > tauRT) && (lambdaRT < p.d()))
00154     {
00155         // the RT breakup creates diameter/lambdaRT new droplets
00156         p.ct() = -GREAT;
00157         scalar multiplier = p.d()/lambdaRT;
00158         scalar nDrops = multiplier*Np;
00159         p.d() = cbrt(semiMass/nDrops);
00160     }
00161     // otherwise check for KH breakup
00162     else if (dc < p.d())
00163     {
00164         // no breakup below Weber = 12
00165         if (weGas > weberLimit_)
00166         {
00167 
00168             label injector = label(p.injector());
00169             scalar fraction = deltaT/tauKH;
00170 
00171             // reduce the diameter according to the rate-equation
00172             p.d() = (fraction*dc + p.d())/(1.0 + fraction);
00173 
00174             scalar ms = rhoLiquid*Np*pow3(dc)*mathematicalConstant::pi/6.0;
00175             p.ms() += ms;
00176 
00177             // Total number of parcels for the whole injection event
00178             label nParcels =
00179                 spray_.injectors()[injector].properties()->nParcelsToInject
00180                 (
00181                     spray_.injectors()[injector].properties()->tsoi(),
00182                     spray_.injectors()[injector].properties()->teoi()
00183                 );
00184 
00185             scalar averageParcelMass =
00186                 spray_.injectors()[injector].properties()->mass()/nParcels;
00187 
00188             if (p.ms()/averageParcelMass > msLimit_)
00189             {
00190                 // set the initial ms value to -GREAT. This prevents
00191                 // new droplets from being formed from the child droplet
00192                 // from the KH instability
00193 
00194                 // mass of stripped child parcel
00195                 scalar mc = p.ms();
00196                 // Prevent child parcel from taking too much mass
00197                 if (mc > 0.5*p.m())
00198                 {
00199                     mc = 0.5*p.m();
00200                 }
00201 
00202                 spray_.addParticle
00203                 (
00204                     new parcel
00205                     (
00206                         spray_,
00207                         p.position(),
00208                         p.cell(),
00209                         p.n(),
00210                         dc,
00211                         p.T(),
00212                         mc,
00213                         0.0,
00214                         0.0,
00215                         0.0,
00216                         -GREAT,
00217                         p.tTurb(),
00218                         0.0,
00219                         p.injector(),
00220                         p.U(),
00221                         p.Uturb(),
00222                         p.X(),
00223                         p.fuelNames()
00224                     )
00225                 );
00226 
00227                 p.m() -= mc;
00228                 p.ms() = 0.0;
00229             }
00230         }
00231     }
00232 }
00233 
00234 
00235 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00236 
00237 } // End namespace Foam
00238 
00239 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines