57 #ifndef KinematicCloud_H 58 #define KinematicCloud_H 83 template<
class CloudType>
86 template<
class CloudType>
89 template<
class CloudType>
92 template<
class CloudType>
95 template<
class CloudType>
98 template<
class CloudType>
101 template<
class CloudType>
104 template<
class CloudType>
112 template<
class CloudType>
173 typename parcelType::constantProperties
constProps_;
277 template<
class TrackCloudType>
280 TrackCloudType&
cloud,
281 typename parcelType::trackingData& td
292 template<
class TrackCloudType>
295 TrackCloudType&
cloud,
296 typename parcelType::trackingData& td
300 void postEvolve(
const typename parcelType::trackingData& td);
370 inline const KinematicCloud&
cloudCopy()
const;
376 inline const fvMesh&
mesh()
const;
388 inline const cloudSolution&
solution()
const;
394 inline const typename parcelType::constantProperties&
398 inline typename parcelType::constantProperties&
constProps();
534 const typename parcelType::trackingData& td
565 bool incompressible =
false 593 inline scalar
Dij(
const label i,
const label j)
const;
596 inline scalar
Dmax()
const;
623 const scalar lagrangianDt
630 const scalar lagrangianDt,
631 const bool fullyDescribed
669 const typename parcelType::trackingData& td
676 template<
class TrackCloudType>
679 TrackCloudType&
cloud,
680 typename parcelType::trackingData& td
tmp< fvVectorMatrix > SU(volVectorField &U, bool incompressible=false) const
Return tmp momentum source term (compressible)
virtual label nParcels() const
Return the number of particles in the cloud.
autoPtr< IOobject > clone() const
Clone.
autoPtr< IsotropyModel< KinematicCloud< CloudType > > > isotropyModel_
Exchange model.
const SurfaceFilmModel< KinematicCloud< CloudType > > & surfaceFilm() const
Return const-access to the surface film model.
void scaleSources()
Apply scaling to (transient) cloud sources.
void setModels()
Set cloud sub-models.
const volVectorField & U_
Velocity [m/s].
void relaxSources(const KinematicCloud< CloudType > &cloudOldTime)
Apply relaxation to (steady state) cloud sources.
const StochasticCollisionModel< KinematicCloud< CloudType > > & stochasticCollision() const
Return const-access to the stochastic collision model.
void storeState()
Store the current cloud state.
scalar totalParticlePerParcel() const
Average particle per parcel.
autoPtr< PatchInteractionModel< KinematicCloud< CloudType > > > patchInteractionModel_
Patch interaction model.
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...
scalar rotationalKineticEnergyOfSystem() const
Total rotational kinetic energy in the system.
const tmp< volScalarField > theta() const
Return the particle volume fraction field.
const word & cloudName() const
Return the cloud type.
InjectionModelList< KinematicCloud< CloudType > > injectors_
Injector models.
scalar Dmax() const
Max diameter.
CloudType::particleType parcelType
Type of parcel the cloud was instantiated for.
const word & name() const noexcept
Return the object name.
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...
const KinematicCloud & cloudCopy() const
Return a reference to the cloud copy.
void evolveCloud(TrackCloudType &cloud, typename parcelType::trackingData &td)
Evolve the cloud.
const volScalarField & rho() const
Return carrier gas density.
autoPtr< volVectorField::Internal > UTrans_
Momentum.
const fvMesh & mesh() const
Return reference to the mesh.
void setParcelThermoProperties(parcelType &parcel, const scalar lagrangianDt)
Set parcel thermo properties.
void postEvolve(const typename parcelType::trackingData &td)
Post-evolve.
void relax(DimensionedField< Type, volMesh > &field, const DimensionedField< Type, volMesh > &field0, const word &name) const
Relax field.
volVectorField::Internal & UTrans()
Return reference to momentum source.
Base class for packing models.
CloudFunctionObjectList< KinematicCloud< CloudType > > functionType
Function object type.
virtual void writeObjects(objectRegistry &obr) const
Write particle fields as objects into the obr registry.
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.
autoPtr< DampingModel< KinematicCloud< CloudType > > > dampingModel_
Damping model.
List< DynamicList< parcelType * > > & cellOccupancy()
Return the cell occupancy information for each.
autoPtr< SurfaceFilmModel< KinematicCloud< CloudType > > > surfaceFilmModel_
Surface film model.
Random rndGen_
Random number generator - used by some injection routines.
virtual label nParcels() const
Total number of parcels.
void updateCellOccupancy()
Update (i.e. build) the cellOccupancy if it has.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
void buildCellOccupancy()
Build the cellOccupancy.
const parcelType::constantProperties & constProps() const
Return the constant properties.
const volScalarField & rho_
Density [kg/m3].
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...
autoPtr< PackingModel< KinematicCloud< CloudType > > > packingModel_
Packing model.
const forceType & forces() const
Optional particle forces.
void updateMesh()
Update mesh.
const volScalarField & mu_
Dynamic viscosity [Pa.s].
bool log
Flag to write log into Info.
volScalarField::Internal & rhokTrans()
Return reference to mass for kinematic source.
virtual ~KinematicCloud()=default
Destructor.
volScalarField::Internal & UCoeff()
Return coefficient for carrier phase U equation.
void resetSourceTerms()
Reset the cloud source terms.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const NameMatchPredicate &selectedFields, DynamicList< regIOobject *> &storedObjects)
Read the selected GeometricFields of the templated type and store on the objectRegistry.
CloudType cloudType
Type of cloud this cloud was instantiated for.
A class for handling words, derived from Foam::string.
const PackingModel< KinematicCloud< CloudType > > & packingModel() const
Return const access to the packing model.
void motion(TrackCloudType &cloud, typename parcelType::trackingData &td)
Particle motion.
A cloud is a registry collection of lagrangian particles.
virtual void readObjects(const objectRegistry &obr)
Read particle fields from objects in the obr registry.
tmp< volScalarField::Internal > Srhok() const
Return tmp mass source for kinematic.
scalar pAmbient_
Averaged ambient domain pressure.
List of injection models.
parcelType::constantProperties constProps_
Parcel constant properties.
const fvMesh & mesh_
References to the mesh and time databases.
void checkParcelProperties(parcelType &parcel, const scalar lagrangianDt, const bool fullyDescribed)
Check parcel properties.
const dictionary subModelProperties_
Sub-models dictionary.
scalar linearKineticEnergyOfSystem() const
Total linear kinetic energy in the system.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
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.
autoPtr< List< DynamicList< parcelType * > > > cellOccupancyPtr_
Cell occupancy information for each parcel, (demand driven)
Templated wall surface film model class.
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.
Base class for collisional return-to-isotropy models.
const IOdictionary & particleProperties() const
Return particle properties dictionary.
void preEvolve(const typename parcelType::trackingData &td)
Pre-evolve.
Virtual abstract base class for templated KinematicCloud.
cloudSolution solution_
Solution properties.
Templated base class for kinematic cloud.
autoPtr< volScalarField::Internal > rhokTrans_
Mass for kinematic cloud.
void patchData(const parcelType &p, const polyPatch &pp, vector &normal, vector &Up) const
Calculate the patch normal and velocity to interact with,.
Stores all relevant solution info for cloud.
KinematicCloud< CloudType > kinematicCloudType
Convenience typedef for this cloud type.
const integrationScheme & UIntegrator() const
Return reference to velocity integration.
void evolve()
Evolve the cloud.
IOdictionary particleProperties_
Dictionary of particle properties.
autoPtr< volScalarField::Internal > UCoeff_
Coefficient for carrier phase U equation.
Templated stochastic collision model class.
Mesh data needed to do the Finite Volume discretisation.
const dimensionedScalar c
Speed of light in a vacuum.
Base class for dispersion modelling.
void info()
Print cloud information.
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...
forceType forces_
Optional particle forces.
const dimensionedVector & g() const
Gravity.
void restoreState()
Reset the current cloud to the previously stored state.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
const IOdictionary & outputProperties() const
Return output properties dictionary.
const volVectorField & U() const
Return carrier gas velocity.
functionType functions_
Optional cloud function objects.
const PatchInteractionModel< KinematicCloud< CloudType > > & patchInteraction() const
Return const-access to the patch interaction model.
virtual autoPtr< Cloud< parcelType > > cloneBare(const word &name) const
Construct and return bare clone based on (this) with new name.
autoPtr< integrationScheme > UIntegrator_
Velocity integration.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
void scale(DimensionedField< Type, volMesh > &field, const word &name) const
Scale field.
List of cloud function objects.
void cloudReset(KinematicCloud< CloudType > &c)
Reset state of cloud.
A class for managing temporary objects.
Registry of regIOobjects.
virtual void autoMap(const mapPolyMesh &)
Remap the cells of particles corresponding to the.
A patch is a list of labels that address the faces in the global face list.
scalar Dij(const label i, const label j) const
Mean diameter Dij.
autoPtr< DispersionModel< KinematicCloud< CloudType > > > dispersionModel_
Dispersion model.
const volScalarField & mu() const
Return carrier gas dynamic viscosity.
IOdictionary outputProperties_
Dictionary of output properties.
const dimensionedVector & g_
Gravity.
const tmp< volScalarField > alpha() const
Return the particle mass fraction field.
functionType & functions()
Optional cloud function objects.
Templated base class for dsmc cloud.
Base class for collisional damping models.
void solve(TrackCloudType &cloud, typename parcelType::trackingData &td)
Solve the cloud - calls all evolution functions.
Random & rndGen() const
Return reference to the random object.
autoPtr< StochasticCollisionModel< KinematicCloud< CloudType > > > stochasticCollisionModel_
Stochastic collision model.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
const dictionary & subModelProperties() const
Return reference to the sub-models dictionary.
Definition of basic kinematic colliding parcel.
ParticleForceList< KinematicCloud< CloudType > > forceType
Force models type.
scalarField cellLengthScale_
Cell length scale.