Description
Class which defines a contact surface for FEA elements, using a mesh of triangles.
Differently from ChContactSurfaceNodeCloud, this also captures the node-vs-face and edge-vs-edge cases, but has a higher computational overhead.
#include <ChContactSurfaceMesh.h>


Public Member Functions | |
ChContactSurfaceMesh (std::shared_ptr< ChContactMaterial > material, ChMesh *mesh=nullptr) | |
void | AddFacesFromBoundary (const ChMesh &mesh, double sphere_swept=0.0, bool ccw=true, bool include_cable_elements=true, bool include_beam_elements=true) |
Utility function to add all boundary faces of the specified FEA mesh to this collision surface. More... | |
void | ConstructFromTrimesh (std::shared_ptr< ChTriangleMeshConnected > trimesh, double sphere_swept=0.0) |
Construct a contact surface from a triangular mesh. More... | |
virtual ChAABB | GetAABB () const override |
Get the current axis-aligned bounding box. | |
std::vector< std::shared_ptr< ChContactTriangleXYZ > > & | GetTrianglesXYZ () |
Get the list of triangles. | |
std::vector< std::shared_ptr< ChContactTriangleXYZRot > > & | GetTrianglesXYZRot () |
Get the list of triangles for nodes with rotational dofs. | |
unsigned int | GetNumTriangles () const |
Get the number of triangles. | |
unsigned int | GetNumVertices () const |
Get the number of vertices. | |
virtual void | SyncCollisionModels () const override |
virtual void | AddCollisionModelsToSystem (ChCollisionSystem *coll_sys) const override |
virtual void | RemoveCollisionModelsFromSystem (ChCollisionSystem *coll_sys) const override |
void | OutputSimpleMesh (std::vector< ChVector3d > &vert_pos, std::vector< ChVector3d > &vert_vel, std::vector< ChVector3i > &triangles, std::vector< ChVector3b > &owns_node, std::vector< ChVector3b > &owns_edge) const |
Utility function for exporting the contact mesh in a pointer-less manner. More... | |
![]() | |
ChContactSurface (std::shared_ptr< ChContactMaterial > material, ChPhysicsItem *mesh=nullptr) | |
ChPhysicsItem * | GetPhysicsItem () |
Get the owner physics item (e.g., an FEA mesh). | |
void | SetPhysicsItem (ChPhysicsItem *physics_item) |
Set the owner physics item (e.g., an FEA mesh). | |
void | DisableSelfCollisions (int family) |
Disable self-collisions (default: enabled). More... | |
std::shared_ptr< ChContactMaterial > & | GetMaterialSurface () |
Get the surface contact material. | |
Additional Inherited Members | |
![]() | |
std::shared_ptr< ChContactMaterial > | m_material |
contact material properties | |
ChPhysicsItem * | m_physics_item |
associated physics item (e.g., an FEA mesh) | |
bool | m_self_collide |
include self-collisions? | |
int | m_collision_family |
collision family (if no self-collisions) | |
Member Function Documentation
◆ AddFacesFromBoundary()
void chrono::fea::ChContactSurfaceMesh::AddFacesFromBoundary | ( | const ChMesh & | mesh, |
double | sphere_swept = 0.0 , |
||
bool | ccw = true , |
||
bool | include_cable_elements = true , |
||
bool | include_beam_elements = true |
||
) |
Utility function to add all boundary faces of the specified FEA mesh to this collision surface.
The function scans all the finite elements already added in the parent ChMesh and adds the faces that are not shared (ie. the faces on the boundary 'skin'). For shells, the argument 'ccw' indicates whether the face vertices are provided in a counter-clockwise (default) or clockwise order(because shells collisions are oriented and might work only from the "outer" side). Currently supported elements that generate boundary skin:
- solids:
- ChElementTetrahedron: all solid tetrahedrons
- ChElementHexahedron: all solid hexahedrons
- shells:
- ChElementShellANCF_3423 ANCF: shells (only one side)
- ChElementShellANCF_3443 ANCF: shells (only one side)
- ChElementShellANCF_3833 ANCF: shells (only one side)
- ChElementShellReissner: Reissner 4-nodes shells (only one side)
- beams:
- ChElementCableANCF: ANCF beams (as sphere-swept lines, i.e. sequence of capsules)
- ChElementBeamEuler: Euler-Bernoulli beams (as sphere-swept lines, i.e. sequence of capsules)
- Parameters
-
mesh FEA mesh sphere_swept radius of swept sphere ccw indicate counterclockwise vertex ordering include_cable_elements create contact triangles for cable elements include_beam_elements create contact triangles for beam elements
◆ ConstructFromTrimesh()
void chrono::fea::ChContactSurfaceMesh::ConstructFromTrimesh | ( | std::shared_ptr< ChTriangleMeshConnected > | trimesh, |
double | sphere_swept = 0.0 |
||
) |
Construct a contact surface from a triangular mesh.
FEA nodes are created at the mesh vertex locations.
◆ OutputSimpleMesh()
void chrono::fea::ChContactSurfaceMesh::OutputSimpleMesh | ( | std::vector< ChVector3d > & | vert_pos, |
std::vector< ChVector3d > & | vert_vel, | ||
std::vector< ChVector3i > & | triangles, | ||
std::vector< ChVector3b > & | owns_node, | ||
std::vector< ChVector3b > & | owns_edge | ||
) | const |
Utility function for exporting the contact mesh in a pointer-less manner.
The mesh is specified as a set of 3D vertex points (with associated velocities) and a set of faces (indices into the vertex array). In addition, ownership of nodes and edges among the consitutent triangles is returned in 'owns_node' and 'owns_edge'.
- Parameters
-
vert_pos mesh vertices (absolute xyz positions) vert_vel vertex velocities (absolute xyz velocities) triangles triangle faces (indices in vertex array) owns_node node ownership for each triangular face owns_edge edge ownership for each triangular face
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono/fea/ChContactSurfaceMesh.h
- /builds/uwsbel/chrono/src/chrono/fea/ChContactSurfaceMesh.cpp