1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
28 #include "addToRunTimeSelectionTable.H"
29 #include "mathematicalConstants.H"
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
38 defineTypeNameAndDebug(SHF, 0);
40 addToRunTimeSelectionTable
48 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
50 // Construct from components
53 const dictionary& dict,
57 breakupModel(dict, sm),
58 coeffsDict_(dict.subDict(typeName + "Coeffs")),
61 weCorrCoeff_(readScalar(coeffsDict_.lookup("weCorrCoeff"))),
62 weBuCrit_(readScalar(coeffsDict_.lookup("weBuCrit"))),
63 weBuBag_(readScalar(coeffsDict_.lookup("weBuBag"))),
64 weBuMM_(readScalar(coeffsDict_.lookup("weBuMM"))),
65 ohnCoeffCrit_(readScalar(coeffsDict_.lookup("ohnCoeffCrit"))),
66 ohnCoeffBag_(readScalar(coeffsDict_.lookup("ohnCoeffBag"))),
67 ohnCoeffMM_(readScalar(coeffsDict_.lookup("ohnCoeffMM"))),
68 ohnExpCrit_(readScalar(coeffsDict_.lookup("ohnExpCrit"))),
69 ohnExpBag_(readScalar(coeffsDict_.lookup("ohnExpBag"))),
70 ohnExpMM_(readScalar(coeffsDict_.lookup("ohnExpMM"))),
71 cInit_(readScalar(coeffsDict_.lookup("Cinit"))),
72 c1_(readScalar(coeffsDict_.lookup("C1"))),
73 c2_(readScalar(coeffsDict_.lookup("C2"))),
74 c3_(readScalar(coeffsDict_.lookup("C3"))),
75 cExp1_(readScalar(coeffsDict_.lookup("Cexp1"))),
76 cExp2_(readScalar(coeffsDict_.lookup("Cexp2"))),
77 cExp3_(readScalar(coeffsDict_.lookup("Cexp3"))),
78 weConst_(readScalar(coeffsDict_.lookup("Weconst"))),
79 weCrit1_(readScalar(coeffsDict_.lookup("Wecrit1"))),
80 weCrit2_(readScalar(coeffsDict_.lookup("Wecrit2"))),
81 coeffD_(readScalar(coeffsDict_.lookup("CoeffD"))),
82 onExpD_(readScalar(coeffsDict_.lookup("OnExpD"))),
83 weExpD_(readScalar(coeffsDict_.lookup("WeExpD"))),
84 mu_(readScalar(coeffsDict_.lookup("mu"))),
85 sigma_(readScalar(coeffsDict_.lookup("sigma"))),
86 d32Coeff_(readScalar(coeffsDict_.lookup("d32Coeff"))),
87 cDmaxBM_(readScalar(coeffsDict_.lookup("cDmaxBM"))),
88 cDmaxS_(readScalar(coeffsDict_.lookup("cDmaxS"))),
89 corePerc_(readScalar(coeffsDict_.lookup("corePerc")))
93 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
99 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
101 void SHF::breakupParcel
106 const liquidMixture& fuels
110 label celli = p.cell();
112 scalar pc = spray_.p()[celli];
114 scalar sigma = fuels.sigma(pc, T, p.X());
115 scalar rhoLiquid = fuels.rho(pc, T, p.X());
116 scalar muLiquid = fuels.mu(pc, T, p.X());
117 scalar rhoGas = spray_.rho()[celli];
119 scalar weGas = p.We(vel, rhoGas, sigma);
120 scalar weLiquid = p.We(vel, rhoLiquid, sigma);
122 // correct the Reynolds number. Reitz is using radius instead of diameter
124 scalar reLiquid = p.Re(rhoLiquid, vel, muLiquid);
125 scalar ohnesorge = sqrt(weLiquid)/(reLiquid + VSMALL);
127 vector acceleration = p.Urel(vel)/p.tMom();
128 vector trajectory = p.U()/mag(p.U());
130 vector vRel = p.Urel(vel);
132 scalar weGasCorr = weGas/(1.0 + weCorrCoeff_ * ohnesorge);
134 // droplet deformation characteristic time
136 scalar tChar = p.d()/mag(vRel)*sqrt(rhoLiquid/rhoGas);
138 scalar tFirst = cInit_ * tChar;
141 scalar tCharSecond = 0;
144 bool multimode = false;
146 bool success = false;
149 // updating the droplet characteristic time
156 tCharSecond = c1_*pow((weGas - weConst_),cExp1_);
158 else if(weGas >= weCrit1_ && weGas <= weCrit2_)
160 tCharSecond = c2_*pow((weGas - weConst_),cExp2_);
164 tCharSecond = c3_*pow((weGas - weConst_),cExp3_);
168 scalar weC = weBuCrit_*(1.0+ohnCoeffCrit_*pow(ohnesorge,ohnExpCrit_));
169 scalar weB = weBuBag_*(1.0+ohnCoeffBag_*pow(ohnesorge, ohnExpBag_));
170 scalar weMM = weBuMM_*(1.0+ohnCoeffMM_*pow(ohnesorge, ohnExpMM_));
172 if(weGas > weC && weGas < weB)
177 if(weGas >= weB && weGas <= weMM)
187 tSecond = tCharSecond * tChar;
189 scalar tBreakUP = tFirst + tSecond;
190 if(p.ct() > tBreakUP)
193 scalar d32 = coeffD_*p.d()*pow(ohnesorge,onExpD_)*pow(weGasCorr,weExpD_);
198 scalar d05 = d32Coeff_ * d32;
206 x = cDmaxBM_*rndGen_.scalar01();
208 y = rndGen_.scalar01();
210 scalar p = x/(2.0*sqrt(2.0*mathematicalConstant::pi)*sigma_)*exp(-0.5*sqr((x-mu_)/sigma_));
224 scalar dC = weConst_*sigma/(rhoGas*sqr(mag(vRel)));
225 scalar d32Red = 4.0*(d32 * dC)/(5.0 * dC - d32);
226 scalar initMass = p.m();
228 scalar d05 = d32Coeff_ * d32Red;
237 x = cDmaxS_*rndGen_.scalar01();
239 y = rndGen_.scalar01();
241 scalar p = x/(2.0*sqrt(2.0*mathematicalConstant::pi)*sigma_)*exp(-0.5*sqr((x-mu_)/sigma_));
250 p.m() = corePerc_ * initMass;
262 (1.0 - corePerc_)* initMass,
269 scalar(p.injector()),
283 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
285 } // End namespace Foam
287 // ************************************************************************* //