1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2011 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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
27 #include "addToRunTimeSelectionTable.H"
28 #include "mathematicalConstants.H"
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
34 defineTypeNameAndDebug(SHF, 0);
36 addToRunTimeSelectionTable
45 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
49 const dictionary& dict,
53 breakupModel(dict, sm),
54 coeffsDict_(dict.subDict(typeName + "Coeffs")),
56 weCorrCoeff_(readScalar(coeffsDict_.lookup("weCorrCoeff"))),
57 weBuCrit_(readScalar(coeffsDict_.lookup("weBuCrit"))),
58 weBuBag_(readScalar(coeffsDict_.lookup("weBuBag"))),
59 weBuMM_(readScalar(coeffsDict_.lookup("weBuMM"))),
60 ohnCoeffCrit_(readScalar(coeffsDict_.lookup("ohnCoeffCrit"))),
61 ohnCoeffBag_(readScalar(coeffsDict_.lookup("ohnCoeffBag"))),
62 ohnCoeffMM_(readScalar(coeffsDict_.lookup("ohnCoeffMM"))),
63 ohnExpCrit_(readScalar(coeffsDict_.lookup("ohnExpCrit"))),
64 ohnExpBag_(readScalar(coeffsDict_.lookup("ohnExpBag"))),
65 ohnExpMM_(readScalar(coeffsDict_.lookup("ohnExpMM"))),
66 cInit_(readScalar(coeffsDict_.lookup("Cinit"))),
67 c1_(readScalar(coeffsDict_.lookup("C1"))),
68 c2_(readScalar(coeffsDict_.lookup("C2"))),
69 c3_(readScalar(coeffsDict_.lookup("C3"))),
70 cExp1_(readScalar(coeffsDict_.lookup("Cexp1"))),
71 cExp2_(readScalar(coeffsDict_.lookup("Cexp2"))),
72 cExp3_(readScalar(coeffsDict_.lookup("Cexp3"))),
73 weConst_(readScalar(coeffsDict_.lookup("Weconst"))),
74 weCrit1_(readScalar(coeffsDict_.lookup("Wecrit1"))),
75 weCrit2_(readScalar(coeffsDict_.lookup("Wecrit2"))),
76 coeffD_(readScalar(coeffsDict_.lookup("CoeffD"))),
77 onExpD_(readScalar(coeffsDict_.lookup("OnExpD"))),
78 weExpD_(readScalar(coeffsDict_.lookup("WeExpD"))),
79 mu_(readScalar(coeffsDict_.lookup("mu"))),
80 sigma_(readScalar(coeffsDict_.lookup("sigma"))),
81 d32Coeff_(readScalar(coeffsDict_.lookup("d32Coeff"))),
82 cDmaxBM_(readScalar(coeffsDict_.lookup("cDmaxBM"))),
83 cDmaxS_(readScalar(coeffsDict_.lookup("cDmaxS"))),
84 corePerc_(readScalar(coeffsDict_.lookup("corePerc")))
88 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
94 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
96 void Foam::SHF::breakupParcel
101 const liquidMixtureProperties& fuels
104 label cellI = p.cell();
106 scalar pc = spray_.p()[cellI];
108 scalar sigma = fuels.sigma(pc, T, p.X());
109 scalar rhoLiquid = fuels.rho(pc, T, p.X());
110 scalar muLiquid = fuels.mu(pc, T, p.X());
111 scalar rhoGas = spray_.rho()[cellI];
113 scalar weGas = p.We(vel, rhoGas, sigma);
114 scalar weLiquid = p.We(vel, rhoLiquid, sigma);
116 // correct the Reynolds number. Reitz is using radius instead of diameter
118 scalar reLiquid = p.Re(rhoLiquid, vel, muLiquid);
119 scalar ohnesorge = sqrt(weLiquid)/(reLiquid + VSMALL);
121 vector vRel = p.Urel(vel);
123 scalar weGasCorr = weGas/(1.0 + weCorrCoeff_*ohnesorge);
125 // droplet deformation characteristic time
127 scalar tChar = p.d()/mag(vRel)*sqrt(rhoLiquid/rhoGas);
129 scalar tFirst = cInit_*tChar;
132 scalar tCharSecond = 0;
135 // updating the droplet characteristic time
138 if (weGas > weConst_)
140 if (weGas < weCrit1_)
142 tCharSecond = c1_*pow((weGas - weConst_),cExp1_);
144 else if (weGas >= weCrit1_ && weGas <= weCrit2_)
146 tCharSecond = c2_*pow((weGas - weConst_),cExp2_);
150 tCharSecond = c3_*pow((weGas - weConst_),cExp3_);
154 scalar weC = weBuCrit_*(1.0+ohnCoeffCrit_*pow(ohnesorge, ohnExpCrit_));
155 scalar weB = weBuBag_*(1.0+ohnCoeffBag_*pow(ohnesorge, ohnExpBag_));
156 scalar weMM = weBuMM_*(1.0+ohnCoeffMM_*pow(ohnesorge, ohnExpMM_));
158 bool bag = (weGas > weC && weGas < weB);
160 bool multimode = (weGas >= weB && weGas <= weMM);
162 bool shear = (weGas > weMM);
164 tSecond = tCharSecond*tChar;
166 scalar tBreakUP = tFirst + tSecond;
167 if (p.ct() > tBreakUP)
171 coeffD_*p.d()*pow(ohnesorge, onExpD_)*pow(weGasCorr, weExpD_);
173 if (bag || multimode)
176 scalar d05 = d32Coeff_*d32;
185 x = cDmaxBM_*rndGen_.sample01<scalar>();
187 y = rndGen_.sample01<scalar>();
191 /(2.0*sqrt(constant::mathematical::twoPi)*sigma_)
192 *exp(-0.5*sqr((x-mu_)/sigma_));
202 scalar dC = weConst_*sigma/(rhoGas*sqr(mag(vRel)));
203 scalar d32Red = 4.0*(d32*dC)/(5.0*dC - d32);
204 scalar initMass = p.m();
206 scalar d05 = d32Coeff_*d32Red;
216 x = cDmaxS_*rndGen_.sample01<scalar>();
218 y = rndGen_.sample01<scalar>();
222 /(2.0*sqrt(constant::mathematical::twoPi)*sigma_)
223 *exp(-0.5*sqr((x-mu_)/sigma_));
227 p.m() = corePerc_*initMass;
241 (1.0 - corePerc_)*initMass,
248 scalar(p.injector()),
262 // ************************************************************************* //