34 template<
class CloudType>
41 this->subModelProperties(),
48 template<
class CloudType>
49 template<
class TrackCloudType>
52 TrackCloudType&
cloud,
53 typename parcelType::trackingData&
td,
57 td.part() = parcelType::trackingData::tpVelocityHalfStep;
58 CloudType::move(
cloud,
td, deltaT);
60 td.part() = parcelType::trackingData::tpLinearTrack;
61 CloudType::move(
cloud,
td, deltaT);
66 this->updateCellOccupancy();
68 this->collision().collide();
70 td.part() = parcelType::trackingData::tpVelocityHalfStep;
71 CloudType::move(
cloud,
td, deltaT);
76 template<
class CloudType>
79 CloudType::cloudReset(
c);
81 collisionModel_.reset(
c.collisionModel_.ptr());
87 template<
class CloudType>
99 constProps_(this->particleProperties()),
100 collisionModel_(nullptr)
109 this->deleteLostParticles();
119 <<
"Collision modelling not currently available " 126 template<
class CloudType>
129 CollidingCloud<CloudType>&
c,
134 collisionModel_(
c.collisionModel_->clone())
138 template<
class CloudType>
147 collisionModel_(nullptr)
153 template<
class CloudType>
160 template<
class CloudType>
167 clone(this->
name() +
"Copy").ptr()
173 template<
class CloudType>
176 cloudReset(cloudCopyPtr_());
177 cloudCopyPtr_.clear();
181 template<
class CloudType>
186 typename parcelType::trackingData
td(*
this);
188 this->
solve(*
this, td);
193 template<
class CloudType>
194 template<
class TrackCloudType>
197 TrackCloudType& cloud,
198 typename parcelType::trackingData&
td 207 label nSubCycles = collision().nSubCycles();
211 Log_<<
" " << nSubCycles <<
" move-collide subCycles" <<
endl;
213 subCycleTime moveCollideSubCycle
215 const_cast<Time&>(this->db().time()),
219 while(!(++moveCollideSubCycle).
end())
221 moveCollide(cloud,
td, this->db().time().deltaTValue());
224 moveCollideSubCycle.endSubCycle();
228 moveCollide(
cloud,
td, this->db().time().deltaTValue());
233 template<
class CloudType>
238 scalar rotationalKineticEnergy = rotationalKineticEnergyOfSystem();
239 reduce(rotationalKineticEnergy, sumOp<scalar>());
241 Log_<<
" Rotational kinetic energy = " 242 << rotationalKineticEnergy <<
nl;
void cloudReset(CollidingCloud< CloudType > &c)
Reset state of cloud.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void evolve()
Evolve the cloud.
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
#define Log_
Report write to Foam::Info if the class log switch is true.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const NameMatchPredicate &selectedFields, DynamicList< regIOobject *> &storedObjects)
Read the selected GeometricFields of the templated type and store on the objectRegistry.
const word cloudName(propsDict.get< word >("cloud"))
A class for handling words, derived from Foam::string.
void motion(TrackCloudType &cloud, typename parcelType::trackingData &td)
Particle motion.
void moveCollide(TrackCloudType &cloud, typename parcelType::trackingData &td, const scalar deltaT)
Move-collide particles.
A cloud is a registry collection of lagrangian particles.
bool isType(const U &obj)
Check if typeid of the object and Type are identical.
Templated collision model class.
Adds coolisions to kinematic clouds.
const uniformDimensionedVectorField & g
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
Place holder for 'none' option.
const dimensionedScalar mu
Atomic mass unit.
void restoreState()
Reset the current cloud to the previously stored state.
void info()
Print cloud information.
Mesh data needed to do the Finite Volume discretisation.
const dimensionedScalar c
Speed of light in a vacuum.
Selector class for relaxation factors, solver type and solution.
void setModels()
Set cloud sub-models.
virtual ~CollidingCloud()
Destructor.
Templated base class for dsmc cloud.
void storeState()
Store the current cloud state.
void reduce(T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce) using linear/tree communication schedule.