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