ThermoSurfaceFilm.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) 2011-2016 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 "ThermoSurfaceFilm.H"
28 #include "mathematicalConstants.H"
29 #include "Pstream.H"
30 
31 using namespace Foam::constant::mathematical;
32 
33 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
34 
35 template<class CloudType>
37 (
38  IStringStream
39  (
40  "(absorb bounce splashBai)"
41  )()
42 );
43 
44 
45 // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
46 
47 template<class CloudType>
50 {
51  forAll(interactionTypeNames_, i)
52  {
53  if (interactionTypeNames_[i] == it)
54  {
55  return interactionType(i);
56  }
57  }
58 
60  << "Unknown interaction type " << it
61  << ". Valid interaction types include: " << interactionTypeNames_
62  << abort(FatalError);
63 
64  return interactionType(0);
65 }
66 
67 
68 template<class CloudType>
70 (
71  const interactionType& it
72 ) const
73 {
74  if (it >= interactionTypeNames_.size())
75  {
77  << "Unknown interaction type enumeration" << abort(FatalError);
78  }
79 
80  return interactionTypeNames_[it];
81 }
82 
83 
84 template<class CloudType>
86 (
87  const vector& v
88 ) const
89 {
90  vector tangent = Zero;
91  scalar magTangent = 0.0;
92 
93  while (magTangent < SMALL)
94  {
95  vector vTest = rndGen_.sample01<vector>();
96  tangent = vTest - (vTest & v)*v;
97  magTangent = mag(tangent);
98  }
99 
100  return tangent/magTangent;
101 }
102 
103 
104 template<class CloudType>
106 (
107  const vector& tanVec1,
108  const vector& tanVec2,
109  const vector& nf
110 ) const
111 {
112  // azimuthal angle [rad]
113  const scalar phiSi = twoPi*rndGen_.sample01<scalar>();
114 
115  // ejection angle [rad]
116  const scalar thetaSi = pi/180.0*(rndGen_.sample01<scalar>()*(50 - 5) + 5);
117 
118  // direction vector of new parcel
119  const scalar alpha = sin(thetaSi);
120  const scalar dcorr = cos(thetaSi);
121  const vector normal = alpha*(tanVec1*cos(phiSi) + tanVec2*sin(phiSi));
122  vector dirVec = dcorr*nf;
123  dirVec += normal;
124 
125  return dirVec/mag(dirVec);
126 }
127 
128 
129 template<class CloudType>
131 (
133  const parcelType& p,
134  const polyPatch& pp,
135  const label facei,
136  const scalar mass,
137  bool& keepParticle
138 )
139 {
140  if (debug)
141  {
142  Info<< "Parcel " << p.origId() << " absorbInteraction" << endl;
143  }
144 
145  // Patch face normal
146  const vector& nf = pp.faceNormals()[facei];
147 
148  // Patch velocity
149  const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
150 
151  // Relative parcel velocity
152  const vector Urel = p.U() - Up;
153 
154  // Parcel normal velocity
155  const vector Un = nf*(Urel & nf);
156 
157  // Parcel tangential velocity
158  const vector Ut = Urel - Un;
159 
160  filmModel.addSources
161  (
162  pp.index(),
163  facei,
164  mass, // mass
165  mass*Ut, // tangential momentum
166  mass*mag(Un), // impingement pressure
167  mass*p.hs() // energy
168  );
169 
170  this->nParcelsTransferred()++;
171 
172  keepParticle = false;
173 }
174 
175 
176 template<class CloudType>
178 (
179  parcelType& p,
180  const polyPatch& pp,
181  const label facei,
182  bool& keepParticle
183 ) const
184 {
185  if (debug)
186  {
187  Info<< "Parcel " << p.origId() << " bounceInteraction" << endl;
188  }
189 
190  // Patch face normal
191  const vector& nf = pp.faceNormals()[facei];
192 
193  // Patch velocity
194  const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
195 
196  // Relative parcel velocity
197  const vector Urel = p.U() - Up;
198 
199  // Flip parcel normal velocity component
200  p.U() -= 2.0*nf*(Urel & nf);
201 
202  keepParticle = true;
203 }
204 
205 
206 template<class CloudType>
208 (
210  const parcelType& p,
211  const polyPatch& pp,
212  const label facei,
213  bool& keepParticle
214 )
215 {
216  if (debug)
217  {
218  Info<< "Parcel " << p.origId() << " drySplashInteraction" << endl;
219  }
220 
221  const liquidProperties& liq = thermo_.liquids().properties()[0];
222 
223  // Patch face velocity and normal
224  const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
225  const vector& nf = pp.faceNormals()[facei];
226 
227  // local pressure
228  const scalar pc = thermo_.thermo().p()[p.cell()];
229 
230  // Retrieve parcel properties
231  const scalar m = p.mass()*p.nParticle();
232  const scalar rho = p.rho();
233  const scalar d = p.d();
234  const scalar sigma = liq.sigma(pc, p.T());
235  const scalar mu = liq.mu(pc, p.T());
236  const vector Urel = p.U() - Up;
237  const vector Un = nf*(Urel & nf);
238 
239  // Laplace number
240  const scalar La = rho*sigma*d/sqr(mu);
241 
242  // Weber number
243  const scalar We = rho*magSqr(Un)*d/sigma;
244 
245  // Critical Weber number
246  const scalar Wec = Adry_*pow(La, -0.183);
247 
248  if (We < Wec) // adhesion - assume absorb
249  {
250  absorbInteraction(filmModel, p, pp, facei, m, keepParticle);
251  }
252  else // splash
253  {
254  // ratio of incident mass to splashing mass
255  const scalar mRatio = 0.2 + 0.6*rndGen_.sample01<scalar>();
256  splashInteraction
257  (filmModel, p, pp, facei, mRatio, We, Wec, sigma, keepParticle);
258  }
259 }
260 
261 
262 template<class CloudType>
264 (
266  parcelType& p,
267  const polyPatch& pp,
268  const label facei,
269  bool& keepParticle
270 )
271 {
272  if (debug)
273  {
274  Info<< "Parcel " << p.origId() << " wetSplashInteraction" << endl;
275  }
276 
277  const liquidProperties& liq = thermo_.liquids().properties()[0];
278 
279  // Patch face velocity and normal
280  const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
281  const vector& nf = pp.faceNormals()[facei];
282 
283  // local pressure
284  const scalar pc = thermo_.thermo().p()[p.cell()];
285 
286  // Retrieve parcel properties
287  const scalar m = p.mass()*p.nParticle();
288  const scalar rho = p.rho();
289  const scalar d = p.d();
290  vector& U = p.U();
291  const scalar sigma = liq.sigma(pc, p.T());
292  const scalar mu = liq.mu(pc, p.T());
293  const vector Urel = p.U() - Up;
294  const vector Un = nf*(Urel & nf);
295  const vector Ut = Urel - Un;
296 
297  // Laplace number
298  const scalar La = rho*sigma*d/sqr(mu);
299 
300  // Weber number
301  const scalar We = rho*magSqr(Un)*d/sigma;
302 
303  // Critical Weber number
304  const scalar Wec = Awet_*pow(La, -0.183);
305 
306  if (We < 1) // adhesion - assume absorb
307  {
308  absorbInteraction(filmModel, p, pp, facei, m, keepParticle);
309  }
310  else if ((We >= 1) && (We < 20)) // bounce
311  {
312  // incident angle of impingement
313  const scalar theta = pi/2 - acos(U/mag(U) & nf);
314 
315  // restitution coefficient
316  const scalar epsilon = 0.993 - theta*(1.76 - theta*(1.56 - theta*0.49));
317 
318  // update parcel velocity
319  U = -epsilon*(Un) + 5/7*(Ut);
320 
321  keepParticle = true;
322  return;
323  }
324  else if ((We >= 20) && (We < Wec)) // spread - assume absorb
325  {
326  absorbInteraction(filmModel, p, pp, facei, m, keepParticle);
327  }
328  else // splash
329  {
330  // ratio of incident mass to splashing mass
331  // splash mass can be > incident mass due to film entrainment
332  const scalar mRatio = 0.2 + 0.9*rndGen_.sample01<scalar>();
333  splashInteraction
334  (filmModel, p, pp, facei, mRatio, We, Wec, sigma, keepParticle);
335  }
336 }
337 
338 
339 template<class CloudType>
341 (
343  const parcelType& p,
344  const polyPatch& pp,
345  const label facei,
346  const scalar mRatio,
347  const scalar We,
348  const scalar Wec,
349  const scalar sigma,
350  bool& keepParticle
351 )
352 {
353  // Patch face velocity and normal
354  const fvMesh& mesh = this->owner().mesh();
355  const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
356  const vector& nf = pp.faceNormals()[facei];
357 
358  // Determine direction vectors tangential to patch normal
359  const vector tanVec1 = tangentVector(nf);
360  const vector tanVec2 = nf^tanVec1;
361 
362  // Retrieve parcel properties
363  const scalar np = p.nParticle();
364  const scalar m = p.mass()*np;
365  const scalar d = p.d();
366  const vector Urel = p.U() - Up;
367  const vector Un = nf*(Urel & nf);
368  const vector Ut = Urel - Un;
369  const vector& posC = mesh.C()[p.cell()];
370  const vector& posCf = mesh.Cf().boundaryField()[pp.index()][facei];
371 
372  // total mass of (all) splashed parcels
373  const scalar mSplash = m*mRatio;
374 
375  // number of splashed particles per incoming particle
376  const scalar Ns = 5.0*(We/Wec - 1.0);
377 
378  // average diameter of splashed particles
379  const scalar dBarSplash = 1/cbrt(6.0)*cbrt(mRatio/Ns)*d + ROOTVSMALL;
380 
381  // cumulative diameter splash distribution
382  const scalar dMax = 0.9*cbrt(mRatio)*d;
383  const scalar dMin = 0.1*dMax;
384  const scalar K = exp(-dMin/dBarSplash) - exp(-dMax/dBarSplash);
385 
386  // surface energy of secondary parcels [J]
387  scalar ESigmaSec = 0;
388 
389  // sample splash distribution to determine secondary parcel diameters
390  scalarList dNew(parcelsPerSplash_);
391  scalarList npNew(parcelsPerSplash_);
392  forAll(dNew, i)
393  {
394  const scalar y = rndGen_.sample01<scalar>();
395  dNew[i] = -dBarSplash*log(exp(-dMin/dBarSplash) - y*K);
396  npNew[i] = mRatio*np*pow3(d)/pow3(dNew[i])/parcelsPerSplash_;
397  ESigmaSec += npNew[i]*sigma*p.areaS(dNew[i]);
398  }
399 
400  // incident kinetic energy [J]
401  const scalar EKIn = 0.5*m*magSqr(Urel);
402 
403  // incident surface energy [J]
404  const scalar ESigmaIn = np*sigma*p.areaS(d);
405 
406  // dissipative energy
407  const scalar Ed = max(0.8*EKIn, np*Wec/12*pi*sigma*sqr(d));
408 
409  // total energy [J]
410  const scalar EKs = EKIn + ESigmaIn - ESigmaSec - Ed;
411 
412  // switch to absorb if insufficient energy for splash
413  if (EKs <= 0)
414  {
415  absorbInteraction(filmModel, p, pp, facei, m, keepParticle);
416  return;
417  }
418 
419  // helper variables to calculate magUns0
420  const scalar logD = log(d);
421  const scalar coeff2 = log(dNew[0]) - logD + ROOTVSMALL;
422  scalar coeff1 = 0.0;
423  forAll(dNew, i)
424  {
425  coeff1 += sqr(log(dNew[i]) - logD);
426  }
427 
428  // magnitude of the normal velocity of the first splashed parcel
429  const scalar magUns0 =
430  sqrt(2.0*parcelsPerSplash_*EKs/mSplash/(1.0 + coeff1/sqr(coeff2)));
431 
432  // Set splashed parcel properties
433  forAll(dNew, i)
434  {
435  const vector dirVec = splashDirection(tanVec1, tanVec2, -nf);
436 
437  // Create a new parcel by copying source parcel
438  parcelType* pPtr = new parcelType(p);
439 
440  pPtr->origId() = pPtr->getNewParticleID();
441 
442  pPtr->origProc() = Pstream::myProcNo();
443 
444  if (splashParcelType_ >= 0)
445  {
446  pPtr->typeId() = splashParcelType_;
447  }
448 
449  // perturb new parcels towards the owner cell centre
450  pPtr->position() += 0.5*rndGen_.sample01<scalar>()*(posC - posCf);
451 
452  pPtr->nParticle() = npNew[i];
453 
454  pPtr->d() = dNew[i];
455 
456  pPtr->U() = dirVec*(mag(Cf_*Ut) + magUns0*(log(dNew[i]) - logD)/coeff2);
457 
458  // Apply correction to velocity for 2-D cases
459  meshTools::constrainDirection(mesh, mesh.solutionD(), pPtr->U());
460 
461  // Add the new parcel
462  this->owner().addParticle(pPtr);
463 
464  nParcelsSplashed_++;
465  }
466 
467  // transfer remaining part of parcel to film 0 - splashMass can be -ve
468  // if entraining from the film
469  const scalar mDash = m - mSplash;
470  absorbInteraction(filmModel, p, pp, facei, mDash, keepParticle);
471 }
472 
473 
474 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
475 
476 template<class CloudType>
478 (
479  const dictionary& dict,
480  CloudType& owner
481 )
482 :
483  SurfaceFilmModel<CloudType>(dict, owner, typeName),
484  rndGen_(owner.rndGen()),
485  thermo_
486  (
487  owner.db().objectRegistry::template lookupObject<SLGThermo>("SLGThermo")
488  ),
489  TFilmPatch_(0),
490  CpFilmPatch_(0),
491  interactionType_
492  (
493  interactionTypeEnum(this->coeffDict().lookup("interactionType"))
494  ),
495  deltaWet_(0.0),
496  splashParcelType_(0),
497  parcelsPerSplash_(0),
498  Adry_(0.0),
499  Awet_(0.0),
500  Cf_(0.0),
501  nParcelsSplashed_(0)
502 {
503  Info<< " Applying " << interactionTypeStr(interactionType_)
504  << " interaction model" << endl;
505 
506  if (interactionType_ == itSplashBai)
507  {
508  this->coeffDict().lookup("deltaWet") >> deltaWet_;
509  splashParcelType_ =
510  this->coeffDict().lookupOrDefault("splashParcelType", -1);
511  parcelsPerSplash_ =
512  this->coeffDict().lookupOrDefault("parcelsPerSplash", 2);
513  this->coeffDict().lookup("Adry") >> Adry_;
514  this->coeffDict().lookup("Awet") >> Awet_;
515  this->coeffDict().lookup("Cf") >> Cf_;
516  }
517 }
518 
519 
520 template<class CloudType>
522 (
524 )
525 :
527  rndGen_(sfm.rndGen_),
528  thermo_(sfm.thermo_),
529  TFilmPatch_(sfm.TFilmPatch_),
530  CpFilmPatch_(sfm.CpFilmPatch_),
531  interactionType_(sfm.interactionType_),
532  deltaWet_(sfm.deltaWet_),
533  splashParcelType_(sfm.splashParcelType_),
534  parcelsPerSplash_(sfm.parcelsPerSplash_),
535  Adry_(sfm.Adry_),
536  Awet_(sfm.Awet_),
537  Cf_(sfm.Cf_),
538  nParcelsSplashed_(sfm.nParcelsSplashed_)
539 {}
540 
541 
542 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
543 
544 template<class CloudType>
546 {}
547 
548 
549 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
550 
551 template<class CloudType>
553 (
554  parcelType& p,
555  const polyPatch& pp,
556  bool& keepParticle
557 )
558 {
559  // Retrieve the film model from the owner database
562  (
563  this->owner().db().time().objectRegistry::template
564  lookupObject<regionModels::surfaceFilmModels::surfaceFilmModel>
565  (
566  "surfaceFilmProperties"
567  )
568  );
569 
570  const label patchi = pp.index();
571 
572  if (filmModel.isRegionPatch(patchi))
573  {
574  const label facei = pp.whichFace(p.face());
575 
576  switch (interactionType_)
577  {
578  case itBounce:
579  {
580  bounceInteraction(p, pp, facei, keepParticle);
581 
582  break;
583  }
584  case itAbsorb:
585  {
586  const scalar m = p.nParticle()*p.mass();
587  absorbInteraction(filmModel, p, pp, facei, m, keepParticle);
588 
589  break;
590  }
591  case itSplashBai:
592  {
593  bool dry = this->deltaFilmPatch_[patchi][facei] < deltaWet_;
594 
595  if (dry)
596  {
597  drySplashInteraction(filmModel, p, pp, facei, keepParticle);
598  }
599  else
600  {
601  wetSplashInteraction(filmModel, p, pp, facei, keepParticle);
602  }
603 
604  break;
605  }
606  default:
607  {
609  << "Unknown interaction type enumeration"
610  << abort(FatalError);
611  }
612  }
613 
614  // transfer parcel/parcel interactions complete
615  return true;
616  }
617 
618  // parcel not interacting with film
619  return false;
620 }
621 
622 
623 template<class CloudType>
625 (
626  const label filmPatchi,
627  const label primaryPatchi,
629 )
630 {
632  (
633  filmPatchi,
634  primaryPatchi,
635  filmModel
636  );
637 
638  TFilmPatch_ = filmModel.Ts().boundaryField()[filmPatchi];
639  filmModel.toPrimary(filmPatchi, TFilmPatch_);
640 
641  CpFilmPatch_ = filmModel.Cp().boundaryField()[filmPatchi];
642  filmModel.toPrimary(filmPatchi, CpFilmPatch_);
643 }
644 
645 
646 template<class CloudType>
648 (
649  parcelType& p,
650  const label filmFacei
651 ) const
652 {
654 
655  // Set parcel properties
656  p.T() = TFilmPatch_[filmFacei];
657  p.Cp() = CpFilmPatch_[filmFacei];
658 }
659 
660 
661 template<class CloudType>
663 {
665 
666  label nSplash0 = this->template getModelProperty<label>("nParcelsSplashed");
667  label nSplashTotal =
668  nSplash0 + returnReduce(nParcelsSplashed_, sumOp<label>());
669 
670  os << " New film splash parcels = " << nSplashTotal << endl;
671 
672  if (this->writeTime())
673  {
674  this->setModelProperty("nParcelsSplashed", nSplashTotal);
675  nParcelsSplashed_ = 0;
676  }
677 }
678 
679 
680 // ************************************************************************* //
scalar Awet_
Wet surface roughness coefficient.
virtual void info(Ostream &os)
Write surface film info to stream.
Thermo parcel surface film model.
dictionary dict
dimensionedScalar acos(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:428
U
Definition: pEqn.H:83
scalar Cf_
Skin friction typically in the range 0.6 < Cf < 0.8.
void wetSplashInteraction(regionModels::surfaceFilmModels::surfaceFilmModel &filmModel, parcelType &p, const polyPatch &pp, const label facei, bool &keepParticle)
Parcel interaction with wetted surface.
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
void bounceInteraction(parcelType &p, const polyPatch &pp, const label facei, bool &keepParticle) const
Bounce parcel (flip parcel normal velocity)
bool isRegionPatch(const label primaryPatchi) const
Return true if patchi on the primary region is a coupled.
Definition: regionModelI.H:155
label whichFace(const label l) const
Return label of face in patch from global face label.
Definition: polyPatch.H:377
void splashInteraction(regionModels::surfaceFilmModels::surfaceFilmModel &filmModel, const parcelType &p, const polyPatch &pp, const label facei, const scalar mRatio, const scalar We, const scalar Wec, const scalar sigma, bool &keepParticle)
Bai parcel splash interaction model.
dimensionedScalar log(const dimensionedScalar &ds)
error FatalError
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:319
const Vector< label > & solutionD() const
Return the vector of solved-for directions in mesh.
Definition: polyMesh.C:801
const surfaceVectorField & Cf() const
Return face centres as surfaceVectorField.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
ThermoSurfaceFilm(const dictionary &dict, CloudType &owner)
Construct from components.
scalar Adry_
Dry surface roughness coefficient.
virtual ~ThermoSurfaceFilm()
Destructor.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Definition: UPstream.H:417
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
virtual scalar mu(scalar p, scalar T) const
Liquid viscosity [Pa s].
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
const volVectorField & C() const
Return cell centres as volVectorField.
scalarList TFilmPatch_
Film temperature / patch face.
CGAL::Exact_predicates_exact_constructions_kernel K
virtual void cacheFilmFields(const label filmPatchi, const label primaryPatchi, const regionModels::surfaceFilmModels::surfaceFilmModel &filmModel)
Cache the film fields in preparation for injection.
Macros for easy insertion into run-time selection tables.
virtual void info(Ostream &os)
Write surface film info to stream.
vector splashDirection(const vector &tanVec1, const vector &tanVec2, const vector &nf) const
Return splashed parcel direction.
scalar y
interactionType interactionType_
Interaction type enumeration.
stressControl lookup("compactNormalStress") >> compactNormalStress
dynamicFvMesh & mesh
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar exp(const dimensionedScalar &ds)
const Boundary & boundaryField() const
Return const-reference to the boundary field.
static wordList interactionTypeNames_
Word descriptions of interaction type names.
mathematical constants.
A class for handling words, derived from string.
Definition: word.H:59
virtual void setParcelProperties(parcelType &p, const label filmFacei) const
Set the individual parcel properties.
dimensionedScalar cbrt(const dimensionedScalar &ds)
void absorbInteraction(regionModels::surfaceFilmModels::surfaceFilmModel &filmModel, const parcelType &p, const polyPatch &pp, const label facei, const scalar mass, bool &keepParticle)
Absorb parcel into film.
virtual scalar sigma(scalar p, scalar T) const
Surface tension [N/m].
The thermophysical properties of a liquidProperties.
virtual const volScalarField & Ts() const =0
Return the film surface temperature [K].
static const zero Zero
Definition: zero.H:91
vector tangentVector(const vector &v) const
Return a vector tangential to input vector, v.
Urel
Definition: pEqn.H:56
errorManip< error > abort(error &err)
Definition: errorManip.H:131
const SLGThermo & thermo_
Reference to the cloud thermo package.
const scalar twoPi(2 *pi)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
dimensionedScalar sin(const dimensionedScalar &ds)
virtual const volScalarField & Cp() const =0
Return the film specific heat capacity [J/kg/K].
virtual void addSources(const label patchi, const label facei, const scalar massSource, const vector &momentumSource, const scalar pressureSource, const scalar energySource)=0
External hook to add sources to the film.
interactionType interactionTypeEnum(const word &it) const
Templated wall surface film model class.
cachedRandom & rndGen_
Reference to the cloud random number generator.
A normal distribution model.
word interactionTypeStr(const interactionType &it) const
const dimensionedScalar mu
Atomic mass unit.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar pow3(const dimensionedScalar &ds)
label patchi
const Field< PointType > & faceNormals() const
Return face normals for patch.
void toPrimary(const label regionPatchi, List< Type > &regionField) const
Convert a local region field to the primary region.
void drySplashInteraction(regionModels::surfaceFilmModels::surfaceFilmModel &filmModel, const parcelType &p, const polyPatch &pp, const label facei, bool &keepParticle)
Parcel interaction with dry surface.
CloudType::parcelType parcelType
Convenience typedef to the cloud&#39;s parcel type.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
label parcelsPerSplash_
Number of new parcels resulting from splash event.
scalar epsilon
messageStream Info
dimensioned< scalar > mag(const dimensioned< Type > &)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
label nParcelsSplashed_
Counter for number of new splash parcels.
void constrainDirection(const polyMesh &mesh, const Vector< label > &dirs, vector &d)
Set the constrained components of directions/velocity to zero.
Definition: meshTools.C:671
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
virtual bool transferParcel(parcelType &p, const polyPatch &pp, bool &keepParticle)
Transfer parcel from cloud to surface film.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
scalar deltaWet_
Film thickness beyond which patch is assumed to be wet.
virtual void setParcelProperties(parcelType &p, const label filmFacei) const
Set the individual parcel properties.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:68
label index() const
Return the index of this patch in the boundaryMesh.
virtual void cacheFilmFields(const label filmPatchi, const label primaryPatchi, const regionModels::surfaceFilmModels::surfaceFilmModel &filmModel)
Cache the film fields in preparation for injection.
label splashParcelType_
Splash parcel type label - id assigned to identify parcel for.
scalarList CpFilmPatch_
Film specific heat capacity / patch face.