33 template<
class CloudType>
37 return *cloudCopyPtr_;
41 template<
class CloudType>
48 template<
class CloudType>
52 return particleProperties_;
56 template<
class CloudType>
60 return outputProperties_;
64 template<
class CloudType>
67 return outputProperties_;
71 template<
class CloudType>
79 template<
class CloudType>
86 template<
class CloudType>
87 inline const typename CloudType::particleType::constantProperties&
94 template<
class CloudType>
95 inline typename CloudType::particleType::constantProperties&
102 template<
class CloudType>
106 return subModelProperties_;
110 template<
class CloudType>
117 template<
class CloudType>
124 template<
class CloudType>
131 template<
class CloudType>
138 template<
class CloudType>
145 template<
class CloudType>
152 template<
class CloudType>
161 template<
class CloudType>
169 template<
class CloudType>
177 template<
class CloudType>
185 template<
class CloudType>
193 template<
class CloudType>
197 return *dispersionModel_;
201 template<
class CloudType>
205 return *dispersionModel_;
209 template<
class CloudType>
213 return *patchInteractionModel_;
217 template<
class CloudType>
221 return *patchInteractionModel_;
225 template<
class CloudType>
229 return *stochasticCollisionModel_;
233 template<
class CloudType>
237 return *stochasticCollisionModel_;
241 template<
class CloudType>
245 return *surfaceFilmModel_;
249 template<
class CloudType>
253 return *surfaceFilmModel_;
257 template<
class CloudType>
261 return *packingModel_;
265 template<
class CloudType>
269 return *packingModel_;
273 template<
class CloudType>
277 return *dampingModel_;
281 template<
class CloudType>
285 return *dampingModel_;
289 template<
class CloudType>
293 return *isotropyModel_;
297 template<
class CloudType>
301 return *isotropyModel_;
305 template<
class CloudType>
309 return *UIntegrator_;
313 template<
class CloudType>
316 scalar sysMass = 0.0;
317 for (
const parcelType&
p : *
this)
319 sysMass +=
p.nParticle()*
p.mass();
326 template<
class CloudType>
332 for (
const parcelType&
p : *
this)
334 linearMomentum +=
p.nParticle()*
p.mass()*
p.U();
337 return linearMomentum;
341 template<
class CloudType>
345 scalar parPerParcel = 0;
347 for (
const parcelType&
p : *
this)
349 parPerParcel +=
p.nParticle();
356 template<
class CloudType>
360 scalar linearKineticEnergy = 0;
362 for (
const parcelType&
p : *
this)
364 linearKineticEnergy +=
p.nParticle()*0.5*
p.mass()*(
p.U() &
p.U());
367 return linearKineticEnergy;
371 template<
class CloudType>
380 for (
const parcelType&
p : *
this)
382 si +=
p.nParticle()*
pow(
p.d(), i);
383 sj +=
p.nParticle()*
pow(
p.d(), j);
386 reduce(si, sumOp<scalar>());
387 reduce(sj, sumOp<scalar>());
394 template<
class CloudType>
398 for (
const parcelType&
p : *
this)
409 template<
class CloudType>
416 template<
class CloudType>
420 if (!cellOccupancyPtr_)
422 buildCellOccupancy();
425 return *cellOccupancyPtr_;
429 template<
class CloudType>
433 return cellLengthScale_;
437 template<
class CloudType>
441 const typename parcelType::trackingData& td
444 const scalar m =
p.nParticle()*
p.mass();
446 rhokTrans()[
p.cell()] += m;
448 UTrans()[
p.cell()] += m*
p.U();
452 template<
class CloudType>
460 template<
class CloudType>
468 template<
class CloudType>
476 template<
class CloudType>
484 template<
class CloudType>
492 template<
class CloudType>
500 template<
class CloudType>
504 label debug0 =
debug;
508 Pout<<
"rhokTrans min/max = " <<
min(rhokTrans()).value() <<
", " 509 <<
max(rhokTrans()).value() <<
endl;
513 if (this->solution().
coupled())
515 return rhokTrans()/this->db().time().deltaT()/this->
mesh().V();
523 IOobject::scopedName(this->
name(),
"rhokTrans"),
528 IOobject::NO_REGISTER
539 template<
class CloudType>
546 Pout<<
"UTrans min/max = " <<
min(UTrans()).value() <<
", " 547 <<
max(UTrans()).value() <<
nl 548 <<
"UCoeff min/max = " <<
min(UCoeff()).value() <<
", " 549 <<
max(UCoeff()).value() <<
endl;
558 if (solution_.coupled())
560 if (solution_.semiImplicit(
"U"))
562 volScalarField::Internal
563 Vdt(mesh_.V()*this->db().time().deltaT());
570 return UTrans()/Vdt -
fvm::Sp(UCoeff()/Vdt,
U) + UCoeff()/Vdt*
U;
577 fvm.source() = -UTrans()/(this->db().time().deltaT());
587 template<
class CloudType>
597 IOobject::scopedName(this->
name(),
"vDotSweep"),
602 IOobject::NO_REGISTER
611 for (
const parcelType&
p : *
this)
613 const label celli =
p.cell();
615 vDotSweep[celli] +=
p.nParticle()*
p.areaP()*
mag(
p.U() - U_[celli]);
625 template<
class CloudType>
635 IOobject::scopedName(this->
name(),
"theta"),
640 IOobject::NO_REGISTER
649 for (
const parcelType&
p : *
this)
651 const label celli =
p.cell();
653 theta[celli] +=
p.nParticle()*
p.volume();
663 template<
class CloudType>
673 IOobject::scopedName(this->
name(),
"alpha"),
678 IOobject::NO_REGISTER
686 for (
const parcelType&
p : *
this)
688 const label celli =
p.cell();
690 alpha[celli] +=
p.nParticle()*
p.mass();
693 alpha /= (mesh_.V()*rho_);
699 template<
class CloudType>
709 IOobject::scopedName(this->
name(),
"rhoEff"),
714 IOobject::NO_REGISTER
722 for (
const parcelType&
p : *
this)
724 const label celli =
p.cell();
726 rhoEff[celli] +=
p.nParticle()*
p.mass();
tmp< fvVectorMatrix > SU(volVectorField &U, bool incompressible=false) const
Return tmp momentum source term (compressible)
const SurfaceFilmModel< KinematicCloud< CloudType > > & surfaceFilm() const
Return const-access to the surface film model.
const StochasticCollisionModel< KinematicCloud< CloudType > > & stochasticCollision() const
Return const-access to the stochastic collision model.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
scalar totalParticlePerParcel() const
Average particle per parcel.
const scalarField & cellLengthScale() const
Return the cell length scale.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const tmp< volScalarField > theta() const
Return the particle volume fraction field.
scalar Dmax() const
Max diameter.
const InjectionModelList< KinematicCloud< CloudType > > & injectors() const
Return const access to the injection model.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const KinematicCloud & cloudCopy() const
Return a reference to the cloud copy.
const volScalarField & rho() const
Return carrier gas density.
constexpr char nl
The newline '\n' character (0x0a)
const fvMesh & mesh() const
Return reference to the mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
volVectorField::Internal & UTrans()
Return reference to momentum source.
Base class for packing models.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
const IsotropyModel< KinematicCloud< CloudType > > & isotropyModel() const
Return const access to the isotropy model.
const tmp< volScalarField > rhoEff() const
Return the particle effective density field.
const DampingModel< KinematicCloud< CloudType > > & dampingModel() const
Return const access to the damping model.
const dimensionSet dimless
Dimensionless.
List< DynamicList< parcelType * > > & cellOccupancy()
Return the cell occupancy information for each.
const parcelType::constantProperties & constProps() const
Return the constant properties.
Templated patch interaction model class.
scalar massInSystem() const
Total mass in system.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
const forceType & forces() const
Optional particle forces.
const dimensionSet dimVolume(pow3(dimLength))
volScalarField::Internal & rhokTrans()
Return reference to mass for kinematic source.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
volScalarField::Internal & UCoeff()
Return coefficient for carrier phase U equation.
const PackingModel< KinematicCloud< CloudType > > & packingModel() const
Return const access to the packing model.
tmp< volScalarField::Internal > Srhok() const
Return tmp mass source for kinematic.
List of injection models.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
scalar linearKineticEnergyOfSystem() const
Total linear kinetic energy in the system.
const dimensionSet dimForce
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
int debug
Static debugging option.
const tmp< volScalarField > vDotSweep() const
Volume swept rate of parcels per cell.
const DispersionModel< KinematicCloud< CloudType > > & dispersion() const
Return const-access to the dispersion model.
scalar pAmbient() const
Return const-access to the ambient pressure.
Templated wall surface film model class.
const dimensionSet dimDensity
const cloudSolution & solution() const
Return const access to the solution properties.
Base for a set of schemes which integrate simple ODEs which arise from semi-implcit rate expressions...
void transferToCarrier(const parcelType &p, const typename parcelType::trackingData &td)
Transfer the effect of parcel to the carrier phase.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Base class for collisional return-to-isotropy models.
const IOdictionary & particleProperties() const
Return particle properties dictionary.
Templated base class for kinematic cloud.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field values.
Stores all relevant solution info for cloud.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const integrationScheme & UIntegrator() const
Return reference to velocity integration.
Templated stochastic collision model class.
Mesh data needed to do the Finite Volume discretisation.
Base class for dispersion modelling.
fvMatrix< vector > fvVectorMatrix
vector linearMomentumOfSystem() const
Total linear momentum of the system.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const dimensionedVector & g() const
Gravity.
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)
Reduce inplace (cf. MPI Allreduce) using specified communication schedule.
const IOdictionary & outputProperties() const
Return output properties dictionary.
void correctBoundaryConditions()
Correct boundary field.
const volVectorField & U() const
Return carrier gas velocity.
Internal & ref(const bool updateAccessTime=true)
Same as internalFieldRef()
const PatchInteractionModel< KinematicCloud< CloudType > > & patchInteraction() const
Return const-access to the patch interaction model.
A class for managing temporary objects.
scalar Dij(const label i, const label j) const
Mean diameter Dij.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
const volScalarField & mu() const
Return carrier gas dynamic viscosity.
Defines the attributes of an object for which implicit objectRegistry management is supported...
const word extrapolatedCalculatedType
A combined zero-gradient and calculated patch field type.
const tmp< volScalarField > alpha() const
Return the particle mass fraction field.
functionType & functions()
Optional cloud function objects.
Base class for collisional damping models.
Random & rndGen() const
Return reference to the random object.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
Calculate the finiteVolume matrix for implicit and explicit sources.
const dictionary & subModelProperties() const
Return reference to the sub-models dictionary.
static constexpr const zero Zero
Global zero (0)