35 template<
class CloudType>
42 this->subModelProperties(),
50 this->subModelProperties(),
58 this->subModelProperties(),
67 template<
class CloudType>
70 const word& cloudName,
78 CloudType(cloudName, rho, U, mu, g,
false),
79 packingModel_(
nullptr),
80 dampingModel_(
nullptr),
81 isotropyModel_(
nullptr)
86 <<
"MPPIC modelling not available for steady state calculations" 95 this->deleteLostParticles();
100 template<
class CloudType>
103 const word& cloudName,
108 const bool readFields
115 template<
class CloudType>
129 template<
class CloudType>
138 packingModel_(
nullptr),
139 dampingModel_(
nullptr),
140 isotropyModel_(
nullptr)
146 template<
class CloudType>
153 template<
class CloudType>
166 template<
class CloudType>
169 this->cloudReset(cloudCopyPtr_());
170 cloudCopyPtr_.clear();
174 template<
class CloudType>
179 typename parcelType::trackingData td(*
this);
181 this->
solve(*
this, td);
186 template<
class CloudType>
187 template<
class TrackCloudType>
190 TrackCloudType& cloud,
191 typename parcelType::trackingData& td
198 td.part() = parcelType::trackingData::tpPredictTrack;
199 CloudType::move(cloud, td, this->db().time().deltaTValue());
206 this->forces().setCalcNonCoupled(
false);
207 this->forces().setCalcCoupled(
false);
215 if (this->
mesh().moving())
218 <<
"MPPIC damping modelling does not support moving meshes." 223 td.updateAverages(cloud);
226 dampingModel_->cacheFields(
true);
229 td.part() = parcelType::trackingData::tpDampingNoTrack;
230 CloudType::move(cloud, td, this->db().time().deltaTValue());
233 td.part() = parcelType::trackingData::tpCorrectTrack;
234 CloudType::move(cloud, td, this->db().time().deltaTValue());
237 dampingModel_->cacheFields(
false);
246 if (this->
mesh().moving())
249 <<
"MPPIC packing modelling does not support moving meshes." 254 td.updateAverages(cloud);
255 packingModel_->cacheFields(
true);
256 td.part() = parcelType::trackingData::tpPackingNoTrack;
257 CloudType::move(cloud, td, this->db().time().deltaTValue());
258 td.part() = parcelType::trackingData::tpCorrectTrack;
259 CloudType::move(cloud, td, this->db().time().deltaTValue());
260 packingModel_->cacheFields(
false);
270 td.updateAverages(cloud);
273 isotropyModel_->calculate();
281 this->updateCellOccupancy();
284 this->forces().setCalcNonCoupled(
true);
285 this->forces().setCalcCoupled(this->
solution().coupled());
289 template<
class CloudType>
296 const scalar alphaMin =
gMin(
alpha().primitiveField());
299 Info<<
" Min cell volume fraction = " << alphaMin <<
endl;
300 Info<<
" Max cell volume fraction = " << alphaMax <<
endl;
302 if (alphaMax < small)
315 const scalar nPack = n*alphaMax/
alpha()[celli];
326 Info<<
" Min dense number of parcels = " << nMin <<
endl;
virtual ~MPPICCloud()
Destructor.
#define forAll(list, i)
Loop across all elements in list.
virtual tmp< volScalarField > mu() const =0
Dynamic viscosity of mixture [kg/m/s].
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
DSMCCloud< dsmcParcel > CloudType
errorManipArg< error, int > exit(error &err, const int errNo=1)
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.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Type gMin(const FieldField< Field, Type > &f)
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
void storeState()
Store the current cloud state.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Base class for packing models.
autoPtr< DampingModel< MPPICCloud< CloudType > > > dampingModel_
Damping model.
void motion(TrackCloudType &cloud, typename parcelType::trackingData &td)
Particle motion.
dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax"))
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
autoPtr< IsotropyModel< MPPICCloud< CloudType > > > isotropyModel_
Exchange model.
A class for handling words, derived from string.
Base-class for fluid thermodynamic properties.
bool isType(const Type &t)
Check the typeid.
MPPICCloud(const word &cloudName, const volScalarField &rho, const volVectorField &U, const volScalarField &mu, const dimensionedVector &g, const bool readFields=true)
Construct given carrier fields.
Type gMax(const FieldField< Field, Type > &f)
Adds MPPIC modelling to clouds.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
word name(const complex &)
Return a string representation of a complex.
Base class for collisional return-to-isotropy models.
const List< DynamicList< molecule * > > & cellOccupancy
void setModels()
Set cloud sub-models.
Mesh data needed to do the Finite Volume discretisation.
Selector class for relaxation factors, solver type and solution.
void evolve()
Evolve the cloud.
A class for managing temporary objects.
const dimensionedVector & g
Base class for collisional damping models.
autoPtr< PackingModel< MPPICCloud< CloudType > > > packingModel_
Packing model.
void restoreState()
Reset the current cloud to the previously stored state.