NetDEM v1.0
|
Signed distance field-based contact solver. More...
#include <solver_sdf_pp.hpp>
Public Types | |
enum | PotentialType { linear , hertz } |
An enumeration of potential types used by the solver. More... | |
Public Member Functions | |
SolverSDFPP () | |
Default constructor for the SolverSDFPP class. | |
SolverSDFPP (Particle *const p1, Particle *const p2) | |
Constructor for the SolverSDFPP class. | |
CollisionSolverPP * | Clone () const override |
Creates a copy of the current collision solver. | |
void | Init (Particle *const p1, Particle *const p2) override |
Initializes the collision solver with two particles. | |
bool | Detect () override |
Detects collisions between particles. | |
void | ResolveInit (ContactPP *const cnt, double timestep) override |
Initializes the contact resolution for a contact point. | |
void | ResolveUpdate (ContactPP *const cnt, double timestep) override |
Updates the contact resolution for a contact point. | |
void | ResolveInit (CollisionGeometries *const cnt_geoms, double timestep) |
Initializes the contact resolution for a set of collision geometries. | |
void | ResolveUpdate (CollisionGeometries *const cnt_geoms, double timestep) |
Updates the contact resolution for a set of collision geometries. | |
void | ResolveInitP2ToP1 (CollisionGeometries *const cnt_geoms, double timestep) |
Initializes the contact resolution from particle 2 to particle 1. | |
void | ResolveUpdateP2ToP1 (CollisionGeometries *const cnt_geoms, double timestep) |
Updates the contact resolution from particle 2 to particle 1. | |
void | ResolveInitP1ToP2 (CollisionGeometries *const cnt_geoms, double timestep) |
Initializes the contact resolution from particle 1 to particle 2. | |
void | ResolveUpdateP1ToP2 (CollisionGeometries *const cnt_geoms, double timestep) |
Updates the contact resolution from particle 1 to particle 2. | |
double | GetPotential (double dist, double node_area, double size_eq, double size_ratio) |
Calculates the potential energy of a contact point. | |
Public Member Functions inherited from netdem::CollisionSolverPP | |
CollisionSolverPP () | |
CollisionSolverPP (Particle *const p1, Particle *const p2) | |
virtual bool | Detect (ContactPP *const cnt) |
virtual | ~CollisionSolverPP () |
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::CollisionSolverPP | |
Particle * | particle_1 {nullptr} |
Particle * | particle_2 {nullptr} |
Additional Inherited Members | |
Protected Member Functions inherited from netdem::CollisionSolverPP | |
void | InitBasicGeoms (CollisionGeometries *const cnt_geoms, double timestep) |
void | UpdateBasicGeoms (CollisionGeometries *const cnt_geoms, double timestep, Vec3d const &dir_n_old) |
Update the basic contact geometries associated with a collision. | |
Signed distance field-based contact solver.
This class is a collision solver that uses signed distance fields to detect and resolve collisions between particles with different shapes. It extends the CollisionSolverPP class.
netdem::SolverSDFPP::SolverSDFPP | ( | ) |
Default constructor for the SolverSDFPP class.
Constructor for the SolverSDFPP class.
p1 | The first particle involved in the collision. |
p2 | The second particle involved in the collision. |
|
overridevirtual |
Creates a copy of the current collision solver.
Implements netdem::CollisionSolverPP.
|
overridevirtual |
Detects collisions between particles.
Implements netdem::CollisionSolverPP.
double netdem::SolverSDFPP::GetPotential | ( | double | dist, |
double | node_area, | ||
double | size_eq, | ||
double | size_ratio ) |
Calculates the potential energy of a contact point.
dist | The signed distance between the particles at the contact point. |
node_area | The surface area associated with the node. |
size_eq | The equivalent size of the shape. |
Initializes the collision solver with two particles.
p1 | The first particle involved in the collision. |
p2 | The second particle involved in the collision. |
Reimplemented from netdem::CollisionSolverPP.
|
static |
|
static |
|
static |
|
static |
void netdem::SolverSDFPP::ResolveInit | ( | CollisionGeometries *const | cnt_geoms, |
double | timestep ) |
Initializes the contact resolution for a set of collision geometries.
cnt_geoms | The collision geometries to resolve. |
timestep | The simulation time step size. |
|
overridevirtual |
Initializes the contact resolution for a contact point.
cnt | The contact point to resolve. |
timestep | The simulation time step size. |
Implements netdem::CollisionSolverPP.
void netdem::SolverSDFPP::ResolveInitP1ToP2 | ( | CollisionGeometries *const | cnt_geoms, |
double | timestep ) |
Initializes the contact resolution from particle 1 to particle 2.
cnt_geoms | The collision geometries to resolve. |
timestep | The simulation time step size. |
void netdem::SolverSDFPP::ResolveInitP2ToP1 | ( | CollisionGeometries *const | cnt_geoms, |
double | timestep ) |
Initializes the contact resolution from particle 2 to particle 1.
cnt_geoms | The collision geometries to resolve. |
timestep | The simulation time step size. |
void netdem::SolverSDFPP::ResolveUpdate | ( | CollisionGeometries *const | cnt_geoms, |
double | timestep ) |
Updates the contact resolution for a set of collision geometries.
cnt_geoms | The collision geometries to resolve. |
timestep | The simulation time step size. |
|
overridevirtual |
Updates the contact resolution for a contact point.
cnt | The contact point to resolve. |
timestep | The simulation time step size. |
Implements netdem::CollisionSolverPP.
void netdem::SolverSDFPP::ResolveUpdateP1ToP2 | ( | CollisionGeometries *const | cnt_geoms, |
double | timestep ) |
Updates the contact resolution from particle 1 to particle 2.
cnt_geoms | The collision geometries to resolve. |
timestep | The simulation time step size. |
void netdem::SolverSDFPP::ResolveUpdateP2ToP1 | ( | CollisionGeometries *const | cnt_geoms, |
double | timestep ) |
Updates the contact resolution from particle 2 to particle 1.
cnt_geoms | The collision geometries to resolve. |
timestep | The simulation time step size. |
double netdem::SolverSDFPP::beta {0.65} |
int netdem::SolverSDFPP::potential_type {PotentialType::linear} |
Whether to solve both sides of the collision.
bool netdem::SolverSDFPP::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.
bool netdem::SolverSDFPP::use_equivalent_stiffness {true} |