MULTIBODY SIMULATION SOFTWARE - API documentation
Public Member Functions | Protected Attributes
chrono::ChLinkMarkers Class Reference

#include <CHlinkMarkers.h>

Inheritance diagram for chrono::ChLinkMarkers:
Inheritance graph
[legend]
Collaboration diagram for chrono::ChLinkMarkers:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void Copy (ChLinkMarkers *source)
virtual ChLinknew_Duplicate ()
virtual int GetType ()
ChMarkerGetMarker1 ()
ChMarkerGetMarker2 ()
virtual void SetMarker1 (ChMarker *mark1)
virtual void SetMarker2 (ChMarker *mark2)
void SetMarkers (ChMarker *mark1, ChMarker *mark2)
void SwapMainSlaveMarkers ()
void SetMarkID1 (int mid)
void SetMarkID2 (int mid)
int GetMarkID1 ()
int GetMarkID2 ()
int ReferenceMarkers (ChMarker *mark1, ChMarker *mark2)
virtual int Initialize (ChSharedPtr< ChMarker > &mark1, ChSharedPtr< ChMarker > &mark2)
virtual int Initialize (ChSharedPtr< ChBody > &mbody1, ChSharedPtr< ChBody > &mbody2, ChCoordsys<> mpos)
virtual int Initialize (ChSharedPtr< ChBody > &mbody1, ChSharedPtr< ChBody > &mbody2, bool pos_are_relative, ChCoordsys<> mpos1, ChCoordsys<> mpos2)
ChCoordsys GetLinkRelativeCoords ()
virtual void UpdateRelMarkerCoords ()
virtual void UpdateForces (double mytime)
virtual void Update (double mytime)
virtual void ConstraintsFbLoadForces (double factor=1.)
Coordsys GetRelM ()
Coordsys GetRelM_dt ()
Coordsys GetRelM_dtdt ()
double GetRelAngle ()
Vector GetRelAxis ()
Vector GetRelRotaxis ()
Vector GetRelWvel ()
Vector GetRelWacc ()
double GetDist ()
double GetDist_dt ()
VectorGet_Scr_force ()
VectorGet_Scr_torque ()
void Set_Scr_force (Vector mf)
void Set_Scr_torque (Vector mf)
Vector GetC_force ()
Vector GetC_torque ()
virtual void StreamIN (ChStreamInBinary &mstream)
virtual void StreamOUT (ChStreamOutBinary &mstream)
virtual void StreamOUT (ChStreamOutAscii &mstream)

Protected Attributes

ChMarkermarker1
ChMarkermarker2
int markID1
int markID2
Coordsys relM
Coordsys relM_dt
Coordsys relM_dtdt
double relAngle
Vector relAxis
Vector relRotaxis
Vector relWvel
Vector relWacc
double dist
double dist_dt
Vector Scr_force
Vector Scr_torque
Vector C_force
Vector C_torque

Detailed Description

Class for links which connect two 'markers'. The markers are two ChMarker objects each belonging to the two linked ChBody parts. Many specialized classes are based on this ChLinkMarkers class, for example the ChLinkSpring and all the family of the ChLinkLock classes - see them-. Also, ChLinkMarkers class allows an optional force vector and torque vector to be set between the two connected markers.


Member Function Documentation

void chrono::ChLinkMarkers::ConstraintsFbLoadForces ( double  factor = 1.) [virtual]

Overrides the empty behaviour of the parent ChLink implementation, which does not consider any user-imposed force between the two bodies. It adds the current link-forces, if any, (caused by springs, etc.) to the 'fb' vectors of the ChLcpVariables referenced by encapsulated ChLcpConstraints. In details, it adds the effect caused by C_force and C_torque. Both C_force and C_torque these forces are considered expressed in the reference coordsystem of marker2 (the MAIN marker), and their application point is the origin of marker1 (the SLAVE marker).

Reimplemented from chrono::ChPhysicsItem.

Vector* chrono::ChLinkMarkers::Get_Scr_force ( )

To get & set the 'script' force buffers(only accessed by external scripts, so it's up to the script to remember to set& reset them -link class just add them to C_force etc.

Vector chrono::ChLinkMarkers::GetC_force ( )

Get the total applied force accumulators (force, momentum) in link coords. These forces might be affected by additional springs, dampers, etc. but they do not include the reaction forces.

ChCoordsys chrono::ChLinkMarkers::GetLinkRelativeCoords ( ) [virtual]

Get the link coordinate system, expressed relative to Body2 (the 'master' body). This represents the 'main' reference of the link: reaction forces and torques are expressed in this coordinate system. (It is the coordinate system of the 'master' marker2 relative to Body2)

Reimplemented from chrono::ChLink.

int chrono::ChLinkMarkers::Initialize ( ChSharedPtr< ChMarker > &  mark1,
ChSharedPtr< ChMarker > &  mark2 
) [virtual]

Use this function after link creation, to initialize the link from two markers to join. Each marker must belong to a rigid body, and both rigid bodies must belong to the same ChSystem. The position of mark2 is used as link's position and main reference.

Parameters:
mark1first marker to join
mark2second marker to join (master)
int chrono::ChLinkMarkers::Initialize ( ChSharedPtr< ChBody > &  mbody1,
ChSharedPtr< ChBody > &  mbody2,
ChCoordsys<>  mpos 
) [virtual]

Use this function after link creation, to initialize the link from two joined rigid bodies. Both rigid bodies must belong to the same ChSystem. Two markers will be created and added to the rigid bodies (later, you can use GetMarker1() and GetMarker2() to access them. To specify the (absolute) position of link and markers, use 'mpos'.

Parameters:
mbody1first body to join
mbody2second body to join
mposthe current absolute pos.& alignment.
int chrono::ChLinkMarkers::Initialize ( ChSharedPtr< ChBody > &  mbody1,
ChSharedPtr< ChBody > &  mbody2,
bool  pos_are_relative,
ChCoordsys<>  mpos1,
ChCoordsys<>  mpos2 
) [virtual]

Use this function after link creation, to initialize the link from two joined rigid bodies. Both rigid bodies must belong to the same ChSystem. Two markers will be created and added to the rigid bodies (later, you can use GetMarker1() and GetMarker2() to access them. To specify the (absolute) position of link and markers, use 'mpos'.

Parameters:
mbody1first body to join
mbody2second body to join
pos_are_relativeif =true, following two positions are relative to bodies. If false, are absolute.
mpos1the position & alignment of 1st marker (relative to body1 cords, or absolute)
mpos2the position & alignment of 2nd marker (relative to body2 cords, or absolute)
void chrono::ChLinkMarkers::SetMarkers ( ChMarker mark1,
ChMarker mark2 
)

Set both constrained markers at once. Note that also Body1 and Body2 are automatically set (they are of course the owners of the two markers)

void chrono::ChLinkMarkers::StreamIN ( ChStreamInBinary mstream) [virtual]
void chrono::ChLinkMarkers::StreamOUT ( ChStreamOutBinary mstream) [virtual]
virtual void chrono::ChLinkMarkers::StreamOUT ( ChStreamOutAscii mstream) [virtual]

Method to allow serialization of transient data in ascii, as a readable item, for example "chrono::GetLog() << myobject;"

Reimplemented from chrono::ChLink.

Reimplemented in chrono::ChLinkMasked, and chrono::ChLinkNumdiff.

void chrono::ChLinkMarkers::SwapMainSlaveMarkers ( )

Exchange the master and the slave marker. The same happens for body1 and body2, automatically.

void chrono::ChLinkMarkers::Update ( double  mytime) [virtual]

This is an important function, which is called by the owner ChSystem at least once per integration step. It may update all auxiliary data of the link, such as matrices if any, etc. The inherited classes, for example the ChLinkMask, often implement specialized versions of this Update(time) function, because they might need to update inner states, forces, springs, etc. This base version, by default, simply updates the time.

Reimplemented from chrono::ChLink.

Reimplemented in chrono::ChLinkMasked.

void chrono::ChLinkMarkers::UpdateForces ( double  mytime) [virtual]

Updates auxiliary forces caused by springs/dampers/etc. which may be connected between the two bodies of the link. By default, it adds the forces which might have been added by the user using Set_Scr_force() and Set_Scr_torque(). Note, these forces are considered in the reference coordsystem of marker2 (the MAIN marker), and their application point is the origin of marker1 (the SLAVE marker).

Reimplemented in chrono::ChLinkMasked, chrono::ChLinkLock, chrono::ChLinkSpring, chrono::ChLinkWheel, chrono::ChLinkEngine, chrono::ChLinkPneumaticActuator, chrono::ChLinkBrake, and chrono::ChLinkClearance.

void chrono::ChLinkMarkers::UpdateRelMarkerCoords ( ) [virtual]

Updates auxiliary vars relM, relM_dt, relM_dtdt, dist, dist_dt et similia.

UPDATING PROCEDURES

Reimplemented in chrono::ChLinkLock.


CHRONO::ENGINE
C++ library for multibody simulation, (C) Alessandro Tasora
This API documentation has been generated on Tue Jul 10 2012 by Doxygen