00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "SHF.H"
00028 #include "addToRunTimeSelectionTable.H"
00029 #include "mathematicalConstants.H"
00030
00031
00032
00033 namespace Foam
00034 {
00035
00036
00037
00038 defineTypeNameAndDebug(SHF, 0);
00039
00040 addToRunTimeSelectionTable
00041 (
00042 breakupModel,
00043 SHF,
00044 dictionary
00045 );
00046
00047
00048
00049
00050
00051 SHF::SHF
00052 (
00053 const dictionary& dict,
00054 spray& sm
00055 )
00056 :
00057 breakupModel(dict, sm),
00058 coeffsDict_(dict.subDict(typeName + "Coeffs")),
00059 g_(sm.g()),
00060 rndGen_(sm.rndGen()),
00061 weCorrCoeff_(readScalar(coeffsDict_.lookup("weCorrCoeff"))),
00062 weBuCrit_(readScalar(coeffsDict_.lookup("weBuCrit"))),
00063 weBuBag_(readScalar(coeffsDict_.lookup("weBuBag"))),
00064 weBuMM_(readScalar(coeffsDict_.lookup("weBuMM"))),
00065 ohnCoeffCrit_(readScalar(coeffsDict_.lookup("ohnCoeffCrit"))),
00066 ohnCoeffBag_(readScalar(coeffsDict_.lookup("ohnCoeffBag"))),
00067 ohnCoeffMM_(readScalar(coeffsDict_.lookup("ohnCoeffMM"))),
00068 ohnExpCrit_(readScalar(coeffsDict_.lookup("ohnExpCrit"))),
00069 ohnExpBag_(readScalar(coeffsDict_.lookup("ohnExpBag"))),
00070 ohnExpMM_(readScalar(coeffsDict_.lookup("ohnExpMM"))),
00071 cInit_(readScalar(coeffsDict_.lookup("Cinit"))),
00072 c1_(readScalar(coeffsDict_.lookup("C1"))),
00073 c2_(readScalar(coeffsDict_.lookup("C2"))),
00074 c3_(readScalar(coeffsDict_.lookup("C3"))),
00075 cExp1_(readScalar(coeffsDict_.lookup("Cexp1"))),
00076 cExp2_(readScalar(coeffsDict_.lookup("Cexp2"))),
00077 cExp3_(readScalar(coeffsDict_.lookup("Cexp3"))),
00078 weConst_(readScalar(coeffsDict_.lookup("Weconst"))),
00079 weCrit1_(readScalar(coeffsDict_.lookup("Wecrit1"))),
00080 weCrit2_(readScalar(coeffsDict_.lookup("Wecrit2"))),
00081 coeffD_(readScalar(coeffsDict_.lookup("CoeffD"))),
00082 onExpD_(readScalar(coeffsDict_.lookup("OnExpD"))),
00083 weExpD_(readScalar(coeffsDict_.lookup("WeExpD"))),
00084 mu_(readScalar(coeffsDict_.lookup("mu"))),
00085 sigma_(readScalar(coeffsDict_.lookup("sigma"))),
00086 d32Coeff_(readScalar(coeffsDict_.lookup("d32Coeff"))),
00087 cDmaxBM_(readScalar(coeffsDict_.lookup("cDmaxBM"))),
00088 cDmaxS_(readScalar(coeffsDict_.lookup("cDmaxS"))),
00089 corePerc_(readScalar(coeffsDict_.lookup("corePerc")))
00090 {}
00091
00092
00093
00094
00095 SHF::~SHF()
00096 {}
00097
00098
00099
00100
00101 void SHF::breakupParcel
00102 (
00103 parcel& p,
00104 const scalar deltaT,
00105 const vector& vel,
00106 const liquidMixture& fuels
00107 ) const
00108 {
00109
00110 label celli = p.cell();
00111 scalar T = p.T();
00112 scalar pc = spray_.p()[celli];
00113
00114 scalar sigma = fuels.sigma(pc, T, p.X());
00115 scalar rhoLiquid = fuels.rho(pc, T, p.X());
00116 scalar muLiquid = fuels.mu(pc, T, p.X());
00117 scalar rhoGas = spray_.rho()[celli];
00118
00119 scalar weGas = p.We(vel, rhoGas, sigma);
00120 scalar weLiquid = p.We(vel, rhoLiquid, sigma);
00121
00122
00123
00124 scalar reLiquid = p.Re(rhoLiquid, vel, muLiquid);
00125 scalar ohnesorge = sqrt(weLiquid)/(reLiquid + VSMALL);
00126
00127 vector acceleration = p.Urel(vel)/p.tMom();
00128 vector trajectory = p.U()/mag(p.U());
00129
00130 vector vRel = p.Urel(vel);
00131
00132 scalar weGasCorr = weGas/(1.0 + weCorrCoeff_ * ohnesorge);
00133
00134
00135
00136 scalar tChar = p.d()/mag(vRel)*sqrt(rhoLiquid/rhoGas);
00137
00138 scalar tFirst = cInit_ * tChar;
00139
00140 scalar tSecond = 0;
00141 scalar tCharSecond = 0;
00142
00143 bool bag = false;
00144 bool multimode = false;
00145 bool shear = false;
00146 bool success = false;
00147
00148
00149
00150 p.ct() += deltaT;
00151
00152 if(weGas > weConst_)
00153 {
00154 if(weGas < weCrit1_)
00155 {
00156 tCharSecond = c1_*pow((weGas - weConst_),cExp1_);
00157 }
00158 else if(weGas >= weCrit1_ && weGas <= weCrit2_)
00159 {
00160 tCharSecond = c2_*pow((weGas - weConst_),cExp2_);
00161 }
00162 else
00163 {
00164 tCharSecond = c3_*pow((weGas - weConst_),cExp3_);
00165 }
00166 }
00167
00168 scalar weC = weBuCrit_*(1.0+ohnCoeffCrit_*pow(ohnesorge,ohnExpCrit_));
00169 scalar weB = weBuBag_*(1.0+ohnCoeffBag_*pow(ohnesorge, ohnExpBag_));
00170 scalar weMM = weBuMM_*(1.0+ohnCoeffMM_*pow(ohnesorge, ohnExpMM_));
00171
00172 if(weGas > weC && weGas < weB)
00173 {
00174 bag = true;
00175 }
00176
00177 if(weGas >= weB && weGas <= weMM)
00178 {
00179 multimode = true;
00180 }
00181
00182 if(weGas > weMM)
00183 {
00184 shear = true;
00185 }
00186
00187 tSecond = tCharSecond * tChar;
00188
00189 scalar tBreakUP = tFirst + tSecond;
00190 if(p.ct() > tBreakUP)
00191 {
00192
00193 scalar d32 = coeffD_*p.d()*pow(ohnesorge,onExpD_)*pow(weGasCorr,weExpD_);
00194
00195 if(bag || multimode)
00196 {
00197
00198 scalar d05 = d32Coeff_ * d32;
00199
00200 scalar x = 0.0;
00201 scalar y = 0.0;
00202 scalar d = 0.0;
00203
00204 while(!success)
00205 {
00206 x = cDmaxBM_*rndGen_.scalar01();
00207 d = sqr(x)*d05;
00208 y = rndGen_.scalar01();
00209
00210 scalar p = x/(2.0*sqrt(2.0*mathematicalConstant::pi)*sigma_)*exp(-0.5*sqr((x-mu_)/sigma_));
00211
00212 if (y<p)
00213 {
00214 success = true;
00215 }
00216 }
00217
00218 p.d() = d;
00219 p.ct() = 0.0;
00220 }
00221
00222 if(shear)
00223 {
00224 scalar dC = weConst_*sigma/(rhoGas*sqr(mag(vRel)));
00225 scalar d32Red = 4.0*(d32 * dC)/(5.0 * dC - d32);
00226 scalar initMass = p.m();
00227
00228 scalar d05 = d32Coeff_ * d32Red;
00229
00230 scalar x = 0.0;
00231 scalar y = 0.0;
00232 scalar d = 0.0;
00233
00234 while(!success)
00235 {
00236
00237 x = cDmaxS_*rndGen_.scalar01();
00238 d = sqr(x)*d05;
00239 y = rndGen_.scalar01();
00240
00241 scalar p = x/(2.0*sqrt(2.0*mathematicalConstant::pi)*sigma_)*exp(-0.5*sqr((x-mu_)/sigma_));
00242
00243 if (y<p)
00244 {
00245 success = true;
00246 }
00247 }
00248
00249 p.d() = dC;
00250 p.m() = corePerc_ * initMass;
00251
00252 spray_.addParticle
00253 (
00254 new parcel
00255 (
00256 spray_,
00257 p.position(),
00258 p.cell(),
00259 p.n(),
00260 d,
00261 p.T(),
00262 (1.0 - corePerc_)* initMass,
00263 0.0,
00264 0.0,
00265 0.0,
00266 -GREAT,
00267 p.tTurb(),
00268 0.0,
00269 scalar(p.injector()),
00270 p.U(),
00271 p.Uturb(),
00272 p.X(),
00273 p.fuelNames()
00274 )
00275 );
00276
00277 p.ct() = 0.0;
00278 }
00279 }
00280 }
00281
00282
00283
00284
00285 }
00286
00287