Description
Class for applying loads to a contact mesh as a cluster of forces on the nodes of the underlying finite elements.
Useful for cosimulation: one can pass this object's vertex & faces to an external software (e.g., CFD) that in turn will perform collision detection with its entities, compute forces, send forces back to Chrono via this object. Note that this is based on a cluster of ChLoadNodeXYZ, but the class itself could bypass all methods of ChLoadNodeXYZ and directly implement a more efficient LoadIntLoadResidual_F.
#include <ChLoadContactSurfaceMesh.h>
Public Member Functions | |
ChLoadContactSurfaceMesh (std::shared_ptr< ChContactSurfaceMesh > contact_mesh) | |
virtual ChLoadContactSurfaceMesh * | Clone () const override |
"Virtual" copy constructor (covariant return type). | |
void | OutputSimpleMesh (std::vector< ChVector3d > &vert_pos, std::vector< ChVector3d > &vert_vel, std::vector< ChVector3i > &triangles) |
Get the collision mesh in a pointer-less way, where vertices are given in a vector of xyz points, and triangles are given as indexes to the three vertexes in that vector (similar to Wavefront OBJ meshes) Note, indexes are 0-based. More... | |
void | InputSimpleForces (const std::vector< ChVector3d > &vert_forces, const std::vector< int > &vert_ind) |
Set the forces to the nodes in a pointer-less way, where forces are given as a vector of xyz vectors and indexes to the referenced vertex, as obtained by OutputSimpleMesh. More... | |
void | SetContactMesh (std::shared_ptr< ChContactSurfaceMesh > contact_mesh) |
Set the contact mesh (also resets the applied nodes) | |
std::shared_ptr< ChContactSurfaceMesh > | GetContactMesh () const |
Get the contact mesh. | |
std::vector< std::shared_ptr< ChLoadNodeXYZ > > & | GetForces () |
Access the list of applied forces, so you can add new ones by using push_back(), remove them, count them, etc. More... | |
Public Member Functions inherited from chrono::ChLoadBase | |
ChLoadJacobians * | GetJacobians () |
Access the Jacobians (if any, i.e. if this is a stiff load). | |
virtual void | Update (double time) |
Update, called at least at each time step. More... | |
Public Member Functions inherited from chrono::ChObj | |
ChObj (const ChObj &other) | |
int | GetIdentifier () const |
Get the unique integer identifier of this object. More... | |
void | SetTag (int tag) |
Set an object integer tag (default: -1). More... | |
int | GetTag () const |
Get the tag of this object. | |
void | SetName (const std::string &myname) |
Set the name of this object. | |
const std::string & | GetName () const |
Get the name of this object. | |
double | GetChTime () const |
Gets the simulation time of this object. | |
void | SetChTime (double m_time) |
Sets the simulation time of this object. | |
virtual void | ArchiveOut (ChArchiveOut &archive_out) |
Method to allow serialization of transient data to archives. | |
virtual void | ArchiveIn (ChArchiveIn &archive_in) |
Method to allow de-serialization of transient data from archives. | |
virtual std::string & | ArchiveContainerName () |
Additional Inherited Members | |
Protected Member Functions inherited from chrono::ChObj | |
int | GenerateUniqueIdentifier () |
Protected Attributes inherited from chrono::ChLoadBase | |
ChLoadJacobians * | m_jacobians |
Protected Attributes inherited from chrono::ChObj | |
double | ChTime |
object simulation time | |
std::string | m_name |
object name | |
int | m_identifier |
object unique identifier | |
int | m_tag |
user-supplied tag | |
Member Function Documentation
◆ GetForces()
|
inline |
Access the list of applied forces, so you can add new ones by using push_back(), remove them, count them, etc.
Note that if you add nodes, these should belong to the referenced mesh.
◆ InputSimpleForces()
void chrono::fea::ChLoadContactSurfaceMesh::InputSimpleForces | ( | const std::vector< ChVector3d > & | vert_forces, |
const std::vector< int > & | vert_ind | ||
) |
Set the forces to the nodes in a pointer-less way, where forces are given as a vector of xyz vectors and indexes to the referenced vertex, as obtained by OutputSimpleMesh.
NOTE: do not insert/remove nodes from the collision mesh between the OutputSimpleMesh-InputSimpleForces pair!
- Parameters
-
vert_forces array of forces (absolute xyz forces in [N]) vert_ind array of indexes to vertexes to which forces are applied
◆ OutputSimpleMesh()
void chrono::fea::ChLoadContactSurfaceMesh::OutputSimpleMesh | ( | std::vector< ChVector3d > & | vert_pos, |
std::vector< ChVector3d > & | vert_vel, | ||
std::vector< ChVector3i > & | triangles | ||
) |
Get the collision mesh in a pointer-less way, where vertices are given in a vector of xyz points, and triangles are given as indexes to the three vertexes in that vector (similar to Wavefront OBJ meshes) Note, indexes are 0-based.
These vectors can be later sent to another computing node that computes, say, CFD forces on the mesh.
- Parameters
-
vert_pos array of vertexes (absolute xyz positions) vert_vel array of vertexes (absolute xyz velocities, might be useful) triangles array of triangles (indexes to vertexes, ccw)
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono/fea/ChLoadContactSurfaceMesh.h
- /builds/uwsbel/chrono/src/chrono/fea/ChLoadContactSurfaceMesh.cpp