1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend 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 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
27 #include "addToRunTimeSelectionTable.H"
28 #include "mathematicalConstants.H"
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
37 defineTypeNameAndDebug(ETAB, 0);
39 addToRunTimeSelectionTable
46 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
48 // Construct from components
51 const dictionary& dict,
55 breakupModel(dict, sm),
56 coeffsDict_(dict.subDict(typeName + "Coeffs")),
57 Cmu_(readScalar(coeffsDict_.lookup("Cmu"))),
58 Comega_(readScalar(coeffsDict_.lookup("Comega"))),
59 k1_(readScalar(coeffsDict_.lookup("k1"))),
60 k2_(readScalar(coeffsDict_.lookup("k2"))),
61 WeCrit_(readScalar(coeffsDict_.lookup("WeCrit"))),
62 WeTransition_(readScalar(coeffsDict_.lookup("WeTransition"))),
66 AWe_ = (k21*sqrt(WeTransition_) - 1.0)/pow(WeTransition_, 4.0);
70 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
76 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
78 void ETAB::breakupParcel
83 const liquidMixture& fuels
88 scalar pc = spray_.p()[p.cell()];
93 scalar rho = fuels.rho(pc, T, p.X());
94 scalar sigma = fuels.sigma(pc, T, p.X());
95 scalar mu = fuels.mu(pc, T, p.X());
97 // inverse of characteristic viscous damping time
98 scalar rtd = 0.5*Cmu_*mu/(rho*r2);
100 // oscillation frequency (squared)
101 scalar omega2 = Comega_*sigma/(rho*r3) - rtd*rtd;
105 scalar omega = sqrt(omega2);
106 scalar romega = 1.0/omega;
108 scalar rhog = spray_.rho()[p.cell()];
109 scalar We = p.We(Ug, rhog, sigma);
110 scalar Wetmp = We/WeCrit_;
112 scalar y1 = p.dev() - Wetmp;
113 scalar y2 = p.ddev()*romega;
115 scalar a = sqrt(y1*y1 + y2*y2);
117 // scotty we may have break-up
122 // constrain phic within -1 to 1
123 phic = max(min(phic, 1), -1);
125 scalar phit = acos(phic);
130 phi = 2*mathematicalConstant::pi - phit;
135 if (mag(p.dev()) < 1.0)
137 scalar theta = acos((1.0 - Wetmp)/a);
141 if (2*mathematicalConstant::pi-theta >= phi)
145 theta += 2*mathematicalConstant::pi;
147 tb = (theta-phi)*romega;
153 p.ddev() = -a*omega*sin(omega*tb + phi);
157 // update droplet size
160 scalar sqrtWe = AWe_*pow(We, 4.0) + 1.0;
161 scalar Kbr = k1_*omega*sqrtWe;
163 if (We > WeTransition_)
166 Kbr =k2_*omega*sqrtWe;
169 scalar rWetmp = 1.0/Wetmp;
170 scalar cosdtbu = max(-1.0, min(1.0, 1.0-rWetmp));
171 scalar dtbu = romega*acos(cosdtbu);
172 scalar decay = exp(-Kbr*dtbu);
174 scalar rNew = decay*r;
186 // reset droplet distortion parameters
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 } // End namespace Foam
196 // ************************************************************************* //