MBSim

Project Page
Public Member Functions | Protected Attributes | Private Attributes
MBSim::SingleContact Class Reference

class for contacts More...

#include <single_contact.h>

Inheritance diagram for MBSim::SingleContact:
MBSim::LinkMechanics MBSim::Link MBSim::Element

List of all members.

Public Member Functions

 SingleContact (const std::string &name="")
 constructor
virtual ~SingleContact ()
 destructor
virtual void updatewb (double t, int i=0)
virtual void updateW (double t, int i=0)
virtual void updateV (double t, int i=0)
virtual void updateh (double t, int i=0)
virtual void updateg (double t)
virtual void updategd (double t)
virtual void updateStopVector (double t)
virtual void updateJacobians (double t, int j=0)
virtual void updateWRef (const fmatvec::Mat &ref, int j=0)
 references to contact force direction matrix of dynamic system parent
virtual void updateVRef (const fmatvec::Mat &ref, int j=0)
 references to condensed contact force direction matrix of dynamic system parent
virtual void updatehRef (const fmatvec::Vec &hRef, int j=0)
 references to complete and link smooth force vector of dynamic system parent
virtual void updatelaRef (const fmatvec::Vec &ref)
 references to contact force parameter of dynamic system parent
virtual void updategdRef (const fmatvec::Vec &ref)
 references to contact relative velocities of dynamic system parent
virtual void calcxSize ()
virtual void calclaSize (int j)
 calculates size of contact force parameters
virtual void calcgSize (int j)
 calculates size of relative distances
virtual void calcgdSize (int j)
 calculates size of relative velocities
virtual void calcrFactorSize (int j)
 calculates size of rfactors
virtual void calcsvSize ()
 calculates size of stopvector (root function for event driven integration)
virtual void calcLinkStatusSize ()
 calculates size of vector LinkStatus
virtual void calcLinkStatusRegSize ()
 calculates size of vector LinkStatusReg
virtual void init (InitStage stage)
 plots time series header
virtual bool isSetValued () const
 asks the link if it contains force laws that contribute to the lagrange multiplier and is therefore set valued
virtual bool isSingleValued () const
 asks the link if it contains single valued force laws that contribute to the right-hand side vector h
virtual void updateLinkStatus (double dt)
virtual void updateLinkStatusReg (double dt)
virtual bool isActive () const
virtual bool gActiveChanged ()
virtual void solveImpactsFixpointSingle (double dt)
 solve contact equations of motion with single step fixed point scheme on velocity level
virtual void solveConstraintsFixpointSingle ()
 solve contact equations of motion with single step fixed point scheme on acceleration level
virtual void solveImpactsGaussSeidel (double dt)
 solve contact equations of motion with Gauss-Seidel scheme on velocity level
virtual void solveConstraintsGaussSeidel ()
 solve contact equations of motion with Gauss-Seidel scheme on acceleration level
virtual void solveImpactsRootFinding (double dt)
 solve contact equations of motion with Newton scheme on velocity level
virtual void solveConstraintsRootFinding ()
 solve contact equations of motion with Newton scheme on acceleration level
virtual void jacobianConstraints ()
 computes JACOBIAN and mass action matrix of nonlinear contact equations on acceleration level
virtual void jacobianImpacts ()
 computes JACOBIAN and mass action matrix of nonlinear contact equations on velocity level
virtual void updaterFactors ()
 updates rfactor relaxation for contact equations
virtual void checkConstraintsForTermination ()
 verify underlying force laws on acceleration level concerning given tolerances
virtual void checkImpactsForTermination (double dt)
 verify underlying force laws on velocity level concerning given tolerances
virtual void checkActive (int j)
 sets the state of a set-valued link, e.g.
virtual void LinearImpactEstimation (fmatvec::Vec &gInActive_, fmatvec::Vec &gdInActive_, int *IndInActive_, fmatvec::Vec &gAct_, int *IndActive_)
 get gap distance and calculate gap velocity of unilateral links to estimate impacts within the next step
virtual void SizeLinearImpactEstimation (int *sizeInActive_, int *sizeActive_)
 calculates the number of active and inactive unilateral constraints and increments sizeActive/sizeInActive
virtual std::string getType () const
virtual void plot (double t, double dt=1)
 plots time dependent data
virtual void closePlot ()
 closes plot file
void setNormalForceLaw (GeneralizedForceLaw *fcl_)
GeneralizedForceLaw * getNormalForceLaw () const
void setNormalImpactLaw (GeneralizedImpactLaw *fnil_)
void setTangentialForceLaw (FrictionForceLaw *fdf_)
void setTangentialImpactLaw (FrictionImpactLaw *ftil_)
void setContactKinematics (ContactKinematics *ck)
ContactKinematics * getContactKinematics () const
ContourPointData *& getcpData ()
ContourPointData * getcpData () const
fmatvec::Vec & getlaN ()
fmatvec::Vec getlaN () const
fmatvec::Vec & getlaT ()
fmatvec::Vec getlaT () const
fmatvec::Vec & getgdN ()
fmatvec::Vec getgdN () const
fmatvec::Vec & getgdT ()
fmatvec::Vec getgdT () const
virtual int getFrictionDirections ()
virtual int getFrictionDirections () const
void connect (Contour *contour1, Contour *contour2, ContactKinematics *contactKinematics=0)
void applyh (int t, int j)
 apply forces to the h-vector
void computeCurvatures (fmatvec::Vec &r) const
virtual void initializeUsingXML (xercesc::DOMElement *element)
void calccorrSize (int j)
void updatecorr (int j)
void checkRoot ()

Protected Attributes

ContactKinematics * contactKinematics
 used contact kinematics
GeneralizedForceLaw * fcl
 force laws in normal and tangential direction on acceleration and velocity level
FrictionForceLaw * fdf
 force law defining relation between tangential velocities and tangential forces
GeneralizedImpactLaw * fnil
 force law defining relation between penetration velocity and resulting normal impulses
FrictionImpactLaw * ftil
 force law defining relation between tangential velocities and forces impulses
ContourPointData * cpData
 vector of frames for definition of relative contact situation
fmatvec::Vec laN
 force in normal direction
fmatvec::Vec laT
 force in tangential direction
fmatvec::Vec gdN
 relative velocity in normal direction
fmatvec::Vec gdT
 relative velocity in tangential direction
unsigned int gActive
 boolean vector symbolising activity of contacts on position level with possibility to save previous time step
unsigned int gActive0
unsigned int * gdActive
 boolean vector symbolising activity of contacts on velocity level
unsigned int * gddActive
 boolean vector symbolising activity of contacts on acceleration level
fmatvec::Index iT
 index for tangential directions in projection matrices
fmatvec::Vec gdnN
 relative velocity and acceleration after an impact for event driven scheme summarizing all possible contacts
fmatvec::Vec gdnT
fmatvec::Vec gddN
fmatvec::Vec gddT
fmatvec::Vec gddNBuf
 buffer for contact acceleration
fmatvec::Vec gddTBuf
int rootID
 type of detected root.

Private Attributes

std::string saved_ref1
std::string saved_ref2

Detailed Description

class for contacts

Author:
Martin Foerg
Date:
2009-04-02 some comments (Thorsten Schindler)
2009-07-16 splitted link / object right hand side (Thorsten Schindler)
2009-08-03 contacts can now visualize their ContactPointFrames (Markus Schneider)
2010-07-06 added LinkStatus and LinearImpactEstimation for timestepper ssc (Robert Huber)
2012-05-08 added LinkStatusReg for AutoTimeSteppingSSCIntegrator (Jan Clauberg)

basic class for contacts between contours, mainly implementing geometrical informations of contact-pairings

Remarks:


Constructor & Destructor Documentation

MBSim::SingleContact::SingleContact ( const std::string &  name = "")

constructor

Parameters:
nameof contact

Member Function Documentation

void MBSim::SingleContact::applyh ( int  t,
int  j 
)

apply forces to the h-vector

Parameters:
ttime of the integration
jposition in h-vector (0 or 1)
virtual void MBSim::SingleContact::checkActive ( int  j) [virtual]

sets the state of a set-valued link, e.g.

contact stays closed or contact will slide

Reimplemented from MBSim::Link.

void MBSim::SingleContact::connect ( Contour *  contour1,
Contour *  contour2,
ContactKinematics *  contactKinematics = 0 
)

connect two contours

Parameters:
firstcontour
secondcontour
specifythe contact kinematics

REMARK: The contact frame of the first contour is used to plot the contacts data in

virtual bool MBSim::SingleContact::gActiveChanged ( ) [virtual]
Returns:
has the relative distance vector changed?

Implements MBSim::Link.

Returns:
number of considered friction directions
virtual std::string MBSim::SingleContact::getType ( ) const [inline, virtual]
Returns:
std::string representation

Reimplemented from MBSim::LinkMechanics.

virtual void MBSim::SingleContact::init ( InitStage  stage) [virtual]

plots time series header

Parameters:
invocingparent class

Reimplemented from MBSim::LinkMechanics.

virtual bool MBSim::SingleContact::isActive ( ) const [virtual]
Returns:
are link equations active?

Implements MBSim::Link.

virtual bool MBSim::SingleContact::isSetValued ( ) const [virtual]

asks the link if it contains force laws that contribute to the lagrange multiplier and is therefore set valued

Returns:
set valued force laws used within the link?

Reimplemented from MBSim::Link.

virtual bool MBSim::SingleContact::isSingleValued ( ) const [virtual]

asks the link if it contains single valued force laws that contribute to the right-hand side vector h

Returns:
single valued force laws used within link?

Reimplemented from MBSim::Link.

virtual void MBSim::SingleContact::LinearImpactEstimation ( fmatvec::Vec &  gInActive_,
fmatvec::Vec &  gdInActive_,
int *  IndInActive_,
fmatvec::Vec &  gAct_,
int *  IndActive_ 
) [virtual]

get gap distance and calculate gap velocity of unilateral links to estimate impacts within the next step

Parameters:
gInActivegap distance of inactive links (return)
gdInActivegap velocities of inactive links (return)
IndInActiveindex for gInActive/gdInActive; incremented with size after storage (return and input)
gActgap distance of active links (return)
IndActiveindex for gActive; incremented with size after storage (return and input)

Reimplemented from MBSim::Link.

virtual void MBSim::SingleContact::plot ( double  t,
double  dt = 1 
) [virtual]

plots time dependent data

Parameters:
simulationtime
simulationtime step size for derivative calculation

Reimplemented from MBSim::LinkMechanics.


Member Data Documentation

unsigned int* MBSim::SingleContact::gdActive [protected]

boolean vector symbolising activity of contacts on velocity level

length of array is two with index 0 for normal direction and index one for tangential direction

unsigned int* MBSim::SingleContact::gddActive [protected]

boolean vector symbolising activity of contacts on acceleration level

length of array is two with index 0 for normal direction and index one for tangential direction

fmatvec::Vec MBSim::SingleContact::gdN [protected]

relative velocity in normal direction

Todo:
: only double needed here
fmatvec::Vec MBSim::SingleContact::gdT [protected]

relative velocity in tangential direction

Todo:
: use fixed size?
fmatvec::Vec MBSim::SingleContact::laN [protected]

force in normal direction

Todo:
: only double needed here
fmatvec::Vec MBSim::SingleContact::laT [protected]

force in tangential direction

Todo:
: use fixed size?

The documentation for this class was generated from the following file: