chrono::fea::ChContactSegmentXYZRot Class Reference

Description

Contact segment for FEA elements that use XYZRot nodes.

Used to 'tessellate' FEA meshes with 1-D elements for collision purposes.

#include <ChContactSurfaceSegmentSet.h>

Inheritance diagram for chrono::fea::ChContactSegmentXYZRot:
Collaboration diagram for chrono::fea::ChContactSegmentXYZRot:

Public Member Functions

 ChContactSegmentXYZRot (std::shared_ptr< ChNodeFEAxyzrot > node1, std::shared_ptr< ChNodeFEAxyzrot > node2, ChContactSurface *container=nullptr)
 
 ChContactSegmentXYZRot (const std::array< std::shared_ptr< ChNodeFEAxyzrot >, 2 > &nodes, ChContactSurface *container=nullptr)
 
void SetNodes (const std::array< std::shared_ptr< ChNodeFEAxyzrot >, 2 > &nodes)
 Set the FEA nodes for which this is a proxy.
 
void SetNodeOwnership (const ChVector2b &owns_node)
 Set node ownership.
 
std::shared_ptr< ChNodeFEAxyzrotGetNode (int i) const
 Acccess the specified FEA node for which this is a proxy.
 
bool OwnsNode (int i) const
 Returns true if the specified node is owned by this segment.
 
const ChVector3dGetPos1 () const
 Get the current position of first node.
 
const ChVector3dGetPos2 () const
 Get the current position of second node.
 
ChContactSurfaceGetContactSurface () const
 Get the contact surface container.
 
void SetContactSurface (ChContactSurface *contact_surface)
 Set the contact surface container.
 
virtual ChContactable::Type GetContactableType () const override
 Return the type of contactable (here, a contactable with 2 variables, each with 6 DOFs).
 
virtual ChConstraintTupleCreateConstraintTuple () override
 Create a constraint tuple with the appropriate number of variables for this contactable object. More...
 
virtual bool IsContactActive () override
 Indicate if the object must be considered in collision detection.
 
virtual int GetContactableNumCoordsPosLevel () override
 Get the number of DOFs affected by this object (position part).
 
virtual int GetContactableNumCoordsVelLevel () override
 Get the number of DOFs affected by this object (speed part).
 
virtual void ContactableGetStateBlockPosLevel (ChState &x) override
 Get all the DOFs packed in a single vector (position part).
 
virtual void ContactableGetStateBlockVelLevel (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 ChVector3d GetContactPoint (const ChVector3d &loc_point, const ChState &state_x) override
 Express the local point in absolute frame, for the given state position.
 
virtual ChVector3d GetContactPointSpeed (const ChVector3d &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 ChVector3d GetContactPointSpeed (const ChVector3d &abs_point) override
 Get the absolute speed of point abs_point if attached to the surface.
 
virtual ChFrame GetCollisionModelFrame () override
 Return the frame of the associated collision model relative to the contactable object.
 
virtual void ContactForceLoadResidual_F (const ChVector3d &F, const ChVector3d &T, const ChVector3d &abs_point, ChVectorDynamic<> &R) override
 Apply the force & torque, expressed in absolute reference, applied in pos, to the coordinates of the variables. More...
 
virtual void ContactComputeQ (const ChVector3d &F, const ChVector3d &T, const ChVector3d &point, const ChState &state_x, ChVectorDynamic<> &Q, int offset) override
 Compute a contiguous vector of generalized forces Q from a given force & torque at the given point. More...
 
virtual void ComputeJacobianForContactPart (const ChVector3d &abs_point, ChMatrix33<> &contact_plane, ChConstraintTuple *jacobian_tuple_N, ChConstraintTuple *jacobian_tuple_U, ChConstraintTuple *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 ChPhysicsItemGetPhysicsItem () override
 This is only for backward compatibility.
 
double ComputeUfromP (const ChVector3d &P)
 Compute u of contact point with respect to the segment. More...
 
- Public Member Functions inherited from chrono::ChContactable
void AddCollisionModel (std::shared_ptr< ChCollisionModel > model)
 Add the collision model.
 
void AddCollisionShape (std::shared_ptr< ChCollisionShape > shape, const ChFrame<> &frame=ChFrame<>())
 Add a collision shape. More...
 
std::shared_ptr< ChCollisionModelGetCollisionModel () const
 Access the collision model.
 
void SetUserData (const std::shared_ptr< void > &data)
 Set user-data associated with this contactable.
 
bool HasData () const
 Check if this contactable has associated user-data.
 
template<typename T >
std::shared_ptr< T > GetUserData () const
 Get the user-data using static cast to a known type.
 
virtual void ComputeJacobianForRollingContactPart (const ChVector3d &abs_point, ChMatrix33<> &contact_plane, ChConstraintTuple *jacobian_tuple_N, ChConstraintTuple *jacobian_tuple_U, ChConstraintTuple *jacobian_tuple_V, bool second)
 Compute the rolling Jacobian part(s) for this contactable item. More...
 
void ArchiveOut (ChArchiveOut &archive_out)
 Method to allow serialization of transient data to archives.
 
void ArchiveIn (ChArchiveIn &archive_in)
 Method to allow deserialization of transient data from archives.
 

Additional Inherited Members

- Public Types inherited from chrono::ChContactable
enum  Type {
  Type::UNKNOWN, Type::ONE_1, Type::ONE_2, Type::ONE_3,
  Type::ONE_4, Type::ONE_5, Type::ONE_6, Type::TWO_33,
  Type::TWO_66, Type::THREE_333, Type::THREE_666
}
 Contactable type (based on number of variables objects and their DOFs). More...
 
- Protected Attributes inherited from chrono::ChContactable
std::shared_ptr< ChCollisionModelcollision_model
 collision model for the contactable object
 
std::vector< ChVariables * > m_contactable_variables
 variables associated with the contactable object
 
std::shared_ptr< void > m_data
 arbitrary user-data
 

Member Function Documentation

◆ ComputeJacobianForContactPart()

void chrono::fea::ChContactSegmentXYZRot::ComputeJacobianForContactPart ( const ChVector3d abs_point,
ChMatrix33<> &  contact_plane,
ChConstraintTuple jacobian_tuple_N,
ChConstraintTuple jacobian_tuple_U,
ChConstraintTuple jacobian_tuple_V,
bool  second 
)
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.

Implements chrono::ChContactable.

◆ ComputeUfromP()

double chrono::fea::ChContactSegmentXYZRot::ComputeUfromP ( const ChVector3d P)

Compute u of contact point with respect to the segment.

u is the line parameter of the point projection onto the segment, in the node1->node2 direction and such that u=0 indicates that P projects into node1.

◆ ContactableIncrementState()

void chrono::fea::ChContactSegmentXYZRot::ContactableIncrementState ( const ChState x,
const ChStateDelta dw,
ChState x_new 
)
overridevirtual

Increment the provided state of this object by the given state-delta increment.

Compute: x_new = x + dw.

Implements chrono::ChContactable.

◆ ContactComputeQ()

void chrono::fea::ChContactSegmentXYZRot::ContactComputeQ ( const ChVector3d F,
const ChVector3d T,
const ChVector3d point,
const ChState state_x,
ChVectorDynamic<> &  Q,
int  offset 
)
overridevirtual

Compute a contiguous vector of generalized forces Q from a given force & torque at the given point.

Used for computing stiffness matrix (square force jacobian) by backward differentiation. 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()

void chrono::fea::ChContactSegmentXYZRot::ContactForceLoadResidual_F ( const ChVector3d F,
const ChVector3d T,
const ChVector3d abs_point,
ChVectorDynamic<> &  R 
)
overridevirtual

Apply the force & torque, 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.

◆ CreateConstraintTuple()

virtual ChConstraintTuple* chrono::fea::ChContactSegmentXYZRot::CreateConstraintTuple ( )
inlineoverridevirtual

Create a constraint tuple with the appropriate number of variables for this contactable object.

Required for NSC contact formulation.

Implements chrono::ChContactable.

◆ GetContactPointSpeed()

ChVector3d chrono::fea::ChContactSegmentXYZRot::GetContactPointSpeed ( const ChVector3d loc_point,
const ChState state_x,
const ChStateDelta state_w 
)
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.


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono/fea/ChContactSurfaceSegmentSet.h
  • /builds/uwsbel/chrono/src/chrono/fea/ChContactSurfaceSegmentSet.cpp