Go to the documentation of this file.
31 template<
class CloudType>
35 return *cloudCopyPtr_;
39 template<
class CloudType>
43 return atomizationModel_;
47 template<
class CloudType>
51 return *atomizationModel_;
55 template<
class CloudType>
63 template<
class CloudType>
67 return *breakupModel_;
71 template<
class CloudType>
74 return averageParcelMass_;
78 template<
class CloudType>
84 if ((fraction < 0) || (fraction > 1))
87 <<
"fraction should be in the range 0 < fraction < 1"
93 const label nParcel = this->size();
95 const label nParcelSum = globalParcels.
size();
116 scalar m =
p.nParticle()*
p.mass();
117 scalar d =
mag(
p.position() -
p.position0());
128 Pstream::gatherList(procMass);
129 Pstream::gatherList(procDist);
131 if (Pstream::master())
136 for (
const int proci : Pstream::allProcs())
142 globalParcels.
offset(proci)
150 globalParcels.
offset(proci)
160 const scalar mLimit = fraction*mSum;
163 if (mLimit > (mSum - allMass[indices.last()]))
171 const scalar mThreshold = (1.0 - fraction)*mSum;
172 scalar mCurrent = 0.0;
177 label indI = indices[i];
179 mCurrent += allMass[indI];
181 if (mCurrent > mThreshold)
188 if (i0 == indices.size() - 1)
195 scalar
alpha = (mCurrent - mThreshold)/allMass[indices[i0]];
197 allDist[i0] +
alpha*(allDist[i0+1] - allDist[i0]);
Templated base class for spray cloud.
void sort()
Forward (stable) sort the list (if changed after construction).
static constexpr const zero Zero
Global zero (0)
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
A List obtained as a section of another List.
Templated atomization model class.
label localSize() const
My local size.
Foam::DSMCCloud ::particleType parcelType
Type of parcel the cloud was instantiated for.
void setSize(const label n)
Alias for resize()
const SprayCloud & cloudCopy() const
Return a reference to the cloud copy.
reduce(hasMovingMesh, orOp< bool >())
A list that is sorted upon construction or when explicitly requested with the sort() method.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
scalar distance(const vector &p1, const vector &p2)
Templated break-up model class.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label size() const
Global sum of localSizes.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
scalar averageParcelMass() const
Return const-access to the average parcel mass.
const AtomizationModel< SprayCloud< CloudType > > & atomization() const
Return const-access to the atomization model.
const labelList & indices() const
Return the list of sorted indices. Updated every sort.
#define forAllReverse(list, i)
Reverse loop across all elements in list.
label offset(const label proci) const
Start of proci data.
const BreakupModel< SprayCloud< CloudType > > & breakup() const
Return const-access to the breakup model.
scalar penetration(const scalar fraction) const
Penetration for fraction [0-1] of the current total mass.