51 #ifndef MomentumCloud_H
52 #define MomentumCloud_H
76 class integrationScheme;
78 template<
class CloudType>
79 class InjectionModelList;
81 template<
class CloudType>
82 class DispersionModel;
84 template<
class CloudType>
85 class PatchInteractionModel;
87 template<
class CloudType>
88 class SurfaceFilmModel;
90 template<
class CloudType>
91 class StochasticCollisionModel;
105 template<
class CloudType>
109 public MomentumCloudName
154 typename parcelType::constantProperties
constProps_;
248 template<
class TrackCloudType>
251 TrackCloudType&
cloud,
252 typename parcelType::trackingData& td
362 inline const typename parcelType::constantProperties&
366 inline typename parcelType::constantProperties&
constProps();
518 inline scalar
Dmin()
const;
521 inline scalar
Dmax()
const;
557 const label injectori
599 template<
class TrackCloudType>
602 TrackCloudType&
cloud,
603 typename parcelType::trackingData& td
List of cloud function objects.
Templated base class for dsmc cloud.
const word & cloudName() const
Return the cloud type.
const fvMesh & mesh() const
Return references to the mesh.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
autoPtr< IOobject > clone() const
Clone.
const word & name() const
Return name.
List of injection models.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Templated base class for momentum cloud.
volScalarField::Internal & UCoeffRef()
Access coefficient for carrier phase U equation.
const parcelType::constantProperties & constProps() const
Return the constant properties.
const dictionary & subModelProperties() const
Return reference to the sub-models dictionary.
void postEvolve()
Post-evolve.
functionType & functions()
Optional cloud function objects.
cloudSolution solution_
Solution properties.
const InjectionModelList< MomentumCloud< CloudType > > & injectors() const
Return const access to the injection model.
autoPtr< volVectorField::Internal > UTrans_
Momentum.
void setModels()
Set cloud sub-models.
scalar massInSystem() const
Total mass in system.
const DispersionModel< MomentumCloud< CloudType > > & dispersion() const
Return const-access to the dispersion model.
scalar rotationalKineticEnergyOfSystem() const
Total rotational kinetic energy in the system.
const PatchInteractionModel< MomentumCloud< CloudType > > & patchInteraction() const
Return const-access to the patch interaction model.
void operator=(const MomentumCloud &)=delete
Disallow default bitwise assignment.
void motion(TrackCloudType &cloud, typename parcelType::trackingData &td)
Particle motion.
forceType forces_
Optional particle forces.
virtual ~MomentumCloud()
Destructor.
void scale(DimensionedField< Type, volMesh > &field, const word &name) const
Scale field.
void storeState()
Store the current cloud state.
MomentumCloud< CloudType > momentumCloudType
Convenience typedef for this cloud type.
const tmp< volScalarField > alpha() const
Return the particle volume fraction field.
bool cpuLoad() const
Return true to cache per-cell CPU load.
void patchData(const parcelType &p, const polyPatch &pp, vector &normal, vector &Up) const
Calculate the patch normal and velocity to interact with,.
CloudFunctionObjectList< MomentumCloud< CloudType > > functionType
Function object type.
const scalarField & cellLengthScale() const
Return the cell length scale.
autoPtr< SurfaceFilmModel< MomentumCloud< CloudType > > > filmModel_
Optional film model.
scalar pAmbient_
Averaged ambient domain pressure.
scalarField cellLengthScale_
Cell length scale.
tmp< volVectorField::Internal > UTrans() const
Return momentum source.
InjectionModelList< MomentumCloud< CloudType > > injectors_
Injector models.
autoPtr< integrationScheme > UIntegrator_
Velocity integration.
vector linearMomentumOfSystem() const
Total linear momentum of the system.
ParticleForceList< MomentumCloud< CloudType > > forceType
Force models type.
const volVectorField & U() const
Return carrier gas velocity.
scalar pAmbient() const
Return const-access to the ambient pressure.
virtual autoPtr< Cloud< parcelType > > cloneBare(const word &name) const
Construct and return bare clone based on (this) with new name.
const SurfaceFilmModel< MomentumCloud< CloudType > > & surfaceFilm() const
Return const-access to the surface film model.
void relax(DimensionedField< Type, volMesh > &field, const DimensionedField< Type, volMesh > &field0, const word &name) const
Relax field.
const volScalarField & rho() const
Return carrier gas density.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
void scaleSources()
Apply scaling to (transient) cloud sources.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
MomentumCloud(const word &cloudName, const volScalarField &rho, const volVectorField &U, const volScalarField &mu, const dimensionedVector &g, const bool readFields=true)
Construct given carrier fields.
distributions::standardNormal & stdNormal() const
Return reference to the standard normal distribution.
const volVectorField & U_
Velocity [m/s].
const integrationScheme & UIntegrator() const
Return reference to velocity integration.
tmp< volScalarField::Internal > UCoeff() const
Return coefficient for carrier phase U equation.
List< DynamicList< parcelType * > > & cellOccupancy()
Return the cell occupancy information for each.
const volScalarField & mu_
Dynamic viscosity [Pa.s].
label nParcels() const
Total number of parcels.
const dimensionedVector & g_
Gravity.
timeIOdictionary outputProperties_
Dictionary of output properties.
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.
scalar Dmin() const
Min diameter.
const dictionary subModelProperties_
Sub-models dictionary.
const tmp< volScalarField > vDotSweep() const
Volume swept rate of parcels per cell.
CloudType cloudType
Type of cloud this cloud was instantiated for.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
const StochasticCollisionModel< MomentumCloud< CloudType > > & stochasticCollision() const
Return const-access to the stochastic collision model.
autoPtr< DispersionModel< MomentumCloud< CloudType > > > dispersionModel_
Dispersion model.
void evolve()
Evolve the cloud.
volVectorField::Internal & UTransRef()
Access momentum source.
functionType functions_
Optional cloud function objects.
const forceType & forces() const
Optional particle forces.
parcelType::constantProperties constProps_
Parcel constant properties.
const MomentumCloud & cloudCopy() const
Return a reference to the cloud copy.
scalar Dmax() const
Max diameter.
const tmp< volScalarField > Y() const
Return the particle mass fraction field.
bool cpuLoad_
Switch to enable per-cell CPU load caching for load-balancing.
autoPtr< PatchInteractionModel< MomentumCloud< CloudType > > > patchInteractionModel_
Patch interaction model.
autoPtr< List< DynamicList< parcelType * > > > cellOccupancyPtr_
Cell occupancy information for each parcel, (demand driven)
distributions::standardNormal stdNormal_
Standard normal distribution.
const volScalarField & rho_
Density [kg/m^3].
scalar Dij(const label i, const label j) const
Mean diameter Dij.
IOdictionary particleProperties_
Dictionary of particle properties.
void cloudReset(MomentumCloud< CloudType > &c)
Reset state of cloud.
const IOdictionary & particleProperties() const
Return particle properties dictionary.
void info()
Print cloud information.
void restoreState()
Reset the current cloud to the previously stored state.
const dimensionedVector & g() const
Gravity.
void checkParcelProperties(parcelType &parcel, const label injectori)
Check parcel properties.
void preEvolve()
Pre-evolve.
void resetSourceTerms()
Reset the cloud source terms.
tmp< fvVectorMatrix > SU(const volVectorField &U) const
Return tmp momentum source term.
const IOdictionary & outputProperties() const
Return output properties dictionary.
void buildCellOccupancy()
Build the cellOccupancy.
autoPtr< volScalarField::Internal > UCoeff_
Coefficient for carrier phase U equation.
randomGenerator rndGen_
Random number generator - used by some injection routines.
scalar linearKineticEnergyOfSystem() const
Total linear kinetic energy in the system.
randomGenerator & rndGen() const
Return reference to the random generator.
autoPtr< StochasticCollisionModel< MomentumCloud< CloudType > > > stochasticCollisionModel_
Stochastic collision model.
void setParcelThermoProperties(parcelType &parcel)
Set parcel thermo properties.
void relaxSources(const MomentumCloud< CloudType > &cloudOldTime)
Apply relaxation to (steady state) cloud sources.
const volScalarField & mu() const
Return carrier gas dynamic viscosity.
void solve(TrackCloudType &cloud, typename parcelType::trackingData &td)
Solve the cloud - calls all evolution functions.
Templated patch interaction model class.
Templated stochastic collision model class.
Templated wall surface film model class.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Stores all relevant solution info for cloud.
A cloud is a collection of lagrangian particles.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Standard normal distribution. Not selectable.
Base-class for fluid thermodynamic properties.
Mesh data needed to do the Finite Volume discretisation.
Base for a set of schemes which integrate simple ODEs which arise from semi-implicit rate expressions...
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
A patch is a list of labels that address the faces in the global face list.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
timeIOdictionary derived from IOdictionary with globalFile set false to enable writing to processor t...
A class for managing temporary objects.
A class for handling words, derived from string.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
const dimensionedScalar c
Speed of light in a vacuum.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const HashSet< word > &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the specified type.
TemplateName(FvFaceCellWave)