36 template<
class CloudType>
43 this->subModelProperties(),
51 this->subModelProperties(),
59 this->subModelProperties(),
66 template<
class CloudType>
69 CloudType::cloudReset(
c);
71 packingModel_.reset(
c.packingModel_.ptr());
72 dampingModel_.reset(
c.dampingModel_.ptr());
73 isotropyModel_.reset(
c.isotropyModel_.ptr());
79 template<
class CloudType>
91 packingModel_(nullptr),
92 dampingModel_(nullptr),
93 isotropyModel_(nullptr)
98 <<
"MPPIC modelling not available for steady state calculations"
112 template<
class CloudType>
127 template<
class CloudType>
135 packingModel_(
c.packingModel_->
clone()),
136 dampingModel_(
c.dampingModel_->
clone()),
137 isotropyModel_(
c.isotropyModel_->
clone())
141 template<
class CloudType>
150 packingModel_(nullptr),
151 dampingModel_(nullptr),
152 isotropyModel_(nullptr)
158 template<
class CloudType>
165 template<
class CloudType>
178 template<
class CloudType>
181 cloudReset(cloudCopyPtr_());
183 cloudCopyPtr_.clear();
187 template<
class CloudType>
192 typename parcelType::trackingData td(*
this);
194 this->
solve(*
this, td);
199 template<
class CloudType>
200 template<
class TrackCloudType>
203 TrackCloudType&
cloud,
204 typename parcelType::trackingData& td
225 predictorCloud.CloudType::move(predictorCloud, td);
228 const scalar trackTime = td.trackTime();
229 td.updateAverages(predictorCloud);
240 predictorCloud.
packingModel().velocityCorrection(iter(), trackTime)
241 + predictorCloud.
dampingModel().velocityCorrection(iter(), trackTime);
245 UCorr[
id.second()] = dU;
249 UCorrProc[
id.first()].
append(dU);
266 os << UCorrProc[proci] << IDProc[proci];
277 is >> UCorrProc[proci] >> IDProc[proci];
284 forAll(UCorrProc[proci], i)
286 UCorr[IDProc[proci][i]] = UCorrProc[proci][i];
293 iter().U() += UCorr[iter().id().second()];
300 td.updateAverages(
cloud);
301 isotropyModel_->calculate();
304 this->updateCellOccupancy();
308 template<
class CloudType>
315 const scalar alphaMin =
gMin(
alpha().primitiveField());
318 Info<<
" Min cell volume fraction = " << alphaMin <<
endl;
345 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
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...
Base class for clouds. Provides a basic evolution algorithm, models, and a database for caching deriv...
Base-class for fluid thermodynamic properties.
Mesh data needed to do the Finite Volume discretisation.
void deleteLostParticles()
Remove lost particles from cloud and delete.
void move(TrackCloudType &cloud, typename ParticleType::trackingData &td)
Move the particles.
Selector class for relaxation factors, solver type and solution.
A class for managing temporary objects.
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#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))
const dimensionedScalar mu
Atomic mass unit.
const dimensionedScalar c
Speed of light in a vacuum.
Type gMin(const UList< Type > &f, const label comm)
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.
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 gMax(const UList< Type > &f, const label comm)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)
SolverPerformance< Type > solve(fvMatrix< Type > &, const word &)
Solve returning the solution statistics given convergence tolerance.
const word cloudName(propsDict.lookup("cloudName"))