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

A class used to control the pressure of walls in a DEM simulation. More...

#include <wall_servo_control.hpp>

Inheritance diagram for netdem::WallServoControl:
netdem::WallGroup netdem::Modifier

Public Member Functions

 WallServoControl (double kn, double area)
 Constructor for WallServoControl class.
 
ModifierClone () const override
 Clones the current WallServoControl instance.
 
void Execute () override
 Executes the WallServoControl instance.
 
void Update () override
 Updates the WallServoControl instance.
 
- Public Member Functions inherited from netdem::WallGroup
 WallGroup ()
 Default constructor for WallGroup class.
 
VecXT< Wall * > const & GetWalls ()
 Get the walls.
 
void AddWall (int id)
 Adds a wall to the group.
 
void RemoveWall (int id)
 Removes a wall from the group.
 
void AddWall (const VecXT< int > &ids)
 Adds multiple walls to the group.
 
void RemoveWall (const VecXT< int > &ids)
 Removes multiple walls from the group.
 
void AddWall (const std::initializer_list< int > &ids)
 Adds multiple walls to the group.
 
void RemoveWall (const std::initializer_list< int > &ids)
 Removes multiple walls from the group.
 
void SetWall (int id)
 Sets the walls based on a wall ID.
 
void SetWall (const VecXT< int > &id_list)
 Sets the walls based on a variable number of wall IDs.
 
void SetWall (const std::initializer_list< int > &id_list)
 Sets the walls based on a variable number of wall IDs.
 
void Clear ()
 Clears all walls from the group.
 
- 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.
 

Public Attributes

double kn {1.0e5}
 wall stiffness
 
double area {0.1}
 Wall area, on which the pressure is applied.
 
double target_pressure {0.0}
 Target pressure.
 
double vel_max {0.5}
 Maximum velocity of wall during servo-control.
 
double study_rate {0.5}
 Coefficient of PID servo-control.
 
double tol {0.05}
 Tolerance of servo-control.
 
bool achieved {true}
 A flag indicating if target pressure is achieved.
 
bool enable_warning {false}
 A flag indicating whether to log warning info.
 
bool enable_auto_area {false}
 A flag indicating whether to automaticaly calculate the contact area from the particles.
 
- 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}
 

Additional Inherited Members

- Protected Attributes inherited from netdem::WallGroup
std::unordered_set< int > wall_id_list
 The list of wall ids.
 
VecXT< Wall * > wall_list
 The list of wall.
 

Detailed Description

A class used to control the pressure of walls in a DEM simulation.

The WallServoControl class is used to control the pressure of walls in a DEM simulation by adjusting their position based on the target pressure and achieved pressure.

Examples
0_plane_case.cpp, 1_test_triaxial_comp.cpp, 91_triaixal_comp.cpp, 91_triaixal_comp_trimesh.cpp, 93_triaixal_comp_trimesh.cpp, and 97_triaixal_comp_sphere_geom.cpp.

Constructor & Destructor Documentation

◆ WallServoControl()

netdem::WallServoControl::WallServoControl ( double kn,
double area )

Constructor for WallServoControl class.

Parameters
knThe spring constant used in the servo control algorithm.
areaThe initial area of the walls being controlled.

Member Function Documentation

◆ Clone()

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

Clones the current WallServoControl instance.

Returns
A pointer to the cloned WallServoControl instance.

Reimplemented from netdem::WallGroup.

◆ Execute()

void netdem::WallServoControl::Execute ( )
overridevirtual

Executes the WallServoControl instance.

Reimplemented from netdem::WallGroup.

◆ Update()

void netdem::WallServoControl::Update ( )
overridevirtual

Updates the WallServoControl instance.

Reimplemented from netdem::WallGroup.

Member Data Documentation

◆ achieved

bool netdem::WallServoControl::achieved {true}

◆ area

double netdem::WallServoControl::area {0.1}

Wall area, on which the pressure is applied.

◆ enable_auto_area

bool netdem::WallServoControl::enable_auto_area {false}

A flag indicating whether to automaticaly calculate the contact area from the particles.

Examples
0_plane_case.cpp, 1_test_triaxial_comp.cpp, 91_triaixal_comp.cpp, 91_triaixal_comp_trimesh.cpp, 93_triaixal_comp_trimesh.cpp, and 97_triaixal_comp_sphere_geom.cpp.

◆ enable_warning

bool netdem::WallServoControl::enable_warning {false}

A flag indicating whether to log warning info.

◆ kn

double netdem::WallServoControl::kn {1.0e5}

wall stiffness

◆ study_rate

double netdem::WallServoControl::study_rate {0.5}

◆ target_pressure

◆ tol

double netdem::WallServoControl::tol {0.05}

◆ vel_max

double netdem::WallServoControl::vel_max {0.5}

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