BrunDripping.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2016-2024 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "BrunDripping.H"
28 
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33 namespace filmEjectionModels
34 {
35 
36 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
37 
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
44 (
45  const dictionary& dict,
46  const solvers::isothermalFilm& film
47 )
48 :
49  ejectionModel(dict, film),
50  ubarStar_
51  (
52  dict.optionalSubDict(typeName + "Coeffs")
53  .lookupOrDefault("ubarStar", 1.62208)
54  ),
55  dCoeff_
56  (
57  dict.optionalSubDict(typeName + "Coeffs")
58  .lookupOrDefault("dCoeff", 3.3)
59  ),
60  deltaStable_
61  (
62  dict.optionalSubDict(typeName + "Coeffs")
63  .lookupOrDefault("deltaStable", scalar(0))
64  ),
65  minParticlesPerParcel_
66  (
67  dict.optionalSubDict(typeName + "Coeffs")
68  .lookupOrDefault("minParticlesPerParcel", 1)
69  )
70 {}
71 
72 
73 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
74 
76 {}
77 
78 
79 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
80 
82 {
83  const scalar piBy6 = constant::mathematical::pi/6;
84 
85  const scalarField& magSf = film_.magSf;
86  const vectorField& nHat = film_.nHat;
87  const scalarField& delta = film_.delta;
88  const scalarField& rho = film_.rho;
89 
90  const tmp<volScalarField> tsigma = film_.sigma();
91  const volScalarField::Internal& sigma = tsigma();
92 
93  const scalar magg = mag(film_.g.value());
94  const vector gHat = -film_.g.value()/magg;
95 
96  const scalar deltaT = film_.mesh.time().deltaTValue();
97 
98  forAll(delta, celli)
99  {
100  rate_[celli] = 0;
101  diameter_[celli] = 0;
102 
103  const scalar sinAlpha = nHat[celli] & gHat;
104 
105  if (sinAlpha > small && delta[celli] > deltaStable_)
106  {
107  const scalar lc = sqrt(sigma[celli]/(rho[celli]*magg));
108 
109  const scalar deltaStable = max
110  (
111  3*lc*sqrt(1 - sqr(sinAlpha))
112  /(ubarStar_*sqrt(sinAlpha)*sinAlpha),
113  deltaStable_
114  );
115 
116  if (delta[celli] > deltaStable)
117  {
118  const scalar ddelta = delta[celli] - deltaStable;
119  const scalar massDrip = ddelta*rho[celli]*magSf[celli];
120 
121  // Calculate dripped droplet diameter
122  diameter_[celli] = dCoeff_*lc;
123 
124  // Calculate the minimum mass of a droplet parcel
125  const scalar minMass =
126  minParticlesPerParcel_
127  *rho[celli]*piBy6*pow3(diameter_[celli]);
128 
129  if (massDrip > minMass)
130  {
131  // Calculate rate of dripping
132  rate_[celli] = ddelta/(deltaT*delta[celli]);
133  }
134  }
135  }
136  }
137 }
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace filmEjectionModels
143 } // End namespace Foam
144 
145 // ************************************************************************* //
scalar delta
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
Brun dripping film to cloud ejection transfer model.
Definition: BrunDripping.H:91
BrunDripping(const dictionary &dict, const solvers::isothermalFilm &film)
Construct from dictionary and film model.
Definition: BrunDripping.C:44
Solver module for flow of compressible isothermal liquid films.
A class for managing temporary objects.
Definition: tmp.H:55
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
addToRunTimeSelectionTable(ejectionModel, BrunDripping, dictionary)
defineTypeNameAndDebug(BrunDripping, 0)
Namespace for OpenFOAM.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< scalar > mag(const dimensioned< Type > &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dictionary dict