All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Attributes | Private Attributes | List of all members
MBSim::SingleContact Class Reference

class for contacts More...

#include <single_contact.h>

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

Public Member Functions

 SingleContact (const std::string &name="")
 constructor More...
 
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 gap velocities More...
 
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 More...
 
virtual bool isSetValued () const
 asks the link if it contains force laws that contribute to the lagrange multiplier and is therefore set valued More...
 
virtual bool isSingleValued () const
 asks the link if it contains single valued force laws that contribute to the right-hand side vector h More...
 
virtual void updateLinkStatus (double dt)
 
virtual void updateLinkStatusReg (double dt)
 
virtual bool isActive () const
 
virtual bool gActiveChanged ()
 
virtual bool detectImpact ()
 
virtual void solveImpactsFixpointSingle (double dt)
 
virtual void solveConstraintsFixpointSingle ()
 
virtual void solveImpactsGaussSeidel (double dt)
 
virtual void solveConstraintsGaussSeidel ()
 
virtual void solveImpactsRootFinding (double dt)
 
virtual void solveConstraintsRootFinding ()
 
virtual void jacobianConstraints ()
 computes JACOBIAN and mass action matrix of nonlinear contact equations
 
virtual void jacobianImpacts ()
 computes JACOBIAN and mass action matrix of nonlinear contact equations on velocity level
 
virtual void updaterFactors ()
 update relaxation factors for contact equations
 
virtual void checkConstraintsForTermination ()
 verify underlying force laws concerning given tolerances
 
virtual void checkImpactsForTermination (double dt)
 verify underlying force laws on velocity level concerning given tolerances
 
virtual void checkActive (int j)
 check if set-valued contacts are active and set corresponding attributes More...
 
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 More...
 
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 More...
 
virtual void closePlot ()
 closes plot file
 
void setNormalForceLaw (GeneralizedForceLaw *fcl_)
 
GeneralizedForceLawgetNormalForceLaw () const
 
void setNormalImpactLaw (GeneralizedImpactLaw *fnil_)
 
void setTangentialForceLaw (FrictionForceLaw *fdf_)
 
FrictionForceLawgetTangentialForceLaw () const
 
void setTangentialImpactLaw (FrictionImpactLaw *ftil_)
 
void setContactKinematics (ContactKinematics *ck)
 
ContactKinematics * getContactKinematics () const
 
ContourPointData *& getcpData ()
 
ContourPointDatagetcpData () const
 
fmatvec::VecgetlaN ()
 
fmatvec::Vec getlaN () const
 
fmatvec::VecgetlaT ()
 
fmatvec::Vec getlaT () const
 
fmatvec::VecgetgdN ()
 
fmatvec::Vec getgdN () const
 
fmatvec::VecgetgdT ()
 
fmatvec::Vec getgdT () const
 
virtual int getFrictionDirections ()
 
virtual int getFrictionDirections () const
 
void connect (Contour *contour1, Contour *contour2, ContactKinematics *contactKinematics=0)
 
void applyh (double t, int j)
 apply forces to the h-vector More...
 
void computeCurvatures (fmatvec::Vec &r) const
 
virtual void initializeUsingXML (xercesc::DOMElement *element)
 
void calccorrSize (int j)
 
void updatecorr (int j)
 
void checkRoot ()
 
- Public Member Functions inherited from MBSim::LinkMechanics
 LinkMechanics (const std::string &name)
 constructor More...
 
virtual ~LinkMechanics ()
 destructor
 
virtual void updatedhdz (double t)
 
virtual void updatedhdqRef (const fmatvec::Mat &ref, int i=0)
 
virtual void updatedhduRef (const fmatvec::SqrMat &ref, int i=0)
 
virtual void updatedhdtRef (const fmatvec::Vec &ref, int i=0)
 
virtual void updaterRef (const fmatvec::Vec &ref, int i=0)
 references to nonsmooth force vector of dynamic system parent
 
const std::vector< Contour * > & getContour () const
 
virtual void connect (Frame *frame_)
 
virtual void connect (Contour *contour_)
 
const std::vector< Frame * > & getFrame () const
 
- 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)
 sets the used dynamics system solver to the element More...
 
virtual void plotAtSpecialEvent (double t, double dt=1)
 plots time dependent data at special events More...
 
const std::string & getName () const
 
void setName (const std::string &str)
 
void setPath (const std::string &str)
 
DynamicSystemSolvergetDynamicSystemSolver ()
 
virtual void createPlotGroup ()
 creates the plotGroup for H5-output
 
H5::GroupBasegetPlotGroup ()
 
virtual void setPlotFeature (PlotFeature pf, PlotFeatureStatus value)
 Set a plot feature. More...
 
void setPlotFeatureForChildren (PlotFeature pf, PlotFeatureStatus value)
 Set a plot feature for the children of this object. More...
 
void setPlotFeatureRecursive (PlotFeature pf, PlotFeatureStatus value)
 Set a plot feature for this object and the children of this object. More...
 
PlotFeatureStatus getPlotFeature (PlotFeature pf)
 
PlotFeatureStatus getPlotFeatureForChildren (PlotFeature pf)
 
virtual xercesc::DOMElement * writeXMLFile (xercesc::DOMNode *element)
 
const std::vector
< MBXMLUtils::EmbedDOMLocator > & 
getLocationStack () const
 
template<class T >
T * getByPath (const std::string &path, bool initialCaller=true) const
 Get the object of type T represented by the path path. Do not set any argurment other than path!
 
std::string getPath (const Element *relTo=NULL, std::string sep="/") const
 Return the path of this object. If relativeTo is not NULL return a relative path to relativeTo. Do not set any argurment other than relTo and sep!
 
virtual ElementgetChildByContainerAndName (const std::string &container, const std::string &name) const
 Get the Element named name in the container named container.
 
virtual ElementgetParent ()
 
virtual const ElementgetParent () const
 
virtual void setParent (Element *parent_)
 
std::vector< Element * > getElementsDependingOn () const
 checks dependency on other elements. More...
 
void addDependency (Element *ele)
 
int computeLevel ()
 computes the length of the pathes in the graph that represents the dependencies between all elements. More...
 
- Public Member Functions inherited from fmatvec::Atom
Atomoperator= (const Atom &)
 
void setMessageStreamActive (MsgType type, bool active)
 
void getMessageStream (MsgType type, boost::shared_ptr< bool > &a, boost::shared_ptr< std::ostream > &s)
 
void adoptMessageStreams (const Atom *src=NULL)
 
std::ostream & msg (MsgType type)
 
bool msgAct (MsgType type)
 

Protected Attributes

ContactKinematics * contactKinematics
 used contact kinematics
 
GeneralizedForceLawfcl
 force laws in normal and tangential direction on acceleration and velocity level
 
FrictionForceLawfdf
 force law defining relation between tangential velocities and tangential forces
 
GeneralizedImpactLawfnil
 force law defining relation between penetration velocity and resulting normal impulses
 
FrictionImpactLawftil
 force law defining relation between tangential velocities and forces impulses
 
ContourPointDatacpData
 vector of frames for definition of relative contact situation
 
fmatvec::Vec laN
 force in normal direction More...
 
fmatvec::Vec laT
 force in tangential direction More...
 
fmatvec::Vec gdN
 relative velocity in normal direction More...
 
fmatvec::Vec gdT
 relative velocity in tangential direction More...
 
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 More...
 
unsigned int * gddActive
 boolean vector symbolising activity of contacts on acceleration level More...
 
fmatvec::Index iT
 index for tangential directions in projection matrices
 
fmatvec::Vec gdnN
 new gap velocity after an impact for event driven scheme
 
fmatvec::Vec gdnT
 
fmatvec::Vec gddN
 gap acceleration for event driven scheme on acceleration level
 
fmatvec::Vec gddT
 
fmatvec::Vec gddNBuf
 gap acceleration buffer
 
fmatvec::Vec gddTBuf
 
int rootID
 type of detected root More...
 
- Protected Attributes inherited from MBSim::LinkMechanics
std::vector< fmatvec::Vec3 > WF
 force and moment direction for smooth right hand side
 
std::vector< fmatvec::Vec3 > WM
 
std::vector< fmatvec::Mat3xV > fF
 cartesian force and moment direction matrix for nonsmooth right hand side
 
std::vector< fmatvec::Mat3xV > fM
 
std::vector< Frame * > frame
 array in which all frames are listed, connecting bodies via a link
 
std::vector< Contour * > contour
 array in which all contours are listed, connecting bodies via link
 
- Protected Attributes inherited from MBSim::Element
Elementparent
 
std::string name
 name of element
 
std::string path
 The path of this object. Is set during the init stage reorganizeHierarchy. Before this the path is calculated dynamically using getPath() after this stage getPath just returns this value.
 
std::vector
< MBXMLUtils::EmbedDOMLocator > 
locationStack
 
DynamicSystemSolverds
 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::GroupBaseplotGroup
 associated plot group
 
std::vector< Element * > dependency
 vector containing all dependencies.
 

Private Attributes

std::string saved_ref1
 
std::string saved_ref2
 

Additional Inherited Members

- Public Types inherited from MBSim::Element
enum  PlotFeatureStatus { enabled, disabled, unset }
 Plot feature status. More...
 
enum  PlotFeature {
  plotRecursive =0, separateFilePerGroup, state, stateDerivative,
  notMinimalState, rightHandSide, globalPosition, globalVelocity,
  globalAcceleration, energy, openMBV, generalizedLinkForce,
  linkKinematics, stopVector, debug, LASTPLOTFEATURE
}
 Plot Features. More...
 
enum  InitStage {
  modelBuildup =0, resolveXMLPath, preInit, resize,
  relativeFrameContourLocation, worldFrameContourLocation, plotting, reorganizeHierarchy,
  unknownStage, calculateLocalInitialValues, LASTINITSTAGE
}
 The stages of the initialization. More...
 
- Public Types inherited from fmatvec::Atom
enum  MsgType
 
- Static Public Member Functions inherited from MBSim::Element
static double getDouble (xercesc::DOMElement *e)
 
static int getInt (xercesc::DOMElement *e)
 
static bool getBool (xercesc::DOMElement *e)
 
static fmatvec::Vec3 getVec3 (xercesc::DOMElement *e)
 
static fmatvec::Vec getVec (xercesc::DOMElement *e, int rows=0)
 
static fmatvec::Mat3xV getMat3xV (xercesc::DOMElement *e, int cols=0)
 
static fmatvec::Mat getMat (xercesc::DOMElement *e, int rows=0, int cols=0)
 
static fmatvec::SqrMat3 getSqrMat3 (xercesc::DOMElement *e)
 
static fmatvec::SqrMat getSqrMat (xercesc::DOMElement *e, int size=0)
 
static fmatvec::SymMat3 getSymMat3 (xercesc::DOMElement *e)
 
static fmatvec::SymMat getSymMat (xercesc::DOMElement *e, int size=0)
 
- Static Public Member Functions inherited from fmatvec::Atom
static void setCurrentMessageStream (MsgType type, const boost::shared_ptr< bool > &a=boost::make_shared< bool >(true), const boost::shared_ptr< std::ostream > &s=boost::make_shared< std::ostream >(std::cout.rdbuf()))
 
static std::ostream & msgStatic (MsgType type)
 
static bool msgActStatic (MsgType type)
 
- Protected Member Functions inherited from MBSim::Element
void updatePlotFeatures ()
 
- Protected Member Functions inherited from fmatvec::Atom
 Atom (const Atom &src)
 

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)
2014-09-16 contact forces are calculated on acceleration level (Thorsten Schindler)

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 ( double  t,
int  j 
)

apply forces to the h-vector

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

calculates size of gap velocities

Parameters
flagto decide which contacts are included in the calculation

see SingleContact for the implementation and DynamicSystem for explanation

Reimplemented from MBSim::Link.

void MBSim::SingleContact::checkActive ( int  j)
virtual

check if set-valued contacts are active and set corresponding attributes

Parameters
flagto decide which criteria are used to define 'activity'

see SingleContact for the implementation and DynamicSystem for explanation

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

bool MBSim::SingleContact::detectImpact ( )
virtual
Returns
has an impact occured?

Reimplemented from MBSim::Link.

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

Implements MBSim::Link.

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

Reimplemented from MBSim::LinkMechanics.

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

plots time series header

Parameters
invocingparent class

Reimplemented from MBSim::LinkMechanics.

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

Implements MBSim::Link.

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.

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.

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.

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.

void MBSim::SingleContact::solveConstraintsFixpointSingle ( )
virtual

solve contact equations of motion with single step fixed point scheme

Reimplemented from MBSim::Link.

void MBSim::SingleContact::solveConstraintsGaussSeidel ( )
virtual

solve contact equations of motion with Gauss-Seidel scheme

Reimplemented from MBSim::Link.

void MBSim::SingleContact::solveConstraintsRootFinding ( )
virtual

solve contact equations of motion with Newton scheme

Reimplemented from MBSim::Link.

void MBSim::SingleContact::solveImpactsFixpointSingle ( double  dt)
virtual

solve impact equations of motion with single step fixed point scheme on velocity level

Parameters
timestep-size

Reimplemented from MBSim::Link.

void MBSim::SingleContact::solveImpactsGaussSeidel ( double  dt)
virtual

solve impact equations of motion with Gauss-Seidel scheme on velocity level

Parameters
timestep-size

Reimplemented from MBSim::Link.

void MBSim::SingleContact::solveImpactsRootFinding ( double  dt)
virtual

solve impact equations of motion with Newton scheme on velocity level

Parameters
timestep-size

Reimplemented from MBSim::Link.

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?
int MBSim::SingleContact::rootID
protected

type of detected root

1 = close-open transition / stick-slip transition 2 = slip-stick transition 3 = open-close transition, i.e., impact


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

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML