FreeFOAM The Cross-Platform CFD Toolkit
blobsSheetAtomization.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 | Copyright (C) 1991-2010 OpenCFD Ltd.
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 <OpenFOAM/error.H>
27 
28 #include "blobsSheetAtomization.H"
31 
32 #include <pdf/RosinRammler.H>
33 
34 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35 
36 namespace Foam
37 {
38 
39 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
40 
41 defineTypeNameAndDebug(blobsSheetAtomization, 0);
42 
44 (
45  atomizationModel,
46  blobsSheetAtomization,
47  dictionary
48 );
49 
50 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
51 
52 // Construct from components
54 (
55  const dictionary& dict,
56  spray& sm
57 )
58 :
59  atomizationModel(dict, sm),
60  coeffsDict_(dict.subDict(typeName + "Coeffs")),
61  B_(readScalar(coeffsDict_.lookup("B"))),
62  angle_(readScalar(coeffsDict_.lookup("angle"))),
63  rndGen_(sm.rndGen())
64 {}
65 
66 
67 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
68 
70 {}
71 
72 
73 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
74 
76 (
77  parcel& p,
78  const scalar deltaT,
79  const vector& vel,
80  const liquidMixture& fuels
81 ) const
82 {
83 
84  const PtrList<volScalarField>& Y = spray_.composition().Y();
85 
86  label Ns = Y.size();
87  label cellI = p.cell();
88  scalar pressure = spray_.p()[cellI];
89  scalar temperature = spray_.T()[cellI];
90  scalar Taverage = p.T() + (temperature - p.T())/3.0;
91 
92  scalar Winv = 0.0;
93  for(label i=0; i<Ns; i++)
94  {
95  Winv += Y[i][cellI]/spray_.gasProperties()[i].W();
96  }
97  scalar R = specie::RR*Winv;
98 
99  // ideal gas law to evaluate density
100  scalar rhoAverage = pressure/R/Taverage;
101  scalar sigma = fuels.sigma(pressure, p.T(), p.X());
102 
103  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104  // The We and Re numbers are to be evaluated using the 1/3 rule.
105  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107  scalar rhoFuel = fuels.rho(1.0e+5, p.T(), p.X());
108 
109  scalar U = mag(p.Urel(vel));
110 
111  const injectorType& it =
112  spray_.injectors()[label(p.injector())].properties();
113 
114  vector itPosition(vector::zero);
115  label nHoles = it.nHoles();
116  if (nHoles > 1)
117  {
118  for(label i=0; i<nHoles;i++)
119  {
120  itPosition += it.position(i);
121  }
122  itPosition /= nHoles;
123  }
124  else
125  {
126  itPosition = it.position(0);
127  }
128 // const vector itPosition = it.position();
129 
130 
131  scalar lBU = B_ * sqrt
132  (
133  rhoFuel * sigma * p.d() * cos(angle_*mathematicalConstant::pi/360.0)
134  / sqr(rhoAverage*U)
135  );
136 
137  scalar pWalk = mag(p.position() - itPosition);
138 
139  if(pWalk > lBU && p.liquidCore() == 1.0)
140  {
141  p.liquidCore() = 0.0;
142  }
143 }
144 
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 } // End namespace Foam
149 
150 // ************************ vim: set sw=4 sts=4 et: ************************ //