All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
flexible_body_2s_13.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 FLEXIBLEBODY2S13_H_
21 #define FLEXIBLEBODY2S13_H_
22 
23 #include "mbsimFlexibleBody/flexible_body/flexible_body_2s.h"
24 
25 namespace MBSimFlexibleBody {
26 
27  class NurbsDisk2s;
28 
35  fmatvec::Mat condenseMatrixRows(fmatvec::Mat A, fmatvec::RangeV I);
36 
43  fmatvec::Mat condenseMatrixCols(fmatvec::Mat A, fmatvec::RangeV I);
44 
51  fmatvec::SymMat condenseMatrix(fmatvec::SymMat A,fmatvec::RangeV I);
52 
57  void MapleOutput(fmatvec::Mat A, std::string MatName, std::string file);
58 
63  void MapleOutput(fmatvec::SymMat C, std::string MatName, std::string file);
64 
76 
77  public:
81  enum LockType { innerring,outerring };
82 
87  FlexibleBody2s13(const std::string &name, const int & DEBUGLEVEL_=0);
88 
92  virtual ~FlexibleBody2s13() { }
93 
94  /* INHERITED INTERFACE OF OBJECTINTERFACE */
95  virtual void updateh(int j=0);
96  virtual void updatedhdz();
97  /******************************************/
98 
99  /* INHERITED INTERFACE OF OBJECT */
100  virtual void updateM();
101  virtual void updateLLM() { }
102 
103  /* INHERITED INTERFACE OF ELEMENT */
104  virtual void plot();
105  virtual std::string getType() const { return "FlexibleBody2s13"; }
106  /***************************************************/
107 
108  /* GETTER/SETTER */
109  void setRadius(double Ri_,double Ra_) { Ri = Ri_; Ra = Ra_; }
110  void setEModul(double E_) { E = E_; }
111  void setPoissonRatio(double nu_) { nu = nu_; }
112  void setThickness(const fmatvec::Vec &d_) { d = d_; }
113  fmatvec::Vec getThickness() const { return d; }
114  void setDensity(double rho_) { rho = rho_; }
115  int getReferenceDegreesOfFreedom() const { return RefDofs; }
116  int getRadialNumberOfElements() const { return nr; }
117  int getAzimuthalNumberOfElements() const { return nj; }
118  double getInnerRadius() const { return Ri; }
119  double getOuterRadius() const { return Ra; }
120  double getAzimuthalDegree() const { return degU; }
121  double getRadialDegree() const { return degV; }
122  fmatvec::SqrMat3& evalA() { if(updAG) updateAG(); return A; }
123  fmatvec::SqrMat3& evalG() { if(updAG) updateAG(); return G; }
124  void setReferenceInertia(double m0_, fmatvec::SymMat3 J0_) { m0 = m0_; J0 = J0_; }
125  void setLockType(LockType LT_) { LType = LT_; }
126  /***************************************************/
127 
133  void setNumberElements(int nr_,int nj_);
134 
138  double computePotentialEnergy() { return 0.5*q.T()*K*q; }
139 
145  virtual fmatvec::Vec transformCW(const fmatvec::Vec& WrPoint) = 0;
146 
147  void resetUpToDate();
148 
149  void updateExt();
150 
151  const fmatvec::Vec& evalqExt() { if(updExt) updateExt(); return qext; }
152  const fmatvec::Vec& evaluExt() { if(updExt) updateExt(); return uext; }
153 
154  virtual fmatvec::Vec3 evalPosition() { return fmatvec::Vec3(); }
155  virtual fmatvec::SqrMat3 evalOrientation() { return fmatvec::SqrMat3(fmatvec::EYE); }
156 
157  protected:
161  int Elements;
162 
166  int NodeDofs;
167 
171  int RefDofs;
172 
176  double E;
177 
181  double nu;
182 
186  double rho;
187 
194 
198  double Ri, Ra;
199 
203  double dr, dj;
204 
208  double m0;
209 
213  fmatvec::SymMat3 J0;
214 
220  int degV, degU;
221 
226 
230  std::vector<fmatvec::Vec> ElementalNodes;
231 
236 
241 
246 
250  int nr, nj, Nodes;
251 
259 
266 
270  int Dofs;
271 
278 
282  fmatvec::RangeV ILocked;
283 
288 
292  fmatvec::SqrMat3 A;
293 
297  fmatvec::SqrMat3 G;
298 
299  /*
300  * \brief Jacobian for condensation with size Dofs x qSize
301  */
302  fmatvec::Mat Jext;
303 
308 
309  /*
310  * \brief Debug-Output-Level
311  *
312  * 0 = no Debug output
313  * 1 = console Debug Output
314  * 2 = File Debug Output
315  */
316  int DEBUGLEVEL;
317 
322  void BuildElement(const fmatvec::Vec &s);
323 
327  virtual void initMatrices() = 0;
328 
332  virtual void updateAG() = 0;
333 
338  double computeThickness(const double &r_);
339 
340  bool updExt, updAG;
341  };
342 
343 }
344 
345 #endif /* FLEXIBLEBODY2S13_H_ */
fmatvec::SqrMat3 A
transformation matrix of coordinates of the moving frame of reference into the reference frame ...
Definition: flexible_body_2s_13.h:292
int Elements
total number of elements
Definition: flexible_body_2s_13.h:161
fmatvec::SymMat MConst
constant part of the mass matrix
Definition: flexible_body_2s_13.h:240
fmatvec::Vec qext
position and velocity with respect to Dofs
Definition: flexible_body_2s_13.h:287
virtual ~FlexibleBody2s13()
destructor
Definition: flexible_body_2s_13.h:92
double nu
Poisson ratio.
Definition: flexible_body_2s_13.h:181
int nr
number of elements in radial and azimuthal direction, number of FE nodes
Definition: flexible_body_2s_13.h:250
double Ri
inner and outer radius of disk
Definition: flexible_body_2s_13.h:198
int NodeDofs
elastic dof per node
Definition: flexible_body_2s_13.h:166
fmatvec::Mat NodeCoordinates
matrix mapping nodes and coordinates (size number of nodes x number of node coordinates) ...
Definition: flexible_body_2s_13.h:258
double computeThickness(const double &r_)
Definition: flexible_body_2s_13.cc:234
2s flexible
Definition: nurbs_disk_2s.h:54
fmatvec::Vec q
std::vector< fmatvec::Vec > ElementalNodes
vector of boundary data of the FE (r1,j1,r2,j2)
Definition: flexible_body_2s_13.h:230
double dr
radial and azimuthal length of an FE
Definition: flexible_body_2s_13.h:203
fmatvec::RangeV ILocked
index of condensated dofs
Definition: flexible_body_2s_13.h:282
int RefDofs
dof of moving frame of reference
Definition: flexible_body_2s_13.h:171
double m0
mass of the attached shaft
Definition: flexible_body_2s_13.h:208
fmatvec::Matrix< fmatvec::General, fmatvec::Ref, fmatvec::Ref, int > ElementNodeList
matrix mapping elements and nodes (size number of elements x number of nodes per elements) ...
Definition: flexible_body_2s_13.h:265
int degV
degree of surface interpolation in radial and azimuthal direction
Definition: flexible_body_2s_13.h:220
void BuildElement(const fmatvec::Vec &s)
detect involved element for contact description
Definition: flexible_body_2s_13.cc:227
fmatvec::SqrMat3 G
transformation matrix of the time derivates of the angles into tho angular velocity in reference coor...
Definition: flexible_body_2s_13.h:297
int currentElement
number of element currently involved in contact calculations
Definition: flexible_body_2s_13.h:235
virtual void updateAG()=0
update the transformation matrices A and G
plate according to Reissner-Mindlin with moving frame of reference
Definition: flexible_body_2s_13.h:75
virtual fmatvec::Vec transformCW(const fmatvec::Vec &WrPoint)=0
transform Cartesian to cylinder system
void setNumberElements(int nr_, int nj_)
set number of elements in radial and azimuthal direction
Definition: flexible_body_2s_13.cc:206
tbd
Definition: flexible_body_2s.h:38
double rho
density
Definition: flexible_body_2s_13.h:186
int drawDegree
number of points drawn between nodes
Definition: flexible_body_2s_13.h:225
int Dofs
total dof of disk with reference movement and elastic deformation but without including bearing ...
Definition: flexible_body_2s_13.h:270
fmatvec::Vec d
parameterization of thickness over radius function: d(0) + d(1)*r + d(2)*r*r
Definition: flexible_body_2s_13.h:193
LockType LType
Dirichlet boundary condition concerning reference movement.
Definition: flexible_body_2s_13.h:277
virtual void initMatrices()=0
calculate the matrices for the first time
double E
Young&#39;s modulus.
Definition: flexible_body_2s_13.h:176
fmatvec::SymMat K
stiffness matrix
Definition: flexible_body_2s_13.h:245
fmatvec::SymMat3 J0
inertia of the attached shaft in local coordinates
Definition: flexible_body_2s_13.h:213
FlexibleBody2s13(const std::string &name, const int &DEBUGLEVEL_=0)
constructor
Definition: flexible_body_2s_13.cc:114
NurbsDisk2s * contour
contour for contact description
Definition: flexible_body_2s_13.h:307
double computePotentialEnergy()
Definition: flexible_body_2s_13.h:138
LockType
condensation setting for clamping to rigid body motion
Definition: flexible_body_2s_13.h:81

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML