chrono::fea::ChContactNodeXYZROT Class Reference

Description

Proxy to FEA nodes with 3 xyz + 3 rot coords, to grant them the features needed for collision detection.

**Note: the ChContactNodeXYZ would be sufficient if ChNodeFEAxyz were inherited from ChNodeFEAxyzrot, but this does not happen -hopefully it will be, in future API-, so we need to implement also this ChContactNodeXYZROT as a proxy to ChNodeFEAxyzrot, sorry for code redundancy.

#include <ChContactSurfaceNodeCloud.h>

Inheritance diagram for chrono::fea::ChContactNodeXYZROT:

Public Member Functions

 ChContactNodeXYZROT (ChNodeFEAxyzrot *anode=0, ChContactSurface *acontainer=0)
 
ChNodeFEAxyzrotGetNode ()
 Access the FEA node to whom this is is a proxy.
 
void SetNode (ChNodeFEAxyzrot *mn)
 Set the FEA node to whom this is a proxy.
 
ChContactSurfaceGetContactSurface () const
 Get the contact surface container.
 
void GetContactSurface (ChContactSurface *mc)
 Set the contact surface container.
 
virtual ChVariablesGetVariables1 () override
 Access variables.
 
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, ChVariableTupleCarrier_1vars< 6 >::type_constraint_tuple &jacobian_tuple_N, ChVariableTupleCarrier_1vars< 6 >::type_constraint_tuple &jacobian_tuple_U, ChVariableTupleCarrier_1vars< 6 >::type_constraint_tuple &jacobian_tuple_V, bool second) override
 Compute the jacobian(s) part(s) for this contactable item. More...
 
virtual double GetContactableMass () override
 This can be useful in some SMC code:
 
virtual std::shared_ptr
< ChMaterialSurface > & 
GetMaterialSurfaceBase () override
 Return the pointer to the surface material.
 
virtual ChPhysicsItemGetPhysicsItem () override
 This is only for backward compatibility.
 
- Public Member Functions inherited from chrono::ChContactable_1vars< T1 >
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)=0
 Compute the jacobian(s) part(s) for this contactable item. More...
 
virtual void ComputeJacobianForRollingContactPart (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)
 Compute the jacobian(s) part(s) for this contactable item, for rolling about N,u,v (used only for rolling friction NSC contacts)
 

Additional Inherited Members

- Public Types inherited from chrono::ChContactable_1vars< T1 >
typedef
ChVariableTupleCarrier_1vars
< T1 > 
type_variable_tuple_carrier
 
typedef
ChVariableTupleCarrier_1vars
< T1 >::type_constraint_tuple 
type_constraint_tuple
 
- Public Types inherited from chrono::ChVariableTupleCarrier_1vars< T1 >
typedef
ChConstraintTuple_1vars
< ChVariableTupleCarrier_1vars
< N1 > > 
type_constraint_tuple
 
- Static Public Attributes inherited from chrono::ChVariableTupleCarrier_1vars< T1 >
static const int nvars1
 

Member Function Documentation

void chrono::fea::ChContactNodeXYZROT::ComputeJacobianForContactPart ( const ChVector<> &  abs_point,
ChMatrix33<> &  contact_plane,
ChVariableTupleCarrier_1vars< 6 >::type_constraint_tuple &  jacobian_tuple_N,
ChVariableTupleCarrier_1vars< 6 >::type_constraint_tuple &  jacobian_tuple_U,
ChVariableTupleCarrier_1vars< 6 >::type_constraint_tuple &  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.

virtual void chrono::fea::ChContactNodeXYZROT::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.

virtual void chrono::fea::ChContactNodeXYZROT::ContactForceLoadQ ( const ChVector<> &  F,
const ChVector<> &  point,
const ChState state_x,
ChVectorDynamic<> &  Q,
int  offset 
)
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 gloabl 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.

void chrono::fea::ChContactNodeXYZROT::ContactForceLoadResidual_F ( const ChVector<> &  F,
const ChVector<> &  abs_point,
ChVectorDynamic<> &  R 
)
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.

virtual ChVector chrono::fea::ChContactNodeXYZROT::GetContactPointSpeed ( const ChVector<> &  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.

virtual ChVector chrono::fea::ChContactNodeXYZROT::GetContactPointSpeed ( const ChVector<> &  abs_point)
overridevirtual

Get the absolute speed of point abs_point if attached to the surface.

Easy in this case because there are no roations..

Implements chrono::ChContactable.

virtual ChCoordsys chrono::fea::ChContactNodeXYZROT::GetCsysForCollisionModel ( )
overridevirtual

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.