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-2017 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 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
85 
86 template<class CloudType>
88 (
89  const vector& v
90 ) const
91 {
92  vector tangent = Zero;
93  scalar magTangent = 0.0;
94 
95  while (magTangent < SMALL)
96  {
97  vector vTest = rndGen_.sample01<vector>();
98  tangent = vTest - (vTest & v)*v;
99  magTangent = mag(tangent);
100  }
101 
102  return tangent/magTangent;
103 }
104 
105 
106 template<class CloudType>
108 (
109  const vector& tanVec1,
110  const vector& tanVec2,
111  const vector& nf
112 ) const
113 {
114  // Azimuthal angle [rad]
115  const scalar phiSi = twoPi*rndGen_.sample01<scalar>();
116 
117  // Ejection angle [rad]
118  const scalar thetaSi = pi/180.0*(rndGen_.sample01<scalar>()*(50 - 5) + 5);
119 
120  // Direction vector of new parcel
121  const scalar alpha = sin(thetaSi);
122  const scalar dcorr = cos(thetaSi);
123  const vector normal = alpha*(tanVec1*cos(phiSi) + tanVec2*sin(phiSi));
124  vector dirVec = dcorr*nf;
125  dirVec += normal;
126 
127  return dirVec/mag(dirVec);
128 }
129 
130 
131 template<class CloudType>
133 (
135  const parcelType& p,
136  const polyPatch& pp,
137  const label facei,
138  const scalar mass,
139  bool& keepParticle
140 )
141 {
142  if (debug)
143  {
144  Info<< "Parcel " << p.origId() << " absorbInteraction" << endl;
145  }
146 
147  // Patch face normal
148  const vector& nf = pp.faceNormals()[facei];
149 
150  // Patch velocity
151  const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
152 
153  // Relative parcel velocity
154  const vector Urel = p.U() - Up;
155 
156  // Parcel normal velocity
157  const vector Un = nf*(Urel & nf);
158 
159  // Parcel tangential velocity
160  const vector Ut = Urel - Un;
161 
162  filmModel.addSources
163  (
164  pp.index(),
165  facei,
166  mass, // mass
167  mass*Ut, // tangential momentum
168  mass*mag(Un), // impingement pressure
169  mass*p.hs() // energy
170  );
171 
172  this->nParcelsTransferred()++;
173 
174  keepParticle = false;
175 }
176 
177 
178 template<class CloudType>
180 (
181  parcelType& p,
182  const polyPatch& pp,
183  const label facei,
184  bool& keepParticle
185 ) const
186 {
187  if (debug)
188  {
189  Info<< "Parcel " << p.origId() << " bounceInteraction" << endl;
190  }
191 
192  // Patch face normal
193  const vector& nf = pp.faceNormals()[facei];
194 
195  // Patch velocity
196  const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
197 
198  // Relative parcel velocity
199  const vector Urel = p.U() - Up;
200 
201  // Flip parcel normal velocity component
202  p.U() -= 2.0*nf*(Urel & nf);
203 
204  keepParticle = true;
205 }
206 
207 
208 template<class CloudType>
210 (
212  const parcelType& p,
213  const polyPatch& pp,
214  const label facei,
215  bool& keepParticle
216 )
217 {
218  if (debug)
219  {
220  Info<< "Parcel " << p.origId() << " drySplashInteraction" << endl;
221  }
222 
223  const liquidProperties& liq = thermo_.liquids().properties()[0];
224 
225  // Patch face velocity and normal
226  const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
227  const vector& nf = pp.faceNormals()[facei];
228 
229  // Local pressure
230  const scalar pc = thermo_.thermo().p()[p.cell()];
231 
232  // Retrieve parcel properties
233  const scalar m = p.mass()*p.nParticle();
234  const scalar rho = p.rho();
235  const scalar d = p.d();
236  const scalar sigma = liq.sigma(pc, p.T());
237  const scalar mu = liq.mu(pc, p.T());
238  const vector Urel = p.U() - Up;
239  const vector Un = nf*(Urel & nf);
240 
241  // Laplace number
242  const scalar La = rho*sigma*d/sqr(mu);
243 
244  // Weber number
245  const scalar We = rho*magSqr(Un)*d/sigma;
246 
247  // Critical Weber number
248  const scalar Wec = Adry_*pow(La, -0.183);
249 
250  if (We < Wec) // Adhesion - assume absorb
251  {
252  absorbInteraction(filmModel, p, pp, facei, m, keepParticle);
253  }
254  else // Splash
255  {
256  // Ratio of incident mass to splashing mass
257  const scalar mRatio = 0.2 + 0.6*rndGen_.sample01<scalar>();
258  splashInteraction
259  (filmModel, p, pp, facei, mRatio, We, Wec, sigma, keepParticle);
260  }
261 }
262 
263 
264 template<class CloudType>
266 (
268  parcelType& p,
269  const polyPatch& pp,
270  const label facei,
271  bool& keepParticle
272 )
273 {
274  if (debug)
275  {
276  Info<< "Parcel " << p.origId() << " wetSplashInteraction" << endl;
277  }
278 
279  const liquidProperties& liq = thermo_.liquids().properties()[0];
280 
281  // Patch face velocity and normal
282  const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
283  const vector& nf = pp.faceNormals()[facei];
284 
285  // Local pressure
286  const scalar pc = thermo_.thermo().p()[p.cell()];
287 
288  // Retrieve parcel properties
289  const scalar m = p.mass()*p.nParticle();
290  const scalar rho = p.rho();
291  const scalar d = p.d();
292  vector& U = p.U();
293  const scalar sigma = liq.sigma(pc, p.T());
294  const scalar mu = liq.mu(pc, p.T());
295  const vector Urel = p.U() - Up;
296  const vector Un = nf*(Urel & nf);
297  const vector Ut = Urel - Un;
298 
299  // Laplace number
300  const scalar La = rho*sigma*d/sqr(mu);
301 
302  // Weber number
303  const scalar We = rho*magSqr(Un)*d/sigma;
304 
305  // Critical Weber number
306  const scalar Wec = Awet_*pow(La, -0.183);
307 
308  if (We < 2) // Adhesion - assume absorb
309  {
310  absorbInteraction(filmModel, p, pp, facei, m, keepParticle);
311  }
312  else if ((We >= 2) && (We < 20)) // Bounce
313  {
314  // Incident angle of impingement
315  const scalar theta = pi/2 - acos(U/mag(U) & nf);
316 
317  // Restitution coefficient
318  const scalar epsilon = 0.993 - theta*(1.76 - theta*(1.56 - theta*0.49));
319 
320  // Update parcel velocity
321  U = -epsilon*(Un) + 5.0/7.0*(Ut);
322 
323  keepParticle = true;
324  return;
325  }
326  else if ((We >= 20) && (We < Wec)) // Spread - assume absorb
327  {
328  absorbInteraction(filmModel, p, pp, facei, m, keepParticle);
329  }
330  else // Splash
331  {
332  // Ratio of incident mass to splashing mass
333  // splash mass can be > incident mass due to film entrainment
334  const scalar mRatio = 0.2 + 0.9*rndGen_.sample01<scalar>();
335  splashInteraction
336  (filmModel, p, pp, facei, mRatio, We, Wec, sigma, keepParticle);
337  }
338 }
339 
340 
341 template<class CloudType>
343 (
345  const parcelType& p,
346  const polyPatch& pp,
347  const label facei,
348  const scalar mRatio,
349  const scalar We,
350  const scalar Wec,
351  const scalar sigma,
352  bool& keepParticle
353 )
354 {
355  // Patch face velocity and normal
356  const fvMesh& mesh = this->owner().mesh();
357  const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
358  const vector& nf = pp.faceNormals()[facei];
359 
360  // Determine direction vectors tangential to patch normal
361  const vector tanVec1 = tangentVector(nf);
362  const vector tanVec2 = nf^tanVec1;
363 
364  // Retrieve parcel properties
365  const scalar np = p.nParticle();
366  const scalar m = p.mass()*np;
367  const scalar d = p.d();
368  const vector Urel = p.U() - Up;
369  const vector Un = nf*(Urel & nf);
370  const vector Ut = Urel - Un;
371  const vector& posC = mesh.C()[p.cell()];
372  const vector& posCf = mesh.Cf().boundaryField()[pp.index()][facei];
373 
374  // Total mass of (all) splashed parcels
375  const scalar mSplash = m*mRatio;
376 
377  // Number of splashed particles per incoming particle
378  const scalar Ns = 5.0*(We/Wec - 1.0);
379 
380  // Average diameter of splashed particles
381  const scalar dBarSplash = 1/cbrt(6.0)*cbrt(mRatio/Ns)*d + ROOTVSMALL;
382 
383  // Cumulative diameter splash distribution
384  const scalar dMax = 0.9*cbrt(mRatio)*d;
385  const scalar dMin = 0.1*dMax;
386  const scalar K = exp(-dMin/dBarSplash) - exp(-dMax/dBarSplash);
387 
388  // Surface energy of secondary parcels [J]
389  scalar ESigmaSec = 0;
390 
391  // Sample splash distribution to determine secondary parcel diameters
392  scalarList dNew(parcelsPerSplash_);
393  scalarList npNew(parcelsPerSplash_);
394  forAll(dNew, i)
395  {
396  const scalar y = rndGen_.sample01<scalar>();
397  dNew[i] = -dBarSplash*log(exp(-dMin/dBarSplash) - y*K);
398  npNew[i] = mRatio*np*pow3(d)/pow3(dNew[i])/parcelsPerSplash_;
399  ESigmaSec += npNew[i]*sigma*p.areaS(dNew[i]);
400  }
401 
402  // Incident kinetic energy [J]
403  const scalar EKIn = 0.5*m*magSqr(Urel);
404 
405  // Incident surface energy [J]
406  const scalar ESigmaIn = np*sigma*p.areaS(d);
407 
408  // Dissipative energy
409  const scalar Ed = max(0.8*EKIn, np*Wec/12*pi*sigma*sqr(d));
410 
411  // Total energy [J]
412  const scalar EKs = EKIn + ESigmaIn - ESigmaSec - Ed;
413 
414  // Switch to absorb if insufficient energy for splash
415  if (EKs <= 0)
416  {
417  absorbInteraction(filmModel, p, pp, facei, m, keepParticle);
418  return;
419  }
420 
421  // Helper variables to calculate magUns0
422  const scalar logD = log(d);
423  const scalar coeff2 = log(dNew[0]) - logD + ROOTVSMALL;
424  scalar coeff1 = 0.0;
425  forAll(dNew, i)
426  {
427  coeff1 += sqr(log(dNew[i]) - logD);
428  }
429 
430  // Magnitude of the normal velocity of the first splashed parcel
431  const scalar magUns0 =
432  sqrt(2.0*parcelsPerSplash_*EKs/mSplash/(1.0 + coeff1/sqr(coeff2)));
433 
434  // Set splashed parcel properties
435  forAll(dNew, i)
436  {
437  const vector dirVec = splashDirection(tanVec1, tanVec2, -nf);
438 
439  // Create a new parcel by copying source parcel
440  parcelType* pPtr = new parcelType(p);
441 
442  pPtr->origId() = pPtr->getNewParticleID();
443 
444  pPtr->origProc() = Pstream::myProcNo();
445 
446  if (splashParcelType_ >= 0)
447  {
448  pPtr->typeId() = splashParcelType_;
449  }
450 
451  // Perturb new parcels towards the owner cell centre
452  pPtr->track(0.5*rndGen_.sample01<scalar>()*(posC - posCf), 0);
453 
454  pPtr->nParticle() = npNew[i];
455 
456  pPtr->d() = dNew[i];
457 
458  pPtr->U() = dirVec*(mag(Cf_*Ut) + magUns0*(log(dNew[i]) - logD)/coeff2);
459 
460  // Apply correction to velocity for 2-D cases
461  meshTools::constrainDirection(mesh, mesh.solutionD(), pPtr->U());
462 
463  // Add the new parcel
464  this->owner().addParticle(pPtr);
465 
466  nParcelsSplashed_++;
467  }
468 
469  // Transfer remaining part of parcel to film 0 - splashMass can be -ve
470  // if entraining from the film
471  const scalar mDash = m - mSplash;
472  absorbInteraction(filmModel, p, pp, facei, mDash, keepParticle);
473 }
474 
475 
476 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
477 
478 template<class CloudType>
480 (
481  const dictionary& dict,
482  CloudType& owner
483 )
484 :
485  SurfaceFilmModel<CloudType>(dict, owner, typeName),
486  rndGen_(owner.rndGen()),
487  thermo_
488  (
489  owner.db().objectRegistry::template lookupObject<SLGThermo>("SLGThermo")
490  ),
491  TFilmPatch_(0),
492  CpFilmPatch_(0),
493  interactionType_
494  (
495  interactionTypeEnum(this->coeffDict().lookup("interactionType"))
496  ),
497  deltaWet_(0.0),
498  splashParcelType_(0),
499  parcelsPerSplash_(0),
500  Adry_(0.0),
501  Awet_(0.0),
502  Cf_(0.0),
503  nParcelsSplashed_(0)
504 {
505  Info<< " Applying " << interactionTypeStr(interactionType_)
506  << " interaction model" << endl;
507 
508  if (interactionType_ == itSplashBai)
509  {
510  this->coeffDict().lookup("deltaWet") >> deltaWet_;
511  splashParcelType_ =
512  this->coeffDict().lookupOrDefault("splashParcelType", -1);
513  parcelsPerSplash_ =
514  this->coeffDict().lookupOrDefault("parcelsPerSplash", 2);
515  this->coeffDict().lookup("Adry") >> Adry_;
516  this->coeffDict().lookup("Awet") >> Awet_;
517  this->coeffDict().lookup("Cf") >> Cf_;
518  }
519 }
520 
521 
522 template<class CloudType>
524 (
526 )
527 :
529  rndGen_(sfm.rndGen_),
530  thermo_(sfm.thermo_),
531  TFilmPatch_(sfm.TFilmPatch_),
532  CpFilmPatch_(sfm.CpFilmPatch_),
533  interactionType_(sfm.interactionType_),
534  deltaWet_(sfm.deltaWet_),
535  splashParcelType_(sfm.splashParcelType_),
536  parcelsPerSplash_(sfm.parcelsPerSplash_),
537  Adry_(sfm.Adry_),
538  Awet_(sfm.Awet_),
539  Cf_(sfm.Cf_),
540  nParcelsSplashed_(sfm.nParcelsSplashed_)
541 {}
542 
543 
544 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
545 
546 template<class CloudType>
548 {}
549 
550 
551 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
552 
553 template<class CloudType>
555 (
556  parcelType& p,
557  const polyPatch& pp,
558  bool& keepParticle
559 )
560 {
561  // Retrieve the film model from the owner database
564  (
565  this->owner().db().time().objectRegistry::template
566  lookupObject<regionModels::surfaceFilmModels::surfaceFilmModel>
567  (
568  "surfaceFilmProperties"
569  )
570  );
571 
572  const label patchi = pp.index();
573 
574  if (filmModel.isRegionPatch(patchi))
575  {
576  const label facei = pp.whichFace(p.face());
577 
578  switch (interactionType_)
579  {
580  case itBounce:
581  {
582  bounceInteraction(p, pp, facei, keepParticle);
583 
584  break;
585  }
586  case itAbsorb:
587  {
588  const scalar m = p.nParticle()*p.mass();
589  absorbInteraction(filmModel, p, pp, facei, m, keepParticle);
590 
591  break;
592  }
593  case itSplashBai:
594  {
595  bool dry = this->deltaFilmPatch_[patchi][facei] < deltaWet_;
596 
597  if (dry)
598  {
599  drySplashInteraction(filmModel, p, pp, facei, keepParticle);
600  }
601  else
602  {
603  wetSplashInteraction(filmModel, p, pp, facei, keepParticle);
604  }
605 
606  break;
607  }
608  default:
609  {
611  << "Unknown interaction type enumeration"
612  << abort(FatalError);
613  }
614  }
615 
616  // Transfer parcel/parcel interactions complete
617  return true;
618  }
619 
620  // Parcel not interacting with film
621  return false;
622 }
623 
624 
625 template<class CloudType>
627 (
628  const label filmPatchi,
629  const label primaryPatchi,
631 )
632 {
634  (
635  filmPatchi,
636  primaryPatchi,
637  filmModel
638  );
639 
640  TFilmPatch_ = filmModel.Ts().boundaryField()[filmPatchi];
641  filmModel.toPrimary(filmPatchi, TFilmPatch_);
642 
643  CpFilmPatch_ = filmModel.Cp().boundaryField()[filmPatchi];
644  filmModel.toPrimary(filmPatchi, CpFilmPatch_);
645 }
646 
647 
648 template<class CloudType>
650 (
651  parcelType& p,
652  const label filmFacei
653 ) const
654 {
656 
657  // Set parcel properties
658  p.T() = TFilmPatch_[filmFacei];
659  p.Cp() = CpFilmPatch_[filmFacei];
660 }
661 
662 
663 template<class CloudType>
665 {
667 
668  label nSplash0 = this->template getModelProperty<label>("nParcelsSplashed");
669  label nSplashTotal =
670  nSplash0 + returnReduce(nParcelsSplashed_, sumOp<label>());
671 
672  os << " New film splash parcels = " << nSplashTotal << endl;
673 
674  if (this->writeTime())
675  {
676  this->setModelProperty("nParcelsSplashed", nSplashTotal);
677  nParcelsSplashed_ = 0;
678  }
679 }
680 
681 
682 // ************************************************************************* //
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 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 > &)
virtual void setParcelProperties(parcelType &p, const label filmFacei) const
Set the individual parcel properties.
bool isRegionPatch(const label primaryPatchi) const
Return true if patchi on the primary region is a coupled.
Definition: regionModelI.H:155
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:319
const surfaceVectorField & Cf() const
Return face centres as surfaceVectorField.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const Vector< label > & solutionD() const
Return the vector of solved-for directions in mesh.
Definition: polyMesh.C:824
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:418
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
const Field< PointType > & faceNormals() const
Return face normals for patch.
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.
virtual scalar sigma(scalar p, scalar T) const =0
Surface tension [N/m].
scalar y
void toPrimary(const label regionPatchi, List< Type > &regionField) const
Convert a local region field to the primary region.
interactionType interactionType_
Interaction type enumeration.
stressControl lookup("compactNormalStress") >> compactNormalStress
dynamicFvMesh & mesh
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar exp(const dimensionedScalar &ds)
interactionType interactionTypeEnum(const word &it) const
static wordList interactionTypeNames_
Word descriptions of interaction type names.
mathematical constants.
A class for handling words, derived from string.
Definition: word.H:59
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.
The thermophysical properties of a liquid.
virtual const volScalarField & Ts() const =0
Return the film surface temperature [K].
static const zero Zero
Definition: zero.H:91
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)
vector splashDirection(const vector &tanVec1, const vector &tanVec2, const vector &nf) const
Return splashed parcel direction.
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.
Templated wall surface film model class.
virtual void setParcelProperties(parcelType &p, const label filmFacei) const
Set the individual parcel properties.
cachedRandom & rndGen_
Reference to the cloud random number generator.
void bounceInteraction(parcelType &p, const polyPatch &pp, const label facei, bool &keepParticle) const
Bounce parcel (flip parcel normal velocity)
A normal distribution model.
const dimensionedScalar mu
Atomic mass unit.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar pow3(const dimensionedScalar &ds)
label patchi
vector tangentVector(const vector &v) const
Return a vector tangential to input vector, v.
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 index() const
Return the index of this patch in the boundaryMesh.
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
const volVectorField & C() const
Return cell centres as volVectorField.
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
word interactionTypeStr(const interactionType &it) const
virtual scalar mu(scalar p, scalar T) const =0
Liquid viscosity [Pa s].
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.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:69
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.
label whichFace(const label l) const
Return label of face in patch from global face label.
Definition: polyPatch.H:377