MomentumCloud.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-2021 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 "MomentumCloud.H"
27 #include "integrationScheme.H"
28 #include "interpolation.H"
29 #include "subCycleTime.H"
30 
31 #include "InjectionModelList.H"
32 #include "DispersionModel.H"
33 #include "PatchInteractionModel.H"
35 #include "SurfaceFilmModel.H"
36 
37 // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
38 
39 template<class CloudType>
41 {
42  dispersionModel_.reset
43  (
45  (
46  subModelProperties_,
47  *this
48  ).ptr()
49  );
50 
51  patchInteractionModel_.reset
52  (
54  (
55  subModelProperties_,
56  *this
57  ).ptr()
58  );
59 
60  stochasticCollisionModel_.reset
61  (
63  (
64  subModelProperties_,
65  *this
66  ).ptr()
67  );
68 
69  surfaceFilmModel_.reset
70  (
72  (
73  subModelProperties_,
74  *this
75  ).ptr()
76  );
77 
78  UIntegrator_.reset
79  (
81  (
82  "U",
83  solution_.integrationSchemes()
84  ).ptr()
85  );
86 }
87 
88 
89 template<class CloudType>
90 template<class TrackCloudType>
92 (
93  TrackCloudType& cloud,
94  typename parcelType::trackingData& td
95 )
96 {
97  if (solution_.steadyState())
98  {
99  cloud.storeState();
100 
101  cloud.preEvolve();
102 
103  evolveCloud(cloud, td);
104 
105  if (solution_.coupled())
106  {
107  cloud.relaxSources(cloud.cloudCopy());
108  }
109  }
110  else
111  {
112  cloud.preEvolve();
113 
114  evolveCloud(cloud, td);
115 
116  if (solution_.coupled())
117  {
118  cloud.scaleSources();
119  }
120  }
121 
122  cloud.info();
123 
124  cloud.postEvolve();
125 
126  if (solution_.steadyState())
127  {
128  cloud.restoreState();
129  }
130 }
131 
132 
133 template<class CloudType>
135 {
136  if (cellOccupancyPtr_.empty())
137  {
138  cellOccupancyPtr_.reset
139  (
140  new List<DynamicList<parcelType*>>(this->mesh().nCells())
141  );
142  }
143  else if (cellOccupancyPtr_().size() != this->mesh().nCells())
144  {
145  // If the size of the mesh has changed, reset the
146  // cellOccupancy size
147 
148  cellOccupancyPtr_().setSize(this->mesh().nCells());
149  }
150 
151  List<DynamicList<parcelType*>>& cellOccupancy = cellOccupancyPtr_();
152 
153  forAll(cellOccupancy, cO)
154  {
155  cellOccupancy[cO].clear();
156  }
157 
158  forAllIter(typename MomentumCloud<CloudType>, *this, iter)
159  {
160  cellOccupancy[iter().cell()].append(&iter());
161  }
162 }
163 
164 
165 template<class CloudType>
167 {
168  // Only build the cellOccupancy if the pointer is set, i.e. it has
169  // been requested before.
170 
171  if (cellOccupancyPtr_.valid())
172  {
173  buildCellOccupancy();
174  }
175 }
176 
177 
178 template<class CloudType>
179 template<class TrackCloudType>
181 (
182  TrackCloudType& cloud,
183  typename parcelType::trackingData& td
184 )
185 {
186  if (solution_.coupled())
187  {
188  cloud.resetSourceTerms();
189  }
190 
191  if (solution_.transient())
192  {
193  label preInjectionSize = this->size();
194 
195  this->surfaceFilm().inject(cloud);
196 
197  // Update the cellOccupancy if the size of the cloud has changed
198  // during the injection.
199  if (preInjectionSize != this->size())
200  {
201  updateCellOccupancy();
202  preInjectionSize = this->size();
203  }
204 
205  injectors_.inject(cloud, td);
206 
207 
208  // Assume that motion will update the cellOccupancy as necessary
209  // before it is required.
210  cloud.motion(cloud, td);
211 
212  stochasticCollision().update(td, solution_.trackTime());
213  }
214  else
215  {
216 // this->surfaceFilm().injectSteadyState(cloud);
217 
218  injectors_.injectSteadyState(cloud, td, solution_.trackTime());
219 
220  CloudType::move(cloud, td, solution_.trackTime());
221  }
222 }
223 
224 
225 template<class CloudType>
227 {
228  Info<< endl;
229 
230  if (debug)
231  {
232  this->writePositions();
233  }
234 
235  this->dispersion().cacheFields(false);
236 
237  forces_.cacheFields(false);
238 
239  functions_.postEvolve();
240 
241  solution_.nextIter();
242 
243  if (this->db().time().writeTime())
244  {
245  outputProperties_.writeObject
246  (
247  IOstream::ASCII,
248  IOstream::currentVersion,
249  this->db().time().writeCompression(),
250  true
251  );
252  }
253 }
254 
255 
256 template<class CloudType>
258 {
259  CloudType::cloudReset(c);
260 
261  rndGen_ = c.rndGen_;
262 
263  forces_.transfer(c.forces_);
264 
265  functions_.transfer(c.functions_);
266 
267  injectors_.transfer(c.injectors_);
268 
269  dispersionModel_.reset(c.dispersionModel_.ptr());
270  patchInteractionModel_.reset(c.patchInteractionModel_.ptr());
271  stochasticCollisionModel_.reset(c.stochasticCollisionModel_.ptr());
272  surfaceFilmModel_.reset(c.surfaceFilmModel_.ptr());
273 
274  UIntegrator_.reset(c.UIntegrator_.ptr());
275 }
276 
277 
278 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
279 
280 template<class CloudType>
282 (
283  const word& cloudName,
284  const volScalarField& rho,
285  const volVectorField& U,
286  const volScalarField& mu,
287  const dimensionedVector& g,
288  const bool readFields
289 )
290 :
291  CloudType(cloudName, rho, U, mu, g, false),
292  cloudCopyPtr_(nullptr),
293  particleProperties_
294  (
295  IOobject
296  (
297  cloudName + "Properties",
298  this->mesh().time().constant(),
299  this->mesh(),
300  IOobject::MUST_READ_IF_MODIFIED,
301  IOobject::NO_WRITE
302  )
303  ),
304  outputProperties_
305  (
306  IOobject
307  (
308  cloudName + "OutputProperties",
309  this->mesh().time().timeName(),
310  "uniform"/cloud::prefix/cloudName,
311  this->mesh(),
312  IOobject::READ_IF_PRESENT,
313  IOobject::NO_WRITE
314  )
315  ),
316  solution_(this->mesh(), particleProperties_.subDict("solution")),
317  constProps_(particleProperties_),
318  subModelProperties_
319  (
320  particleProperties_.subOrEmptyDict("subModels", true)
321  ),
322  rndGen_(0),
323  cellOccupancyPtr_(),
324  cellLengthScale_(mag(cbrt(this->mesh().V()))),
325  rho_(rho),
326  U_(U),
327  mu_(mu),
328  g_(g),
329  pAmbient_(0.0),
330  forces_
331  (
332  *this,
333  this->mesh(),
334  subModelProperties_.subOrEmptyDict
335  (
336  "particleForces",
337  true
338  ),
339  true
340  ),
341  functions_
342  (
343  *this,
344  particleProperties_.subOrEmptyDict("cloudFunctions"),
345  true
346  ),
347  injectors_
348  (
349  subModelProperties_.subOrEmptyDict("injectionModels"),
350  *this
351  ),
352  dispersionModel_(nullptr),
353  patchInteractionModel_(nullptr),
354  stochasticCollisionModel_(nullptr),
355  surfaceFilmModel_(nullptr),
356  UIntegrator_(nullptr),
357  UTrans_
358  (
360  (
361  IOobject
362  (
363  this->name() + ":UTrans",
364  this->db().time().timeName(),
365  this->db(),
366  IOobject::READ_IF_PRESENT,
367  IOobject::AUTO_WRITE
368  ),
369  this->mesh(),
371  )
372  ),
373  UCoeff_
374  (
376  (
377  IOobject
378  (
379  this->name() + ":UCoeff",
380  this->db().time().timeName(),
381  this->db(),
382  IOobject::READ_IF_PRESENT,
383  IOobject::AUTO_WRITE
384  ),
385  this->mesh(),
387  )
388  )
389 {
390  setModels();
391 
392  if (readFields)
393  {
394  parcelType::readFields(*this);
395  this->deleteLostParticles();
396  }
397 
398  if (solution_.resetSourcesOnStartup())
399  {
400  resetSourceTerms();
401  }
402 }
403 
404 
405 template<class CloudType>
407 (
408  const word& cloudName,
409  const volScalarField& rho,
410  const volVectorField& U,
411  const dimensionedVector& g,
412  const fluidThermo& carrierThermo,
413  const bool readFields
414 )
415 :
416  MomentumCloud(cloudName, rho, U, carrierThermo.mu(), g, readFields)
417 {}
418 
419 
420 template<class CloudType>
422 (
424  const word& name
425 )
426 :
427  CloudType(c, name),
428  cloudCopyPtr_(nullptr),
429  particleProperties_(c.particleProperties_),
430  outputProperties_(c.outputProperties_),
431  solution_(c.solution_),
432  constProps_(c.constProps_),
433  subModelProperties_(c.subModelProperties_),
434  rndGen_(c.rndGen_),
435  cellOccupancyPtr_(nullptr),
436  cellLengthScale_(c.cellLengthScale_),
437  rho_(c.rho_),
438  U_(c.U_),
439  mu_(c.mu_),
440  g_(c.g_),
441  pAmbient_(c.pAmbient_),
442  forces_(c.forces_),
443  functions_(c.functions_),
444  injectors_(c.injectors_),
445  dispersionModel_(c.dispersionModel_->clone()),
446  patchInteractionModel_(c.patchInteractionModel_->clone()),
447  stochasticCollisionModel_(c.stochasticCollisionModel_->clone()),
448  surfaceFilmModel_(c.surfaceFilmModel_->clone()),
449  UIntegrator_(c.UIntegrator_->clone()),
450  UTrans_
451  (
453  (
454  IOobject
455  (
456  this->name() + ":UTrans",
457  this->db().time().timeName(),
458  this->db(),
459  IOobject::NO_READ,
460  IOobject::NO_WRITE,
461  false
462  ),
463  c.UTrans_()
464  )
465  ),
466  UCoeff_
467  (
469  (
470  IOobject
471  (
472  name + ":UCoeff",
473  this->db().time().timeName(),
474  this->db(),
475  IOobject::NO_READ,
476  IOobject::NO_WRITE,
477  false
478  ),
479  c.UCoeff_()
480  )
481  )
482 {}
483 
484 
485 template<class CloudType>
487 (
488  const fvMesh& mesh,
489  const word& name,
490  const MomentumCloud<CloudType>& c
491 )
492 :
493  CloudType(mesh, name, c),
494  cloudCopyPtr_(nullptr),
495  particleProperties_
496  (
497  IOobject
498  (
499  name + "Properties",
500  mesh.time().constant(),
501  mesh,
502  IOobject::NO_READ,
503  IOobject::NO_WRITE,
504  false
505  )
506  ),
507  outputProperties_
508  (
509  IOobject
510  (
511  name + "OutputProperties",
512  this->mesh().time().timeName(),
513  "uniform"/cloud::prefix/name,
514  this->mesh(),
515  IOobject::NO_READ,
516  IOobject::NO_WRITE,
517  false
518  )
519  ),
520  solution_(mesh),
521  constProps_(),
522  subModelProperties_(dictionary::null),
523  rndGen_(0),
524  cellOccupancyPtr_(nullptr),
525  cellLengthScale_(c.cellLengthScale_),
526  rho_(c.rho_),
527  U_(c.U_),
528  mu_(c.mu_),
529  g_(c.g_),
530  pAmbient_(c.pAmbient_),
531  forces_(*this, mesh),
532  functions_(*this),
533  injectors_(*this),
534  dispersionModel_(nullptr),
535  patchInteractionModel_(nullptr),
536  stochasticCollisionModel_(nullptr),
537  surfaceFilmModel_(nullptr),
538  UIntegrator_(nullptr),
539  UTrans_(nullptr),
540  UCoeff_(nullptr)
541 {}
542 
543 
544 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
545 
546 template<class CloudType>
548 {}
549 
550 
551 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
552 
553 template<class CloudType>
555 (
556  parcelType& parcel,
557  const scalar lagrangianDt
558 )
559 {
560  parcel.rho() = constProps_.rho0();
561 }
562 
563 
564 template<class CloudType>
566 (
567  parcelType& parcel,
568  const scalar lagrangianDt,
569  const bool fullyDescribed
570 )
571 {
572  const scalar carrierDt = this->mesh().time().deltaTValue();
573  parcel.stepFraction() = (carrierDt - lagrangianDt)/carrierDt;
574 
575  if (parcel.typeId() == -1)
576  {
577  parcel.typeId() = constProps_.parcelTypeId();
578  }
579 }
580 
581 
582 template<class CloudType>
584 {
585  cloudCopyPtr_.reset
586  (
587  static_cast<MomentumCloud<CloudType>*>
588  (
589  clone(this->name() + "Copy").ptr()
590  )
591  );
592 }
593 
594 
595 template<class CloudType>
597 {
598  cloudReset(cloudCopyPtr_());
599  cloudCopyPtr_.clear();
600 }
601 
602 
603 template<class CloudType>
605 {
606  UTransRef().field() = Zero;
607  UCoeffRef().field() = 0.0;
608 }
609 
610 
611 template<class CloudType>
612 template<class Type>
614 (
616  const DimensionedField<Type, volMesh>& field0,
617  const word& name
618 ) const
619 {
620  const scalar coeff = solution_.relaxCoeff(name);
621  field = field0 + coeff*(field - field0);
622 }
623 
624 
625 template<class CloudType>
626 template<class Type>
628 (
630  const word& name
631 ) const
632 {
633  const scalar coeff = solution_.relaxCoeff(name);
634  field *= coeff;
635 }
636 
637 
638 template<class CloudType>
640 (
641  const MomentumCloud<CloudType>& cloudOldTime
642 )
643 {
644  this->relax(UTrans_(), cloudOldTime.UTrans_(), "U");
645  this->relax(UCoeff_(), cloudOldTime.UCoeff_(), "U");
646 }
647 
648 
649 template<class CloudType>
651 {
652  this->scale(UTrans_(), "U");
653  this->scale(UCoeff_(), "U");
654 }
655 
656 
657 template<class CloudType>
659 {
660  // force calculation of mesh dimensions - needed for parallel runs
661  // with topology change due to lazy evaluation of valid mesh dimensions
662  label nGeometricD = this->mesh().nGeometricD();
663 
664  Info<< "\nSolving " << nGeometricD << "-D cloud " << this->name() << endl;
665 
666  this->dispersion().cacheFields(true);
667  forces_.cacheFields(true);
668  updateCellOccupancy();
669 
670  pAmbient_ = constProps_.dict().template
671  lookupOrDefault<scalar>("pAmbient", pAmbient_);
672 
673  functions_.preEvolve();
674 }
675 
676 
677 template<class CloudType>
679 {
680  if (solution_.canEvolve())
681  {
682  typename parcelType::trackingData td(*this);
683 
684  solve(*this, td);
685  }
686 }
687 
688 
689 template<class CloudType>
690 template<class TrackCloudType>
692 (
693  TrackCloudType& cloud,
694  typename parcelType::trackingData& td
695 )
696 {
697  CloudType::move(cloud, td, solution_.trackTime());
698 
699  updateCellOccupancy();
700 }
701 
702 
703 template<class CloudType>
705 (
706  const parcelType& p,
707  const polyPatch& pp,
708  vector& nw,
709  vector& Up
710 ) const
711 {
712  p.patchData(nw, Up);
713  Up /= p.mesh().time().deltaTValue();
714 
715  // If this is a wall patch, then there may be a non-zero tangential velocity
716  // component; the lid velocity in a lid-driven cavity case, for example. We
717  // want the particle to interact with this velocity, so we look it up in the
718  // velocity field and use it to set the wall-tangential component.
719  if (!this->mesh().moving() && isA<wallPolyPatch>(pp))
720  {
721  const label patchi = pp.index();
722  const label patchFacei = pp.whichFace(p.face());
723 
724  // We only want to use the boundary condition value only if it is set
725  // by the boundary condition. If the boundary values are extrapolated
726  // (e.g., slip conditions) then they represent the motion of the fluid
727  // just inside the domain rather than that of the wall itself.
728  if (U_.boundaryField()[patchi].fixesValue())
729  {
730  const vector Uw1 = U_.boundaryField()[patchi][patchFacei];
731  const vector& Uw0 =
732  U_.oldTime().boundaryField()[patchi][patchFacei];
733 
734  const scalar f = p.currentTimeFraction();
735 
736  const vector Uw = Uw0 + f*(Uw1 - Uw0);
737 
738  const tensor nnw = nw*nw;
739 
740  Up = (nnw & Up) + Uw - (nnw & Uw);
741  }
742  }
743 }
744 
745 
746 template<class CloudType>
748 {
749  updateCellOccupancy();
750  injectors_.updateMesh();
751  cellLengthScale_ = mag(cbrt(this->mesh().V()));
752 }
753 
754 
755 template<class CloudType>
757 {
759 
760  updateMesh();
761 }
762 
763 
764 template<class CloudType>
766 {
767  vector linearMomentum = linearMomentumOfSystem();
768  reduce(linearMomentum, sumOp<vector>());
769 
770  scalar linearKineticEnergy = linearKineticEnergyOfSystem();
771  reduce(linearKineticEnergy, sumOp<scalar>());
772 
773  Info<< "Cloud: " << this->name() << nl
774  << " Current number of parcels = "
775  << returnReduce(this->size(), sumOp<label>()) << nl
776  << " Current mass in system = "
777  << returnReduce(massInSystem(), sumOp<scalar>()) << nl
778  << " Linear momentum = "
779  << linearMomentum << nl
780  << " |Linear momentum| = "
781  << mag(linearMomentum) << nl
782  << " Linear kinetic energy = "
783  << linearKineticEnergy << nl;
784 
785  injectors_.info(Info);
786  this->surfaceFilm().info(Info);
787  this->patchInteraction().info(Info);
788 }
789 
790 
791 // ************************************************************************* //
autoPtr< StochasticCollisionModel< MomentumCloud< CloudType > > > stochasticCollisionModel_
Stochastic collision model.
const volVectorField & U_
Velocity [m/s].
void preEvolve()
Pre-evolve.
void scaleSources()
Apply scaling to (transient) cloud sources.
void updateCellOccupancy()
Update (i.e. build) the cellOccupancy if it has.
IOdictionary particleProperties_
Dictionary of particle properties.
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
virtual tmp< volScalarField > mu() const =0
Dynamic viscosity of mixture [kg/m/s].
void postEvolve()
Post-evolve.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
void solve(TrackCloudType &cloud, typename parcelType::trackingData &td)
Solve the cloud - calls all evolution functions.
Definition: MomentumCloud.C:92
DSMCCloud< dsmcParcel > CloudType
void setModels()
Set cloud sub-models.
Definition: MomentumCloud.C:40
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const HashSet< word > &selectedFields, LIFOStack< regIOobject *> &storedObjects)
Read the selected GeometricFields of the specified type.
Definition: ReadFields.C:244
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
cloudSolution solution_
Solution properties.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
Definition: UList.H:459
MomentumCloud(const word &cloudName, const volScalarField &rho, const volVectorField &U, const volScalarField &mu, const dimensionedVector &g, const bool readFields=true)
Construct given carrier fields.
void storeState()
Store the current cloud state.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
autoPtr< PatchInteractionModel< MomentumCloud< CloudType > > > patchInteractionModel_
Patch interaction model.
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:239
void buildCellOccupancy()
Build the cellOccupancy.
void scale(DimensionedField< Type, volMesh > &field, const word &name) const
Scale field.
void resetSourceTerms()
Reset the cloud source terms.
Random rndGen_
Random number generator - used by some injection routines.
InjectionModelList< MomentumCloud< CloudType > > injectors_
Injector models.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
autoPtr< SurfaceFilmModel< MomentumCloud< CloudType > > > surfaceFilmModel_
Surface film model.
const dimensionedVector & g_
Gravity.
Templated patch interaction model class.
Definition: MomentumCloud.H:83
void info()
Print cloud information.
Templated base class for momentum cloud.
autoPtr< volScalarField::Internal > UCoeff_
Coefficient for carrier phase U equation.
const volScalarField & rho_
Density [kg/m^3].
T clone(const T &t)
Definition: List.H:54
void cloudReset(MomentumCloud< CloudType > &c)
Reset state of cloud.
dynamicFvMesh & mesh
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
Definition: DynamicList.H:56
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
void clear()
Clear the list, i.e. set size to zero.
Definition: ListI.H:125
parcelType::constantProperties constProps_
Parcel constant properties.
A class for handling words, derived from string.
Definition: word.H:59
Base-class for fluid thermodynamic properties.
Definition: fluidThermo.H:53
forceType forces_
Optional particle forces.
void append(const T &)
Append an element at the end of the list.
Definition: ListI.H:178
void evolveCloud(TrackCloudType &cloud, typename parcelType::trackingData &td)
Evolve the cloud.
dimensionedScalar cbrt(const dimensionedScalar &ds)
const word & constant() const
Return constant name.
Definition: TimePaths.H:123
void relax(DimensionedField< Type, volMesh > &field, const DimensionedField< Type, volMesh > &field0, const word &name) const
Relax field.
autoPtr< DispersionModel< MomentumCloud< CloudType > > > dispersionModel_
Dispersion model.
word timeName
Definition: getTimeIndex.H:3
static const zero Zero
Definition: zero.H:97
const dictionary subModelProperties_
Sub-models dictionary.
void motion(TrackCloudType &cloud, typename parcelType::trackingData &td)
Particle motion.
IOdictionary outputProperties_
Dictionary of output properties.
EaEqn relax()
Base cloud calls templated on particle type.
Definition: Cloud.H:52
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:221
autoPtr< integrationScheme > UIntegrator_
Velocity integration.
static const char nl
Definition: Ostream.H:260
autoPtr< volVectorField::Internal > UTrans_
Momentum.
const dimensionSet dimVelocity
void checkParcelProperties(parcelType &parcel, const scalar lagrangianDt, const bool fullyDescribed)
Check parcel properties.
const volScalarField & mu_
Dynamic viscosity [Pa.s].
labelList f(nPoints)
const dimensionSet dimMass
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
virtual ~MomentumCloud()
Destructor.
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
void relaxSources(const MomentumCloud< CloudType > &cloudOldTime)
Apply relaxation to (steady state) cloud sources.
void setParcelThermoProperties(parcelType &parcel, const scalar lagrangianDt)
Set parcel thermo properties.
label patchi
rhoEqn solve()
const List< DynamicList< molecule * > > & cellOccupancy
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void patchData(const parcelType &p, const polyPatch &pp, vector &normal, vector &Up) const
Calculate the patch normal and velocity to interact with,.
Templated stochastic collision model class.
Definition: MomentumCloud.H:89
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.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
messageStream Info
dimensioned< scalar > mag(const dimensioned< Type > &)
virtual void autoMap(const mapPolyMesh &)
Remap the cells of particles corresponding to the.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
void updateMesh()
Update mesh.
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
const dimensionedVector & g
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
scalarField cellLengthScale_
Cell length scale.
scalar pAmbient_
Averaged ambient domain pressure.
void restoreState()
Reset the current cloud to the previously stored state.
label nw
Definition: createFields.H:12
void evolve()
Evolve the cloud.
label whichFace(const label l) const
Return label of face in patch from global face label.
Definition: polyPatch.H:389
functionType functions_
Optional cloud function objects.