35 template<
class CloudType>
42 this->subModelProperties(),
50 this->subModelProperties(),
58 this->subModelProperties(),
65 template<
class CloudType>
68 CloudType::cloudReset(
c);
70 packingModel_.reset(
c.packingModel_.ptr());
71 dampingModel_.reset(
c.dampingModel_.ptr());
72 isotropyModel_.reset(
c.isotropyModel_.ptr());
78 template<
class CloudType>
90 packingModel_(nullptr),
91 dampingModel_(nullptr),
92 isotropyModel_(nullptr)
97 <<
"MPPIC modelling not available for steady state calculations"
111 template<
class CloudType>
126 template<
class CloudType>
134 packingModel_(
c.packingModel_->
clone()),
135 dampingModel_(
c.dampingModel_->
clone()),
136 isotropyModel_(
c.isotropyModel_->
clone())
140 template<
class CloudType>
149 packingModel_(nullptr),
150 dampingModel_(nullptr),
151 isotropyModel_(nullptr)
157 template<
class CloudType>
164 template<
class CloudType>
177 template<
class CloudType>
180 cloudReset(cloudCopyPtr_());
182 cloudCopyPtr_.clear();
186 template<
class CloudType>
191 typename parcelType::trackingData td(*
this);
193 this->
solve(*
this, td);
198 template<
class CloudType>
199 template<
class TrackCloudType>
202 TrackCloudType&
cloud,
203 typename parcelType::trackingData& td
224 predictorCloud.CloudType::move(predictorCloud, td);
227 const scalar trackTime = td.trackTime();
228 td.updateAverages(predictorCloud);
239 predictorCloud.
packingModel().velocityCorrection(iter(), trackTime)
240 + predictorCloud.
dampingModel().velocityCorrection(iter(), trackTime);
244 UCorr[
id.second()] = dU;
248 UCorrProc[
id.first()].
append(dU);
265 os << UCorrProc[proci] << IDProc[proci];
276 is >> UCorrProc[proci] >> IDProc[proci];
283 forAll(UCorrProc[proci], i)
285 UCorr[IDProc[proci][i]] = UCorrProc[proci][i];
292 iter().U() += UCorr[iter().id().second()];
299 td.updateAverages(
cloud);
300 isotropyModel_->calculate();
303 this->updateCellOccupancy();
307 template<
class CloudType>
314 const scalar alphaMin =
gMin(
alpha().primitiveField());
317 Info<<
" Min cell volume fraction = " << alphaMin <<
endl;
344 Info<<
" Min dense number of parcels = " << nMin <<
endl;
#define forAll(list, i)
Loop across all elements in list.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
const List< DynamicList< molecule * > > & cellOccupancy
void deleteLostParticles()
Remove lost particles from cloud and delete.
void move(TrackCloudType &cloud, typename ParticleType::trackingData &td)
Move the particles.
Templated base class for dsmc cloud.
void info() const
Print cloud information.
Base class for collisional damping models.
Generic GeometricField class.
Base class for collisional return-to-isotropy models.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void append(const T &)
Append an element at the end of the list.
Adds MPPIC modelling to clouds.
const DampingModel< MPPICCloud< CloudType > > & dampingModel() const
Return condt access to the damping model.
void setModels()
Set cloud sub-models.
void motion(TrackCloudType &cloud, typename parcelType::trackingData &td)
Particle motion.
void storeState()
Store the current cloud state.
virtual ~MPPICCloud()
Destructor.
void evolve()
Evolve the cloud.
void restoreState()
Reset the current cloud to the previously stored state.
void cloudReset(MPPICCloud< CloudType > &c)
Reset state of cloud.
MPPICCloud(const word &cloudName, const volScalarField &rho, const volVectorField &U, const volScalarField &mu, const dimensionedVector &g, const bool readFields=true)
Construct given carrier fields.
const PackingModel< MPPICCloud< CloudType > > & packingModel() const
Return const access to the packing model.
Base class for packing models.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
void finishedSends(const bool block=true)
Mark all sends as having been done. This will start receives.
Input inter-processor communications stream operating on external buffer.
Output inter-processor communications stream operating on external buffer.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static bool & parRun()
Is this a parallel run?
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A cloud is a collection of lagrangian particles.
Base-class for fluid thermodynamic properties.
Mesh data needed to do the Finite Volume discretisation.
Selector class for relaxation factors, solver type and solution.
A class for managing temporary objects.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedScalar alphaMax(viscosity->lookup("alphaMax"))
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
const dimensionedScalar mu
Atomic mass unit.
const dimensionedScalar c
Speed of light in a vacuum.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Pair< label > labelPair
Label pair.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
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.
labelList second(const UList< labelPair > &p)
labelList first(const UList< labelPair > &p)
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
Type gMin(const FieldField< Field, Type > &f)
Type gMax(const FieldField< Field, Type > &f)
SolverPerformance< Type > solve(fvMatrix< Type > &, const word &)
Solve returning the solution statistics given convergence tolerance.
const word cloudName(propsDict.lookup("cloudName"))