MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
TerrainContact Class Reference

Class to compute terrain contact. More...

#include <TerrainContact.h>

Collaboration diagram for TerrainContact:

Public Member Functions

 TerrainContact (STLReader *mesh, double friction)
 
void computeDistanceLevelSetFunction (Mesh *mesh)
 compute the distance level set function in nodes \( d_{I}=(X_I-X_i) e_n \) It is the distance from the node to the STL mesh
 
void particleDistanceLevelSet (Mesh *mesh, vector< Particle * > *particles)
 Interpolate distance level set function value of particle \( d_p = \sum_I d_I N_{Ip} \).
 
void nodalDensityLevelSet (Mesh *mesh, vector< Particle * > *particles)
 Calculate the nodal density level set function \( \rho_I = \sum_p \frac{V_p N_{Ip}}{V_I} \) It allows to know the boundary of the body for a certain scalar.
 
void trianglesDensityLevelSet (Mesh *mesh)
 Interpolate the density level set function in the centroids of triangles \( \rho_m = \sum_I \rho_I N_{Im} \) It allows to know the boundary of the body in contact with the STL mesh.
 
void determineContactPotentialPairs (Mesh *mesh, std::vector< Particle * > *particles)
 Determine the contact potential pairs.
 
STLReadergetSTLMesh ()
 Get the triangular mesh.
 
void computeContactForces (double dt)
 
void setDistanceThreshold (double threshold)
 Set the distance threshold for contact detection.
 
void apply (Mesh *mesh, std::vector< Particle * > *particles, double dt)
 Apply the terrain contact algorithm.
 
void enablePenaltyContact (bool enable)
 Enable the penalty contact method.
 
void setPenaltyStiffness (double k)
 Set the penalty stiffness for contact forces.
 

Private Attributes

STLReaderstlMesh
 triangular mesh for terrain contact
 
double frictionCoefficient
 Friction coefficient \(\mu\).
 
std::vector< double > densityLevelSet
 density level set function interpolated in centroids of triangles \( \rho_{m} \)
 
std::vector< std::pair< Particle *, Triangle * > > contactPairs
 contact potential pairs
 
double scalingFactor = 2.0
 scaling factor for the distance threshold in contact detection \( \alpha \)
 
bool usePenaltyContact = false
 Use penalty contact method.
 
double penaltyStiffness = 0.0
 Penalty stiffness for contact forces.
 

Detailed Description

Class to compute terrain contact.

Constructor & Destructor Documentation

◆ TerrainContact()

TerrainContact::TerrainContact ( STLReader * mesh,
double friction )
inline

Member Function Documentation

◆ apply()

void TerrainContact::apply ( Mesh * mesh,
std::vector< Particle * > * particles,
double dt )

Apply the terrain contact algorithm.

◆ computeContactForces()

void TerrainContact::computeContactForces ( double dt)

◆ computeDistanceLevelSetFunction()

void TerrainContact::computeDistanceLevelSetFunction ( Mesh * mesh)

compute the distance level set function in nodes \( d_{I}=(X_I-X_i) e_n \) It is the distance from the node to the STL mesh

◆ determineContactPotentialPairs()

void TerrainContact::determineContactPotentialPairs ( Mesh * mesh,
std::vector< Particle * > * particles )

Determine the contact potential pairs.

◆ enablePenaltyContact()

void TerrainContact::enablePenaltyContact ( bool enable)

Enable the penalty contact method.

◆ getSTLMesh()

STLReader * TerrainContact::getSTLMesh ( )
inline

Get the triangular mesh.

◆ nodalDensityLevelSet()

void TerrainContact::nodalDensityLevelSet ( Mesh * mesh,
vector< Particle * > * particles )

Calculate the nodal density level set function \( \rho_I = \sum_p \frac{V_p N_{Ip}}{V_I} \) It allows to know the boundary of the body for a certain scalar.

◆ particleDistanceLevelSet()

void TerrainContact::particleDistanceLevelSet ( Mesh * mesh,
vector< Particle * > * particles )

Interpolate distance level set function value of particle \( d_p = \sum_I d_I N_{Ip} \).

◆ setDistanceThreshold()

void TerrainContact::setDistanceThreshold ( double threshold)
inline

Set the distance threshold for contact detection.

Parameters
threshold

◆ setPenaltyStiffness()

void TerrainContact::setPenaltyStiffness ( double k)

Set the penalty stiffness for contact forces.

◆ trianglesDensityLevelSet()

void TerrainContact::trianglesDensityLevelSet ( Mesh * mesh)

Interpolate the density level set function in the centroids of triangles \( \rho_m = \sum_I \rho_I N_{Im} \) It allows to know the boundary of the body in contact with the STL mesh.

Member Data Documentation

◆ contactPairs

std::vector<std::pair<Particle*, Triangle*> > TerrainContact::contactPairs
private

contact potential pairs

◆ densityLevelSet

std::vector<double> TerrainContact::densityLevelSet
private

density level set function interpolated in centroids of triangles \( \rho_{m} \)

◆ frictionCoefficient

double TerrainContact::frictionCoefficient
private

Friction coefficient \(\mu\).

◆ penaltyStiffness

double TerrainContact::penaltyStiffness = 0.0
private

Penalty stiffness for contact forces.

◆ scalingFactor

double TerrainContact::scalingFactor = 2.0
private

scaling factor for the distance threshold in contact detection \( \alpha \)

◆ stlMesh

STLReader* TerrainContact::stlMesh
private

triangular mesh for terrain contact

◆ usePenaltyContact

bool TerrainContact::usePenaltyContact = false
private

Use penalty contact method.


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