Description
Contact element of triangular type.
This can be used to 'tessellate' the surface of FEA meshes for collision purposes.
#include <ChContactSurfaceMesh.h>
Public Member Functions | |
ChContactTriangleXYZ (std::shared_ptr< ChNodeFEAxyz > n1, std::shared_ptr< ChNodeFEAxyz > n2, std::shared_ptr< ChNodeFEAxyz > n3, ChContactSurface *acontainer=0) | |
collision::ChCollisionModel * | GetCollisionModel () |
std::shared_ptr< ChNodeFEAxyz > | GetNode1 () const |
Access the FEA node to whom this is a proxy as triangle vertex. | |
std::shared_ptr< ChNodeFEAxyz > | GetNode2 () const |
Access the FEA node to whom this is a proxy as triangle vertex. | |
std::shared_ptr< ChNodeFEAxyz > | GetNode3 () const |
Access the FEA node to whom this is a proxy as triangle vertex. | |
void | SetNode1 (std::shared_ptr< ChNodeFEAxyz > mn) |
Set the FEA node to whom this is a proxy. | |
void | SetNode2 (std::shared_ptr< ChNodeFEAxyz > mn) |
Set the FEA node to whom this is a proxy. | |
void | SetNode3 (std::shared_ptr< ChNodeFEAxyz > mn) |
Set the FEA node to whom this is a proxy. | |
ChContactSurface * | GetContactSurface () const |
Get the contact surface container. | |
void | SetContactSurface (ChContactSurface *mc) |
Set the contact surface container. | |
virtual ChContactable::eChContactableType | GetContactableType () const override |
This must return the proper eChContactableType enum, for allowing a faster collision dispatcher in ChContactContainer classes (this enum will be used instead of slow dynamic_cast<> to infer the type of ChContactable, if possible) | |
virtual ChVariables * | GetVariables1 () override |
Access variables for node 1. | |
virtual ChVariables * | GetVariables2 () override |
Access variables for node 2. | |
virtual ChVariables * | GetVariables3 () override |
Access variables for node 3. | |
virtual bool | IsContactActive () override |
Tell if the object must be considered in collision detection. | |
virtual int | ContactableGet_ndof_x () override |
Get the number of DOFs affected by this object (position part) | |
virtual int | ContactableGet_ndof_w () override |
Get the number of DOFs affected by this object (speed part) | |
virtual void | ContactableGetStateBlock_x (ChState &x) override |
Get all the DOFs packed in a single vector (position part) | |
virtual void | ContactableGetStateBlock_w (ChStateDelta &w) override |
Get all the DOFs packed in a single vector (speed part) | |
virtual void | ContactableIncrementState (const ChState &x, const ChStateDelta &dw, ChState &x_new) override |
Increment the provided state of this object by the given state-delta increment. More... | |
virtual ChVector | GetContactPoint (const ChVector<> &loc_point, const ChState &state_x) override |
Express the local point in absolute frame, for the given state position. | |
virtual ChVector | GetContactPointSpeed (const ChVector<> &loc_point, const ChState &state_x, const ChStateDelta &state_w) override |
Get the absolute speed of a local point attached to the contactable. More... | |
virtual ChVector | GetContactPointSpeed (const ChVector<> &abs_point) override |
Get the absolute speed of point abs_point if attached to the surface. More... | |
virtual ChCoordsys | GetCsysForCollisionModel () override |
Return the coordinate system for the associated collision model. More... | |
virtual void | ContactForceLoadResidual_F (const ChVector<> &F, const ChVector<> &abs_point, ChVectorDynamic<> &R) override |
Apply the force, expressed in absolute reference, applied in pos, to the coordinates of the variables. More... | |
virtual void | ContactForceLoadQ (const ChVector<> &F, const ChVector<> &point, const ChState &state_x, ChVectorDynamic<> &Q, int offset) override |
Apply the given force at the given point and load the generalized force array. More... | |
virtual void | ComputeJacobianForContactPart (const ChVector<> &abs_point, ChMatrix33<> &contact_plane, type_constraint_tuple &jacobian_tuple_N, type_constraint_tuple &jacobian_tuple_U, type_constraint_tuple &jacobian_tuple_V, bool second) override |
Compute the jacobian(s) part(s) for this contactable item. More... | |
virtual double | GetContactableMass () override |
Return mass of contactable object. | |
virtual ChPhysicsItem * | GetPhysicsItem () override |
This is only for backward compatibility. | |
virtual int | LoadableGet_ndof_x () override |
Gets the number of DOFs affected by this element (position part). | |
virtual int | LoadableGet_ndof_w () override |
Gets the number of DOFs affected by this element (velocity part). | |
virtual void | LoadableGetStateBlock_x (int block_offset, ChState &mD) override |
Gets all the DOFs packed in a single vector (position part). | |
virtual void | LoadableGetStateBlock_w (int block_offset, ChStateDelta &mD) override |
Gets all the DOFs packed in a single vector (velocity part). | |
virtual void | LoadableStateIncrement (const unsigned int off_x, ChState &x_new, const ChState &x, const unsigned int off_v, const ChStateDelta &Dv) override |
Increment all DOFs using a delta. | |
virtual int | Get_field_ncoords () override |
Number of coordinates in the interpolated field, ex=3 for a tetrahedron finite element or a cable, = 1 for a thermal problem, etc. | |
virtual int | GetSubBlocks () override |
Get the number of DOFs sub-blocks. | |
virtual unsigned int | GetSubBlockOffset (int nblock) override |
Get the offset of the specified sub-block of DOFs in global vector. | |
virtual unsigned int | GetSubBlockSize (int nblock) override |
Get the size of the specified sub-block of DOFs in global vector. | |
virtual void | LoadableGetVariables (std::vector< ChVariables * > &mvars) override |
Get the pointers to the contained ChVariables, appending to the mvars vector. | |
virtual bool | IsSubBlockActive (int nblock) const override |
Check if the specified sub-block of DOFs is active. | |
virtual void | ComputeNF (const double U, const double V, ChVectorDynamic<> &Qi, double &detJ, const ChVectorDynamic<> &F, ChVectorDynamic<> *state_x, ChVectorDynamic<> *state_w) override |
Evaluate N'*F , where N is some type of shape function evaluated at U,V coordinates of the surface, each ranging in 0..+1 (as IsTriangleIntegrationNeeded() is true) F is a load, N'*F is the resulting generalized load Returns also det[J] with J=[dx/du,..], that might be useful in gauss quadrature. More... | |
virtual ChVector | ComputeNormal (const double U, const double V) override |
Gets the normal to the surface at the parametric coordinate U,V. More... | |
virtual bool | IsTriangleIntegrationNeeded () override |
If true, use quadrature over u,v in [0..1] range as triangle volumetric coords. | |
Member Function Documentation
◆ ComputeJacobianForContactPart()
|
overridevirtual |
Compute the jacobian(s) part(s) for this contactable item.
For example, if the contactable is a ChBody, this should update the corresponding 1x6 jacobian.
◆ ComputeNF()
|
overridevirtual |
Evaluate N'*F , where N is some type of shape function evaluated at U,V coordinates of the surface, each ranging in 0..+1 (as IsTriangleIntegrationNeeded() is true) F is a load, N'*F is the resulting generalized load Returns also det[J] with J=[dx/du,..], that might be useful in gauss quadrature.
- Parameters
-
U parametric coordinate in surface V parametric coordinate in surface Qi Return result of Q = N'*F here detJ Return det[J] here F Input F vector, size is =n. field coords. state_x if != 0, update state (pos. part) to this, then evaluate Q state_w if != 0, update state (speed part) to this, then evaluate Q
Implements chrono::ChLoadableUV.
◆ ComputeNormal()
|
overridevirtual |
Gets the normal to the surface at the parametric coordinate U,V.
Each coordinate ranging in -1..+1.
Implements chrono::ChLoadableUV.
◆ ContactableIncrementState()
|
overridevirtual |
Increment the provided state of this object by the given state-delta increment.
Compute: x_new = x + dw.
Implements chrono::ChContactable.
◆ ContactForceLoadQ()
|
overridevirtual |
Apply the given force at the given point and load the generalized force array.
The force and its application point are specified in the global frame. Each object must set the entries in Q corresponding to its variables, starting at the specified offset. If needed, the object states must be extracted from the provided state position.
Implements chrono::ChContactable.
◆ ContactForceLoadResidual_F()
|
overridevirtual |
Apply the force, expressed in absolute reference, applied in pos, to the coordinates of the variables.
Force for example could come from a penalty model.
Implements chrono::ChContactable.
◆ GetContactPointSpeed() [1/2]
|
overridevirtual |
Get the absolute speed of point abs_point if attached to the surface.
Easy in this case because there are no rotations..
Implements chrono::ChContactable.
◆ GetContactPointSpeed() [2/2]
|
overridevirtual |
Get the absolute speed of a local point attached to the contactable.
The given point is assumed to be expressed in the local frame of this object. This function must use the provided states.
Implements chrono::ChContactable.
◆ GetCsysForCollisionModel()
|
inlineoverridevirtual |
Return the coordinate system for the associated collision model.
ChCollisionModel might call this to get the position of the contact model (when rigid) and sync it.
Implements chrono::ChContactable.
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