mbsimflexiblebody  4.0.0
MBSim Flexible Body Module
1s_33_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_33_RCM_H_
21 #define _FLEXIBLE_BODY_1S_33_RCM_H_
22 
23 #include "mbsimFlexibleBody/flexible_body/1s.h"
24 #include "mbsimFlexibleBody/pointer.h"
25 
26 namespace MBSimFlexibleBody {
27 
28  class NodeFrame;
29 
43  public:
49  FlexibleBody1s33RCM(const std::string &name="",bool openStructure=false);
50 
51  /* INHERITED INTERFACE OF FLEXIBLE BODY */
52  void BuildElements() override;
53 
54  void GlobalVectorContribution(int n, const fmatvec::Vec& locVec, fmatvec::Vec& gloVec) override;
55  void GlobalMatrixContribution(int n, const fmatvec::Mat& locMat, fmatvec::Mat& gloMat) override;
56  void GlobalMatrixContribution(int n, const fmatvec::SymMat& locMat, fmatvec::SymMat& gloMat) override;
57 
58  void exportPositionVelocity(const std::string & filenamePos, const std::string & filenameVel = std::string( ), const int & deg = 3, const bool & writePsFile = false) override;
59  void importPositionVelocity(const std::string & filenamePos, const std::string & filenameVel = std::string( )) override;
60 
61  void updatePositions(Frame1s* frame) override;
62  void updateVelocities(Frame1s* frame) override;
63  void updateAccelerations(Frame1s* frame) override;
64  void updateJacobians(Frame1s* frame, int j=0) override;
65  void updateGyroscopicAccelerations(Frame1s* frame) override;
66 
67  virtual void updatePositions(NodeFrame* frame);
68  virtual void updateVelocities(NodeFrame* frame);
69  virtual void updateAccelerations(NodeFrame* frame);
70  virtual void updateJacobians(NodeFrame* frame, int j=0);
71  virtual void updateGyroscopicAccelerations(NodeFrame* frame);
72 
73  fmatvec::Vec3 getAngles(double s) override;
74  /***************************************************/
75 
76  /* INHERITED INTERFACE OF OBJECT */
77  void init(InitStage stage, const MBSim::InitConfigSet &config) override;
78  /***************************************************/
79 
80  /* INHERITED INTERFACE OF ELEMENT */
81  void initializeUsingXML(xercesc::DOMElement * element) override;
82  /***************************************************/
83 
84  /* GETTER / SETTER */
85  void setNumberElements(int n);
86  int getNumberElements(){ return Elements; }
87  void setEGModuls(double E_, double G_) { E = E_; G = G_; }
88  void setDensity(double rho_) { rho = rho_; }
89  void setCrossSectionalArea(double A_) { A = A_; }
90  void setMomentsInertia(double I1_, double I2_, double I0_) { I1 = I1_; I2 = I2_; I0 = I0_; }
91  void setMaterialDamping(double epstD_,double k0D_);
92 
93  void setGauss(int nGauss_) { nGauss = nGauss_; }
94  void setCurlRadius(double R1_, double R2_);
95  void setLehrDamping(double epstL_, double k0L_);
96  /***************************************************/
97 
102  fmatvec::Vector<fmatvec::Fixed<6>, double> getPositions(double x);
103 
108  fmatvec::Vector<fmatvec::Fixed<6>, double> getVelocities(double x);
109 
114  double computePhysicalStrain(const double sGlobal);
115 
119  void initInfo();
120 
121  private:
125  RevCardanPtr angle;
126 
130  int Elements;
131 
135  double l0;
136 
140  double E, G;
141 
145  double A;
146 
150  double I1, I2, I0;
151 
155  double rho;
156 
160  double R1, R2;
161 
165  double epstD, k0D, epstL, k0L;
166 
171 
175  int nGauss;
176 
183  void BuildElement(const double& sGlobal, double& sLocal, int& currentElement);
184  };
185 
186 }
187 
188 #endif /* _FLEXIBLE_BODY_1S_33_RCM_H_ */
void GlobalVectorContribution(int n, const fmatvec::Vec &locVec, fmatvec::Vec &gloVec) override
insert 'local' information in global vectors
Definition: 1s_33_rcm.cc:98
bool initialised
initialised FLAG
Definition: 1s_33_rcm.h:170
double A
area of cross-section
Definition: 1s_33_rcm.h:145
void BuildElement(const double &sGlobal, double &sLocal, int &currentElement)
detect current finite element
Definition: 1s_33_rcm.cc:324
double computePhysicalStrain(const double sGlobal)
compute the physical strain of the element
Definition: 1s_33_rcm.cc:306
tbd
Definition: 1s.h:33
Definition: frame_1s.h:27
int nGauss
number of Gauss points for rotational kinetic energy
Definition: 1s_33_rcm.h:175
spatial beam using Redundant Coordinate Method (RCM)
Definition: 1s_33_rcm.h:42
int Elements
number of elements
Definition: 1s_33_rcm.h:130
fmatvec::Vector< fmatvec::Fixed< 6 >, double > getVelocities(double x)
compute velocities and differentiated angles at Lagrangian coordinate in local FE coordinates
Definition: 1s_33_rcm.cc:299
bool openStructure
flag for open (cantilever beam) or closed (rings) structures
Definition: 1s.h:73
void exportPositionVelocity(const std::string &filenamePos, const std::string &filenameVel=std::string(), const int &deg=3, const bool &writePsFile=false) override
interpolates the position and optional the velocity coordinates of the flexible body with Nurbs-packa...
Definition: 1s_33_rcm.cc:391
RevCardanPtr angle
angle parametrisation
Definition: 1s_33_rcm.h:125
void importPositionVelocity(const std::string &filenamePos, const std::string &filenameVel=std::string()) override
imports the interpolated position and optional the velocity files (created with exportPositionVelocit...
Definition: 1s_33_rcm.cc:455
double l0
length of entire beam and finite elements
Definition: 1s_33_rcm.h:135
fmatvec::Vector< fmatvec::Fixed< 6 >, double > getPositions(double x)
compute positions and angle at Lagrangian coordinate in local FE coordinates
Definition: 1s_33_rcm.cc:292
FlexibleBody1s33RCM(const std::string &name="", bool openStructure=false)
constructor
Definition: 1s_33_rcm.cc:49
double R1
radius of undeformed shape
Definition: 1s_33_rcm.h:160
std::string name
std::vector< Frame * > frame
double rho
density
Definition: 1s_33_rcm.h:155
double epstD
damping
Definition: 1s_33_rcm.h:165
cartesian frame on nodes of flexible bodies
Definition: node_frame.h:31
void BuildElements() override
references finite element coordinates to assembled coordinates
Definition: 1s_33_rcm.cc:52
double E
elastic modules
Definition: 1s_33_rcm.h:140
void GlobalMatrixContribution(int n, const fmatvec::Mat &locMat, fmatvec::Mat &gloMat) override
insert 'local' information in global matrices
double I1
area moment of inertia
Definition: 1s_33_rcm.h:150
void initInfo()
Definition: 1s_33_rcm.cc:313