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>
148 clone(this->
name() +
"Copy").ptr()
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::tpLinearTrack;
187 CloudType::move(cloud, td, this->db().time().deltaTValue());
194 this->forces().setCalcNonCoupled(
false);
195 this->forces().setCalcCoupled(
false);
201 if (dampingModel_->active())
204 td.updateAverages(cloud);
207 dampingModel_->cacheFields(
true);
210 td.part() = parcelType::trackingData::tpDampingNoTrack;
211 CloudType::move(cloud, td, this->db().time().deltaTValue());
214 td.part() = parcelType::trackingData::tpCorrectTrack;
215 CloudType::move(cloud, td, this->db().time().deltaTValue());
218 dampingModel_->cacheFields(
false);
225 if (packingModel_->active())
228 td.updateAverages(cloud);
229 packingModel_->cacheFields(
true);
230 td.part() = parcelType::trackingData::tpPackingNoTrack;
231 CloudType::move(cloud, td, this->db().time().deltaTValue());
232 td.part() = parcelType::trackingData::tpCorrectTrack;
233 CloudType::move(cloud, td, this->db().time().deltaTValue());
234 packingModel_->cacheFields(
false);
241 if (isotropyModel_->active())
244 td.updateAverages(cloud);
247 isotropyModel_->calculate();
255 this->updateCellOccupancy();
258 this->forces().setCalcNonCoupled(
true);
259 this->forces().setCalcCoupled(this->
solution().coupled());
263 template<
class CloudType>
270 const scalar alphaMin =
gMin(
alpha().primitiveField());
273 Info<<
" Min cell volume fraction = " << alphaMin <<
endl;
274 Info<<
" Max cell volume fraction = " << alphaMax <<
endl;
276 if (alphaMax < small)
289 const scalar nPack = n*alphaMax/
alpha()[celli];
300 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.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
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.
A class for managing temporary objects.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Base class for collisional damping models.
autoPtr< PackingModel< MPPICCloud< CloudType > > > packingModel_
Packing model.
void restoreState()
Reset the current cloud to the previously stored state.