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