Description
Class for smooth (penalty-based) contact between two generic contactable objects.
#include <ChContactSMC.h>


Public Member Functions | |
ChContactSMC (ChContactContainer *contact_container, ChContactable *obj_A, ChContactable *obj_B, const ChCollisionInfo &cinfo, const ChContactMaterialCompositeSMC &mat) | |
virtual ChVector3d | GetContactForce () const override |
Get the contact force, if computed, in contact coordinate system. | |
virtual ChVector3d | GetContactTorque () const override |
Get the contact torque, if computed, in contact coordinate system. | |
double | GetContactPenetration () const |
Get the contact penetration (positive if there is overlap). | |
ChVector3d | GetContactForceAbs () const |
Get the contact force, expressed in the absolute frame. | |
ChVector3d | GetContactTorqueAbs () const |
Get the contact torque, expressed in the absolute frame. | |
const ChKRMBlock * | GetJacobianKRM () const |
Access the proxy to the Jacobian. | |
const ChMatrixDynamic< double > * | GetJacobianK () const |
const ChMatrixDynamic< double > * | GetJacobianR () const |
void | Reset (ChContactable *obj_A, ChContactable *obj_B, const ChCollisionInfo &cinfo, const ChContactMaterialCompositeSMC &mat) |
Reinitialize this contact for reuse. More... | |
ChWrenchd | CalculateForceTorque (double delta, const ChVector3d &normal_dir, const ChVector3d &vel1, const ChVector3d &vel2, const ChContactMaterialCompositeSMC &mat) |
Calculate contact force, and maybe torque too, expressed in absolute coordinates. More... | |
void | CalculateQ (const ChState &stateA_x, const ChStateDelta &stateA_w, const ChState &stateB_x, const ChStateDelta &stateB_w, const ChContactMaterialCompositeSMC &mat, ChVectorDynamic<> &Q) |
Compute all forces in a contiguous array. More... | |
void | CreateJacobians () |
Create the Jacobian matrices. More... | |
void | CalculateJacobians (const ChContactMaterialCompositeSMC &mat) |
Calculate Jacobian of generalized contact forces. | |
virtual void | ContIntLoadResidual_F (ChVectorDynamic<> &R, const double c) override |
Apply contact forces to the two objects. More... | |
virtual void | ContInjectKRMmatrices (ChSystemDescriptor &mdescriptor) override |
Inject Jacobian blocks into the system descriptor. More... | |
virtual void | ContKRMmatricesLoad (double Kfactor, double Rfactor) override |
Compute Jacobian of contact forces. | |
![]() | |
void | Reset_cinfo (ChContactable *obj_A, ChContactable *obj_B, const ChCollisionInfo &cinfo) |
Reinitialize geometric information for this contact for reuse. More... | |
ChContactable * | GetObjA () |
Get the colliding object A, with point P1. | |
ChContactable * | GetObjB () |
Get the colliding object B, with point P2. | |
ChCoordsys | GetContactCoords () const |
Get the contact coordinate system, expressed in absolute frame. More... | |
const ChMatrix33 & | GetContactPlane () const |
Returns the pointer to a contained 3x3 matrix representing the UV and normal directions of the contact. More... | |
const ChVector3d & | GetContactP1 () const |
Get the contact point 1, in absolute coordinates. | |
const ChVector3d & | GetContactP2 () const |
Get the contact point 2, in absolute coordinates. | |
const ChVector3d & | GetContactNormal () const |
Get the contact normal, in absolute coordinates. | |
double | GetContactDistance () const |
Get the contact distance. | |
double | GetEffectiveCurvatureRadius () const |
Get the effective radius of curvature. | |
virtual void | ContIntStateGatherReactions (const unsigned int off_L, ChVectorDynamic<> &L) |
virtual void | ContIntStateScatterReactions (const unsigned int off_L, const ChVectorDynamic<> &L) |
virtual void | ContIntLoadResidual_CqL (const unsigned int off_L, ChVectorDynamic<> &R, const ChVectorDynamic<> &L, const double c) |
virtual void | ContIntLoadConstraint_C (const unsigned int off_L, ChVectorDynamic<> &Qc, const double c, bool do_clamp, double recovery_clamp) |
virtual void | ContIntToDescriptor (const unsigned int off_L, const ChVectorDynamic<> &L, const ChVectorDynamic<> &Qc) |
virtual void | ContIntFromDescriptor (const unsigned int off_L, ChVectorDynamic<> &L) |
virtual void | InjectConstraints (ChSystemDescriptor &descriptor) |
virtual void | ConstraintsBiReset () |
virtual void | ConstraintsBiLoad_C (double factor=1., double recovery_clamp=0.1, bool do_clamp=false) |
virtual void | ConstraintsFetch_react (double factor) |
Additional Inherited Members | |
![]() | |
ChContact (ChContactContainer *contact_container, ChContactable *obj_A, ChContactable *obj_B) | |
![]() | |
ChContactContainer * | container |
associated contact container | |
ChContactable * | objA |
first ChContactable object in the pair | |
ChContactable * | objB |
second ChContactable object in the pair | |
ChVector3d | p1 |
max penetration point on geo1, after refining, in abs space | |
ChVector3d | p2 |
max penetration point on geo2, after refining, in abs space | |
ChVector3d | normal |
normal, on surface of master reference (geo1) | |
ChMatrix33 | contact_plane |
the plane of contact (X is normal direction) | |
double | norm_dist |
penetration distance (negative if going inside) after refining | |
double | eff_radius |
effective radius of curvature at contact | |
Constructor & Destructor Documentation
◆ ChContactSMC()
chrono::ChContactSMC::ChContactSMC | ( | ChContactContainer * | contact_container, |
ChContactable * | obj_A, | ||
ChContactable * | obj_B, | ||
const ChCollisionInfo & | cinfo, | ||
const ChContactMaterialCompositeSMC & | mat | ||
) |
- Parameters
-
contact_container contact container obj_A contactable object A obj_B contactable object B cinfo data for the collision pair mat composite material
Member Function Documentation
◆ CalculateForceTorque()
ChWrenchd chrono::ChContactSMC::CalculateForceTorque | ( | double | delta, |
const ChVector3d & | normal_dir, | ||
const ChVector3d & | vel1, | ||
const ChVector3d & | vel2, | ||
const ChContactMaterialCompositeSMC & | mat | ||
) |
Calculate contact force, and maybe torque too, expressed in absolute coordinates.
- Parameters
-
delta overlap in normal direction normal_dir normal contact direction (expressed in global frame) vel1 velocity of contact point on objA (expressed in global frame) vel2 velocity of contact point on objB (expressed in global frame) mat composite material for contact pair
◆ CalculateQ()
void chrono::ChContactSMC::CalculateQ | ( | const ChState & | stateA_x, |
const ChStateDelta & | stateA_w, | ||
const ChState & | stateB_x, | ||
const ChStateDelta & | stateB_w, | ||
const ChContactMaterialCompositeSMC & | mat, | ||
ChVectorDynamic<> & | Q | ||
) |
Compute all forces in a contiguous array.
Used in finite-difference Jacobian approximation.
- Parameters
-
stateA_x state positions for objA stateA_w state velocities for objA stateB_x state positions for objB stateB_w state velocities for objB mat composite material for contact pair Q output generalized forces
◆ ContInjectKRMmatrices()
|
overridevirtual |
Inject Jacobian blocks into the system descriptor.
Tell to a system descriptor that there are item(s) of type ChKRMBlock in this object (for further passing it to a solver)
Reimplemented from chrono::ChContact.
◆ ContIntLoadResidual_F()
|
overridevirtual |
Apply contact forces to the two objects.
(new version, for interfacing to ChTimestepper and ChIntegrable)
Reimplemented from chrono::ChContact.
◆ CreateJacobians()
void chrono::ChContactSMC::CreateJacobians | ( | ) |
Create the Jacobian matrices.
These matrices are created/resized as needed.
◆ Reset()
void chrono::ChContactSMC::Reset | ( | ChContactable * | obj_A, |
ChContactable * | obj_B, | ||
const ChCollisionInfo & | cinfo, | ||
const ChContactMaterialCompositeSMC & | mat | ||
) |
Reinitialize this contact for reuse.
- Parameters
-
obj_A contactable object A obj_B contactable object B cinfo data for the collision pair mat composite material
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono/physics/ChContactSMC.h
- /builds/uwsbel/chrono/src/chrono/physics/ChContactSMC.cpp