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

A class used to solve collisions between a particle and a wall using a signed distance field. More...

#include <solver_sdf_pw.hpp>

Inheritance diagram for netdem::SolverSDFPW:
netdem::CollisionSolverPW

Public Types

enum  PotentialType { linear , hertz }
 An enumeration of potential types used by the solver. More...
 

Public Member Functions

 SolverSDFPW ()
 Default constructor for SolverSDFPW class.
 
 SolverSDFPW (Particle *const p, Wall *const w)
 Constructor for SolverSDFPW class.
 
CollisionSolverPWClone () const override
 Clones the current SolverSDFPW instance.
 
void Init (Particle *const p, Wall *const w) override
 Initializes the SolverSDFPW instance with the given particles and walls.
 
bool Detect () override
 Detects if there is a collision between the particle and the wall.
 
void ResolveInit (ContactPW *const cnt, double timestep) override
 Resolves the collision based on the initial contact information and timestep.
 
void ResolveUpdate (ContactPW *const cnt, double timestep) override
 Updates the contact information object and resolves the collision based on the updated information and timestep.
 
void ResolveInit (CollisionGeometries *const cnt_geoms, double timestep)
 Resolves the collision between the particle and the wall based on the initial contact geometries and timestep.
 
void ResolveUpdate (CollisionGeometries *const cnt_geoms, double timestep)
 Updates the contact geometries object and resolves the collision based on the updated information and timestep.
 
void ResolveInitWToP (CollisionGeometries *const cnt_geoms, double timestep)
 Resolves the collision between the wall and the particle based on the initial contact geometries and timestep.
 
void ResolveUpdateWToP (CollisionGeometries *const cnt_geoms, double timestep)
 Updates the contact geometries object and resolves the collision based on the updated information and timestep.
 
void ResolveInitPToW (CollisionGeometries *const cnt_geoms, double timestep)
 Resolves the collision between the particle and the wall based on the initial contact geometries and timestep.
 
void ResolveUpdatePToW (CollisionGeometries *const cnt_geoms, double timestep)
 Updates the contact geometries object and resolves the collision based on the updated information and timestep.
 
double GetPotential (double dist, double node_area, double size_eq, double size_ratio)
 Calculates the potential energy between two shapes based on their distance and type of potential function used.
 
- Public Member Functions inherited from netdem::CollisionSolverPW
 CollisionSolverPW ()
 
 CollisionSolverPW (Particle *const p, Wall *const w)
 
virtual bool Detect (ContactPW *const cnt)
 
virtual ~CollisionSolverPW ()
 

Static Public Member Functions

static double KiToKn (double ki, double size_eq, double size_ratio)
 
static double KiFromKn (double kn, double size_eq, double size_ratio)
 
static double KiToEstar (double ki, double size_eq, double size_ratio)
 
static double KiFromEstar (double Estar, double size_eq, double size_ratio)
 

Public Attributes

int potential_type {PotentialType::linear}
 Whether to solve both sides of the collision.
 
bool solve_two_sides {false}
 
bool use_equivalent_stiffness {true}
 
double beta {0.65}
 
- Public Attributes inherited from netdem::CollisionSolverPW
Particleparticle {nullptr}
 
Wallwall {nullptr}
 

Additional Inherited Members

- Protected Member Functions inherited from netdem::CollisionSolverPW
void InitBasicGeoms (CollisionGeometries *const cnt_geoms, double timestep)
 
void UpdateBasicGeoms (CollisionGeometries *const cnt_geoms, double timestep, Vec3d const &dir_n_old)
 

Detailed Description

A class used to solve collisions between a particle and a wall using a signed distance field.

The SolverSDFPW class is used to solve collisions between a particle and a wall based on the signed distance field of the particles and walls in a particle-wall collision detection system.

Examples
00_hertz_contact.cpp, 00_nut_in_bolt.cpp, 81_golf_ball_impact.cpp, and 92_nut_in_bolt.cpp.

Member Enumeration Documentation

◆ PotentialType

An enumeration of potential types used by the solver.

The potential type determines the shape of the contact force applied by the solver. The available options are linear and Hertz potentials.

Enumerator
linear 
hertz 

Constructor & Destructor Documentation

◆ SolverSDFPW() [1/2]

netdem::SolverSDFPW::SolverSDFPW ( )

Default constructor for SolverSDFPW class.

◆ SolverSDFPW() [2/2]

netdem::SolverSDFPW::SolverSDFPW ( Particle *const p,
Wall *const w )

Constructor for SolverSDFPW class.

Parameters
pA pointer to the particle involved in the collision.
wA pointer to the wall involved in the collision.

Member Function Documentation

◆ Clone()

CollisionSolverPW * netdem::SolverSDFPW::Clone ( ) const
overridevirtual

Clones the current SolverSDFPW instance.

Returns
A pointer to the cloned SolverSDFPW instance.

Implements netdem::CollisionSolverPW.

◆ Detect()

bool netdem::SolverSDFPW::Detect ( )
overridevirtual

Detects if there is a collision between the particle and the wall.

Returns
True if there is a collision, false otherwise.

Implements netdem::CollisionSolverPW.

Examples
00_hertz_contact.cpp, 00_nut_in_bolt.cpp, 81_golf_ball_impact.cpp, and 92_nut_in_bolt.cpp.

◆ GetPotential()

double netdem::SolverSDFPW::GetPotential ( double dist,
double node_area,
double size_eq,
double size_ratio )

Calculates the potential energy between two shapes based on their distance and type of potential function used.

Parameters
distThe distance between the shapes.
node_areaThe surface area associated with the node.
size_eqThe equivalent size of the shape.
Returns
The potential energy between the two shapes.

◆ Init()

void netdem::SolverSDFPW::Init ( Particle *const p,
Wall *const w )
overridevirtual

Initializes the SolverSDFPW instance with the given particles and walls.

Parameters
pA pointer to the particle involved in the collision.
wA pointer to the wall involved in the collision.

Reimplemented from netdem::CollisionSolverPW.

Examples
00_hertz_contact.cpp, 00_nut_in_bolt.cpp, 81_golf_ball_impact.cpp, and 92_nut_in_bolt.cpp.

◆ KiFromEstar()

double netdem::SolverSDFPW::KiFromEstar ( double Estar,
double size_eq,
double size_ratio )
static

◆ KiFromKn()

double netdem::SolverSDFPW::KiFromKn ( double kn,
double size_eq,
double size_ratio )
static

◆ KiToEstar()

double netdem::SolverSDFPW::KiToEstar ( double ki,
double size_eq,
double size_ratio )
static

◆ KiToKn()

double netdem::SolverSDFPW::KiToKn ( double ki,
double size_eq,
double size_ratio )
static

◆ ResolveInit() [1/2]

void netdem::SolverSDFPW::ResolveInit ( CollisionGeometries *const cnt_geoms,
double timestep )

Resolves the collision between the particle and the wall based on the initial contact geometries and timestep.

Parameters
cnt_geomsA pointer to the contact geometries object.
timestepThe timestep to use for resolving the collision.

◆ ResolveInit() [2/2]

void netdem::SolverSDFPW::ResolveInit ( ContactPW *const cnt,
double timestep )
overridevirtual

Resolves the collision based on the initial contact information and timestep.

Parameters
cntA pointer to the contact information object.
timestepThe timestep to use for resolving the collision.

Implements netdem::CollisionSolverPW.

Examples
00_hertz_contact.cpp, and 81_golf_ball_impact.cpp.

◆ ResolveInitPToW()

void netdem::SolverSDFPW::ResolveInitPToW ( CollisionGeometries *const cnt_geoms,
double timestep )

Resolves the collision between the particle and the wall based on the initial contact geometries and timestep.

Parameters
cnt_geomsA pointer to the contact geometries object.
timestepThe timestep to use for resolving the collision.

◆ ResolveInitWToP()

void netdem::SolverSDFPW::ResolveInitWToP ( CollisionGeometries *const cnt_geoms,
double timestep )

Resolves the collision between the wall and the particle based on the initial contact geometries and timestep.

Parameters
cnt_geomsA pointer to the contact geometries object.
timestepThe timestep to use for resolving the collision.

◆ ResolveUpdate() [1/2]

void netdem::SolverSDFPW::ResolveUpdate ( CollisionGeometries *const cnt_geoms,
double timestep )

Updates the contact geometries object and resolves the collision based on the updated information and timestep.

Parameters
cnt_geomsA pointer to the contact geometries object.
timestepThe timestep to use for resolving the collision.

◆ ResolveUpdate() [2/2]

void netdem::SolverSDFPW::ResolveUpdate ( ContactPW *const cnt,
double timestep )
overridevirtual

Updates the contact information object and resolves the collision based on the updated information and timestep.

Parameters
cntA pointer to the contact information object.
timestepThe timestep to use for resolving the collision.

Implements netdem::CollisionSolverPW.

◆ ResolveUpdatePToW()

void netdem::SolverSDFPW::ResolveUpdatePToW ( CollisionGeometries *const cnt_geoms,
double timestep )

Updates the contact geometries object and resolves the collision based on the updated information and timestep.

Parameters
cnt_geomsA pointer to the contact geometries object.
timestepThe timestep to use for resolving the collision.

◆ ResolveUpdateWToP()

void netdem::SolverSDFPW::ResolveUpdateWToP ( CollisionGeometries *const cnt_geoms,
double timestep )

Updates the contact geometries object and resolves the collision based on the updated information and timestep.

Parameters
cnt_geomsA pointer to the contact geometries object.
timestepThe timestep to use for resolving the collision.

Member Data Documentation

◆ beta

double netdem::SolverSDFPW::beta {0.65}

◆ potential_type

int netdem::SolverSDFPW::potential_type {PotentialType::linear}

Whether to solve both sides of the collision.

Examples
00_hertz_contact.cpp, and 81_golf_ball_impact.cpp.

◆ solve_two_sides

bool netdem::SolverSDFPW::solve_two_sides {false}

Whether to auto convert the model stiffness parameter, such that it is identical to those in conventional linear or Hertz contact.

Examples
81_golf_ball_impact.cpp.

◆ use_equivalent_stiffness

bool netdem::SolverSDFPW::use_equivalent_stiffness {true}

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