Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / src / lagrangian / spray / submodels / BreakupModel / ReitzDiwakar / ReitzDiwakar.C
blobc9cb30ff2b79178946c18ba8690556789a3e7328
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2009-2011 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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 \*---------------------------------------------------------------------------*/
26 #include "ReitzDiwakar.H"
28 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
30 template <class CloudType>
31 Foam::ReitzDiwakar<CloudType>::ReitzDiwakar
33     const dictionary& dict,
34     CloudType& owner
37     BreakupModel<CloudType>(dict, owner, typeName),
38     Cbag_(6.0),
39     Cb_(0.785),
40     Cstrip_(0.5),
41     Cs_(10.0)
43     if (!this->defaultCoeffs(true))
44     {
45         this->coeffDict().lookup("Cbag") >> Cbag_;
46         this->coeffDict().lookup("Cb") >> Cb_;
47         this->coeffDict().lookup("Cstrip") >> Cstrip_;
48         this->coeffDict().lookup("Cs") >> Cs_;
49     }
53 template <class CloudType>
54 Foam::ReitzDiwakar<CloudType>::ReitzDiwakar(const ReitzDiwakar<CloudType>& bum)
56     BreakupModel<CloudType>(bum),
57     Cbag_(bum.Cbag_),
58     Cb_(bum.Cb_),
59     Cstrip_(bum.Cstrip_),
60     Cs_(bum.Cs_)
64 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
66 template <class CloudType>
67 Foam::ReitzDiwakar<CloudType>::~ReitzDiwakar()
71 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
73 template<class CloudType>
74 bool Foam::ReitzDiwakar<CloudType>::update
76     const scalar dt,
77     const vector& g,
78     scalar& d,
79     scalar& tc,
80     scalar& ms,
81     scalar& nParticle,
82     scalar& KHindex,
83     scalar& y,
84     scalar& yDot,
85     const scalar d0,
86     const scalar rho,
87     const scalar mu,
88     const scalar sigma,
89     const vector& U,
90     const scalar rhoc,
91     const scalar muc,
92     const vector& Urel,
93     const scalar Urmag,
94     const scalar tMom,
95     const scalar averageParcelMass,
96     scalar& dChild,
97     scalar& massChild,
98     cachedRandom& rndGen
99 ) const
101     scalar d1 = d;
102     scalar nuc = muc/rhoc;
103     scalar We = 0.5*rhoc*sqr(Urmag)*d/sigma;
104     scalar Re = Urmag*d/nuc;
106     scalar sqRey = sqrt(Re);
108     if (We > Cbag_)
109     {
110         if (We > Cstrip_*sqRey)
111         {
112             scalar dStrip = sqr(2.0*Cstrip_*sigma)/(rhoc*pow3(Urmag)*muc);
113             scalar tauStrip = Cs_*d*sqrt(rho/rhoc)/Urmag;
114             scalar fraction = dt/tauStrip;
116             // new droplet diameter, implicit calculation
117             d = (fraction*dStrip + d)/(1.0 + fraction);
118         }
119         else
120         {
121             scalar dBag = 2.0*Cbag_*sigma/(rhoc*sqr(Urmag));
123             scalar tauBag = Cb_*d*sqrt(rho*d/sigma);
125             scalar fraction = dt/tauBag;
127             // new droplet diameter, implicit calculation
128             d = (fraction*dBag + d)/(1.0 + fraction);
129         }
131         // preserve the total mass/volume by updating the number of
132         // particles in parcels due to breakup
133         nParticle *= pow(d1/d, 3.0);
134     }
136     return false;
140 // ************************************************************************* //