MBSim

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

class for contacts More...

#include <contact.h>

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

List of all members.

Public Member Functions

 Contact (const std::string &name)
 constructor
virtual ~Contact ()
 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 updatewbRef (const fmatvec::Vec &ref)
 references to TODO of dynamic system parent
virtual void updatelaRef (const fmatvec::Vec &ref)
 references to contact force parameter of dynamic system parent
virtual void updategRef (const fmatvec::Vec &ref)
 references to contact relative distances of dynamic system parent
virtual void updategdRef (const fmatvec::Vec &ref)
 references to contact relative velocities of dynamic system parent
virtual void updaterFactorRef (const fmatvec::Vec &ref)
 references to rfactors of dynamic system parent
virtual void updatesvRef (const fmatvec::Vec &ref)
 references to stopvector of dynamic system parent (root function for event driven integration)
virtual void updatejsvRef (const fmatvec::Vector< int > &ref)
 references to stopvector evaluation of dynamic system parent (root detection with corresponding bool array by event driven integrator)
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
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 setContactForceLaw (GeneralizedForceLaw *fcl_)
GeneralizedForceLaw * getContactForceLaw () const
void setContactImpactLaw (GeneralizedImpactLaw *fnil_)
void setFrictionForceLaw (FrictionForceLaw *fdf_)
void setFrictionImpactLaw (FrictionImpactLaw *ftil_)
void setContactKinematics (ContactKinematics *ck)
ContactKinematics * getContactKinematics () const
virtual int getFrictionDirections ()
void connect (Contour *contour1, Contour *contour2)
void computeCurvatures (fmatvec::Vec &r) const
virtual void initializeUsingXML (TiXmlElement *element)
void calccorrSize (int j)
void updatecorr (int j)
void updatecorrRef (const fmatvec::Vec &ref)
void checkRoot ()
- Public Member Functions inherited from MBSim::Element
 Element (const std::string &name)
 constructor
virtual ~Element ()
 destructor
virtual void initDataInterfaceBase (DynamicSystemSolver *parentds)
 TODO.
virtual void setDynamicSystemSolver (DynamicSystemSolver *sys)
virtual void plotAtSpecialEvent (double t, double dt=1)
 plots time dependent data at special events
const std::string & getName () const
const std::string getShortName () const
void setName (const std::string &str)
DynamicSystemSolver * getDynamicSystemSolver ()
virtual void createPlotGroup ()
 creates the plotGroup for H5-output
H5::Group * getPlotGroup ()
virtual void setPlotFeature (PlotFeature pf, PlotFeatureStatus value)
 Set a plot feature.
void setPlotFeatureForChildren (PlotFeature pf, PlotFeatureStatus value)
 Set a plot feature for the children of this object.
void setPlotFeatureRecursive (PlotFeature pf, PlotFeatureStatus value)
 Set a plot feature for this object and the children of this object.
PlotFeatureStatus getPlotFeature (PlotFeature pf)
PlotFeatureStatus getPlotFeatureForChildren (PlotFeature pf)
template<class T >
T * getByPath (std::string path)
 a general element access
virtual Element * getParent ()
virtual const Element * getParent () const
virtual void setParent (Element *parent_)
std::string getPath (char pathDelim='.')

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
std::vector< ContourPointData * > cpData
 vector of frames for definition of relative contact situation
std::vector< unsigned int > gActive
 boolean vector symbolising activity of contacts on position level with possibility to save previous time step
std::vector< unsigned int > gActive0
std::vector< unsigned int * > gdActive
 boolean vector symbolising activity of contacts on velocity level
std::vector< unsigned int * > gddActive
 boolean vector symbolising activity of contacts on acceleration level
fmatvec::Index iT
 index for tangential directions in projection matrices
fmatvec::Vec gdn
 relative velocity and acceleration after an impact for event driven scheme summarizing all possible contacts
fmatvec::Vec gdd
std::vector< fmatvec::Vec > gk
 vectors of relative distance, velocity, velocity after impact in event driven scheme, acceleration in event driven scheme, force parameters, acceleration description with respect to contour parameters, stop vector, relaxation factors for possible contact points
std::vector< fmatvec::Vec > gdk
std::vector< fmatvec::Vec > gdnk
std::vector< fmatvec::Vec > gddk
std::vector< fmatvec::Vec > lak
std::vector< fmatvec::Vec > wbk
std::vector< fmatvec::Vec > svk
std::vector< fmatvec::Vec > rFactork
std::vector< fmatvec::Vector
< int > > 
jsvk
 boolean evaluation of stop vector for possible contact points
std::vector< fmatvec::Mat * > fF
 single-valued forces for possible contact points
std::vector< fmatvec::Vec * > WF
 set-valued forces for possible contact points
std::vector< fmatvec::Mat * > Vk [2]
 condensed and full force direction matrix for possible contact points
std::vector< fmatvec::Mat * > Wk [2]
std::vector< int > laSizek
 size and index of force parameters, relative distances, relative velocities, stop vector and relaxation factors for possible contact points
std::vector< int > laIndk
std::vector< int > gSizek
std::vector< int > gIndk
std::vector< int > gdSizek
std::vector< int > gdIndk
std::vector< int > svSizek
std::vector< int > svIndk
std::vector< int > rFactorSizek
std::vector< int > rFactorIndk
std::vector< fmatvec::Vec > corrk
 vector for correction regarding projection.
std::vector< int > corrSizek
 size and index of correction vector.
std::vector< int > corrIndk
std::vector< int > rootID
 type of detected root.
std::vector< fmatvec::Vec > gddkBuf
 buffer for contact acceleration.
- Protected Attributes inherited from MBSim::Element
Element * parent
std::string name
 name of element
DynamicSystemSolver * ds
 dynamic system
H5::VectorSerie< double > * plotVectorSerie
 time series
std::vector< double > plotVector
 one entry of time series
std::vector< std::string > plotColumns
 columns of time series
H5::Group * plotGroup
 associated plot group

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::Contact::Contact ( const std::string &  name)

constructor

Parameters:
nameof contact

Member Function Documentation

virtual void MBSim::Contact::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::Contact::connect ( Contour *  contour1,
Contour *  contour2 
)

connect two contours

Parameters:
firstcontour
secondcontour
virtual bool MBSim::Contact::gActiveChanged ( )
virtual
Returns:
has the relative distance vector changed?

Implements MBSim::Link.

virtual int MBSim::Contact::getFrictionDirections ( )
virtual
Returns:
number of considered friction directions
virtual std::string MBSim::Contact::getType ( ) const
inlinevirtual
Returns:
std::string representation

Reimplemented from MBSim::LinkMechanics.

virtual void MBSim::Contact::init ( InitStage  stage)
virtual

plots time series header

Parameters:
invocingparent class

Reimplemented from MBSim::LinkMechanics.

virtual bool MBSim::Contact::isActive ( ) const
virtual
Returns:
are link equations active?

Implements MBSim::Link.

virtual bool MBSim::Contact::isSetValued ( ) const
virtual
Returns:
set valued force laws used?

Reimplemented from MBSim::Link.

virtual void MBSim::Contact::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::Contact::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

std::vector<fmatvec::Vec> MBSim::Contact::corrk
protected

vector for correction regarding projection.

Needed e.g. to project contact to positive normal distance.


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