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