All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SprayParcelI.H
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) 2011-2018 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 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
27 
28 template<class ParcelType>
30 :
31  ParcelType::constantProperties(),
32  sigma0_(this->dict_, 0.0),
33  mu0_(this->dict_, 0.0)
34 {}
35 
36 
37 template<class ParcelType>
39 (
40  const constantProperties& cp
41 )
42 :
43  ParcelType::constantProperties(cp),
44  sigma0_(cp.sigma0_),
45  mu0_(cp.mu0_)
46 {}
47 
48 
49 template<class ParcelType>
51 (
52  const dictionary& parentDict
53 )
54 :
55  ParcelType::constantProperties(parentDict),
56  sigma0_(this->dict_, "sigma0"),
57  mu0_(this->dict_, "mu0")
58 {}
59 
60 
61 template<class ParcelType>
63 (
64  const label parcelTypeId,
65  const scalar rhoMin,
66  const scalar rho0,
67  const scalar minParcelMass,
68  const scalar youngsModulus,
69  const scalar poissonsRatio,
70  const scalar T0,
71  const scalar TMin,
72  const scalar TMax,
73  const scalar Cp0,
74  const scalar epsilon0,
75  const scalar f0,
76  const scalar Pr,
77  const scalar pMin,
78  const Switch& constantVolume,
79  const scalar sigma0,
80  const scalar mu0
81 )
82 :
83  ParcelType::constantProperties
84  (
85  parcelTypeId,
86  rhoMin,
87  rho0,
88  minParcelMass,
89  youngsModulus,
90  poissonsRatio,
91  T0,
92  TMin,
93  TMax,
94  Cp0,
95  epsilon0,
96  f0,
97  Pr,
98  pMin,
99  constantVolume
100  ),
101  sigma0_(this->dict_, sigma0),
102  mu0_(this->dict_, mu0)
103 {}
104 
105 
106 template<class ParcelType>
108 (
109  const polyMesh& mesh,
110  const barycentric& coordinates,
111  const label celli,
112  const label tetFacei,
113  const label tetPti
114 )
115 :
116  ParcelType(mesh, coordinates, celli, tetFacei, tetPti),
117  d0_(this->d()),
118  position0_(this->position()),
119  sigma_(0.0),
120  mu_(0.0),
121  liquidCore_(0.0),
122  KHindex_(0.0),
123  y_(0.0),
124  yDot_(0.0),
125  tc_(0.0),
126  ms_(0.0),
127  injector_(1.0),
128  tMom_(great),
129  user_(0.0)
130 {}
131 
132 
133 template<class ParcelType>
135 (
136  const polyMesh& mesh,
137  const vector& position,
138  const label celli
139 )
140 :
141  ParcelType(mesh, position, celli),
142  d0_(this->d()),
143  position0_(this->position()),
144  sigma_(0.0),
145  mu_(0.0),
146  liquidCore_(0.0),
147  KHindex_(0.0),
148  y_(0.0),
149  yDot_(0.0),
150  tc_(0.0),
151  ms_(0.0),
152  injector_(1.0),
153  tMom_(great),
154  user_(0.0)
155 {}
156 
157 
158 template<class ParcelType>
160 (
161  const polyMesh& mesh,
162  const barycentric& coordinates,
163  const label celli,
164  const label tetFacei,
165  const label tetPti,
166  const label typeId,
167  const scalar nParticle0,
168  const scalar d0,
169  const scalar dTarget0,
170  const vector& U0,
171  const vector& f0,
172  const vector& angularMomentum0,
173  const vector& torque0,
174  const scalarField& Y0,
175  const scalar liquidCore,
176  const scalar KHindex,
177  const scalar y,
178  const scalar yDot,
179  const scalar tc,
180  const scalar ms,
181  const scalar injector,
182  const scalar tMom,
183  const scalar user,
184  const typename ParcelType::constantProperties& constProps
185 )
186 :
187  ParcelType
188  (
189  mesh,
190  coordinates,
191  celli,
192  tetFacei,
193  tetPti,
194  typeId,
195  nParticle0,
196  d0,
197  dTarget0,
198  U0,
199  f0,
200  angularMomentum0,
201  torque0,
202  Y0,
203  constProps
204  ),
205  d0_(d0),
206  position0_(this->position()),
207  sigma_(constProps.sigma0()),
208  mu_(constProps.mu0()),
209  liquidCore_(liquidCore),
210  KHindex_(KHindex),
211  y_(y),
212  yDot_(yDot),
213  tc_(tc),
214  ms_(ms),
215  injector_(injector),
216  tMom_(tMom),
217  user_(user)
218 {}
219 
220 
221 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
222 
223 template<class ParcelType>
224 inline Foam::scalar
226 {
227  return sigma0_.value();
228 }
229 
230 
231 template<class ParcelType>
232 inline Foam::scalar
234 {
235  return mu0_.value();
236 }
237 
238 
239 // * * * * * * * * * * SprayParcel Member Functions * * * * * * * * * * * * //
240 
241 template<class ParcelType>
242 inline Foam::scalar Foam::SprayParcel<ParcelType>::d0() const
243 {
244  return d0_;
245 }
246 
247 
248 template<class ParcelType>
250 {
251  return position0_;
252 }
253 
254 
255 template<class ParcelType>
256 inline Foam::scalar Foam::SprayParcel<ParcelType>::sigma() const
257 {
258  return sigma_;
259 }
260 
261 
262 template<class ParcelType>
263 inline Foam::scalar Foam::SprayParcel<ParcelType>::mu() const
264 {
265  return mu_;
266 }
267 
268 
269 template<class ParcelType>
270 inline Foam::scalar Foam::SprayParcel<ParcelType>::liquidCore() const
271 {
272  return liquidCore_;
273 }
274 
275 
276 template<class ParcelType>
277 inline Foam::scalar Foam::SprayParcel<ParcelType>::KHindex() const
278 {
279  return KHindex_;
280 }
281 
282 
283 template<class ParcelType>
284 inline Foam::scalar Foam::SprayParcel<ParcelType>::y() const
285 {
286  return y_;
287 }
288 
289 
290 template<class ParcelType>
291 inline Foam::scalar Foam::SprayParcel<ParcelType>::yDot() const
292 {
293  return yDot_;
294 }
295 
296 
297 template<class ParcelType>
298 inline Foam::scalar Foam::SprayParcel<ParcelType>::tc() const
299 {
300  return tc_;
301 }
302 
303 
304 template<class ParcelType>
305 inline Foam::scalar Foam::SprayParcel<ParcelType>::ms() const
306 {
307  return ms_;
308 }
309 
310 
311 template<class ParcelType>
312 inline Foam::scalar Foam::SprayParcel<ParcelType>::injector() const
313 {
314  return injector_;
315 }
316 
317 
318 template<class ParcelType>
319 inline Foam::scalar Foam::SprayParcel<ParcelType>::tMom() const
320 {
321  return tMom_;
322 }
323 
324 
325 template<class ParcelType>
326 inline Foam::scalar Foam::SprayParcel<ParcelType>::user() const
327 {
328  return user_;
329 }
330 
331 
332 template<class ParcelType>
333 inline Foam::scalar& Foam::SprayParcel<ParcelType>::d0()
334 {
335  return d0_;
336 }
337 
338 
339 template<class ParcelType>
341 {
342  return position0_;
343 }
344 
345 
346 template<class ParcelType>
348 {
349  return sigma_;
350 }
351 
352 
353 template<class ParcelType>
354 inline Foam::scalar& Foam::SprayParcel<ParcelType>::mu()
355 {
356  return mu_;
357 }
358 
359 
360 template<class ParcelType>
362 {
363  return liquidCore_;
364 }
365 
366 
367 template<class ParcelType>
369 {
370  return KHindex_;
371 }
372 
373 
374 template<class ParcelType>
375 inline Foam::scalar& Foam::SprayParcel<ParcelType>::y()
376 {
377  return y_;
378 }
379 
380 
381 template<class ParcelType>
383 {
384  return yDot_;
385 }
386 
387 
388 template<class ParcelType>
389 inline Foam::scalar& Foam::SprayParcel<ParcelType>::tc()
390 {
391  return tc_;
392 }
393 
394 
395 template<class ParcelType>
396 inline Foam::scalar& Foam::SprayParcel<ParcelType>::ms()
397 {
398  return ms_;
399 }
400 
401 
402 template<class ParcelType>
404 {
405  return injector_;
406 }
407 
408 
409 template<class ParcelType>
411 {
412  return tMom_;
413 }
414 
415 
416 template<class ParcelType>
418 {
419  return user_;
420 }
421 
422 
423 // ************************************************************************* //
scalar mu0() const
Return const access to the initial dynamic viscosity.
Definition: SprayParcelI.H:233
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
scalar tMom_
Momentum relaxation time (needed for calculating parcel acc.)
Definition: SprayParcel.H:174
scalar KHindex() const
Return const access to Kelvin-Helmholtz breakup index.
Definition: SprayParcelI.H:277
scalar tMom() const
Return const access to momentum relaxation time.
Definition: SprayParcelI.H:319
scalar sigma0() const
Return const access to the initial surface tension.
Definition: SprayParcelI.H:225
scalar liquidCore() const
Return const access to liquid core.
Definition: SprayParcelI.H:270
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none/any.
Definition: Switch.H:60
scalar ms() const
Return const access to stripped parcel mass.
Definition: SprayParcelI.H:305
scalar liquidCore_
Part of liquid core ( >0.5=liquid, <0.5=droplet )
Definition: SprayParcel.H:152
SprayParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
Construct from mesh, coordinates and topology.
Definition: SprayParcelI.H:108
scalar y() const
Return const access to spherical deviation.
Definition: SprayParcelI.H:284
const Type & value() const
Return the value.
scalar d0() const
Return const access to initial droplet diameter.
Definition: SprayParcelI.H:242
scalar mu() const
Return const access to the liquid dynamic viscosity.
Definition: SprayParcelI.H:263
scalar tc() const
Return const access to atomization characteristic time.
Definition: SprayParcelI.H:298
scalar injector_
Injected from injector (needed e.g. for calculating distance.
Definition: SprayParcel.H:171
Class to hold reacting particle constant properties.
Definition: SprayParcel.H:70
scalar user_
Passive scalar (extra variable to be defined by user)
Definition: SprayParcel.H:177
scalar yDot() const
Return const access to rate of change of spherical deviation.
Definition: SprayParcelI.H:291
scalar user() const
Return const access to passive user scalar.
Definition: SprayParcelI.H:326
constantProperties()
Null constructor.
Definition: SprayParcelI.H:29
scalar sigma_
Liquid surface tension [N/m].
Definition: SprayParcel.H:146
vector position0_
Injection position.
Definition: SprayParcel.H:143
scalar injector() const
Return const access to injector id.
Definition: SprayParcelI.H:312
const vector & position0() const
Return const access to initial droplet position.
Definition: SprayParcelI.H:249
scalar yDot_
Rate of change of spherical deviation.
Definition: SprayParcel.H:161
scalar ms_
Stripped parcel mass due to breakup.
Definition: SprayParcel.H:167
scalar d0_
Initial droplet diameter.
Definition: SprayParcel.H:140
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
scalar tc_
Characteristic time (used in atomization and/or breakup model)
Definition: SprayParcel.H:164
scalar mu_
Liquid dynamic viscosity [Pa.s].
Definition: SprayParcel.H:149
scalar y_
Spherical deviation.
Definition: SprayParcel.H:158
scalar KHindex_
Index for KH Breakup.
Definition: SprayParcel.H:155
scalar sigma() const
Return const access to the liquid surface tension.
Definition: SprayParcelI.H:256