ParticleCollector.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2012-2017 OpenFOAM Foundation
9  Copyright (C) 2015-2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "ParticleCollector.H"
30 #include "Pstream.H"
31 #include "surfaceWriter.H"
32 #include "unitConversion.H"
33 #include "Random.H"
34 #include "triangle.H"
35 #include "cloud.H"
36 
37 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
38 
39 template<class CloudType>
41 (
42  const faceList& faces,
43  const Field<point>& points,
44  const Field<scalar>& area
45 )
46 {
47  // Create the output file if not already created
48  if (log_)
49  {
50  if (debug)
51  {
52  Info<< "Creating output file" << endl;
53  }
54 
55  if (Pstream::master())
56  {
57  // Create directory if does not exist
58  mkDir(this->writeTimeDir());
59 
60  // Open new file at start up
61  outputFilePtr_.reset
62  (
63  new OFstream(this->writeTimeDir()/(type() + ".dat"))
64  );
65 
66  outputFilePtr_()
67  << "# Source : " << type() << nl
68  << "# Bins : " << faces.size() << nl
69  << "# Total area : " << sum(area) << nl;
70 
71  outputFilePtr_()
72  << "# Geometry :" << nl
73  << '#'
74  << tab << "Bin"
75  << tab << "(Centre_x Centre_y Centre_z)"
76  << tab << "Area"
77  << nl;
78 
79  forAll(faces, i)
80  {
81  outputFilePtr_()
82  << '#'
83  << tab << i
84  << tab << faces[i].centre(points)
85  << tab << area[i]
86  << nl;
87  }
88 
89  outputFilePtr_()
90  << '#' << nl
91  << "# Output format:" << nl;
92 
93  forAll(faces, i)
94  {
95  word id = Foam::name(i);
96  word binId = "bin_" + id;
97 
98  outputFilePtr_()
99  << '#'
100  << tab << "Time"
101  << tab << binId
102  << tab << "mass[" << id << "]"
103  << tab << "massFlowRate[" << id << "]"
104  << endl;
105  }
106  }
107  }
108 }
109 
110 
111 template<class CloudType>
113 (
114  const List<Field<point>>& polygons
115 )
116 {
117  mode_ = mtPolygon;
118 
119  label nPoints = 0;
120  forAll(polygons, polyI)
121  {
122  label np = polygons[polyI].size();
123  if (np < 3)
124  {
125  FatalIOErrorInFunction(this->coeffDict())
126  << "polygons must consist of at least 3 points"
127  << exit(FatalIOError);
128  }
129 
130  nPoints += np;
131  }
132 
133  label pointOffset = 0;
134  points_.setSize(nPoints);
135  faces_.setSize(polygons.size());
136  faceTris_.setSize(polygons.size());
137  area_.setSize(polygons.size());
138  forAll(faces_, facei)
139  {
140  const Field<point>& polyPoints = polygons[facei];
141  face f(identity(polyPoints.size(), pointOffset));
142  UIndirectList<point>(points_, f) = polyPoints;
143  area_[facei] = f.mag(points_);
144 
145  DynamicList<face> tris;
146  f.triangles(points_, tris);
147  faceTris_[facei].transfer(tris);
148 
149  faces_[facei].transfer(f);
150 
151  pointOffset += polyPoints.size();
152  }
153 }
154 
155 
156 template<class CloudType>
158 {
159  mode_ = mtConcentricCircle;
160 
161  vector origin(this->coeffDict().lookup("origin"));
162 
163  this->coeffDict().readEntry("radius", radius_);
164  this->coeffDict().readEntry("nSector", nSector_);
165 
166  label nS = nSector_;
167 
168  vector refDir;
169  if (nSector_ > 1)
170  {
171  this->coeffDict().readEntry("refDir", refDir);
172 
173  refDir -= normal_[0]*(normal_[0] & refDir);
174  refDir.normalise();
175  }
176  else
177  {
178  // Set 4 quadrants for single sector cases
179  nS = 4;
180 
181  vector tangent = Zero;
182  scalar magTangent = 0.0;
183 
184  Random& rnd = this->owner().rndGen();
185  while (magTangent < SMALL)
186  {
187  vector v = rnd.sample01<vector>();
188 
189  tangent = v - (v & normal_[0])*normal_[0];
190  magTangent = mag(tangent);
191  }
192 
193  refDir = tangent/magTangent;
194  }
195 
196  scalar dTheta = 5.0;
197  scalar dThetaSector = 360.0/scalar(nS);
198  label intervalPerSector = max(1, ceil(dThetaSector/dTheta));
199  dTheta = dThetaSector/scalar(intervalPerSector);
200 
201  label nPointPerSector = intervalPerSector + 1;
202 
203  label nPointPerRadius = nS*(nPointPerSector - 1);
204  label nPoint = radius_.size()*nPointPerRadius;
205  label nFace = radius_.size()*nS;
206 
207  // Add origin
208  nPoint++;
209 
210  points_.setSize(nPoint);
211  faces_.setSize(nFace);
212  area_.setSize(nFace);
213 
214  coordSys_ = coordSystem::cylindrical(origin, normal_[0], refDir);
215 
216  List<label> ptIDs(identity(nPointPerRadius));
217 
218  points_[0] = origin;
219 
220  // Points
221  forAll(radius_, radI)
222  {
223  label pointOffset = radI*nPointPerRadius + 1;
224 
225  for (label i = 0; i < nPointPerRadius; i++)
226  {
227  label pI = i + pointOffset;
228  point pCyl(radius_[radI], degToRad(i*dTheta), 0.0);
229  points_[pI] = coordSys_.globalPosition(pCyl);
230  }
231  }
232 
233  // Faces
234  DynamicList<label> facePts(2*nPointPerSector);
235  forAll(radius_, radI)
236  {
237  if (radI == 0)
238  {
239  for (label secI = 0; secI < nS; secI++)
240  {
241  facePts.clear();
242 
243  // Append origin point
244  facePts.append(0);
245 
246  for (label ptI = 0; ptI < nPointPerSector; ptI++)
247  {
248  label i = ptI + secI*(nPointPerSector - 1);
249  label id = ptIDs.fcIndex(i - 1) + 1;
250  facePts.append(id);
251  }
252 
253  label facei = secI + radI*nS;
254 
255  faces_[facei] = face(facePts);
256  area_[facei] = faces_[facei].mag(points_);
257  }
258  }
259  else
260  {
261  for (label secI = 0; secI < nS; secI++)
262  {
263  facePts.clear();
264 
265  label offset = (radI - 1)*nPointPerRadius + 1;
266 
267  for (label ptI = 0; ptI < nPointPerSector; ptI++)
268  {
269  label i = ptI + secI*(nPointPerSector - 1);
270  label id = offset + ptIDs.fcIndex(i - 1);
271  facePts.append(id);
272  }
273  for (label ptI = nPointPerSector-1; ptI >= 0; ptI--)
274  {
275  label i = ptI + secI*(nPointPerSector - 1);
276  label id = offset + nPointPerRadius + ptIDs.fcIndex(i - 1);
277  facePts.append(id);
278  }
279 
280  label facei = secI + radI*nS;
281 
282  faces_[facei] = face(facePts);
283  area_[facei] = faces_[facei].mag(points_);
284  }
285  }
286  }
287 }
288 
289 
290 template<class CloudType>
292 (
293  const point& p1,
294  const point& p2
295 ) const
296 {
297  forAll(faces_, facei)
298  {
299  const label facePoint0 = faces_[facei][0];
300 
301  const point& pf = points_[facePoint0];
302 
303  const scalar d1 = normal_[facei] & (p1 - pf);
304  const scalar d2 = normal_[facei] & (p2 - pf);
305 
306  if (sign(d1) == sign(d2))
307  {
308  // Did not cross polygon plane
309  continue;
310  }
311 
312  // Intersection point
313  const point pIntersect = p1 + (d1/(d1 - d2))*(p2 - p1);
314 
315  // Identify if point is within the bounds of the face. Create triangles
316  // between the intersection point and each edge of the face. If all the
317  // triangle normals point in the same direction as the face normal, then
318  // the particle is within the face. Note that testing for pointHits on
319  // the face's decomposed triangles does not work due to ambiguity along
320  // the diagonals.
321  const face& f = faces_[facei];
322  const vector areaNorm = f.areaNormal(points_);
323  bool inside = true;
324  for (label i = 0; i < f.size(); ++i)
325  {
326  const label j = f.fcIndex(i);
327  const triPointRef t(pIntersect, points_[f[i]], points_[f[j]]);
328 
329  if ((areaNorm & t.areaNormal()) < 0)
330  {
331  inside = false;
332  break;
333  }
334  }
335 
336  // Add to the list of hits
337  if (inside)
338  {
339  hitFaceIDs_.append(facei);
340  }
341  }
342 }
343 
344 
345 template<class CloudType>
347 (
348  const point& p1,
349  const point& p2
350 ) const
351 {
352  label secI = -1;
353 
354  const scalar d1 = normal_[0] & (p1 - coordSys_.origin());
355  const scalar d2 = normal_[0] & (p2 - coordSys_.origin());
356 
357  if (sign(d1) == sign(d2))
358  {
359  // Did not cross plane
360  return;
361  }
362 
363  // Intersection point in cylindrical coordinate system
364  const point pCyl = coordSys_.localPosition(p1 + (d1/(d1 - d2))*(p2 - p1));
365 
366  scalar r = pCyl[0];
367 
368  if (r < radius_.last())
369  {
370  label radI = 0;
371  while (r > radius_[radI])
372  {
373  radI++;
374  }
375 
376  if (nSector_ == 1)
377  {
378  secI = 4*radI;
379  }
380  else
381  {
382  scalar theta = pCyl[1] + constant::mathematical::pi;
383 
384  secI =
385  nSector_*radI
386  + floor
387  (
388  scalar(nSector_)*theta/constant::mathematical::twoPi
389  );
390  }
391  }
392 
393  if (secI != -1)
394  {
395  hitFaceIDs_.append(secI);
396  }
397 }
398 
399 
400 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
401 
402 template<class CloudType>
404 {
405  const fvMesh& mesh = this->owner().mesh();
406  const Time& time = mesh.time();
407  scalar timeNew = time.value();
408  scalar timeElapsed = timeNew - timeOld_;
409 
410  totalTime_ += timeElapsed;
411 
412  const scalar alpha = (totalTime_ - timeElapsed)/totalTime_;
413  const scalar beta = timeElapsed/totalTime_;
414 
415  forAll(faces_, facei)
416  {
417  massFlowRate_[facei] =
418  alpha*massFlowRate_[facei] + beta*mass_[facei]/timeElapsed;
419  massTotal_[facei] += mass_[facei];
420  }
421 
422  const label proci = Pstream::myProcNo();
423 
424  Info<< type() << " output:" << nl;
425 
426  Field<scalar> faceMassTotal(mass_.size(), Zero);
427  this->getModelProperty("massTotal", faceMassTotal);
428 
429  Field<scalar> faceMassFlowRate(massFlowRate_.size(), Zero);
430  this->getModelProperty("massFlowRate", faceMassFlowRate);
431 
432 
433  scalar sumTotalMass = 0.0;
434  scalar sumAverageMFR = 0.0;
435  forAll(faces_, facei)
436  {
437  scalarList allProcMass(Pstream::nProcs());
438  allProcMass[proci] = massTotal_[facei];
439  Pstream::gatherList(allProcMass);
440  faceMassTotal[facei] += sum(allProcMass);
441 
442  scalarList allProcMassFlowRate(Pstream::nProcs());
443  allProcMassFlowRate[proci] = massFlowRate_[facei];
444  Pstream::gatherList(allProcMassFlowRate);
445  faceMassFlowRate[facei] += sum(allProcMassFlowRate);
446 
447  sumTotalMass += faceMassTotal[facei];
448  sumAverageMFR += faceMassFlowRate[facei];
449 
450  if (outputFilePtr_)
451  {
452  outputFilePtr_()
453  << time.timeName()
454  << tab << facei
455  << tab << faceMassTotal[facei]
456  << tab << faceMassFlowRate[facei]
457  << endl;
458  }
459  }
460 
461  Info<< " sum(total mass) = " << sumTotalMass << nl
462  << " sum(average mass flow rate) = " << sumAverageMFR << nl
463  << endl;
464 
465 
466  if (surfaceFormat_ != "none" && Pstream::master())
467  {
469  (
470  surfaceFormat_,
471  this->coeffDict().subOrEmptyDict("formatOptions")
472  .subOrEmptyDict(surfaceFormat_)
473  );
474 
475  if (debug)
476  {
477  writer->verbose(true);
478  }
479 
480  writer->open
481  (
482  points_,
483  faces_,
484  (this->writeTimeDir() / "collector"),
485  false // serial - already merged
486  );
487 
488  writer->write("massFlowRate", faceMassFlowRate);
489 
490  writer->write("massTotal", faceMassTotal);
491  }
492 
493 
494  if (resetOnWrite_)
495  {
496  Field<scalar> dummy(faceMassTotal.size(), Zero);
497  this->setModelProperty("massTotal", dummy);
498  this->setModelProperty("massFlowRate", dummy);
499 
500  timeOld_ = timeNew;
501  totalTime_ = 0.0;
502  }
503  else
504  {
505  this->setModelProperty("massTotal", faceMassTotal);
506  this->setModelProperty("massFlowRate", faceMassFlowRate);
507  }
508 
509  forAll(faces_, facei)
510  {
511  mass_[facei] = 0.0;
512  massTotal_[facei] = 0.0;
513  massFlowRate_[facei] = 0.0;
514  }
515 }
516 
517 
518 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
519 
520 template<class CloudType>
522 (
523  const dictionary& dict,
524  CloudType& owner,
525  const word& modelName
526 )
527 :
528  CloudFunctionObject<CloudType>(dict, owner, modelName, typeName),
529  mode_(mtUnknown),
530  parcelType_(this->coeffDict().getOrDefault("parcelType", -1)),
531  removeCollected_(this->coeffDict().getBool("removeCollected")),
532  resetOnWrite_(this->coeffDict().getBool("resetOnWrite")),
533  log_(this->coeffDict().getBool("log")),
534  points_(),
535  faces_(),
536  faceTris_(),
537  nSector_(0),
538  radius_(),
539  coordSys_(),
540  normal_(),
541  negateParcelsOppositeNormal_
542  (
543  this->coeffDict().getBool("negateParcelsOppositeNormal")
544  ),
545  surfaceFormat_(this->coeffDict().lookup("surfaceFormat")),
546  totalTime_(0.0),
547  mass_(),
548  massTotal_(),
549  massFlowRate_(),
550  outputFilePtr_(),
551  timeOld_(owner.mesh().time().value()),
552  hitFaceIDs_()
553 {
554  normal_ /= mag(normal_);
555 
556  word mode(this->coeffDict().lookup("mode"));
557  if (mode == "polygon")
558  {
559  List<Field<point>> polygons(this->coeffDict().lookup("polygons"));
560 
561  initPolygons(polygons);
562 
563  vector n0(this->coeffDict().lookup("normal"));
564  normal_ = vectorField(faces_.size(), n0);
565  }
566  else if (mode == "polygonWithNormal")
567  {
568  List<Tuple2<Field<point>, vector>> polygonAndNormal
569  (
570  this->coeffDict().lookup("polygons")
571  );
572 
573  List<Field<point>> polygons(polygonAndNormal.size());
574  normal_.setSize(polygonAndNormal.size());
575 
576  forAll(polygons, polyI)
577  {
578  polygons[polyI] = polygonAndNormal[polyI].first();
579  normal_[polyI] = normalised(polygonAndNormal[polyI].second());
580  }
581 
582  initPolygons(polygons);
583  }
584  else if (mode == "concentricCircle")
585  {
586  vector n0(this->coeffDict().lookup("normal"));
587  normal_ = vectorField(1, n0);
588 
589  initConcentricCircles();
590  }
591  else
592  {
593  FatalIOErrorInFunction(this->coeffDict())
594  << "Unknown mode " << mode << ". Available options are "
595  << "polygon, polygonWithNormal and concentricCircle"
596  << exit(FatalIOError);
597  }
598 
599  mass_.setSize(faces_.size(), 0.0);
600  massTotal_.setSize(faces_.size(), 0.0);
601  massFlowRate_.setSize(faces_.size(), 0.0);
602 
603  makeLogFile(faces_, points_, area_);
604 }
605 
606 
607 template<class CloudType>
609 (
611 )
612 :
614  mode_(pc.mode_),
615  parcelType_(pc.parcelType_),
616  removeCollected_(pc.removeCollected_),
617  resetOnWrite_(pc.resetOnWrite_),
618  log_(pc.log_),
619  points_(pc.points_),
620  faces_(pc.faces_),
621  faceTris_(pc.faceTris_),
622  nSector_(pc.nSector_),
623  radius_(pc.radius_),
624  coordSys_(pc.coordSys_),
625  area_(pc.area_),
626  normal_(pc.normal_),
627  negateParcelsOppositeNormal_(pc.negateParcelsOppositeNormal_),
628  surfaceFormat_(pc.surfaceFormat_),
629  totalTime_(pc.totalTime_),
630  mass_(pc.mass_),
631  massTotal_(pc.massTotal_),
632  massFlowRate_(pc.massFlowRate_),
633  outputFilePtr_(),
634  timeOld_(0.0),
635  hitFaceIDs_()
636 {}
637 
638 
639 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
640 
641 template<class CloudType>
643 (
644  parcelType& p,
645  const scalar dt,
646  const point& position0,
647  bool& keepParticle
648 )
649 {
650  if ((parcelType_ != -1) && (parcelType_ != p.typeId()))
651  {
652  return;
653  }
654 
655  hitFaceIDs_.clear();
656 
657  switch (mode_)
658  {
659  case mtPolygon:
660  {
661  collectParcelPolygon(position0, p.position());
662  break;
663  }
664  case mtConcentricCircle:
665  {
666  collectParcelConcentricCircles(position0, p.position());
667  break;
668  }
669  default:
670  {}
671  }
672 
673  forAll(hitFaceIDs_, i)
674  {
675  label facei = hitFaceIDs_[i];
676  scalar m = p.nParticle()*p.mass();
677 
678  if (negateParcelsOppositeNormal_)
679  {
680  scalar Unormal = 0;
681  vector Uhat = p.U();
682  switch (mode_)
683  {
684  case mtPolygon:
685  {
686  Unormal = Uhat & normal_[facei];
687  break;
688  }
689  case mtConcentricCircle:
690  {
691  Unormal = Uhat & normal_[0];
692  break;
693  }
694  default:
695  {}
696  }
697 
698  Uhat /= mag(Uhat) + ROOTVSMALL;
699 
700  if (Unormal < 0)
701  {
702  m = -m;
703  }
704  }
705 
706  // Add mass contribution
707  mass_[facei] += m;
708 
709  if (nSector_ == 1)
710  {
711  mass_[facei + 1] += m;
712  mass_[facei + 2] += m;
713  mass_[facei + 3] += m;
714  }
715 
716  if (removeCollected_)
717  {
718  keepParticle = false;
719  }
720  }
721 }
722 
723 
724 // ************************************************************************* //
Foam::expressions::patchExpr::debug
int debug
Static debugging option.
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::ParticleCollector::ParticleCollector
ParticleCollector(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
Definition: ParticleCollector.C:522
triangle.H
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::ParticleCollector::write
void write()
Write post-processing info.
Definition: ParticleCollector.C:403
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
Foam::Time::timeName
static word timeName(const scalar t, const int precision=precision_)
Definition: Time.C:780
Foam::writer::write
virtual void write(const coordSet &, const wordList &, const List< const Field< Type > * > &, Ostream &) const =0
General entry point for writing.
cloud.H
unitConversion.H
Unit conversion functions.
Foam::FatalIOError
IOerror FatalIOError
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:350
Foam::dimensioned::value
const Type & value() const
Return const reference to value.
Definition: dimensionedType.C:434
surfaceWriter.H
Foam::Vector::normalise
Vector< Cmpt > & normalise()
Normalise the vector by its magnitude.
Definition: VectorI.H:123
Foam::sign
dimensionedScalar sign(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:166
Foam::DSMCCloud::rndGen
Random & rndGen()
Return reference to the random object.
Definition: DSMCCloudI.H:124
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:296
Foam::vectorField
Field< vector > vectorField
Specialisation of Field<T> for vector.
Definition: primitiveFieldsFwd.H:54
nPoints
label nPoints
Definition: gmvOutputHeader.H:2
Foam::mode
mode_t mode(const fileName &name, const bool followLink=true)
Return the file mode, normally following symbolic links.
Definition: MSwindows.C:564
Foam::Field< scalar >
Foam::DSMCCloud::mesh
const fvMesh & mesh() const
Return reference to the mesh.
Definition: DSMCCloudI.H:44
Foam::Info
messageStream Info
Information stream (uses stdout - output is on the master only)
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition: complex.C:76
beta
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)
Foam::ParticleCollector::postMove
virtual void postMove(parcelType &p, const scalar dt, const point &position0, bool &keepParticle)
Post-move hook.
Definition: ParticleCollector.C:643
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
Foam::radiation::lookup
Lookup type of boundary radiation properties.
Definition: lookup.H:63
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:71
Foam::constant::mathematical::twoPi
constexpr scalar twoPi(2 *M_PI)
dict
dictionary dict
Definition: searchingEngine.H:14
ParticleCollector.H
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::writer
Base class for graphics format writing. Entry points are.
Definition: writer.H:80
Pstream.H
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:83
Foam::vector
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:51
Foam::degToRad
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
Definition: unitConversion.H:48
Random.H
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
Foam::normalised
VectorSpace< Form, Cmpt, Ncmpts > normalised(const VectorSpace< Form, Cmpt, Ncmpts > &vs)
Definition: VectorSpaceI.H:483
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Definition: DimensionedFieldReuseFunctions.H:105
Foam::tab
constexpr char tab
Definition: Ostream.H:384
Foam::constant::mathematical::pi
constexpr scalar pi(M_PI)
Foam::nl
constexpr char nl
Definition: Ostream.H:385
f
labelList f(nPoints)
Foam::faceList
List< face > faceList
A List of faces.
Definition: faceListFwd.H:47
Foam::Vector< scalar >
Foam::List< scalar >
Foam::CloudFunctionObject
Templated cloud function object base class.
Definition: CloudFunctionObject.H:62
Foam::mag
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
points
const pointField & points
Definition: gmvOutputHeader.H:1
Foam::identity
labelList identity(const label len, label start=0)
Create identity map of the given length with (map[i] == i)
Definition: labelList.C:38
Foam::sum
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
Definition: DimensionedFieldFunctions.C:327
Foam::roots::type
type
Types of root.
Definition: Roots.H:54
Foam::fieldTypes::area
const wordList area
Standard area field types (scalar, vector, tensor, etc)
Foam::fvMesh::time
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:275
Foam::ParticleCollector
Function object to collect the parcel mass- and mass flow rate over a set of polygons....
Definition: ParticleCollector.H:112
FatalIOErrorInFunction
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:401
Foam::point
vector point
Point is a vector.
Definition: point.H:43
Foam::List::setSize
void setSize(const label newSize)
Alias for resize(const label)
Definition: ListI.H:146
Foam::mkDir
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
Definition: MSwindows.C:507
Foam::triPointRef
triangle< point, const point & > triPointRef
A triangle using referred points.
Definition: triangle.H:73