All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
flexible_body_1s_21_rcm.h
1 /* Copyright (C) 2004-2015 MBSim Development Team
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  *
17  * Contact: thorsten.schindler@mytum.de
18  */
19 
20 #ifndef _FLEXIBLE_BODY_1S_21_RCM_H_
21 #define _FLEXIBLE_BODY_1S_21_RCM_H_
22 
23 #include "mbsimFlexibleBody/flexible_body/flexible_body_1s.h"
24 
25 namespace MBSimFlexibleBody {
26 
27  class Frame1s;
28 
50  public:
56  FlexibleBody1s21RCM(const std::string &name, bool openStructure);
57 
58  /* INHERITED INTERFACE OF FLEXIBLE BODY */
59  virtual void BuildElements();
60 
61  virtual void GlobalVectorContribution(int n, const fmatvec::Vec& locVec, fmatvec::Vec& gloVec);
62  virtual void GlobalMatrixContribution(int n, const fmatvec::Mat& locMat, fmatvec::Mat& gloMat);
63  virtual void GlobalMatrixContribution(int n, const fmatvec::SymMat& locMat, fmatvec::SymMat& gloMat);
64 
65  virtual void exportPositionVelocity(const std::string& filenamePos, const std::string& filenameVel = std::string( ), const int & deg = 3, const bool &writePsFile = false);
66  virtual void importPositionVelocity(const std::string& filenamePos, const std::string& filenameVel = std::string( ));
67 
68  virtual void updatePositions(Frame1s* frame);
69  virtual void updateVelocities(Frame1s* frame);
70  virtual void updateAccelerations(Frame1s* frame);
71  virtual void updateJacobians(Frame1s* frame, int j=0);
72  virtual void updateGyroscopicAccelerations(Frame1s* frame);
73 
74  virtual void updatePositions(NodeFrame* frame);
75  virtual void updateVelocities(NodeFrame* frame);
76  virtual void updateAccelerations(NodeFrame* frame);
77  virtual void updateJacobians(NodeFrame* frame, int j=0);
78  virtual void updateGyroscopicAccelerations(NodeFrame* frame);
79  /****************************************/
80 
81  /* INHERITED INTERFACE OF OBJECT */
82  virtual void init(InitStage stage);
83  /***************************************************/
84 
85  /* INHERITED INTERFACE OF ELEMENT */
86  virtual void plot();
87  virtual std::string getType() const { return "FlexibleBody1s21RCM"; }
88  /***************************************************/
89 
90  /* GETTER / SETTER */
94  void setNumberElements(int n);
95  int getNumberElements(){return Elements;}
96  double getLength(){return L;}
97  void setEModul(double E_) { E = E_; }
98  void setCrossSectionalArea(double A_) { A = A_; }
99  void setMomentInertia(double I_) { I = I_; }
100  void setDensity(double rho_) { rho = rho_; }
101  void setCurlRadius(double r);
102  void setMaterialDamping(double d);
103  void setLehrDamping(double d);
104  void setElementPlotList(fmatvec::VecInt plotElements_) {plotElements = plotElements_;}
105  /***************************************************/
106 
111  fmatvec::Vec3 getPositions(double x);
112 
117  fmatvec::Vec3 getVelocities(double x);
118 
122  double computePhysicalStrain(double sGlobal);
123 
128  void initRelaxed(double alpha);
129 
133  void initInfo();
134 
135  protected:
142  void BuildElement(const double& sGlobal, double& sLocal, int& currentElement);
143 
147  int Elements;
148 
152  double l0;
153 
157  double E;
158 
162  double A;
163 
167  double I;
168 
172  double rho;
173 
177  double rc;
178 
182  double dm;
183 
187  double dl;
188 
192  fmatvec::VecInt plotElements;
193 
198  };
199 
200 }
201 
202 #endif /* _FLEXIBLE_BODY_1S_21_RCM_H_ */
fmatvec::VecInt plotElements
variables to plot in addition to state
Definition: flexible_body_1s_21_rcm.h:192
virtual void GlobalMatrixContribution(int n, const fmatvec::Mat &locMat, fmatvec::Mat &gloMat)
insert 'local' information in global matrices
Definition: flexible_body_1s_21_rcm.cc:80
bool initialized
flag for testing if beam is initialised
Definition: flexible_body_1s_21_rcm.h:197
double rho
material density
Definition: flexible_body_1s_21_rcm.h:172
tbd
Definition: flexible_body_1s.h:33
Definition: frame_1s.h:27
void BuildElement(const double &sGlobal, double &sLocal, int &currentElement)
detect current finite element
Definition: flexible_body_1s_21_rcm.cc:498
virtual void GlobalVectorContribution(int n, const fmatvec::Vec &locVec, fmatvec::Vec &gloVec)
insert 'local' information in global vectors
Definition: flexible_body_1s_21_rcm.cc:68
double rc
curl radius
Definition: flexible_body_1s_21_rcm.h:177
virtual void importPositionVelocity(const std::string &filenamePos, const std::string &filenameVel=std::string())
imports the interpolated position and optional the velocity files (created with exportPositionVelocit...
Definition: flexible_body_1s_21_rcm.cc:419
int Elements
number of finite elements used for discretisation
Definition: flexible_body_1s_21_rcm.h:147
model for planar beams with large deflection using Redundant Coordinate Method (RCM) ...
Definition: flexible_body_1s_21_rcm.h:49
FlexibleBody1s21RCM(const std::string &name, bool openStructure)
constructor:
Definition: flexible_body_1s_21_rcm.cc:43
bool openStructure
flag for open (cantilever beam) or closed (rings) structures
Definition: flexible_body_1s.h:73
double l0
length of one finite element
Definition: flexible_body_1s_21_rcm.h:152
double I
moment of inertia of cross-section
Definition: flexible_body_1s_21_rcm.h:167
std::vector< Frame * > frame
double computePhysicalStrain(double sGlobal)
computes the phyiscal strain (compare Zander p.71) of the element, defined by the global position ...
Definition: flexible_body_1s_21_rcm.cc:304
void initInfo()
initialise beam only for giving information with respect to state, number elements, length, (not for simulation)
Definition: flexible_body_1s_21_rcm.cc:344
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-packa...
Definition: flexible_body_1s_21_rcm.cc:355
double E
modulus of linear elasticity
Definition: flexible_body_1s_21_rcm.h:157
double A
cross-section area
Definition: flexible_body_1s_21_rcm.h:162
void initRelaxed(double alpha)
initialise beam state concerning a straight cantilever setting or a circle shaped ring ...
Definition: flexible_body_1s_21_rcm.cc:311
fmatvec::Vec3 getVelocities(double x)
compute velocities and differentiated angles at Lagrangian coordinate in local FE coordinates ...
Definition: flexible_body_1s_21_rcm.cc:297
virtual void BuildElements()
references finite element coordinates to assembled coordinates
Definition: flexible_body_1s_21_rcm.cc:46
double dm
coefficient of material damping
Definition: flexible_body_1s_21_rcm.h:182
fmatvec::Vec3 getPositions(double x)
compute positions and angle at Lagrangian coordinate in local FE coordinates
Definition: flexible_body_1s_21_rcm.cc:290
void setNumberElements(int n)
sets size of positions and velocities
Definition: flexible_body_1s_21_rcm.cc:257
cartesian frame on nodes of flexible bodies
Definition: node_frame.h:31
double L
length of beam
Definition: flexible_body_1s.h:68
double dl
coefficient of Lehr-damping
Definition: flexible_body_1s_21_rcm.h:187

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML