57#ifndef KinematicCloud_H
58#define KinematicCloud_H
81class integrationScheme;
83template<
class CloudType>
84class InjectionModelList;
86template<
class CloudType>
89template<
class CloudType>
90class PatchInteractionModel;
92template<
class CloudType>
93class SurfaceFilmModel;
95template<
class CloudType>
96class StochasticCollisionModel;
98template<
class CloudType>
101template<
class CloudType>
104template<
class CloudType>
112template<
class CloudType>
274 template<
class TrackCloudType>
277 TrackCloudType&
cloud,
289 template<
class TrackCloudType>
292 TrackCloudType&
cloud,
541 bool incompressible =
false
569 inline scalar
Dij(
const label i,
const label j)
const;
572 inline scalar
Dmax()
const;
599 const scalar lagrangianDt
606 const scalar lagrangianDt,
607 const bool fullyDescribed
652 template<
class TrackCloudType>
655 TrackCloudType&
cloud,
List of cloud function objects.
virtual label nParcels() const
Return the number of particles in the cloud.
ParticleType particleType
Templated base class for dsmc cloud.
const word & cloudName() const
Return the cloud type.
Class to hold DSMC particle constant properties.
Base class for collisional damping models.
Base class for dispersion modelling.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
const word & name() const noexcept
Return the object name.
autoPtr< IOobject > clone() const
Clone.
List of injection models.
Base class for collisional return-to-isotropy models.
Templated base class for kinematic cloud.
const parcelType::constantProperties & constProps() const
Return the constant properties.
const dictionary & subModelProperties() const
Return reference to the sub-models dictionary.
cloudSolution solution_
Solution properties.
autoPtr< DampingModel< KinematicCloud< CloudType > > > dampingModel_
Damping model.
autoPtr< volVectorField::Internal > UTrans_
Momentum.
void setModels()
Set cloud sub-models.
scalar massInSystem() const
Total mass in system.
scalar rotationalKineticEnergyOfSystem() const
Total rotational kinetic energy in the system.
scalar totalParticlePerParcel() const
Average particle per parcel.
virtual label nParcels() const
Total number of parcels.
void relaxSources(const KinematicCloud< CloudType > &cloudOldTime)
Apply relaxation to (steady state) cloud sources.
void motion(TrackCloudType &cloud, typename parcelType::trackingData &td)
Particle motion.
forceType forces_
Optional particle forces.
void scale(DimensionedField< Type, volMesh > &field, const word &name) const
Scale field.
const tmp< volScalarField > theta() const
Return the particle volume fraction field.
const fvMesh & mesh_
References to the mesh and time databases.
void storeState()
Store the current cloud state.
autoPtr< SurfaceFilmModel< KinematicCloud< CloudType > > > surfaceFilmModel_
Surface film model.
const tmp< volScalarField > alpha() const
Return the particle mass fraction field.
void patchData(const parcelType &p, const polyPatch &pp, vector &normal, vector &Up) const
Calculate the patch normal and velocity to interact with,.
const scalarField & cellLengthScale() const
Return the cell length scale.
void setParcelThermoProperties(parcelType &parcel, const scalar lagrangianDt)
Set parcel thermo properties.
scalar pAmbient_
Averaged ambient domain pressure.
const SurfaceFilmModel< KinematicCloud< CloudType > > & surfaceFilm() const
Return const-access to the surface film model.
virtual void readObjects(const objectRegistry &obr)
Read particle fields from objects in the obr registry.
scalarField cellLengthScale_
Cell length scale.
void cloudReset(KinematicCloud< CloudType > &c)
Reset state of cloud.
const PatchInteractionModel< KinematicCloud< CloudType > > & patchInteraction() const
Return const-access to the patch interaction model.
void checkParcelProperties(parcelType &parcel, const scalar lagrangianDt, const bool fullyDescribed)
Check parcel properties.
autoPtr< integrationScheme > UIntegrator_
Velocity integration.
vector linearMomentumOfSystem() const
Total linear momentum of the system.
const volVectorField & U() const
Return carrier gas velocity.
scalar pAmbient() const
Return const-access to the ambient pressure.
const KinematicCloud & cloudCopy() const
Return a reference to the cloud copy.
InjectionModelList< KinematicCloud< CloudType > > injectors_
Injector models.
const volScalarField & rho() const
Return carrier gas density.
autoPtr< IsotropyModel< KinematicCloud< CloudType > > > isotropyModel_
Exchange model.
autoPtr< DispersionModel< KinematicCloud< CloudType > > > dispersionModel_
Dispersion model.
void scaleSources()
Apply scaling to (transient) cloud sources.
KinematicCloud< CloudType > kinematicCloudType
Convenience typedef for this cloud type.
autoPtr< PatchInteractionModel< KinematicCloud< CloudType > > > patchInteractionModel_
Patch interaction model.
const volVectorField & U_
Velocity [m/s].
const integrationScheme & UIntegrator() const
Return reference to velocity integration.
List< DynamicList< parcelType * > > & cellOccupancy()
Return the cell occupancy information for each.
const volScalarField & mu_
Dynamic viscosity [Pa.s].
const dimensionedVector & g_
Gravity.
functionType & functions()
Optional cloud function objects.
CloudType::particleType parcelType
Type of parcel the cloud was instantiated for.
const tmp< volScalarField > rhoEff() const
Return the particle effective density field.
const cloudSolution & solution() const
Return const access to the solution properties.
void updateCellOccupancy()
Update (i.e. build) the cellOccupancy if it has.
const dictionary subModelProperties_
Sub-models dictionary.
const tmp< volScalarField > vDotSweep() const
Volume swept rate of parcels per cell.
const PackingModel< KinematicCloud< CloudType > > & packingModel() const
Return const access to the packing model.
CloudType cloudType
Type of cloud this cloud was instantiated for.
virtual void autoMap(const mapPolyMesh &)
Remap the cells of particles corresponding to the.
virtual autoPtr< Cloud< parcelType > > clone(const word &name)
Construct and return clone based on (this) with new name.
const DispersionModel< KinematicCloud< CloudType > > & dispersion() const
Return const-access to the dispersion model.
virtual autoPtr< Cloud< parcelType > > cloneBare(const word &name) const
Construct and return bare clone based on (this) with new name.
void evolve()
Evolve the cloud.
void postEvolve(const typename parcelType::trackingData &td)
Post-evolve.
volScalarField::Internal & UCoeff()
Return coefficient for carrier phase U equation.
functionType functions_
Optional cloud function objects.
const StochasticCollisionModel< KinematicCloud< CloudType > > & stochasticCollision() const
Return const-access to the stochastic collision model.
void evolveCloud(TrackCloudType &cloud, typename parcelType::trackingData &td)
Evolve the cloud.
parcelType::constantProperties constProps_
Parcel constant properties.
scalar Dmax() const
Max diameter.
autoPtr< List< DynamicList< parcelType * > > > cellOccupancyPtr_
Cell occupancy information for each parcel, (demand driven)
const DampingModel< KinematicCloud< CloudType > > & dampingModel() const
Return const access to the damping model.
const volScalarField & rho_
Density [kg/m3].
CloudFunctionObjectList< KinematicCloud< CloudType > > functionType
Function object type.
scalar Dij(const label i, const label j) const
Mean diameter Dij.
IOdictionary particleProperties_
Dictionary of particle properties.
const IOdictionary & particleProperties() const
Return particle properties dictionary.
volVectorField::Internal & UTrans()
Return reference to momentum source.
void preEvolve(const typename parcelType::trackingData &td)
Pre-evolve.
void info()
Print cloud information.
void restoreState()
Reset the current cloud to the previously stored state.
tmp< fvVectorMatrix > SU(volVectorField &U, bool incompressible=false) const
Return tmp momentum source term (compressible)
const dimensionedVector & g() const
Gravity.
virtual ~KinematicCloud()=default
Destructor.
const fvMesh & mesh() const
Return reference to the mesh.
Random rndGen_
Random number generator - used by some injection routines.
const InjectionModelList< KinematicCloud< CloudType > > & injectors() const
Return const access to the injection model.
Random & rndGen() const
Return reference to the random object.
void resetSourceTerms()
Reset the cloud source terms.
const forceType & forces() const
Optional particle forces.
ParticleForceList< KinematicCloud< CloudType > > forceType
Force models type.
autoPtr< PackingModel< KinematicCloud< CloudType > > > packingModel_
Packing model.
const IOdictionary & outputProperties() const
Return output properties dictionary.
const IsotropyModel< KinematicCloud< CloudType > > & isotropyModel() const
Return const access to the isotropy model.
void buildCellOccupancy()
Build the cellOccupancy.
autoPtr< volScalarField::Internal > UCoeff_
Coefficient for carrier phase U equation.
void updateMesh()
Update mesh.
IOdictionary outputProperties_
Dictionary of output properties.
scalar linearKineticEnergyOfSystem() const
Total linear kinetic energy in the system.
const volScalarField & mu() const
Return carrier gas dynamic viscosity.
autoPtr< StochasticCollisionModel< KinematicCloud< CloudType > > > stochasticCollisionModel_
Stochastic collision model.
virtual void writeObjects(objectRegistry &obr) const
Write particle fields as objects into the obr registry.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Base class for packing models.
Templated patch interaction model class.
Templated stochastic collision model class.
Templated wall surface film model class.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Stores all relevant solution info for cloud.
A cloud is a registry collection of lagrangian particles.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Class used to pass data into container.
Mesh data needed to do the Finite Volume discretisation.
Base for a set of schemes which integrate simple ODEs which arise from semi-implcit rate expressions.
Virtual abstract base class for templated KinematicCloud.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Registry of regIOobjects.
A patch is a list of labels that address the faces in the global face list.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.