sphereParticles Class Reference

Class for managing spherical particles. More...

Inheritance diagram for sphereParticles:
Collaboration diagram for sphereParticles:

Public Member Functions

 sphereParticles (systemControl &control, const property &prop)
 construct from systemControl and property More...
 
 sphereParticles (const sphereParticles &)=delete
 no copy constructor More...
 
 sphereParticles (sphereParticles &&)=default
 move constructor More...
 
sphereParticlesoperator= (const sphereParticles &)=delete
 no copy-assignement More...
 
sphereParticlesoperator= (sphereParticles &&)=default
 move-assignement More...
 
virtual ~sphereParticles ()=default
 
bool insertParticles (const realx3Vector &position, const wordVector &shapes, const setFieldList &setField) override
 Insert new particles in position with specified shapes. More...
 
const auto & shapes () const
 const reference to shapes object More...
 
const auto & I () const
 const reference to inertia pointField More...
 
auto & I ()
 reference to inertia pointField More...
 
const realx3Vector_D rVelocity () const
 
const realVector_DboundingSphere () const override
 
word shapeTypeName () const override
 
void boundingSphereMinMax (real &minDiam, real &maxDiam) const override
 
bool update (const eventMessage &msg) override
 
realx3PointField_DrAcceleration () override
 
const realx3PointField_DrAcceleration () const override
 
bool beforeIteration () override
 before iteration step More...
 
bool iterate () override
 iterate particles More...
 
bool afterIteration () override
 after iteration step More...
 
- Public Member Functions inherited from particles
 TypeInfo ("particles")
 
 particles (systemControl &control, const word &integrationMethod)
 
const auto & time () const
 
auto & time ()
 
auto integrationMethod () const
 
const auto & dynPointStruct () const
 
auto & dynPointStruct ()
 
const auto & pStruct () const
 
auto & pStruct ()
 
auto size () const
 
auto capacity () const
 
auto activePointsMaskD () const
 
auto numActive () const
 
bool allActive () const
 
auto activeRange () const
 
auto activePointsMaskH () const
 
const auto & pointPosition () const
 
const auto & position () const
 
const auto & pointVelocity () const
 
const auto & velocity () const
 
const auto & id () const
 
auto & id ()
 
const auto & diameter () const
 
auto & diameter ()
 
const auto & mass () const
 
auto & mass ()
 
const auto & accelertion () const
 
auto & accelertion ()
 
realx3PointField_DcontactForce ()
 
const realx3PointField_DcontactForce () const
 
realx3PointField_DcontactTorque ()
 
const realx3PointField_DcontactTorque () const
 
const auto & propertyId () const
 
auto & propertyId ()
 
const auto & shapeName () const
 
auto & shapName ()
 
- Public Member Functions inherited from eventObserver
 eventObserver ()
 
 eventObserver (const eventSubscriber &subscriber, bool subscribe=true)
 
virtual ~eventObserver ()
 
bool subscribed () const
 
bool subscribe (const eventSubscriber &subscriber)
 
void invalidateSubscriber ()
 
- Public Member Functions inherited from demParticles
 demParticles (systemControl &control)
 
- Public Member Functions inherited from demComponent
 TypeInfo ("demComponent")
 
 demComponent (const word &name, systemControl &control)
 
virtual ~demComponent ()=default
 
const auto & control () const
 
auto & control ()
 
real dt () const
 
real currentTime () const
 
auto & timers ()
 
const auto & timers () const
 

Protected Member Functions

bool diameterMassInertiaPropId (const word &shName, real &diam, real &mass, real &I, int8 &propIdx)
 
bool initializeParticles ()
 
bool insertSphereParticles (const wordVector &names, const int32IndexContainer &indices)
 
virtual uniquePtr< List< eventObserver * > > getFieldObjectList () const override
 
- Protected Member Functions inherited from particles
void zeroForce ()
 
void zeroTorque ()
 

Protected Attributes

const propertyproperty_
 reference to material properties More...
 
sphereShapeshapes_
 reference to shapes More...
 
realPointField_DI_
 pointField of inertial of particles More...
 
realx3PointField_DrVelocity_
 pointField of rotational Velocity of particles on device More...
 
realx3PointField_DrAcceleration_
 pointField of rotational acceleration of particles on device
More...
 
uniquePtr< integrationrVelIntegration_ = nullptr
 rotational velocity integrator More...
 
Timer accelerationTimer_
 timer for acceleration computations More...
 
Timer intPredictTimer_
 timer for integration computations (prediction step) More...
 
Timer intCorrectTimer_
 timer for integration computations (correction step) More...
 
- Protected Attributes inherited from particles
Timetime_
 
const word integrationMethod_
 
dynamicPointStructure dynPointStruct_
 
wordPointFieldshapeName_
 
int32PointField_HDid_
 
int8PointField_DpropertyId_
 
realPointField_Ddiameter_
 
realPointField_Dmass_
 
realx3PointField_Daccelertion_
 
realx3PointField_DcontactForce_
 
realx3PointField_DcontactTorque_
 
particleIdHandler idHandler_
 
- Protected Attributes inherited from eventObserver
const eventSubscribersubscriber_ = nullptr
 
bool subscribed_ = false
 
- Protected Attributes inherited from demComponent
word componentName_
 
systemControlcontrol_
 
Timers timers_
 

Detailed Description

Class for managing spherical particles.

This is a top-level class that contains the essential components for defining spherical prticles in a DEM simulation.

Definition at line 44 of file sphereParticles.hpp.

Constructor & Destructor Documentation

◆ sphereParticles() [1/3]

◆ sphereParticles() [2/3]

sphereParticles ( const sphereParticles )
delete

no copy constructor

◆ sphereParticles() [3/3]

sphereParticles ( sphereParticles &&  )
default

move constructor

◆ ~sphereParticles()

virtual ~sphereParticles ( )
virtualdefault

Member Function Documentation

◆ diameterMassInertiaPropId()

bool diameterMassInertiaPropId ( const word shName,
real diam,
real mass,
real I,
int8 propIdx 
)
protected

Definition at line 37 of file sphereParticles.cpp.

References pFlow::endl(), fatalErrorInFunction, pFlow::Pi, pFlow::pow(), and pFlow::printKeys().

Here is the call graph for this function:

◆ initializeParticles()

bool initializeParticles ( )
protected

Definition at line 73 of file sphereParticles.cpp.

Referenced by sphereParticles::sphereParticles().

Here is the caller graph for this function:

◆ insertSphereParticles()

bool insertSphereParticles ( const wordVector names,
const int32IndexContainer indices 
)
protected

Definition at line 139 of file sphereParticles.cpp.

References pFlow::endl(), fatalErrorInFunction, ForAll, m, indexContainer< IndexType >::size(), and Vector< T, Allocator >::size().

Here is the call graph for this function:

◆ getFieldObjectList()

pFlow::uniquePtr< pFlow::List< pFlow::eventObserver * > > getFieldObjectList ( ) const
overrideprotectedvirtual

Reimplemented from particles.

Definition at line 26 of file sphereParticles.cpp.

References particles::getFieldObjectList(), and sphereParticles::I_.

Here is the call graph for this function:

◆ operator=() [1/2]

sphereParticles& operator= ( const sphereParticles )
delete

no copy-assignement

◆ operator=() [2/2]

sphereParticles& operator= ( sphereParticles &&  )
default

move-assignement

◆ insertParticles()

bool insertParticles ( const realx3Vector position,
const wordVector shapes,
const setFieldList setField 
)
overridevirtual

Insert new particles in position with specified shapes.

This function is involked by inserted object to insert new set of particles into the simulation.

Parameters
positionposition of new particles
shapeshape of new particles
setFieldinitial value of the selected fields for new particles

Implements particles.

Definition at line 362 of file sphereParticles.cpp.

References cyanText, endREPORT, fatalErrorInFunction, pStruct, REPORT, Vector< T, Allocator >::size(), and yellowText.

Here is the call graph for this function:

◆ shapes()

const auto& shapes ( ) const
inline

const reference to shapes object

Definition at line 121 of file sphereParticles.hpp.

References sphereParticles::shapes_.

◆ I() [1/2]

const auto& I ( ) const
inline

const reference to inertia pointField

Definition at line 127 of file sphereParticles.hpp.

References sphereParticles::I_.

◆ I() [2/2]

auto& I ( )
inline

reference to inertia pointField

Definition at line 133 of file sphereParticles.hpp.

References sphereParticles::I_.

◆ rVelocity()

const realx3Vector_D rVelocity ( ) const
inline

Definition at line 138 of file sphereParticles.hpp.

References sphereParticles::rVelocity_.

◆ boundingSphere()

const realVector_D& boundingSphere ( ) const
inlineoverridevirtual

Implements particles.

Definition at line 143 of file sphereParticles.hpp.

References particles::diameter().

Here is the call graph for this function:

◆ shapeTypeName()

word shapeTypeName ( ) const
inlineoverridevirtual

Implements particles.

Definition at line 148 of file sphereParticles.hpp.

◆ boundingSphereMinMax()

void boundingSphereMinMax ( real minDiam,
real maxDiam 
) const
inlineoverridevirtual

Implements particles.

Definition at line 153 of file sphereParticles.hpp.

References sphereShape::diameterMinMax(), and sphereParticles::shapes_.

Here is the call graph for this function:

◆ update()

bool update ( const eventMessage msg)
overridevirtual

Implements eventObserver.

Definition at line 334 of file sphereParticles.cpp.

References n, and pStruct.

◆ rAcceleration() [1/2]

realx3PointField_D& rAcceleration ( )
inlineoverridevirtual

Implements particles.

Definition at line 163 of file sphereParticles.hpp.

References sphereParticles::rAcceleration_.

◆ rAcceleration() [2/2]

const realx3PointField_D& rAcceleration ( ) const
inlineoverridevirtual

Implements particles.

Definition at line 168 of file sphereParticles.hpp.

References sphereParticles::rAcceleration_.

◆ beforeIteration()

bool beforeIteration ( )
overridevirtual

before iteration step

Reimplemented from particles.

Definition at line 84 of file sphereParticles.cpp.

References particles::beforeIteration().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iterate()

bool iterate ( )
overridevirtual

iterate particles

Implements demComponent.

Definition at line 104 of file sphereParticles.cpp.

References pFlow::sphereParticlesKernels::acceleration(), and pStruct.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ afterIteration()

bool afterIteration ( )
overridevirtual

after iteration step

Implements demComponent.

Definition at line 133 of file sphereParticles.cpp.

Referenced by main().

Here is the caller graph for this function:

Member Data Documentation

◆ property_

const property& property_
protected

reference to material properties

Definition at line 51 of file sphereParticles.hpp.

◆ shapes_

sphereShape& shapes_
protected

reference to shapes

Definition at line 54 of file sphereParticles.hpp.

Referenced by sphereParticles::boundingSphereMinMax(), and sphereParticles::shapes().

◆ I_

realPointField_D& I_
protected

pointField of inertial of particles

Definition at line 57 of file sphereParticles.hpp.

Referenced by sphereParticles::getFieldObjectList(), and sphereParticles::I().

◆ rVelocity_

realx3PointField_D& rVelocity_
protected

pointField of rotational Velocity of particles on device

Definition at line 60 of file sphereParticles.hpp.

Referenced by sphereParticles::rVelocity(), and sphereParticles::sphereParticles().

◆ rAcceleration_

realx3PointField_D& rAcceleration_
protected

pointField of rotational acceleration of particles on device

Definition at line 63 of file sphereParticles.hpp.

Referenced by sphereParticles::rAcceleration().

◆ rVelIntegration_

uniquePtr<integration> rVelIntegration_ = nullptr
protected

rotational velocity integrator

Definition at line 66 of file sphereParticles.hpp.

Referenced by sphereParticles::sphereParticles().

◆ accelerationTimer_

Timer accelerationTimer_
protected

timer for acceleration computations

Definition at line 69 of file sphereParticles.hpp.

◆ intPredictTimer_

Timer intPredictTimer_
protected

timer for integration computations (prediction step)

Definition at line 72 of file sphereParticles.hpp.

◆ intCorrectTimer_

Timer intCorrectTimer_
protected

timer for integration computations (correction step)

Definition at line 75 of file sphereParticles.hpp.


The documentation for this class was generated from the following files: