NetDEM v1.0
Loading...
Searching...
No Matches
netdem::ParticleMotionControl Class Reference

A class used to add motion control to particles in a DEM simulation. More...

#include <particle_motion_control.hpp>

Inheritance diagram for netdem::ParticleMotionControl:
netdem::Modifier

Public Member Functions

 ParticleMotionControl ()
 Default constructor for ParticleMotionControl class.
 
void SetFixed (int id)
 Sets the particle to have a fixed position.
 
void SetFixRotation (int id)
 Sets the particle to have a fixed rotation.
 
void SetLinearSpin (int id, double spin_x, double spin_y, double spin_z)
 
void SetLinearVelocity (int id, double xa, double xb, double ya, double yb, double za, double zb)
 Sets the particle to have a linear velocity.
 
void SetSinVelocity (int id, double x_amplit, double x_freq, double x_phase, double y_amplit, double y_freq, double y_phase, double z_amplit, double z_freq, double z_phase)
 Sets the particle to have a sinusoidal velocity.
 
void SyncToAllProcessors ()
 Synchronizes the particle motion across all processors in the simulation.
 
void Clear ()
 Clears all particles from the ParticleMotionControl instance.
 
ModifierClone () const override
 Clones the current ParticleMotionControl instance.
 
void Execute () override
 Executes the ParticleMotionControl instance at the beginning of a DEM cycle.
 
void Update () override
 Updates the ParticleMotionControl instance.
 
- Public Member Functions inherited from netdem::Modifier
 Modifier ()
 Default constructor for Modifier class.
 
virtual void Init (Simulation *sim)
 Initializes the Modifier instance.
 
virtual void Enable ()
 Enables the Modifier instance.
 
virtual void Disable ()
 Disables the Modifier instance.
 
virtual ~Modifier ()
 Destructor for Modifier class.
 

Additional Inherited Members

- Public Attributes inherited from netdem::Modifier
std::string label {"default"}
 
DEMSolver::CyclePoint cycle_point {DEMSolver::CyclePoint::pre}
 
Simulationsim {nullptr}
 
Scenescene {nullptr}
 
bool update_with_scene {false}
 
bool enable_logging {true}
 

Detailed Description

A class used to add motion control to particles in a DEM simulation.

The ParticleMotionControl class is used to add various types of motion to particles, including fixed, linear velocity, and sinusoidal velocity.

Constructor & Destructor Documentation

◆ ParticleMotionControl()

netdem::ParticleMotionControl::ParticleMotionControl ( )

Default constructor for ParticleMotionControl class.

Member Function Documentation

◆ Clear()

void netdem::ParticleMotionControl::Clear ( )

Clears all particles from the ParticleMotionControl instance.

◆ Clone()

Modifier * netdem::ParticleMotionControl::Clone ( ) const
overridevirtual

Clones the current ParticleMotionControl instance.

Returns
A pointer to the cloned ParticleMotionControl instance.

Reimplemented from netdem::Modifier.

◆ Execute()

void netdem::ParticleMotionControl::Execute ( )
overridevirtual

Executes the ParticleMotionControl instance at the beginning of a DEM cycle.

Reimplemented from netdem::Modifier.

◆ SetFixed()

void netdem::ParticleMotionControl::SetFixed ( int id)

Sets the particle to have a fixed position.

Parameters
idThe ID of the particle to set as fixed.

◆ SetFixRotation()

void netdem::ParticleMotionControl::SetFixRotation ( int id)

Sets the particle to have a fixed rotation.

Parameters
idThe ID of the particle to set as fixed.

◆ SetLinearSpin()

void netdem::ParticleMotionControl::SetLinearSpin ( int id,
double spin_x,
double spin_y,
double spin_z )

◆ SetLinearVelocity()

void netdem::ParticleMotionControl::SetLinearVelocity ( int id,
double xa,
double xb,
double ya,
double yb,
double za,
double zb )

Sets the particle to have a linear velocity.

Parameters
idThe ID of the particle to set the linear velocity for.
xaThe x component of the start point of the linear velocity.
xbThe x component of the end point of the linear velocity.
yaThe y component of the start point of the linear velocity.
ybThe y component of the end point of the linear velocity.
zaThe z component of the start point of the linear velocity.
zbThe z component of the end point of the linear velocity.

◆ SetSinVelocity()

void netdem::ParticleMotionControl::SetSinVelocity ( int id,
double x_amplit,
double x_freq,
double x_phase,
double y_amplit,
double y_freq,
double y_phase,
double z_amplit,
double z_freq,
double z_phase )

Sets the particle to have a sinusoidal velocity.

Parameters
idThe ID of the particle to set the sinusoidal velocity for.
x_amplitThe amplitude of the x component of the sinusoidal velocity.
x_freqThe frequency of the x component of the sinusoidal velocity.
x_phaseThe phase of the x component of the sinusoidal velocity.
y_amplitThe amplitude of the y component of the sinusoidal velocity.
y_freqThe frequency of the y component of the sinusoidal velocity.
y_phaseThe phase of the y component of the sinusoidal velocity.
z_amplitThe amplitude of the z component of the sinusoidal velocity.
z_freqThe frequency of the z component of the sinusoidal velocity.
z_phaseThe phase of the z component of the sinusoidal velocity.

◆ SyncToAllProcessors()

void netdem::ParticleMotionControl::SyncToAllProcessors ( )

Synchronizes the particle motion across all processors in the simulation.

◆ Update()

void netdem::ParticleMotionControl::Update ( )
overridevirtual

Updates the ParticleMotionControl instance.

Updates the params_list and particle_list based on the current id_params_map.

Reimplemented from netdem::Modifier.


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