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 "breakupModel.H"
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
37 defineTypeNameAndDebug(breakupModel, 0);
39 defineRunTimeSelectionTable(breakupModel, dictionary);
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
43 // Construct from components
44 breakupModel::breakupModel
46 const dictionary& dict,
53 includeOscillation_(dict_.lookup("includeOscillation")),
54 TABcoeffsDict_(dict.subDict("TABCoeffs")),
61 if (includeOscillation_)
63 y0_ = readScalar(TABcoeffsDict_.lookup("y0"));
64 yDot0_ = readScalar(TABcoeffsDict_.lookup("yDot0"));
65 TABComega_ = readScalar(TABcoeffsDict_.lookup("Comega"));
66 TABCmu_ = readScalar(TABcoeffsDict_.lookup("Cmu"));
67 TABWeCrit_ = readScalar(TABcoeffsDict_.lookup("WeCrit"));
72 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
74 breakupModel::~breakupModel()
77 // * * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * //
79 void breakupModel::updateParcelProperties
84 const liquidMixture& fuels
88 if(includeOscillation_)
92 scalar pc = spray_.p()[p.cell()];
93 scalar r = 0.5 * p.d();
97 scalar rho = fuels.rho(pc, T, p.X());
98 scalar sigma = fuels.sigma(pc, T, p.X());
99 scalar mu = fuels.mu(pc, T, p.X());
101 // inverse of characteristic viscous damping time
102 scalar rtd = 0.5*TABCmu_*mu/(rho*r2);
104 // oscillation frequency (squared)
105 scalar omega2 = TABComega_ * 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/TABWeCrit_;
115 scalar y1 = p.dev() - Wetmp;
116 scalar y2 = p.ddev()/omega;
118 // update distortion parameters
119 scalar c = cos(omega*deltaT);
120 scalar s = sin(omega*deltaT);
121 scalar e = exp(-rtd*deltaT);
122 y2 = (p.ddev() + y1*rtd)/omega;
124 p.dev() = Wetmp + e*(y1*c + y2*s);
132 p.ddev() = (Wetmp-p.dev())*rtd + e*omega*(y2*c - y1*s);
137 // reset droplet distortion parameters
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 } // End namespace Foam
151 // ************************************************************************* //