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