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),
86 <<
"MPPIC modelling not available for steady state calculations" 102 template<
class CloudType>
116 template<
class CloudType>
133 template<
class CloudType>
140 template<
class CloudType>
147 clone(this->
name() +
"Copy").ptr()
153 template<
class CloudType>
156 this->cloudReset(cloudCopyPtr_());
157 cloudCopyPtr_.clear();
161 template<
class CloudType>
166 typename parcelType::template
167 TrackingData<MPPICCloud<CloudType>> td(*
this);
174 template<
class CloudType>
175 template<
class TrackData>
182 td.part() = TrackData::tpLinearTrack;
183 CloudType::move(td, this->db().time().deltaTValue());
190 this->forces().setCalcNonCoupled(
false);
191 this->forces().setCalcCoupled(
false);
197 if (dampingModel_->active())
200 td.updateAverages(*
this);
203 dampingModel_->cacheFields(
true);
206 td.part() = TrackData::tpDampingNoTrack;
207 CloudType::move(td, this->db().time().deltaTValue());
210 td.part() = TrackData::tpCorrectTrack;
211 CloudType::move(td, this->db().time().deltaTValue());
214 dampingModel_->cacheFields(
false);
221 if (packingModel_->active())
224 td.updateAverages(*
this);
225 packingModel_->cacheFields(
true);
226 td.part() = TrackData::tpPackingNoTrack;
227 CloudType::move(td, this->db().time().deltaTValue());
228 td.part() = TrackData::tpCorrectTrack;
229 CloudType::move(td, this->db().time().deltaTValue());
230 packingModel_->cacheFields(
false);
237 if (isotropyModel_->active())
240 td.updateAverages(*
this);
243 isotropyModel_->calculate();
251 this->updateCellOccupancy();
254 this->forces().setCalcNonCoupled(
true);
255 this->forces().setCalcCoupled(this->
solution().coupled());
259 template<
class CloudType>
266 const scalar alphaMin =
gMin(
alpha().primitiveField());
269 Info<<
" Min cell volume fraction = " << alphaMin <<
endl;
270 Info<<
" Max cell volume fraction = " << alphaMax <<
endl;
272 if (alphaMax < SMALL)
285 const scalar nPack = n*alphaMax/
alpha()[celli];
296 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)
#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 readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const HashSet< word > &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the specified type.
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.