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::template
168 TrackingData<MPPICCloud<CloudType>> td(*
this);
175 template<
class CloudType>
176 template<
class TrackData>
183 td.part() = TrackData::tpLinearTrack;
184 CloudType::move(td, this->db().time().deltaTValue());
191 this->forces().setCalcNonCoupled(
false);
192 this->forces().setCalcCoupled(
false);
198 if (dampingModel_->active())
201 td.updateAverages(*
this);
204 dampingModel_->cacheFields(
true);
207 td.part() = TrackData::tpDampingNoTrack;
208 CloudType::move(td, this->db().time().deltaTValue());
211 td.part() = TrackData::tpCorrectTrack;
212 CloudType::move(td, this->db().time().deltaTValue());
215 dampingModel_->cacheFields(
false);
222 if (packingModel_->active())
225 td.updateAverages(*
this);
226 packingModel_->cacheFields(
true);
227 td.part() = TrackData::tpPackingNoTrack;
228 CloudType::move(td, this->db().time().deltaTValue());
229 td.part() = TrackData::tpCorrectTrack;
230 CloudType::move(td, this->db().time().deltaTValue());
231 packingModel_->cacheFields(
false);
238 if (isotropyModel_->active())
241 td.updateAverages(*
this);
244 isotropyModel_->calculate();
252 this->updateCellOccupancy();
255 this->forces().setCalcNonCoupled(
true);
256 this->forces().setCalcCoupled(this->
solution().coupled());
260 template<
class CloudType>
267 const scalar alphaMin =
gMin(
alpha().primitiveField());
270 Info<<
" Min cell volume fraction = " << alphaMin <<
endl;
271 Info<<
" Max cell volume fraction = " << alphaMax <<
endl;
273 if (alphaMax < SMALL)
286 const scalar nPack = n*alphaMax/
alpha()[celli];
297 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.
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.
void motion(TrackData &td)
Particle motion.
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.