1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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 * * * * * * * * * * * * * //
35 defineTypeNameAndDebug(ETAB, 0);
37 addToRunTimeSelectionTable
46 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
50 const dictionary& dict,
54 breakupModel(dict, sm),
55 coeffsDict_(dict.subDict(typeName + "Coeffs")),
56 Cmu_(readScalar(coeffsDict_.lookup("Cmu"))),
57 Comega_(readScalar(coeffsDict_.lookup("Comega"))),
58 k1_(readScalar(coeffsDict_.lookup("k1"))),
59 k2_(readScalar(coeffsDict_.lookup("k2"))),
60 WeCrit_(readScalar(coeffsDict_.lookup("WeCrit"))),
61 WeTransition_(readScalar(coeffsDict_.lookup("WeTransition"))),
65 AWe_ = (k21*sqrt(WeTransition_) - 1.0)/pow4(WeTransition_);
69 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
75 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
77 void Foam::ETAB::breakupParcel
82 const liquidMixtureProperties& fuels
86 scalar pc = spray_.p()[p.cell()];
91 scalar rho = fuels.rho(pc, T, p.X());
92 scalar sigma = fuels.sigma(pc, T, p.X());
93 scalar mu = fuels.mu(pc, T, p.X());
95 // inverse of characteristic viscous damping time
96 scalar rtd = 0.5*Cmu_*mu/(rho*r2);
98 // oscillation frequency (squared)
99 scalar omega2 = Comega_*sigma/(rho*r3) - rtd*rtd;
103 scalar omega = sqrt(omega2);
104 scalar romega = 1.0/omega;
106 scalar rhog = spray_.rho()[p.cell()];
107 scalar We = p.We(Ug, rhog, sigma);
108 scalar Wetmp = We/WeCrit_;
110 scalar y1 = p.dev() - Wetmp;
111 scalar y2 = p.ddev()*romega;
113 scalar a = sqrt(y1*y1 + y2*y2);
115 // scotty we may have break-up
120 // constrain phic within -1 to 1
121 phic = max(min(phic, 1), -1);
123 scalar phit = acos(phic);
128 phi = constant::mathematical::twoPi - phit;
133 if (mag(p.dev()) < 1.0)
135 scalar theta = acos((1.0 - Wetmp)/a);
139 if (constant::mathematical::twoPi - theta >= phi)
143 theta += constant::mathematical::twoPi;
145 tb = (theta-phi)*romega;
151 p.ddev() = -a*omega*sin(omega*tb + phi);
155 // update droplet size
158 scalar sqrtWe = AWe_*pow4(We) + 1.0;
159 scalar Kbr = k1_*omega*sqrtWe;
161 if (We > WeTransition_)
164 Kbr = k2_*omega*sqrtWe;
167 scalar rWetmp = 1.0/Wetmp;
168 scalar cosdtbu = max(-1.0, min(1.0, 1.0 - rWetmp));
169 scalar dtbu = romega*acos(cosdtbu);
170 scalar decay = exp(-Kbr*dtbu);
172 scalar rNew = decay*r;
184 // reset droplet distortion parameters
191 // ************************************************************************* //