ReitzDiwakar.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2013 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "ReitzDiwakar.H"
29 
30 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
31 
32 template<class CloudType>
34 (
35  const dictionary& dict,
36  CloudType& owner
37 )
38 :
39  BreakupModel<CloudType>(dict, owner, typeName),
40  Cbag_(6.0),
41  Cb_(0.785),
42  Cstrip_(0.5),
43  Cs_(10.0)
44 {
45  if (!this->defaultCoeffs(true))
46  {
47  this->coeffDict().readEntry("Cbag", Cbag_);
48  this->coeffDict().readEntry("Cb", Cb_);
49  this->coeffDict().readEntry("Cstrip", Cstrip_);
50  this->coeffDict().readEntry("Cs", Cs_);
51  }
52 }
53 
54 
55 template<class CloudType>
56 Foam::ReitzDiwakar<CloudType>::ReitzDiwakar(const ReitzDiwakar<CloudType>& bum)
57 :
58  BreakupModel<CloudType>(bum),
59  Cbag_(bum.Cbag_),
60  Cb_(bum.Cb_),
61  Cstrip_(bum.Cstrip_),
62  Cs_(bum.Cs_)
63 {}
64 
65 
66 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
67 
68 template<class CloudType>
70 {}
71 
72 
73 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
74 
75 template<class CloudType>
77 (
78  const scalar dt,
79  const vector& g,
80  scalar& d,
81  scalar& tc,
82  scalar& ms,
83  scalar& nParticle,
84  scalar& KHindex,
85  scalar& y,
86  scalar& yDot,
87  const scalar d0,
88  const scalar rho,
89  const scalar mu,
90  const scalar sigma,
91  const vector& U,
92  const scalar rhoc,
93  const scalar muc,
94  const vector& Urel,
95  const scalar Urmag,
96  const scalar tMom,
97  scalar& dChild,
98  scalar& massChild
99 )
100 {
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;
105 
106  if (We > Cbag_)
107  {
108  if (We > Cstrip_*sqrt(Re))
109  {
110  scalar dStrip = sqr(2.0*Cstrip_*sigma)/(rhoc*pow3(Urmag)*muc);
111  scalar tauStrip = Cs_*d*sqrt(rho/rhoc)/Urmag;
112  scalar fraction = dt/tauStrip;
113 
114  // new droplet diameter, implicit calculation
115  d = (fraction*dStrip + d)/(1.0 + fraction);
116  }
117  else
118  {
119  scalar dBag = 2.0*Cbag_*sigma/(rhoc*sqr(Urmag));
120  scalar tauBag = Cb_*d*sqrt(rho*d/sigma);
121  scalar fraction = dt/tauBag;
122 
123  // new droplet diameter, implicit calculation
124  d = (fraction*dBag + d)/(1.0 + fraction);
125  }
126 
127  // preserve the total mass/volume by updating the number of
128  // particles in parcels due to breakup
129  nParticle *= pow3(d1/d);
130  }
131 
132  return false;
133 }
134 
135 
136 // ************************************************************************* //
virtual ~ReitzDiwakar()
Destructor.
Definition: ReitzDiwakar.C:62
dictionary dict
DSMCCloud< dsmcParcel > CloudType
ReitzDiwakar(const dictionary &, CloudType &)
Construct from dictionary.
Definition: ReitzDiwakar.C:27
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ) const
Find entry and assign to T val. FatalIOError if it is found and the number of tokens is incorrect...
scalar y
const dictionary & coeffDict() const
Return const access to the coefficients dictionary.
Definition: subModelBase.C:122
Urel
Definition: pEqn.H:56
const uniformDimensionedVectorField & g
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
virtual bool defaultCoeffs(const bool printMsg) const
Returns true if defaultCoeffs is true and outputs on printMsg.
Definition: subModelBase.C:134
const dimensionedScalar mu
Atomic mass unit.
scalarField Re(const UList< complex > &cmplx)
Extract real component.
Definition: complexField.C:207
dimensionedScalar pow3(const dimensionedScalar &ds)
U
Definition: pEqn.H:72
virtual bool update(const scalar dt, const vector &g, scalar &d, scalar &tc, scalar &ms, scalar &nParticle, scalar &KHindex, scalar &y, scalar &yDot, const scalar d0, const scalar rho, const scalar mu, const scalar sigma, const vector &U, const scalar rhoc, const scalar muc, const vector &Urel, const scalar Urmag, const scalar tMom, scalar &dChild, scalar &massChild)
Update the parcel properties.
Definition: ReitzDiwakar.C:70
Templated break-up model class.
Definition: SprayCloud.H:44
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:67