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(TAB, 0);
40 addToRunTimeSelectionTable
47 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
49 // Construct from components
52 const dictionary& dict,
56 breakupModel(dict, sm),
57 coeffsDict_(dict.subDict(typeName + "Coeffs")),
58 Cmu_(readScalar(coeffsDict_.lookup("Cmu"))),
59 Comega_(readScalar(coeffsDict_.lookup("Comega"))),
60 WeCrit_(readScalar(coeffsDict_.lookup("WeCrit")))
63 // calculate the inverse function of the Rossin-Rammler Distribution
64 const scalar xx0 = 12.0;
65 const scalar rrd100 = 1.0/(1.0-exp(-xx0)*(1+xx0+pow(xx0, 2)/2+pow(xx0, 3)/6));
67 for(label n=0; n<100; n++)
69 scalar xx = 0.12*(n+1);
70 rrd_[n] = (1-exp(-xx)*(1 + xx + pow(xx, 2)/2 + pow(xx, 3)/6))*rrd100;
75 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
81 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
83 void TAB::breakupParcel
88 const liquidMixture& fuels
93 scalar pc = spray_.p()[p.cell()];
98 scalar rho = fuels.rho(pc, T, p.X());
99 scalar sigma = fuels.sigma(pc, T, p.X());
100 scalar mu = fuels.mu(pc, T, p.X());
102 // inverse of characteristic viscous damping time
103 scalar rtd = 0.5*Cmu_*mu/(rho*r2);
105 // oscillation frequency (squared)
106 scalar omega2 = Comega_*sigma/(rho*r3) - rtd*rtd;
110 scalar omega = sqrt(omega2);
111 scalar rhog = spray_.rho()[p.cell()];
112 scalar We = p.We(Ug, rhog, sigma);
113 scalar Wetmp = We/WeCrit_;
115 scalar y1 = p.dev() - Wetmp;
116 scalar y2 = p.ddev()/omega;
118 scalar a = sqrt(y1*y1 + y2*y2);
120 // scotty we may have break-up
125 // constrain phic within -1 to 1
126 phic = max(min(phic, 1), -1);
128 scalar phit = acos(phic);
133 phi = 2*mathematicalConstant::pi - phit;
138 if (mag(p.dev()) < 1.0)
150 scalar theta = acos((coste-Wetmp)/a);
154 if (2*mathematicalConstant::pi-theta >= phi)
158 theta += 2*mathematicalConstant::pi;
160 tb = (theta-phi)/omega;
166 p.ddev() = -a*omega*sin(omega*tb + phi);
171 // update droplet size
177 + (4.0/3.0)*pow(p.dev(), 2)
178 + rho*r3/(8*sigma)*pow(p.ddev(), 2)
183 scalar random = rndGen_.scalar01();
184 while (!found && (n<99))
193 scalar rNew = 0.04*n*rs;
208 // reset droplet distortion parameters
215 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
217 } // End namespace Foam
219 // ************************************************************************* //