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

Linear models from external preprocessing, e.g. Finite Element model. More...

#include <flexible_body_linear_external.h>

Inheritance diagram for MBSimFlexibleBody::FlexibleBodyLinearExternal:
MBSimFlexibleBody::FlexibleBody MBSim::Body MBSim::Object MBSim::Element fmatvec::Atom

Public Member Functions

 FlexibleBodyLinearExternal (const std::string &name)
 constructor More...
 
virtual ~FlexibleBodyLinearExternal ()
 destructor
 
virtual std::string getType () const
 
virtual void init (InitStage stage)
 
virtual void facLLM ()
 
virtual void BuildElements ()
 references finite element coordinates to assembled coordinates
 
virtual void GlobalVectorContribution (int n, const fmatvec::Vec &locVec, fmatvec::Vec &gloVec)
 insert 'local' information in global vectors More...
 
virtual void GlobalMatrixContribution (int n, const fmatvec::Mat &locMat, fmatvec::Mat &gloMat)
 insert 'local' information in global matrices More...
 
virtual void GlobalMatrixContribution (int n, const fmatvec::SymMat &locMat, fmatvec::SymMat &gloMat)
 insert 'local' information in global matrices More...
 
virtual void updateKinematicsForFrame (MBSim::ContourPointData &cp, MBSim::Frame::Feature ff, MBSim::Frame *frame=0)
 
virtual void updateJacobiansForFrame (MBSim::ContourPointData &data, MBSim::Frame *frame=0)
 
void readMassMatrix (const std::string &massfilename)
 
void setMassMatrix (const fmatvec::SymMat &mat)
 
void readStiffnessMatrix (const std::string &stiffnessfilename)
 
void setStiffnessMatrix (const fmatvec::SqrMat &mat)
 
void setProportionalDamping (const double &a, const double &b)
 
void setWrON00 (const fmatvec::Vec &WrON00_)
 
fmatvec::Mat computeJacobianMatrix (const MBSim::ContourPointData &CP)
 
- Public Member Functions inherited from MBSimFlexibleBody::FlexibleBody
 FlexibleBody (const std::string &name)
 constructor More...
 
virtual ~FlexibleBody ()
 destructor
 
virtual void updatedq ()
 
virtual void updateqd ()
 
virtual void updateh (int k=0)
 
virtual void updateM ()
 
virtual void updatedhdz ()
 
virtual void updatePositions (NodeFrame *frame)
 
virtual void updateVelocities (NodeFrame *frame)
 
virtual void updateAccelerations (NodeFrame *frame)
 
virtual void updateJacobians (NodeFrame *frame, int j=0)
 
virtual void updateGyroscopicAccelerations (NodeFrame *frame)
 
virtual void plot ()
 
virtual void initializeUsingXML (xercesc::DOMElement *element)
 
virtual double computeKineticEnergy ()
 
virtual double computePotentialEnergy ()
 
virtual void setFrameOfReference (MBSim::Frame *frame)
 
virtual void setq0 (fmatvec::Vec q0_)
 
virtual void setu0 (fmatvec::Vec u0_)
 
const fmatvec::VecgetqElement (int i)
 
const fmatvec::VecgetuElement (int i)
 
virtual fmatvec::Vec3 getAngles (int i)
 
virtual fmatvec::Vec3 getDerivativeOfAngles (int i)
 
void setMassProportionalDamping (const double d_)
 cartesian kinematic for contour or external frame (normal, tangent, binormal) is set by implementation class More...
 
void addFrame (NodeFrame *frame)
 
void addFrame (MBSim::ContourFrame *frame)
 
void addFrame (MBSim::FixedRelativeFrame *frame)
 
void addContour (MBSim::Contour *contour)
 
virtual void exportPositionVelocity (const std::string &filenamePos, const std::string &filenameVel=std::string(), const int &deg=3, const bool &writePsFile=false)
 interpolates the position and optional the velocity coordinates of the flexible body with Nurbs-package and exports the nurbs curve in the specified file More...
 
virtual void importPositionVelocity (const std::string &filenamePos, const std::string &filenameVel=std::string())
 imports the interpolated position and optional the velocity files (created with exportPositionVelocity) and fits the rigid and flexible coordinate dofs and optional the translatory velocity components of flexible body to the imported nurbs curve More...
 
void resetUpToDate ()
 
- Public Member Functions inherited from MBSim::Body
 Body (const std::string &name)
 
virtual void closePlot ()
 
virtual void setDynamicSystemSolver (DynamicSystemSolver *sys)
 
virtual ContourgetContour (const std::string &name, bool check=true) const
 
virtual FramegetFrame (const std::string &name, bool check=true) const
 
virtual FramegetFrameOfReference ()
 
virtual const FramegetFrameOfReference () const
 
int frameIndex (const Frame *frame_) const
 
int contourIndex (const Contour *contour_) const
 
virtual ElementgetChildByContainerAndName (const std::string &container, const std::string &name) const
 
 Object (const std::string &name)
 
virtual void updateqRef (const fmatvec::Vec &qRef)
 
virtual void updateqdRef (const fmatvec::Vec &qdRef)
 
virtual void updatedqRef (const fmatvec::Vec &dqRef)
 
virtual void updateuRef (const fmatvec::Vec &uRef)
 
virtual void updateuallRef (const fmatvec::Vec &uallRef)
 
virtual void updateudRef (const fmatvec::Vec &udRef)
 
virtual void updateduRef (const fmatvec::Vec &duRef)
 
virtual void updateudallRef (const fmatvec::Vec &udallRef)
 
virtual void updatehRef (const fmatvec::Vec &hRef, int i=0)
 
virtual void updatedhdqRef (const fmatvec::Mat &dhdqRef, int i=0)
 
virtual void updatedhduRef (const fmatvec::SqrMat &dhduRef, int i=0)
 
virtual void updatedhdtRef (const fmatvec::Vec &dhdtRef, int i=0)
 
virtual void updaterRef (const fmatvec::Vec &ref, int i=0)
 
virtual void updaterdtRef (const fmatvec::Vec &ref)
 
virtual void updateTRef (const fmatvec::Mat &ref)
 
virtual void updateMRef (const fmatvec::SymMat &ref)
 
virtual void updateLLMRef (const fmatvec::SymMat &ref)
 
virtual void initz ()
 
virtual void writez (H5::GroupBase *group)
 
virtual void readz0 (H5::GroupBase *group)
 
virtual void updateLLM ()
 
virtual double evalKineticEnergy ()
 
virtual double evalPotentialEnergy ()
 
virtual void setUpInverseKinetics ()
 
- Public Member Functions inherited from fmatvec::Atom
Atomoperator= (const Atom &)
 
void setMessageStreamActive (MsgType type, bool active)
 
void getMessageStream (MsgType type, std::shared_ptr< bool > &a, std::shared_ptr< std::ostream > &s)
 
void adoptMessageStreams (const Atom *src=NULL)
 
std::ostream & msg (MsgType type)
 
bool msgAct (MsgType type)
 

Protected Member Functions

void updateStateDependentVariables (double t)
 
void updateContours (double t)
 
MBSim::ContourPointData addInterface (const std::string &jacbifilename)
 
MBSim::ContourPointData addInterface (const fmatvec::Mat &J, const fmatvec::Vec &r)
 
void updateJh_internal (double t)
 
- Protected Member Functions inherited from MBSim::Body
virtual void addFrame (Frame *frame)
 
- Protected Member Functions inherited from fmatvec::Atom
 Atom (const Atom &src)
 

Protected Attributes

int nContours
 
std::vector
< MBSim::ContourPointData > 
contourType
 
fmatvec::Vec WrON00
 
- Protected Attributes inherited from MBSimFlexibleBody::FlexibleBody
std::vector
< DiscretizationInterface * > 
discretization
 stl-vector of discretizations/finite elements
 
std::vector< fmatvec::VecqElement
 stl-vector of finite element wise positions
 
std::vector< fmatvec::VecuElement
 stl-vector of finite element wise velocities
 
double d_massproportional
 damping factor for mass proportion, see BodyFlexible::setMassProportionalDamping()
 
bool updEle
 vector of contour parameters each describing a frame More...
 
- Protected Attributes inherited from MBSim::Body
std::vector< Frame * > frame
 
FrameR
 
fmatvec::Mat3xV PJT [2]
 
int qSize
 
int uSize [2]
 
int hSize [2]
 
int qInd
 
fmatvec::Vec q
 
fmatvec::Vec q0
 
fmatvec::Vec qd
 
fmatvec::Vec h [2]
 
fmatvec::Mat dhdq
 
fmatvec::Mat T
 
fmatvec::SymMat M
 
fmatvec::SymMat LLM
 

Additional Inherited Members

- Public Types inherited from fmatvec::Atom
enum  MsgType
 
- Static Public Member Functions inherited from fmatvec::Atom
static void setCurrentMessageStream (MsgType type, const std::shared_ptr< bool > &a=std::make_shared< bool >(true), const std::shared_ptr< std::ostream > &s=std::make_shared< std::ostream >(std::cout.rdbuf()))
 
static std::ostream & msgStatic (MsgType type)
 
static bool msgActStatic (MsgType type)
 

Detailed Description

Linear models from external preprocessing, e.g. Finite Element model.

Author
Roland Zander
Date
2009-03-26 initial kernel_dev commit (Roland Zander)
2009-04-05 minor change: parent class is not template class (Schindler / Zander)
2009-07-23 implicit integration (Thorsten Schindler)

Systems equation of motion:

\[ \vM{\rm d}\vu = -( \vK \vq + \vD \vu){\rm d}t - \vW{\rm d}\vLambda \]

with CONSTANT matrices $\vM,\vK,\vD$. The model uses n degrees of freedom (dimension of $\vq,\vu$) and d translational directions (dimension of Jacobi-matrizes $n\times d$)

Constructor & Destructor Documentation

MBSimFlexibleBody::FlexibleBodyLinearExternal::FlexibleBodyLinearExternal ( const std::string &  name)

constructor

Parameters
nameof body

Member Function Documentation

MBSim::ContourPointData MBSimFlexibleBody::FlexibleBodyLinearExternal::addInterface ( const std::string &  jacbifilename)
protected

create interface in form of ContourPointData based on file

Returns
cpData for refering to Port or Contour added
Parameters
jacbifilenamefile containing interface data
ContourPointData MBSimFlexibleBody::FlexibleBodyLinearExternal::addInterface ( const fmatvec::Mat J,
const fmatvec::Vec r 
)
protected

create interface in form of ContourPointData based on Jacobian matrix and undeformed position

Returns
cpData for refering to Port or Contour added
Parameters
JJacobian matrix
rundeformed position in body coordinate system
void MBSimFlexibleBody::FlexibleBodyLinearExternal::GlobalMatrixContribution ( int  CurrentElement,
const fmatvec::Mat locMat,
fmatvec::Mat gloMat 
)
virtual

insert 'local' information in global matrices

Parameters
CurrentElementnumber of current finite element
locMatlocal matrix
gloMatglobal matrix

Implements MBSimFlexibleBody::FlexibleBody.

void MBSimFlexibleBody::FlexibleBodyLinearExternal::GlobalMatrixContribution ( int  CurrentElement,
const fmatvec::SymMat locMat,
fmatvec::SymMat gloMat 
)
virtual

insert 'local' information in global matrices

Parameters
CurrentElementnumber of current finite element
locMatlocal matrix
gloMatglobal matrix

Implements MBSimFlexibleBody::FlexibleBody.

void MBSimFlexibleBody::FlexibleBodyLinearExternal::GlobalVectorContribution ( int  CurrentElement,
const fmatvec::Vec locVec,
fmatvec::Vec gloVec 
)
virtual

insert 'local' information in global vectors

Parameters
numberof finite element
localvector
globalvector

Implements MBSimFlexibleBody::FlexibleBody.

void MBSimFlexibleBody::FlexibleBodyLinearExternal::readMassMatrix ( const std::string &  massfilename)

read mass matrix: style e.g. for 2*2 matrix
n x n
[1.0 0.0
 0.0 1.0]

Parameters
massfilenamename of file holding mass matrix
void MBSimFlexibleBody::FlexibleBodyLinearExternal::readStiffnessMatrix ( const std::string &  stiffnessfilename)

read stiffness matrix form given file readMassMatrix(const std::string &massfilename)

Parameters
stiffnessfilenamename of file holding stiffness matrix
void MBSimFlexibleBody::FlexibleBodyLinearExternal::setMassMatrix ( const fmatvec::SymMat mat)

set mass matrix:

Parameters
matmass matrix
void MBSimFlexibleBody::FlexibleBodyLinearExternal::setProportionalDamping ( const double &  a,
const double &  b 
)

set damping $\vD$ proportional to mass and stiffness

\[ \vD = \alpha * \vM + \beta*\vK \]

Parameters
a_$\alpha$
b_$\beta $
void MBSimFlexibleBody::FlexibleBodyLinearExternal::setStiffnessMatrix ( const fmatvec::SqrMat mat)

read stiffness matrix

Parameters
matstiffness matrix
void MBSimFlexibleBody::FlexibleBodyLinearExternal::setWrON00 ( const fmatvec::Vec WrON00_)
inline

add Port using JACOBIAN matrix and frame location form given file n x d
[1.0
 0.0 ]

d x 1
[1.0
0.0
0.0 ]

Parameters
namename of Port create
jacobifilenamename of file holding matrices

add Port using JACOBIAN matrix and location of reference point

Parameters
nameof Port to
JJacobian matrix create
rundeformed reference point in body coordinate system

add Contour using information given in file for JACOBIAN matrix and location of reference point

Parameters
contourContour to add
jacobifilenamename of file holding matrices

add Contour using JACOBIAN matrix and location of reference point

Parameters
contourContour to add
JJacobian matrix
rundeformed reference point in body coordinate system

add a ContourInterpolation, no additional information needed

set origin BodyFlexibleLinearExternal::WrON00, $\rs{_W}[_K0]{\vr}$ of model

void MBSimFlexibleBody::FlexibleBodyLinearExternal::updateContours ( double  t)
protected

Kinematical update of postition and velocities of every Contour:

\[ \vr_{C} = \vr_{K} + \vJ_T(\vr_{P0} + \vW^T\vq) \]

Parameters
ttime
Todo:
angular kinematics
void MBSimFlexibleBody::FlexibleBodyLinearExternal::updateKinematicsForFrame ( MBSim::ContourPointData &  cp,
MBSim::Frame::Feature  ff,
MBSim::Frame frame = 0 
)
virtual

Kinematical update of postition and velocities of every attached Frame:

\[ \vr_{P} = \vr_{K} + \vJ_T(\vr_{P0} + \vW^T\vq) \]

Parameters
ttime
Todo:
angular kinematics
void MBSimFlexibleBody::FlexibleBodyLinearExternal::updateStateDependentVariables ( double  t)
protected

update kinematical values
Call to updateFrames(double t) and updateContours(double t)

Parameters
ttime

Member Data Documentation

std::vector<MBSim::ContourPointData> MBSimFlexibleBody::FlexibleBodyLinearExternal::contourType
protected

vector of ContourPointData controlling type of interface: node/interpolation

int MBSimFlexibleBody::FlexibleBodyLinearExternal::nContours
protected

number of Contours directly asoziated to body

fmatvec::Vec MBSimFlexibleBody::FlexibleBodyLinearExternal::WrON00
protected

origin $\rs{_W}[_K0]{\vr}$ of model


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

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML