1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2009-2011 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
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 \*---------------------------------------------------------------------------*/
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
30 template<class CloudType>
31 Foam::ETAB<CloudType>::ETAB
33 const dictionary& dict,
37 BreakupModel<CloudType>(dict, owner, typeName),
46 if (!this->defaultCoeffs(true))
48 this->coeffDict().lookup("Cmu") >> Cmu_;
49 this->coeffDict().lookup("Comega") >> Comega_;
50 this->coeffDict().lookup("k1") >> k1_;
51 this->coeffDict().lookup("k2") >> k2_;
52 this->coeffDict().lookup("WeCrit") >> WeCrit_;
53 this->coeffDict().lookup("WeTransition") >> WeTransition_;
57 AWe_ = (k21*sqrt(WeTransition_) - 1.0)/pow4(WeTransition_);
59 if (!BreakupModel<CloudType>::solveOscillationEq_)
61 Info<< "Warning: solveOscillationEq is set to "
62 << BreakupModel<CloudType>::solveOscillationEq_ << nl
63 << " Setting it to true in order for the ETAB model to work."
65 BreakupModel<CloudType>::solveOscillationEq_ = true;
70 template<class CloudType>
71 Foam::ETAB<CloudType>::ETAB(const ETAB<CloudType>& bum)
73 BreakupModel<CloudType>(bum),
79 WeTransition_(bum.WeTransition_),
84 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
86 template<class CloudType>
87 Foam::ETAB<CloudType>::~ETAB()
91 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
93 template<class CloudType>
94 bool Foam::ETAB<CloudType>::update
115 const scalar averageParcelMass,
125 scalar semiMass = nParticle*pow3(d);
127 // inverse of characteristic viscous damping time
128 scalar rtd = 0.5*Cmu_*mu/(rho*r2);
130 // oscillation frequency (squared)
131 scalar omega2 = Comega_*sigma/(rho*r3) - rtd*rtd;
135 scalar omega = sqrt(omega2);
136 scalar romega = 1.0/omega;
138 scalar We = rhoc*sqr(Urmag)*r/sigma;
139 scalar Wetmp = We/WeCrit_;
141 scalar y1 = y - Wetmp;
142 scalar y2 = yDot*romega;
144 scalar a = sqrt(y1*y1 + y2*y2);
146 // scotty we may have break-up
151 // constrain phic within -1 to 1
152 phic = max(min(phic, 1), -1);
154 scalar phit = acos(phic);
159 phi = 2*constant::mathematical::pi - phit;
166 scalar theta = acos((1.0 - Wetmp)/a);
170 if (2*constant::mathematical::pi - theta >= phi)
174 theta += 2*constant::mathematical::pi;
176 tb = (theta - phi)*romega;
182 yDot = -a*omega*sin(omega*tb + phi);
186 // update droplet size
189 scalar sqrtWe = AWe_*pow4(We) + 1.0;
190 scalar Kbr = k1_*omega*sqrtWe;
192 if (We > WeTransition_)
195 Kbr =k2_*omega*sqrtWe;
198 scalar rWetmp = 1.0/Wetmp;
199 scalar cosdtbu = max(-1.0, min(1.0, 1.0 - rWetmp));
200 scalar dtbu = romega*acos(cosdtbu);
201 scalar decay = exp(-Kbr*dtbu);
203 scalar rNew = decay*r;
215 // reset droplet distortion parameters
220 // update the nParticle count to conserve mass
221 nParticle = semiMass/pow3(d);
223 // Do not add child parcel
228 // ************************************************************************* //