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" 97 this->deleteLostParticles();
103 template<
class CloudType>
117 template<
class CloudType>
126 packingModel_(
nullptr),
127 dampingModel_(
nullptr),
128 isotropyModel_(
nullptr)
134 template<
class CloudType>
141 template<
class CloudType>
154 template<
class CloudType>
157 this->cloudReset(cloudCopyPtr_());
158 cloudCopyPtr_.clear();
162 template<
class CloudType>
167 typename parcelType::trackingData td(*
this);
169 this->
solve(*
this, td);
174 template<
class CloudType>
175 template<
class TrackCloudType>
178 TrackCloudType& cloud,
179 typename parcelType::trackingData& td
186 td.part() = parcelType::trackingData::tpPredictTrack;
187 CloudType::move(cloud, td, this->db().time().deltaTValue());
194 this->forces().setCalcNonCoupled(
false);
195 this->forces().setCalcCoupled(
false);
201 if (dampingModel_->active())
203 if (this->
mesh().moving())
206 <<
"MPPIC damping modelling does not support moving meshes." 211 td.updateAverages(cloud);
214 dampingModel_->cacheFields(
true);
217 td.part() = parcelType::trackingData::tpDampingNoTrack;
218 CloudType::move(cloud, td, this->db().time().deltaTValue());
221 td.part() = parcelType::trackingData::tpCorrectTrack;
222 CloudType::move(cloud, td, this->db().time().deltaTValue());
225 dampingModel_->cacheFields(
false);
232 if (packingModel_->active())
234 if (this->
mesh().moving())
237 <<
"MPPIC packing modelling does not support moving meshes." 242 td.updateAverages(cloud);
243 packingModel_->cacheFields(
true);
244 td.part() = parcelType::trackingData::tpPackingNoTrack;
245 CloudType::move(cloud, td, this->db().time().deltaTValue());
246 td.part() = parcelType::trackingData::tpCorrectTrack;
247 CloudType::move(cloud, td, this->db().time().deltaTValue());
248 packingModel_->cacheFields(
false);
255 if (isotropyModel_->active())
258 td.updateAverages(cloud);
261 isotropyModel_->calculate();
269 this->updateCellOccupancy();
272 this->forces().setCalcNonCoupled(
true);
273 this->forces().setCalcCoupled(this->
solution().coupled());
277 template<
class CloudType>
284 const scalar alphaMin =
gMin(
alpha().primitiveField());
287 Info<<
" Min cell volume fraction = " << alphaMin <<
endl;
288 Info<<
" Max cell volume fraction = " << alphaMax <<
endl;
290 if (alphaMax < small)
303 const scalar nPack = n*alphaMax/
alpha()[celli];
314 Info<<
" Min dense number of parcels = " << nMin <<
endl;
virtual ~MPPICCloud()
Destructor.
#define forAll(list, i)
Loop across all elements in list.
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)
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.
MPPICCloud(const word &cloudName, const volScalarField &rho, const volVectorField &U, const volScalarField &mu, const dimensionedVector &g, bool readFields=true)
Construct given carrier gas fields.
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.
Type gMax(const FieldField< Field, Type > &f)
Adds MPPIC modelling to kinematic 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.
dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax"))
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.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
A class for managing temporary objects.
Base class for collisional damping models.
autoPtr< PackingModel< MPPICCloud< CloudType > > > packingModel_
Packing model.
void restoreState()
Reset the current cloud to the previously stored state.