mbsimflexiblebody  4.0.0
MBSim Flexible Body Module
MBSimFlexibleBody::FlexibleBody1SReferenceCurve Class Reference

class that implements an one dimensional nonlinear beam that uses a reference curve for the nonlinearity together with overlaid deformations. Also the Eulerian coordinates ("S" not "s") are used to project the movement of the nodes back to their original position... More...

#include <1S_reference_curve.h>

Inheritance diagram for MBSimFlexibleBody::FlexibleBody1SReferenceCurve:
[legend]

Public Member Functions

 FlexibleBody1SReferenceCurve (const std::string &name, ReferenceCurve *refCurve)
 
virtual void init (MBSim::Element::InitStage stage, const MBSim::InitConfigSet &config)
 
virtual void initInfo (fmatvec::Vec q0=fmatvec::Vec(0, fmatvec::NONINIT), fmatvec::Vec u0=fmatvec::Vec(0, fmatvec::NONINIT))
 
virtual void BuildElements ()
 references finite element coordinates to assembled coordinates More...
 
virtual void updateh (int k=0)
 
virtual void updateM ()
 
virtual void updatedq ()
 
virtual void updatedu ()
 
virtual void updateud ()
 
virtual void updateqd ()
 
virtual void initz ()
 
virtual void plot (double t, double dt=1.)
 
virtual void GlobalVectorContribution (int, const fmatvec::Vec &, fmatvec::Vec &)
 insert 'local' information in global vectors More...
 
virtual void GlobalMatrixContribution (int, const fmatvec::Mat3xV &, fmatvec::Mat3xV &)
 
virtual void GlobalMatrixContribution (int, const fmatvec::Mat &, fmatvec::Mat &)
 insert 'local' information in global matrices More...
 
virtual void GlobalMatrixContribution (int, const fmatvec::SymMat &, fmatvec::SymMat &)
 insert 'local' information in global matrices More...
 
virtual void setq0 (fmatvec::Vec q0_)
 
virtual void setu0 (fmatvec::Vec u0_)
 
void setLength (double length_)
 
double getlength () const
 
void setDensity (double rho_)
 
double getrho () const
 
void setCrossSectionalArea (double A_)
 
double getA () const
 
void setEModul (double E_)
 
double getE () const
 
void setNu (double nu_)
 
double getNu () const
 
void setIn (double In_)
 
double getIn () const
 
void setIb (double Ib_)
 
double getIb () const
 
void setIt (double It_)
 
double getIt () const
 
void setdPulley (double dPulley_)
 
double getdPulley () const
 
void setNumberElements (int elements_)
 
void setElementOrder (int elementOrder_)
 
void setNodeDofs (int nodeDofs_)
 
void setUseSpatialReferenceKinematics (bool switch_)
 
void setThetaDamping (double dTheta_)
 
void setLockedDofs (std::set< int > lockedDofs_)
 
void setLambdaqSwitches (const fmatvec::VecV &lambdaqSwitches_)
 
void setLambdauSwitches (const fmatvec::VecV &lambdauSwitches_)
 
virtual void setelongationActive (bool val)
 
virtual void setnormalBendingActive (bool val)
 
virtual double gets ()
 
Contour1sNeutralFlexibleBody1SReferenceCurvecreateNeutralPhase (const std::string &contourName)
 create a neutral phase as a basis for overlaid contours
 
double computePhysicalStrain (double xi)
 compute the physical strain at the Eulerian coordinate xi
 
fmatvec::Vec computeNeutralState (const fmatvec::Vec &q0)
 compute the neutral state, i.e. h = 0
 
- Public Member Functions inherited from MBSimFlexibleBody::FlexibleBodyContinuum< double >
 FlexibleBodyContinuum (const std::string &name)
 constructor More...
 
void setContourNodes (const std::vector< double > nodes)
 
void setNodeOffset (const double nodeOffset_)
 
double getNodeOffset () const
 
- Public Member Functions inherited from MBSimFlexibleBody::FlexibleBody
 FlexibleBody (const std::string &name)
 constructor More...
 
 ~FlexibleBody () override
 destructor
 
void updateqd () override
 
void updateh (int k=0) override
 
void updateM () override
 
void updatedhdz () override
 
void initializeUsingXML (xercesc::DOMElement *element) override
 
void init (InitStage stage, const MBSim::InitConfigSet &config) override
 
virtual double computeKineticEnergy ()
 
virtual double computePotentialEnergy ()
 
void setFrameOfReference (MBSim::Frame *frame) override
 
virtual void setq0 (const fmatvec::Vec &q0_)
 
virtual void setu0 (const fmatvec::Vec &u0_)
 
virtual void BuildElements ()=0
 references finite element coordinates to assembled coordinates More...
 
const fmatvec::Vec & getqElement (int i)
 
const fmatvec::Vec & getuElement (int i)
 
virtual fmatvec::Vec3 getAngles (int i)
 
virtual fmatvec::Vec3 getDerivativeOfAngles (int i)
 
virtual void GlobalVectorContribution (int CurrentElement, const fmatvec::Vec &locVec, fmatvec::Vec &gloVec)=0
 insert 'local' information in global vectors More...
 
virtual void GlobalMatrixContribution (int CurrentElement, const fmatvec::Mat &locMat, fmatvec::Mat &gloMat)=0
 insert 'local' information in global matrices More...
 
virtual void GlobalMatrixContribution (int CurrentElement, const fmatvec::SymMat &locMat, fmatvec::SymMat &gloMat)=0
 insert 'local' information in global matrices More...
 
void setMassProportionalDamping (const double d_)
 Jacobians and gyroscopes for contour or external frame are set by implementation class. More...
 
void addFrame (MBSim::ContourFrame *frame)
 
void addFrame (MBSim::FixedRelativeFrame *frame)
 
void addContour (MBSim::Contour *contour) override
 
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 () override
 
void addFrame (NodeBasedFrame *frame)
 
- Public Member Functions inherited from MBSimFlexibleBody::NodeBasedBody
 NodeBasedBody (const std::string &name)
 
void resetUpToDate () override
 
virtual void updatePositions (int i)
 
virtual void updateVelocities (int i)
 
virtual void updateAccelerations (int i)
 
virtual void updateJacobians (int i, int j=0)
 
virtual void updateGyroscopicAccelerations (int i)
 
virtual void updateStresses (int i)
 
const fmatvec::Vec3 & evalNodalPosition (int i)
 
const fmatvec::Vec3 & evalNodalVelocity (int i)
 
const fmatvec::Vec3 & evalNodalAcceleration (int i)
 
const fmatvec::Mat3xV & evalNodalJacobianOfTranslation (int i, int j=0)
 
const fmatvec::Vec3 & evalNodalGyroscopicAccelerationOfTranslation (int i)
 
const fmatvec::Vec3 & evalNodalDisplacement (int i)
 
const fmatvec::Vector< fmatvec::Fixed< 6 >, double > & evalNodalStress (int i)
 
fmatvec::SqrMat3 & getNodalOrientation (int i, bool check=true)
 
fmatvec::Vec3 & getNodalAngularVelocity (int i, bool check=true)
 
fmatvec::Vec3 & getNodalAngularAcceleration (int i, bool check=true)
 
fmatvec::Mat3xV & getNodalJacobianOfRotation (int i, int j=0, bool check=true)
 
fmatvec::Vec3 & getNodalGyroscopicAccelerationOfRotation (int i, bool check=true)
 
void addFrame (NodeBasedFrame *frame)
 
void init (InitStage stage, const MBSim::InitConfigSet &config) override
 
int getNumberOfNodes ()
 
int getNodeIndex (int nodeNumber) const
 
- Public Member Functions inherited from MBSim::Body
 Body (const std::string &name)
 
void plot () override
 
void setDynamicSystemSolver (DynamicSystemSolver *sys) override
 
void init (InitStage stage, const InitConfigSet &config) override
 
void createPlotGroup () override
 
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
 
virtual void setFrameOfReference (Frame *frame)
 
int frameIndex (const Frame *frame_) const
 
int contourIndex (const Contour *contour_) const
 
ElementgetChildByContainerAndName (const std::string &container, const std::string &name) const override
 
virtual void addFrame (Frame *frame)
 
virtual void addContour (Contour *contour)
 
- Public Member Functions inherited from MBSim::Object
 Object (const std::string &name)
 
void plot () override
 
virtual void updateqRef (fmatvec::Vec &qRef)
 
virtual void updateqdRef (fmatvec::Vec &qdRef)
 
virtual void updatedqRef (fmatvec::Vec &dqRef)
 
virtual void updateuRef (fmatvec::Vec &uRef)
 
virtual void updateuallRef (fmatvec::Vec &uallRef)
 
virtual void updateudRef (fmatvec::Vec &udRef)
 
virtual void updateduRef (fmatvec::Vec &duRef)
 
virtual void updateudallRef (fmatvec::Vec &udallRef)
 
virtual void updatehRef (fmatvec::Vec &hRef, int i=0)
 
virtual void updatedhdqRef (fmatvec::Mat &dhdqRef, int i=0)
 
virtual void updatedhduRef (fmatvec::SqrMat &dhduRef, int i=0)
 
virtual void updatedhdtRef (fmatvec::Vec &dhdtRef, int i=0)
 
virtual void updaterRef (fmatvec::Vec &ref, int i=0)
 
virtual void updaterdtRef (fmatvec::Vec &ref)
 
virtual void updateTRef (fmatvec::Mat &ref)
 
virtual void updateMRef (fmatvec::SymMat &ref)
 
virtual void updateLLMRef (fmatvec::SymMat &ref)
 
void init (InitStage stage, const InitConfigSet &config) override
 
virtual void initz ()
 
virtual void writez (H5::GroupBase *group)
 
virtual void readz0 (H5::GroupBase *group)
 
virtual void updateLLM ()
 
virtual void setUpInverseKinetics ()
 
void createPlotGroup () override
 
- Public Member Functions inherited from MBSim::Element
 Element (const std::string &name)
 
virtual void setDynamicSystemSolver (DynamicSystemSolver *sys)
 
virtual void plot ()
 
virtual void plotAtSpecialEvent ()
 
const std::string & getName () const
 
void setName (const std::string &str)
 
DynamicSystemSolvergetDynamicSystemSolver ()
 
virtual void init (InitStage stage, const InitConfigSet &config=InitConfigSet())
 
virtual void createPlotGroup ()
 
H5::GroupBasegetPlotGroup ()
 
bool getPlotFeature (const PlotFeatureEnum &pf)
 
virtual void setPlotFeature (const PlotFeatureEnum &pf, bool value)
 
void setPlotFeatureForChildren (const PlotFeatureEnum &pf, bool value)
 
void setPlotFeatureRecursive (const PlotFeatureEnum &pf, bool value)
 
void setPlotAttribute (const std::string &name, const T &value, PlotAttributeStorage storage=PlotAttributeStorage::attribute)
 
T * getByPath (const std::string &path, bool initialCaller=true) const
 
std::string getPath (const Element *relTo=nullptr, std::string sep="/") const
 
virtual ElementgetChildByContainerAndName (const std::string &container, const std::string &name) const
 
std::vector< Element * > getDependencies () const
 
int computeLevel ()
 

Private Member Functions

double computeG () const
 computes the shear modulus G
 
fmatvec::Vec3 computer (double xi, int derXi=0, int derTheta=0)
 compute the position and/or its derivative w.r.t. xi and/or theta
 
fmatvec::Vec3 computedrdqk (double xi, int derXi, int qInd)
 computes the derivative wrt the generalized positions
 
fmatvec::Vec3 computev (double xi)
 compute the velocity and/or its derivative w.r.t. xi and/or theta
 
fmatvec::Vec3 computerRef (double xi, int derXi=0, int derTheta=0)
 compute the position and its derivatives w.r.t. xi or theta at position xi and ratio Theta
 
fmatvec::SqrMat3 computeARef (double xi, int derXi=0, int derTheta=0)
 compute the local transformation Matrix A and its derivatives w.r.t. xi or theta at position xi and ratio Theta
 
fmatvec::Vec3 computenRef (double xi, int derXi=0, int derTheta=0)
 compute the normal vector at the given position
 
fmatvec::Vec3 computeSElement (int globalDOF, double xi, int derXi)
 compute the column of the elements S matrix
 
fmatvec::Vec3 computeSqfElement (double xi, int derXi)
 compute the deformation vector, i.e. S*qf, for the ring
 
fmatvec::Vec3 computeSufElement (double xi, int derXi)
 compute the deformation vector, i.e. S*uf, for the ring
 
fmatvec::Mat3xV computeP (double xi, int derXi=0)
 compute the P matrix
 
fmatvec::Mat3xV computedPdqk (double xi, int qInd)
 compute the P matrix derived wrt the generalized position
 
fmatvec::SymMatV integratePTP ()
 computes the integral needed for the mass matrix (\int P^T P)
 
fmatvec::SqrMatV integratePTdPdxi ()
 computes the integral for the first part of the h vector coming from the kinetic energy (\int P^T * P')
 
fmatvec::SqrMatV integratePTdPdt ()
 computes the integral for the second part of the h vector coming from the kinetic energy (\int P^T * dPdt)
 
fmatvec::SqrMatV integratePTdPdqk (int qInd)
 computes the integral for the third part of the h vector coming from the kinetic energy (\int P^T * dPdqk)
 
fmatvec::Vec3 integrateForWgammaWnWtau (int qInd)
 computes the integral for the first part of the h vector coming from the potential energy (intForWgamma)
 
double integrateForWb (int qInd)
 computes the integral for the second part of the h vector coming from the potential energy (intForWgamma)
 
int findElement (double &xi)
 find the element number of the given global coordinate More...
 
std::vector< std::pair< int, int > > getElementAndLocalDoFNo (int globalColumn)
 find the elemental DOF Number out of the global DOF Number More...
 
int getEleDofs () const
 get the number of DOFs for one element
 

Private Attributes

ReferenceCurverefCurve
 the reference curve
 
int elements
 number of elements used
 
int nodeDoFs
 DoFs per element.
 
int elementOrder
 DoFs per element.
 
bool useSpatialReferenceKinematics
 switch to only use kinematical reference deformation
 
double length
 length of ring
 
double rho
 density of the body
 
double A
 cross section Area of the body
 
double E
 Youngs modulus of the body.
 
double nu
 Poisson-ratio of the body.
 
double In
 area moment of inertia around normal axis
 
double Ib
 area moment of inertia around binormal axis
 
double It
 area moment of inertia around torsional axis
 
double dPulley
 distance between pulleys
 
fmatvec::Vec3 b
 Binormal of the curve.
 
double dTheta
 damping coefficient for theta
 
std::set< int > lockedDofsFull
 this vector saves the locked DOFs of the system
 
fmatvec::VecV qF
 vector for PT1 in positions
 
fmatvec::VecV uF
 vector for PT1 in velocities
 
fmatvec::VecV lambdaqFSwitches
 these are the switches to the the lambdaqSwitches The first entrie is always the entro for "s" the second one always for "theta". Then it depends on the element order but it actually follows just the global q-vector. Thus for elementOrder 3 and planar it is like this: lambdaqSwitches = [s, theta, qt, qn, qt', qn'] Thus for elementOrder 5 and spatial it is like this: lambdaqSwitches = [s, theta, qt, qn, qb, qt', qn', qb'', qt'', qn'', qb''] As here only the switches are set no one cars for the locked directions...
 
fmatvec::VecV lambdauFSwitches
 these are the switches to the the lambdauSwitches See the explanations for the qSwitches, however for the generalized velocities
 
fmatvec::VecV lambdaqF
 lambda factors for qFs
 
fmatvec::VecV lambdauF
 lambda factors for uFs
 
bool usePT1 = false
 switch to use either the lambda PT1 version or not
 
std::vector< fmatvec::Vec > qElementAll
 vector storing the values of the locked and not locked Dofs
 
std::vector< fmatvec::Vec > uElementAll
 vector storing the values of the locked and not locked Dofs generelaized velocities
 
int updateReferenceEvery
 number of how often the reference movement should be updated compared to the local movements
 
int referenceNotUpdated
 counter of how many updates have been done since the last time
 
double tLastRefUpdate
 marker since when the last update has been done on the reference
 
bool elongationActive = true
 switch to enable / disable the elongation energy in the h-vector
 
bool normalBendingActive = true
 switch to enable / disable the normal bending energy in the h-vector
 

Friends

class FlexibleBody1SReferenceCurveFE
 
class Contour1sNeutralFlexibleBody1SReferenceCurve
 
class funcForWgamma
 
class gethFunc
 

Additional Inherited Members

- Public Types inherited from MBSim::Element
enum  InitStage
 
- Public Attributes inherited from MBSim::Element
 resolveStringRef
 
 preInit
 
 plotting
 
 unknownStage
 
- Protected Attributes inherited from MBSimFlexibleBody::FlexibleBodyContinuum< double >
std::vector< double > userContourNodes
 grid for contact point detection
 
double nodeOffset
 offset of the ROTNODE from the TRANSNODE
 
- Protected Attributes inherited from MBSimFlexibleBody::FlexibleBody
std::vector< DiscretizationInterface * > discretization
 stl-vector of discretizations/finite elements
 
std::vector< fmatvec::Vec > qElement
 stl-vector of finite element wise positions
 
std::vector< fmatvec::Vec > uElement
 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 MBSimFlexibleBody::NodeBasedBody
std::vector< fmatvec::Vec3 > WrOP
 
std::vector< fmatvec::Vec3 > WvP
 
std::vector< fmatvec::Vec3 > Wom
 
std::vector< fmatvec::Vec3 > WaP
 
std::vector< fmatvec::Vec3 > Wpsi
 
std::vector< fmatvec::Vec3 > WjP
 
std::vector< fmatvec::Vec3 > WjR
 
std::vector< fmatvec::Vec3 > disp
 
std::vector< fmatvec::SqrMat3 > AWK
 
std::vector< fmatvec::Mat3xV > WJP [2]
 
std::vector< fmatvec::Mat3xV > WJR [2]
 
std::vector< bool > updNodalPos
 
std::vector< bool > updNodalVel
 
std::vector< bool > updNodalAcc
 
std::vector< bool > updNodalGA
 
std::vector< bool > updNodalStress
 
std::vector< bool > updNodalJac [2]
 
std::vector< fmatvec::Vector< fmatvec::Fixed< 6 >, double > > sigma
 
int nn {0}
 
std::vector< int > nodeMap
 
std::vector< int > nodeNumbers
 
- Protected Attributes inherited from MBSim::Body
std::vector< Frame * > frame
 
FrameR
 
fmatvec::Mat3xV PJT [2]
 
- Protected Attributes inherited from MBSim::Object
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
 
- Protected Attributes inherited from MBSim::Element
std::string name
 
std::string path
 
MBXMLUtils::DOMEvalException domEvalError
 
DynamicSystemSolverds
 
H5::VectorSerie< double > * plotVectorSerie
 
std::vector< double > plotVector
 
std::vector< std::string > plotColumns
 
H5::GroupBaseplotGroup
 
std::vector< Element * > dependency
 
PlotFeatureMap plotFeature
 

Detailed Description

class that implements an one dimensional nonlinear beam that uses a reference curve for the nonlinearity together with overlaid deformations. Also the Eulerian coordinates ("S" not "s") are used to project the movement of the nodes back to their original position...

Member Function Documentation

◆ BuildElements()

void MBSimFlexibleBody::FlexibleBody1SReferenceCurve::BuildElements ( )
virtual

references finite element coordinates to assembled coordinates

Implements MBSimFlexibleBody::FlexibleBody.

◆ findElement()

int MBSimFlexibleBody::FlexibleBody1SReferenceCurve::findElement ( double &  xi)
private

find the element number of the given global coordinate

Remarks
: If xi is not valid (not big or too small it is changed!)

◆ getElementAndLocalDoFNo()

std::vector< std::pair< int, int > > MBSimFlexibleBody::FlexibleBody1SReferenceCurve::getElementAndLocalDoFNo ( int  globalColumn)
private

find the elemental DOF Number out of the global DOF Number

Remarks
the first two local DOFs are locked

◆ GlobalMatrixContribution() [1/2]

virtual void MBSimFlexibleBody::FlexibleBody1SReferenceCurve::GlobalMatrixContribution ( int  CurrentElement,
const fmatvec::Mat &  locMat,
fmatvec::Mat &  gloMat 
)
inlinevirtual

insert 'local' information in global matrices

Parameters
CurrentElementnumber of current finite element
locMatlocal matrix
gloMatglobal matrix

Implements MBSimFlexibleBody::FlexibleBody.

◆ GlobalMatrixContribution() [2/2]

void MBSimFlexibleBody::FlexibleBody1SReferenceCurve::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.

◆ GlobalVectorContribution()

void MBSimFlexibleBody::FlexibleBody1SReferenceCurve::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.

◆ initz()

void MBSimFlexibleBody::FlexibleBody1SReferenceCurve::initz ( )
virtual

Reimplemented from MBSim::Object.


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