CloudFilmTransfer.C
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-2024 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 "CloudFilmTransfer.H"
27 #include "filmCloudTransfer.H"
28 #include "mappedFvPatchBaseBase.H"
29 #include "ThermoCloud.H"
30 #include "meshTools.H"
31 #include "mathematicalConstants.H"
33 
34 using namespace Foam::constant::mathematical;
35 
36 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
37 
38 template<class CloudType>
40 (
41  const vector& tanVec1,
42  const vector& tanVec2,
43  const vector& nf
44 ) const
45 {
46  // Azimuthal angle [rad]
47  const scalar phiSi = twoPi*rndGen_.sample01<scalar>();
48 
49  // Ejection angle [rad]
50  const scalar thetaSi = pi/180.0*(rndGen_.sample01<scalar>()*(50 - 5) + 5);
51 
52  // Direction vector of new parcel
53  const scalar alpha = sin(thetaSi);
54  const scalar dcorr = cos(thetaSi);
55  const vector normal = alpha*(tanVec1*cos(phiSi) + tanVec2*sin(phiSi));
56  vector dirVec = dcorr*nf;
57  dirVec += normal;
58 
59  return dirVec/mag(dirVec);
60 }
61 
62 
63 template<class CloudType>
65 (
66  fv::filmCloudTransfer& filmCloudTransfer,
67  const parcelType& p,
68  const polyPatch& pp,
69  const label facei,
70  const scalar mass,
71  bool& keepParticle
72 )
73 {
74  if (debug)
75  {
76  Info<< "Parcel " << p.origId() << " absorbInteraction" << endl;
77  }
78 
79  const fluidThermo& carrierThermo =
80  static_cast<const ThermoCloud<CloudType>&>(this->owner())
81  .carrierThermo();
82 
83  const parcelThermo& thermo =
84  static_cast<const ThermoCloud<CloudType>&>(this->owner()).thermo();
85 
86  // Patch velocity
87  const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
88 
89  // Relative parcel velocity
90  const vector Urel = p.U() - Up;
91 
92  const liquidProperties& liq = thermo.liquids().properties()[0];
93 
94  // Local pressure
95  const scalar pc = carrierThermo.p()[p.cell()];
96 
97  filmCloudTransfer.parcelFromCloud
98  (
99  facei,
100  mass, // mass
101  mass*Urel, // momentum
102  mass*liq.hs(pc, p.T()) // energy
103  );
104 
105  this->nParcelsTransferred()++;
106 
107  keepParticle = false;
108 }
109 
110 
111 template<class CloudType>
113 (
114  parcelType& p,
115  const polyPatch& pp,
116  const label facei,
117  bool& keepParticle
118 ) const
119 {
120  if (debug)
121  {
122  Info<< "Parcel " << p.origId() << " bounceInteraction" << endl;
123  }
124 
125  // Patch face normal
126  const vector& nf = pp.faceNormals()[facei];
127 
128  // Patch velocity
129  const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
130 
131  // Relative parcel velocity
132  const vector Urel = p.U() - Up;
133 
134  // Flip parcel normal velocity component
135  p.U() -= 2.0*nf*(Urel & nf);
136 
137  keepParticle = true;
138 }
139 
140 
141 template<class CloudType>
143 (
144  fv::filmCloudTransfer& filmCloudTransfer,
145  const parcelType& p,
146  const polyPatch& pp,
147  const label facei,
148  bool& keepParticle
149 )
150 {
151  if (debug)
152  {
153  Info<< "Parcel " << p.origId() << " drySplashInteraction" << endl;
154  }
155 
156  const fluidThermo& carrierThermo =
157  static_cast<const ThermoCloud<CloudType>&>(this->owner())
158  .carrierThermo();
159 
160  const parcelThermo& thermo =
161  static_cast<const ThermoCloud<CloudType>&>(this->owner()).thermo();
162 
163  const liquidProperties& liq = thermo.liquids().properties()[0];
164 
165  // Patch face velocity and normal
166  const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
167  const vector& nf = pp.faceNormals()[facei];
168 
169  // Local pressure
170  const scalar pc = carrierThermo.p()[p.cell()];
171 
172  // Retrieve parcel properties
173  const scalar m = p.mass()*p.nParticle();
174  const scalar rho = p.rho();
175  const scalar d = p.d();
176  const scalar sigma = liq.sigma(pc, p.T());
177  const scalar mu = liq.mu(pc, p.T());
178  const vector Urel = p.U() - Up;
179  const vector Un = nf*(Urel & nf);
180 
181  // Laplace number
182  const scalar La = rho*sigma*d/sqr(mu);
183 
184  // Weber number
185  const scalar We = rho*magSqr(Un)*d/sigma;
186 
187  // Critical Weber number
188  const scalar Wec = Adry_*pow(La, -0.183);
189 
190  if (We < Wec) // Adhesion - assume absorb
191  {
192  absorbInteraction(filmCloudTransfer, p, pp, facei, m, keepParticle);
193  }
194  else // Splash
195  {
196  // Ratio of incident mass to splashing mass
197  const scalar mRatio = 0.2 + 0.6*rndGen_.sample01<scalar>();
198  splashInteraction
199  (
200  filmCloudTransfer,
201  p,
202  pp,
203  facei,
204  mRatio,
205  We,
206  Wec,
207  sigma,
208  keepParticle
209  );
210  }
211 }
212 
213 
214 template<class CloudType>
216 (
217  fv::filmCloudTransfer& filmCloudTransfer,
218  parcelType& p,
219  const polyPatch& pp,
220  const label facei,
221  bool& keepParticle
222 )
223 {
224  if (debug)
225  {
226  Info<< "Parcel " << p.origId() << " wetSplashInteraction" << endl;
227  }
228 
229  const fluidThermo& carrierThermo =
230  static_cast<const ThermoCloud<CloudType>&>(this->owner())
231  .carrierThermo();
232 
233  const parcelThermo& thermo =
234  static_cast<const ThermoCloud<CloudType>&>(this->owner()).thermo();
235 
236  const liquidProperties& liq = thermo.liquids().properties()[0];
237 
238  // Patch face velocity and normal
239  const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
240  const vector& nf = pp.faceNormals()[facei];
241 
242  // Local pressure
243  const scalar pc = carrierThermo.p()[p.cell()];
244 
245  // Retrieve parcel properties
246  const scalar m = p.mass()*p.nParticle();
247  const scalar rho = p.rho();
248  const scalar d = p.d();
249  vector& U = p.U();
250  const scalar sigma = liq.sigma(pc, p.T());
251  const scalar mu = liq.mu(pc, p.T());
252  const vector Urel = p.U() - Up;
253  const vector Un = nf*(Urel & nf);
254  const vector Ut = Urel - Un;
255 
256  // Laplace number
257  const scalar La = rho*sigma*d/sqr(mu);
258 
259  // Weber number
260  const scalar We = rho*magSqr(Un)*d/sigma;
261 
262  // Critical Weber number
263  const scalar Wec = Awet_*pow(La, -0.183);
264 
265  if (We < 2) // Adhesion - assume absorb
266  {
267  absorbInteraction(filmCloudTransfer, p, pp, facei, m, keepParticle);
268  }
269  else if ((We >= 2) && (We < 20)) // Bounce
270  {
271  // Incident angle of impingement
272  const scalar theta = pi/2 - acos(U/mag(U) & nf);
273 
274  // Restitution coefficient
275  const scalar epsilon = 0.993 - theta*(1.76 - theta*(1.56 - theta*0.49));
276 
277  // Update parcel velocity
278  U = -epsilon*(Un) + 5.0/7.0*(Ut);
279 
280  keepParticle = true;
281  return;
282  }
283  else if ((We >= 20) && (We < Wec)) // Spread - assume absorb
284  {
285  absorbInteraction(filmCloudTransfer, p, pp, facei, m, keepParticle);
286  }
287  else // Splash
288  {
289  // Ratio of incident mass to splashing mass
290  // splash mass can be > incident mass due to film entrainment
291  const scalar mRatio = 0.2 + 0.9*rndGen_.sample01<scalar>();
292  splashInteraction
293  (
294  filmCloudTransfer,
295  p,
296  pp,
297  facei,
298  mRatio,
299  We,
300  Wec,
301  sigma,
302  keepParticle
303  );
304  }
305 }
306 
307 
308 template<class CloudType>
310 (
311  fv::filmCloudTransfer& filmCloudTransfer,
312  const parcelType& p,
313  const polyPatch& pp,
314  const label facei,
315  const scalar mRatio,
316  const scalar We,
317  const scalar Wec,
318  const scalar sigma,
319  bool& keepParticle
320 )
321 {
322  // Patch face velocity and normal
323  const fvMesh& mesh = this->owner().mesh();
324  const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
325  const vector& nf = pp.faceNormals()[facei];
326 
327  // Determine direction vectors tangential to patch normal
328  const vector tanVec1 = normalised(perpendicular(nf));
329  const vector tanVec2 = nf^tanVec1;
330 
331  // Retrieve parcel properties
332  const scalar np = p.nParticle();
333  const scalar m = p.mass()*np;
334  const scalar d = p.d();
335  const vector Urel = p.U() - Up;
336  const vector Un = nf*(Urel & nf);
337  const vector Ut = Urel - Un;
338  const vector& posC = mesh.C()[p.cell()];
339  const vector& posCf = mesh.Cf().boundaryField()[pp.index()][facei];
340 
341  // Total mass of (all) splashed parcels
342  const scalar mSplash = m*mRatio;
343 
344  // Number of splashed particles per incoming particle
345  const scalar Ns = 5.0*(We/Wec - 1.0);
346 
347  // Average diameter of splashed particles
348  const scalar dBarSplash = 1/cbrt(6.0)*cbrt(mRatio/Ns)*d + rootVSmall;
349 
350  // Cumulative diameter splash distribution
351  const scalar dMax = 0.9*cbrt(mRatio)*d;
352  const scalar dMin = 0.1*dMax;
353  const scalar K = exp(-dMin/dBarSplash) - exp(-dMax/dBarSplash);
354 
355  // Surface energy of secondary parcels [J]
356  scalar ESigmaSec = 0;
357 
358  // Sample splash distribution to determine secondary parcel diameters
359  scalarList dNew(parcelsPerSplash_);
360  scalarList npNew(parcelsPerSplash_);
361  forAll(dNew, i)
362  {
363  const scalar y = rndGen_.sample01<scalar>();
364  dNew[i] = -dBarSplash*log(exp(-dMin/dBarSplash) - y*K);
365  npNew[i] = mRatio*np*pow3(d)/pow3(dNew[i])/parcelsPerSplash_;
366  ESigmaSec += npNew[i]*sigma*p.areaS(dNew[i]);
367  }
368 
369  // Incident kinetic energy [J]
370  const scalar EKIn = 0.5*m*magSqr(Un);
371 
372  // Incident surface energy [J]
373  const scalar ESigmaIn = np*sigma*p.areaS(d);
374 
375  // Dissipative energy
376  const scalar Ed = max(0.8*EKIn, np*Wec/12*pi*sigma*sqr(d));
377 
378  // Total energy [J]
379  const scalar EKs = EKIn + ESigmaIn - ESigmaSec - Ed;
380 
381  // Switch to absorb if insufficient energy for splash
382  if (EKs <= 0)
383  {
384  absorbInteraction(filmCloudTransfer, p, pp, facei, m, keepParticle);
385  return;
386  }
387 
388  // Helper variables to calculate magUns0
389  const scalar logD = log(d);
390  const scalar coeff2 = log(dNew[0]) - logD + rootVSmall;
391  scalar coeff1 = 0.0;
392  forAll(dNew, i)
393  {
394  coeff1 += sqr(log(dNew[i]) - logD);
395  }
396 
397  // Magnitude of the normal velocity of the first splashed parcel
398  const scalar magUns0 =
399  sqrt(2.0*parcelsPerSplash_*EKs/mSplash/(1.0 + coeff1/sqr(coeff2)));
400 
401  // Set splashed parcel properties
402  forAll(dNew, i)
403  {
404  const vector dirVec = splashDirection(tanVec1, tanVec2, -nf);
405 
406  // Create a new parcel by copying source parcel
407  parcelType* pPtr = new parcelType(p);
408 
409  pPtr->origId() = pPtr->getNewParticleIndex();
410 
411  pPtr->origProc() = Pstream::myProcNo();
412 
413  if (splashParcelType_ >= 0)
414  {
415  pPtr->typeId() = splashParcelType_;
416  }
417 
418  // Perturb new parcels towards the owner cell centre
419  pPtr->track(mesh, 0.5*rndGen_.sample01<scalar>()*(posC - posCf), 0);
420 
421  pPtr->nParticle() = npNew[i];
422 
423  pPtr->d() = dNew[i];
424 
425  pPtr->U() = dirVec*(mag(Cf_*Ut) + magUns0*(log(dNew[i]) - logD)/coeff2);
426 
427  // Apply correction to velocity for 2-D cases
428  meshTools::constrainDirection(mesh, mesh.solutionD(), pPtr->U());
429 
430  // Add the new parcel
431  this->owner().addParticle(pPtr);
432 
433  nParcelsSplashed_++;
434  }
435 
436  // Transfer remaining part of parcel to film 0 - splashMass can be -ve
437  // if entraining from the film
438  const scalar mDash = m - mSplash;
439  absorbInteraction(filmCloudTransfer, p, pp, facei, mDash, keepParticle);
440 }
441 
442 
443 template<class CloudType>
446 {
447  if (filmTransfers_.empty())
448  {
449  const fvBoundaryMesh& patches = this->owner().mesh().boundary();
450 
451  label nFilms = 0;
452 
454  {
455  if (isA<mappedFvPatchBaseBase>(patches[patchi]))
456  {
457  const mappedFvPatchBaseBase& mpb =
458  refCast<const mappedFvPatchBaseBase>(patches[patchi]);
459 
461 
462  fv::filmCloudTransfer* filmCloudPtr = nullptr;
463 
464  forAll(fvModels, i)
465  {
466  if (isType<fv::filmCloudTransfer>(fvModels[i]))
467  {
468  filmCloudPtr =
469  &refCast<fv::filmCloudTransfer>(fvModels[i]);
470  }
471  }
472 
473  if (filmCloudPtr)
474  {
475  Info<< "Found filmCloudTransfer fvModel "
476  "for the film region " << mpb.nbrMesh().name()
477  << endl;
478 
479  filmTransfers_.resize(nFilms + 1);
480  filmPatches_.resize(nFilms + 1);
481 
482  filmTransfers_.set(nFilms, filmCloudPtr);
483  filmPatches_[nFilms] = patchi;
484 
485  nFilms++;
486  }
487  }
488  }
489  }
490 
491  return filmTransfers_;
492 }
493 
494 
495 template<class CloudType>
497 {
498  // Ensure filmPatches_ has been initialise
499  filmTransferPtrs();
500 
501  return filmPatches_;
502 }
503 
504 
505 template<class CloudType>
507 {
508  fv::filmCloudTransfer& filmCloudTransfer = filmTransferPtrs()[filmi];
509 
510  filmCloudTransfer.resetFromCloudFields();
511 
512  this->deltaFilmPatch_ = filmCloudTransfer.deltaToCloud();
513 
514  if (filmCloudTransfer.ejecting())
515  {
516  this->massParcelPatch_ = filmCloudTransfer.ejectedMassToCloud();
517  this->diameterParcelPatch_ = filmCloudTransfer.ejectedDiameterToCloud();
518  UFilmPatch_ = filmCloudTransfer.UToCloud();
519  rhoFilmPatch_ = filmCloudTransfer.rhoToCloud();
520  TFilmPatch_ = filmCloudTransfer.TToCloud();
521  CpFilmPatch_ = filmCloudTransfer.CpToCloud();
522  }
523  else
524  {
525  // Set the mass transferred from film->cloud to 0
526  this->massParcelPatch_.setSize(0);
527  }
528 }
529 
530 
531 template<class CloudType>
533 (
534  parcelType& p,
535  const label filmFacei
536 ) const
537 {
538  // Set parcel properties
539  const scalar vol =
540  mathematical::pi/6.0*pow3(this->diameterParcelPatch_[filmFacei]);
541  p.d() = this->diameterParcelPatch_[filmFacei];
542  p.U() = UFilmPatch_[filmFacei];
543  p.rho() = rhoFilmPatch_[filmFacei];
544 
545  p.nParticle() = this->massParcelPatch_[filmFacei]/p.rho()/vol;
546 
547  if (this->ejectedParcelType_ >= 0)
548  {
549  p.typeId() = this->ejectedParcelType_;
550  }
551 
552  // Set parcel properties
553  p.T() = TFilmPatch_[filmFacei];
554  p.Cp() = CpFilmPatch_[filmFacei];
555 }
556 
557 
558 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
559 
560 template<class CloudType>
562 (
563  const dictionary& dict,
564  CloudType& owner
565 )
566 :
567  SurfaceFilmModel<CloudType>(dict, owner, typeName),
568  rndGen_(owner.rndGen()),
569  UFilmPatch_(0),
570  rhoFilmPatch_(0),
571  TFilmPatch_(0),
572  CpFilmPatch_(0),
573  interactionType_
574  (
575  interactionTypeNames_.read(this->coeffDict().lookup("interactionType"))
576  ),
577  deltaWet_(0.0),
578  splashParcelType_(0),
579  parcelsPerSplash_(0),
580  Adry_(0.0),
581  Awet_(0.0),
582  Cf_(0.0),
583  nParcelsSplashed_(0)
584 {
585  Info<< " Applying " << interactionTypeNames_[interactionType_]
586  << " interaction model" << endl;
587 
589  {
590  this->coeffDict().lookup("deltaWet") >> deltaWet_;
592  this->coeffDict().lookupOrDefault("splashParcelType", -1);
594  this->coeffDict().lookupOrDefault("parcelsPerSplash", 2);
595  this->coeffDict().lookup("Adry") >> Adry_;
596  this->coeffDict().lookup("Awet") >> Awet_;
597  this->coeffDict().lookup("Cf") >> Cf_;
598  }
599 }
600 
601 
602 template<class CloudType>
604 (
606 )
607 :
609  rndGen_(sfm.rndGen_),
610  UFilmPatch_(sfm.UFilmPatch_),
611  rhoFilmPatch_(sfm.rhoFilmPatch_),
612  TFilmPatch_(sfm.TFilmPatch_),
613  CpFilmPatch_(sfm.CpFilmPatch_),
614  interactionType_(sfm.interactionType_),
615  deltaWet_(sfm.deltaWet_),
616  splashParcelType_(sfm.splashParcelType_),
617  parcelsPerSplash_(sfm.parcelsPerSplash_),
618  Adry_(sfm.Adry_),
619  Awet_(sfm.Awet_),
620  Cf_(sfm.Cf_),
621  nParcelsSplashed_(sfm.nParcelsSplashed_)
622 {}
623 
624 
625 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
626 
627 template<class CloudType>
629 {}
630 
631 
632 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
633 
634 template<class CloudType>
636 (
637  parcelType& p,
638  const polyPatch& pp,
639  bool& keepParticle
640 )
641 {
642  const label patchi = pp.index();
643 
644  forAll(this->filmTransferPtrs(), filmi)
645  {
646  if (patchi == filmPatches_[filmi])
647  {
648  fv::filmCloudTransfer& filmCloudTransfer =
649  filmTransferPtrs()[filmi];
650 
651  const label facei = pp.whichFace(p.face());
652 
653  switch (interactionType_)
654  {
655  case interactionType::bounce:
656  {
657  bounceInteraction(p, pp, facei, keepParticle);
658  break;
659  }
660  case interactionType::absorb:
661  {
662  absorbInteraction
663  (
664  filmCloudTransfer,
665  p,
666  pp,
667  facei,
668  p.nParticle()*p.mass(),
669  keepParticle
670  );
671  break;
672  }
673  case interactionType::splashBai:
674  {
675  if (this->deltaFilmPatch_[facei] < deltaWet_)
676  {
677  drySplashInteraction
678  (
679  filmCloudTransfer,
680  p,
681  pp,
682  facei,
683  keepParticle
684  );
685  }
686  else
687  {
688  wetSplashInteraction
689  (
690  filmCloudTransfer,
691  p,
692  pp,
693  facei,
694  keepParticle
695  );
696  }
697  break;
698  }
699  default:
700  {
702  << "Unknown interaction type enumeration"
703  << abort(FatalError);
704  }
705  }
706 
707  // Transfer parcel/parcel interactions complete
708  return true;
709  }
710  }
711 
712  // Parcel not interacting with film
713  return false;
714 }
715 
716 
717 template<class CloudType>
719 {
721 
722  label nSplash0 = this->template getModelProperty<label>("nParcelsSplashed");
723  label nSplashTotal =
724  nSplash0 + returnReduce(nParcelsSplashed_, sumOp<label>());
725 
726  os << " New film splash parcels = " << nSplashTotal << endl;
727 
728  if (this->writeTime())
729  {
730  this->setModelProperty("nParcelsSplashed", nSplashTotal);
731  nParcelsSplashed_ = 0;
732  }
733 }
734 
735 
736 // ************************************************************************* //
scalar y
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
Macros for easy insertion into run-time selection tables.
static const NamedEnum< interactionType, 3 > interactionTypeNames_
Interaction type names.
Thermo parcel<->film transfer model.
virtual void setParcelProperties(parcelType &p, const label filmFacei) const
Set the individual parcel properties.
label splashParcelType_
Splash parcel type label - id assigned to identify parcel for.
virtual void cacheFilmFields(const label filmi)
Cache the film fields in preparation for injection.
virtual const labelList & filmPatches() const
Return pointers to the films.
scalar Cf_
Skin friction typically in the range 0.6 < Cf < 0.8.
void drySplashInteraction(fv::filmCloudTransfer &, const parcelType &p, const polyPatch &pp, const label facei, bool &keepParticle)
Parcel interaction with dry surface.
scalar Awet_
Wet surface roughness coefficient.
virtual void info(Ostream &os)
Write film info to stream.
void splashInteraction(fv::filmCloudTransfer &, 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.
vector splashDirection(const vector &tanVec1, const vector &tanVec2, const vector &nf) const
Return splashed parcel direction.
void bounceInteraction(parcelType &p, const polyPatch &pp, const label facei, bool &keepParticle) const
Bounce parcel (flip parcel normal velocity)
void absorbInteraction(fv::filmCloudTransfer &, const parcelType &p, const polyPatch &pp, const label facei, const scalar mass, bool &keepParticle)
Absorb parcel into film.
scalar Adry_
Dry surface roughness coefficient.
scalar deltaWet_
Film thickness beyond which patch is assumed to be wet.
interactionType interactionType_
Interaction type enumeration.
virtual ~CloudFilmTransfer()
Destructor.
CloudFilmTransfer(const dictionary &dict, CloudType &owner)
Construct from components.
void wetSplashInteraction(fv::filmCloudTransfer &, parcelType &p, const polyPatch &pp, const label facei, bool &keepParticle)
Parcel interaction with wetted surface.
label parcelsPerSplash_
Number of new parcels resulting from splash event.
virtual bool transferParcel(parcelType &p, const polyPatch &pp, bool &keepParticle)
Transfer parcel from cloud to film.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:80
const Boundary & boundaryField() const
Return const-reference to the boundary field.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
const Field< PointType > & faceNormals() const
Return face normals for patch.
Templated wall surface film model class.
virtual void info(Ostream &os)
Write surface film info to stream.
CloudType::parcelType parcelType
Convenience typedef to the cloud's parcel type.
Templated base class for thermodynamic cloud.
Definition: ThermoCloud.H:83
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Definition: UPstream.H:429
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T, if not found return the given default.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:710
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
Definition: dictionaryIO.C:100
Base-class for fluid thermodynamic properties.
Definition: fluidThermo.H:57
virtual const volScalarField & p() const =0
Pressure [Pa].
Foam::fvBoundaryMesh.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
const volVectorField & C() const
Return cell centres.
const surfaceVectorField & Cf() const
Return face centres.
const word & name() const
Return reference to name.
Definition: fvMesh.H:432
const polyMesh & mesh() const
Return reference to polyMesh.
Definition: fvMesh.H:441
Finite volume models.
Definition: fvModels.H:65
Film<->cloud transfer model.
tmp< Field< scalar > > deltaToCloud() const
Transfer the film delta field to the cloud.
void resetFromCloudFields()
Reset the fields accumulated cloud transfer fields.
tmp< Field< scalar > > TToCloud() const
Transfer the film temperature field to the cloud.
tmp< Field< scalar > > CpToCloud() const
Transfer the film heat capacity field to the cloud.
tmp< Field< scalar > > ejectedDiameterToCloud() const
Transfer the ejected droplet diameter to the cloud.
tmp< Field< vector > > UToCloud() const
Transfer the film velocity field to the cloud.
void parcelFromCloud(const label facei, const scalar mass, const vector &momentum, const scalar energy)
Transfer parcel properties from cloud to the film.
tmp< Field< scalar > > ejectedMassToCloud() const
Transfer the ejected mass to the cloud.
bool ejecting() const
Return true if the film is ejecting to the cloud.
tmp< Field< scalar > > rhoToCloud() const
Transfer the film density field to the cloud.
The thermophysical properties of a liquid.
virtual scalar mu(scalar p, scalar T) const =0
Liquid viscosity [Pa s].
virtual scalar sigma(scalar p, scalar T) const =0
Surface tension [N/m].
virtual scalar hs(scalar p, scalar T) const =0
Liquid sensible enthalpy [J/kg].
Base class for fv patches that provide mapping between two fv patches.
const fvMesh & nbrMesh() const
Get the mesh for the region to map from.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
Definition: parcelThermo.H:59
label index() const
Return the index of this patch in the boundaryMesh.
const Vector< label > & solutionD() const
Return the vector of solved-for directions in mesh.
Definition: polyMesh.C:1006
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:70
label whichFace(const label l) const
Return label of face in patch from global face label.
Definition: polyPatch.H:360
const dictionary & coeffDict() const
Return const access to the coefficients dictionary.
Definition: subModelBase.C:128
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:334
const scalar epsilon
label patchi
const fvPatchList & patches
K
Definition: pEqn.H:75
U
Definition: pEqn.H:72
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
mathematical constants.
const scalar twoPi(2 *pi)
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
const dimensionedScalar mu
Atomic mass unit.
void constrainDirection(const polyMesh &mesh, const Vector< label > &dirs, vector &d)
Set the constrained components of directions/velocity to zero.
Definition: meshTools.C:671
dimensionedScalar exp(const dimensionedScalar &ds)
bool read(const char *, int32_t &)
Definition: int32IO.C:85
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
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:257
dimensionedScalar pow3(const dimensionedScalar &ds)
errorManip< error > abort(error &err)
Definition: errorManip.H:131
dimensionedScalar sin(const dimensionedScalar &ds)
messageStream Info
dimensionedScalar log(const dimensionedScalar &ds)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar sqrt(const dimensionedScalar &ds)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
dimensionSet normalised(const dimensionSet &)
Definition: dimensionSet.C:510
dimensioned< scalar > mag(const dimensioned< Type > &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
error FatalError
dimensionedScalar cbrt(const dimensionedScalar &ds)
dimensionSet perpendicular(const dimensionSet &)
Definition: dimensionSet.C:516
dimensioned< scalar > magSqr(const dimensioned< Type > &)
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar acos(const dimensionedScalar &ds)
dictionary dict
randomGenerator rndGen(653213)
volScalarField & p
fluidMulticomponentThermo & thermo
Definition: createFields.H:31