mbsimflexiblebody  4.0.0
MBSim Flexible Body Module
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/2s.h"
24
25namespace MBSimFlexibleBody {
26
27 class NurbsDisk2s;
28
35 fmatvec::Mat condenseMatrixRows(const fmatvec::Mat &A, const fmatvec::RangeV &I);
36
43 fmatvec::Mat condenseMatrixCols(const fmatvec::Mat &A, const fmatvec::RangeV &I);
44
51 fmatvec::SymMat condenseMatrix(const fmatvec::SymMat &A,const fmatvec::RangeV &I);
52
57 void MapleOutput(const fmatvec::Mat &A, const std::string &MatName, const std::string &file);
58
63 void MapleOutput(const fmatvec::SymMat &C, const std::string &MatName, const std::string &file);
64
76
77 public:
81 enum LockType { innerring,outerring };
82
87 FlexibleBody2s13(const std::string &name);
88
92 ~FlexibleBody2s13() override = default;
93
94 /* INHERITED INTERFACE OF OBJECTINTERFACE */
95 void updateh(int j=0) override;
96 void updatedhdz() override;
97 /******************************************/
98
99 /* INHERITED INTERFACE OF OBJECT */
100 void updateM() override;
101 void updateLLM() override { }
102
103 /* INHERITED INTERFACE OF ELEMENT */
104 void plot() override;
105 /***************************************************/
106
107 /* GETTER/SETTER */
108 void setRadius(double Ri_,double Ra_) { Ri = Ri_; Ra = Ra_; }
109 void setEModul(double E_) { E = E_; }
110 void setPoissonRatio(double nu_) { nu = nu_; }
111 void setThickness(const fmatvec::Vec &d_) { d = d_; }
112 fmatvec::Vec getThickness() const { return d; }
113 void setDensity(double rho_) { rho = rho_; }
114 int getReferenceDegreesOfFreedom() const { return RefDofs; }
115 int getRadialNumberOfElements() const { return nr; }
116 int getAzimuthalNumberOfElements() const { return nj; }
117 double getInnerRadius() const { return Ri; }
118 double getOuterRadius() const { return Ra; }
119 double getAzimuthalDegree() const { return degU; }
120 double getRadialDegree() const { return degV; }
121 fmatvec::SqrMat3& evalA() { if(updAG) updateAG(); return A; }
122 fmatvec::SqrMat3& evalG() { if(updAG) updateAG(); return G; }
123 void setReferenceInertia(double m0_, fmatvec::SymMat3 J0_) { m0 = m0_; J0 = J0_; }
124 void setLockType(LockType LT_) { LType = LT_; }
125 /***************************************************/
126
132 void setNumberElements(int nr_,int nj_);
133
137 double computePotentialEnergy() override { return 0.5*q.T()*K*q; }
138
144 virtual fmatvec::Vec transformCW(const fmatvec::Vec& WrPoint) = 0;
145
146 void resetUpToDate() override;
147
148 void updateExt();
149
150 const fmatvec::Vec& evalqExt() { if(updExt) updateExt(); return qext; }
151 const fmatvec::Vec& evaluExt() { if(updExt) updateExt(); return uext; }
152
153 virtual fmatvec::Vec3 evalPosition() { return fmatvec::Vec3(); }
154 virtual fmatvec::SqrMat3 evalOrientation() { return fmatvec::SqrMat3(fmatvec::EYE); }
155
156 protected:
161
166
171
175 double E;
176
180 double nu;
181
185 double rho;
186
192 fmatvec::Vec d;
193
197 double Ri, Ra;
198
202 double dr, dj;
203
207 double m0;
208
212 fmatvec::SymMat3 J0;
213
219 int degV, degU;
220
225
229 std::vector<fmatvec::Vec> ElementalNodes;
230
235
239 fmatvec::SymMat MConst;
240
244 fmatvec::SymMat K;
245
249 int nr, nj, Nodes;
250
257 fmatvec::Mat NodeCoordinates;
258
264 fmatvec::Matrix<fmatvec::General,fmatvec::Ref,fmatvec::Ref,int> ElementNodeList;
265
269 int Dofs;
270
277
281 fmatvec::RangeV ILocked;
282
286 fmatvec::Vec qext, uext;
287
291 fmatvec::SqrMat3 A;
292
296 fmatvec::SqrMat3 G;
297
298 /*
299 * \brief Jacobian for condensation with size Dofs x qSize
300 */
301 fmatvec::Mat Jext;
302
307
312 void BuildElement(const fmatvec::Vec &s);
313
317 virtual void initMatrices() = 0;
318
322 virtual void updateAG() = 0;
323
328 double computeThickness(const double &r_);
329
330 bool updExt, updAG;
331 };
332
333}
334
335#endif /* FLEXIBLEBODY2S13_H_ */
plate according to Reissner-Mindlin with moving frame of reference
Definition: 2s_13.h:75
double rho
density
Definition: 2s_13.h:185
int Elements
total number of elements
Definition: 2s_13.h:160
fmatvec::Mat NodeCoordinates
matrix mapping nodes and coordinates (size number of nodes x number of node coordinates)
Definition: 2s_13.h:257
NurbsDisk2s * contour
contour for contact description
Definition: 2s_13.h:306
LockType
condensation setting for clamping to rigid body motion
Definition: 2s_13.h:81
fmatvec::SymMat MConst
constant part of the mass matrix
Definition: 2s_13.h:239
int drawDegree
number of points drawn between nodes
Definition: 2s_13.h:224
std::vector< fmatvec::Vec > ElementalNodes
vector of boundary data of the FE (r1,j1,r2,j2)
Definition: 2s_13.h:229
fmatvec::SqrMat3 G
transformation matrix of the time derivates of the angles into tho angular velocity in reference coor...
Definition: 2s_13.h:296
virtual void updateAG()=0
update the transformation matrices A and G
int NodeDofs
elastic dof per node
Definition: 2s_13.h:165
int nr
number of elements in radial and azimuthal direction, number of FE nodes
Definition: 2s_13.h:249
virtual fmatvec::Vec transformCW(const fmatvec::Vec &WrPoint)=0
transform Cartesian to cylinder system
fmatvec::SymMat3 J0
inertia of the attached shaft in local coordinates
Definition: 2s_13.h:212
void setNumberElements(int nr_, int nj_)
set number of elements in radial and azimuthal direction
Definition: 2s_13.cc:204
double dr
radial and azimuthal length of an FE
Definition: 2s_13.h:202
int RefDofs
dof of moving frame of reference
Definition: 2s_13.h:170
double computeThickness(const double &r_)
Definition: 2s_13.cc:232
FlexibleBody2s13(const std::string &name)
constructor
Definition: 2s_13.cc:114
fmatvec::SqrMat3 A
transformation matrix of coordinates of the moving frame of reference into the reference frame
Definition: 2s_13.h:291
LockType LType
Dirichlet boundary condition concerning reference movement.
Definition: 2s_13.h:276
virtual void initMatrices()=0
calculate the matrices for the first time
fmatvec::SymMat K
stiffness matrix
Definition: 2s_13.h:244
fmatvec::Vec d
parameterization of thickness over radius function: d(0) + d(1)*r + d(2)*r*r
Definition: 2s_13.h:192
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: 2s_13.h:264
fmatvec::Vec qext
position and velocity with respect to Dofs
Definition: 2s_13.h:286
~FlexibleBody2s13() override=default
destructor
double nu
Poisson ratio.
Definition: 2s_13.h:180
int Dofs
total dof of disk with reference movement and elastic deformation but without including bearing
Definition: 2s_13.h:269
double Ri
inner and outer radius of disk
Definition: 2s_13.h:197
double computePotentialEnergy() override
Definition: 2s_13.h:137
fmatvec::RangeV ILocked
index of condensated dofs
Definition: 2s_13.h:281
int degV
degree of surface interpolation in radial and azimuthal direction
Definition: 2s_13.h:219
void BuildElement(const fmatvec::Vec &s)
detect involved element for contact description
Definition: 2s_13.cc:225
int currentElement
number of element currently involved in contact calculations
Definition: 2s_13.h:234
double m0
mass of the attached shaft
Definition: 2s_13.h:207
double E
Young's modulus.
Definition: 2s_13.h:175
tbd
Definition: 2s.h:38
2s flexible
Definition: nurbs_disk_2s.h:54
std::string name
fmatvec::Vec q