Go to the documentation of this file.
31 template<
class CloudType>
35 return cloudCopyPtr_();
39 template<
class CloudType>
46 template<
class CloudType>
50 return particleProperties_;
54 template<
class CloudType>
58 return outputProperties_;
62 template<
class CloudType>
65 return outputProperties_;
69 template<
class CloudType>
77 template<
class CloudType>
84 template<
class CloudType>
85 inline const typename CloudType::particleType::constantProperties&
92 template<
class CloudType>
93 inline typename CloudType::particleType::constantProperties&
100 template<
class CloudType>
104 return subModelProperties_;
108 template<
class CloudType>
115 template<
class CloudType>
122 template<
class CloudType>
129 template<
class CloudType>
136 template<
class CloudType>
143 template<
class CloudType>
150 template<
class CloudType>
159 template<
class CloudType>
167 template<
class CloudType>
175 template<
class CloudType>
183 template<
class CloudType>
191 template<
class CloudType>
195 return dispersionModel_;
199 template<
class CloudType>
203 return dispersionModel_();
207 template<
class CloudType>
211 return patchInteractionModel_;
215 template<
class CloudType>
219 return patchInteractionModel_();
223 template<
class CloudType>
227 return stochasticCollisionModel_();
231 template<
class CloudType>
235 return stochasticCollisionModel_();
239 template<
class CloudType>
243 return surfaceFilmModel_();
247 template<
class CloudType>
251 return surfaceFilmModel_();
255 template<
class CloudType>
263 template<
class CloudType>
270 template<
class CloudType>
273 scalar sysMass = 0.0;
277 sysMass +=
p.nParticle()*
p.mass();
284 template<
class CloudType>
288 vector linearMomentum(vector::zero);
294 linearMomentum +=
p.nParticle()*
p.mass()*
p.U();
297 return linearMomentum;
301 template<
class CloudType>
305 scalar linearKineticEnergy = 0.0;
311 linearKineticEnergy +=
p.nParticle()*0.5*
p.mass()*(
p.U() &
p.U());
314 return linearKineticEnergy;
318 template<
class CloudType>
330 si +=
p.nParticle()*
pow(
p.d(), i);
331 sj +=
p.nParticle()*
pow(
p.d(), j);
336 sj =
max(sj, VSMALL);
342 template<
class CloudType>
358 template<
class CloudType>
361 const scalar fraction
364 if ((fraction < 0) || (fraction > 1))
367 <<
"fraction should be in the range 0 < fraction < 1"
373 const label nParcel = this->size();
375 const label nParcelSum = globalParcels.
size();
397 scalar m =
p.nParticle()*
p.mass();
398 scalar d =
mag(
p.position() -
p.position0());
409 Pstream::gatherList(procMass);
410 Pstream::gatherList(procDist);
412 if (Pstream::master())
417 for (
label procI = 0; procI < Pstream::nProcs(); procI++)
423 globalParcels.
offset(procI)
424 ).
assign(procMass[procI]);
431 globalParcels.
offset(procI)
432 ).
assign(procDist[procI]);
441 const scalar mLimit = fraction*mSum;
444 if (mLimit > (mSum - allMass[indices.last()]))
452 const scalar mThreshold = (1.0 - fraction)*mSum;
453 scalar mCurrent = 0.0;
458 label indI = indices[i];
460 mCurrent += allMass[indI];
462 if (mCurrent > mThreshold)
469 if (i0 == indices.
size() - 1)
476 scalar
alpha = (mCurrent - mThreshold)/allMass[indices[i0]];
478 allDist[i0] +
alpha*(allDist[i0+1] - allDist[i0]);
494 template<
class CloudType>
501 template<
class CloudType>
505 if (cellOccupancyPtr_.empty())
507 buildCellOccupancy();
510 return cellOccupancyPtr_();
514 template<
class CloudType>
518 return cellLengthScale_;
522 template<
class CloudType>
530 template<
class CloudType>
538 template<
class CloudType>
546 template<
class CloudType>
554 template<
class CloudType>
560 Info<<
"UTrans min/max = " <<
min(UTrans()).
value() <<
", "
562 <<
"UCoeff min/max = " <<
min(UCoeff()).
value() <<
", "
566 if (solution_.coupled())
568 if (solution_.semiImplicit(
"U"))
571 Vdt(mesh_.V()*this->db().time().deltaT());
573 return UTrans()/Vdt -
fvm::Sp(UCoeff()/Vdt,
U) + UCoeff()/Vdt*
U;
580 fvm.
source() = -UTrans()/(this->db().time().deltaT());
590 template<
class CloudType>
600 this->
name() +
":vDotSweep",
609 zeroGradientFvPatchScalarField::typeName
617 const label cellI =
p.cell();
619 vDotSweep[cellI] +=
p.nParticle()*
p.areaP()*
mag(
p.U() - U_[cellI]);
629 template<
class CloudType>
639 this->
name() +
":theta",
648 zeroGradientFvPatchScalarField::typeName
656 const label cellI =
p.cell();
658 theta[cellI] +=
p.nParticle()*
p.volume();
668 template<
class CloudType>
678 this->
name() +
":alpha",
694 const label cellI =
p.cell();
696 alpha[cellI] +=
p.nParticle()*
p.mass();
699 alpha /= (mesh_.V()*rho_);
705 template<
class CloudType>
715 this->
name() +
":rhoEff",
731 const label cellI =
p.cell();
733 rhoEff[cellI] +=
p.nParticle()*
p.mass();
DimensionedField< scalar, volMesh > & UCoeff()
Return coefficient for carrier phase U equation.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
functionType & functions()
Optional cloud function objects.
scalar penetration(const scalar fraction) const
Penetration for fraction [0-1] of the current total mass.
void sort()
(stable) sort the list (if changed after construction time)
A class for managing temporary objects.
const dimensionSet dimDensity
const parcelType::constantProperties & constProps() const
Return the constant properties.
const fvMesh & mesh() const
Return reference to the mesh.
tmp< fvVectorMatrix > SU(volVectorField &U) const
Return tmp momentum source term.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
A List obtained as a section of another List.
const volScalarField & mu() const
Return carrier gas dynamic viscosity.
scalar massInSystem() const
Total mass in system.
const tmp< volScalarField > rhoEff() const
Return the particle effective density field.
const forceType & forces() const
Optional particle forces.
const SurfaceFilmModel< KinematicCloud< CloudType > > & surfaceFilm() const
Return const-access to the surface film model.
const KinematicCloud & cloudCopy() const
Return a reference to the cloud copy.
label localSize() const
My local size.
const InjectionModelList< KinematicCloud< CloudType > > & injectors() const
Return const access to the injection model.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type & value() const
Return const reference to value.
dimensioned< scalar > mag(const dimensioned< Type > &)
const dimensionSet dimForce
label nParcels() const
Total number of parcels.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
const tmp< volScalarField > vDotSweep() const
Volume swept rate of parcels per cell.
Top level model for Integration schemes.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
Templated base class for kinematic cloud.
Templated patch interaction model class.
fvMatrix< vector > fvVectorMatrix
Templated stochastic collision model class.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
List< DynamicList< parcelType * > > & cellOccupancy()
Return the cell occupancy information for each.
Templated wall surface film model class.
DimensionedField< vector, volMesh > & UTrans()
Return reference to momentum source.
Stores all relevant solution info for cloud.
void assign(const UList< T > &)
Assign elements to those from UList.
InternalField & internalField()
Return internal field.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label offset(const label procI) const
Start of procI data.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
A list of keyword definitions, which are a keyword followed by any number of values (e....
#define forAllReverse(list, i)
Reverse loop across all elements in list.
A list that is sorted upon construction or when explicitly requested with the sort() method.
Generic dimensioned Type class.
const vectorIntegrationScheme & UIntegrator() const
Return reference to velocity integration.
Mesh data needed to do the Finite Volume discretisation.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
const StochasticCollisionModel< KinematicCloud< CloudType > > & stochasticCollision() const
Return const-access to the stochastic collision model.
const IOdictionary & particleProperties() const
Return particle properties dictionary.
scalar distance(const vector &p1, const vector &p2)
const cloudSolution & solution() const
Return const access to the solution properties.
Calculate the matrix for implicit and explicit sources.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void correctBoundaryConditions()
Correct boundary field.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
void setSize(const label)
Reset size of List.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const DispersionModel< KinematicCloud< CloudType > > & dispersion() const
Return const-access to the dispersion model.
scalar pAmbient() const
Return const-access to the ambient pressure.
label size() const
Global sum of localSizes.
const PatchInteractionModel< KinematicCloud< CloudType > > & patchInteraction() const
Return const-access to the patch interaction model.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const dimensionedVector & g() const
Gravity.
const tmp< volScalarField > theta() const
Return the particle volume fraction field.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
const labelList & indices() const
Return the list of sorted indices. Updated every sort.
scalar Dij(const label i, const label j) const
Mean diameter Dij.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
const dictionary & subModelProperties() const
Return reference to the sub-models dictionary.
void size(const label)
Override size to be inconsistent with allocated storage.
const volVectorField & U() const
Return carrier gas velocity.
scalar linearKineticEnergyOfSystem() const
Total linear kinetic energy in the system.
tmp< GeometricField< Type, fvPatchField, volMesh > > Sp(const volScalarField &sp, const GeometricField< Type, fvPatchField, volMesh > &vf)
Generic GeometricField class.
vector linearMomentumOfSystem() const
Total linear momentum of the system.
scalar Dmax() const
Max diameter.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const IOdictionary & outputProperties() const
Return output properties dictionary.
cachedRandom & rndGen()
Return reference to the random object.
word name(const complex &)
Return a string representation of a complex.
List of injection models.
const tmp< volScalarField > alpha() const
Return the particle mass fraction field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const volScalarField & rho() const
Return carrier gas density.
const scalarField & cellLengthScale() const
Return the cell length scale.