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
25 namespace 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
75 class FlexibleBody2s13 : public FlexibleBody2s {
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:
160 int Elements;
161
165 int NodeDofs;
166
170 int RefDofs;
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
224 int drawDegree;
225
229 std::vector<fmatvec::Vec> ElementalNodes;
230
234 int currentElement;
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
276 LockType LType;
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
306 NurbsDisk2s *contour;
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_ */
MBSimFlexibleBody::FlexibleBody2s13::A
fmatvec::SqrMat3 A
transformation matrix of coordinates of the moving frame of reference into the reference frame
Definition: 2s_13.h:291
MBSimFlexibleBody::FlexibleBody2s13::Elements
int Elements
total number of elements
Definition: 2s_13.h:160
MBSimFlexibleBody::FlexibleBody2s13::MConst
fmatvec::SymMat MConst
constant part of the mass matrix
Definition: 2s_13.h:239
MBSimFlexibleBody::FlexibleBody2s13::qext
fmatvec::Vec qext
position and velocity with respect to Dofs
Definition: 2s_13.h:286
MBSimFlexibleBody::FlexibleBody2s13::nu
double nu
Poisson ratio.
Definition: 2s_13.h:180
MBSimFlexibleBody::FlexibleBody2s13::nr
int nr
number of elements in radial and azimuthal direction, number of FE nodes
Definition: 2s_13.h:249
MBSimFlexibleBody::FlexibleBody2s13::Ri
double Ri
inner and outer radius of disk
Definition: 2s_13.h:197
MBSimFlexibleBody::FlexibleBody2s13::NodeDofs
int NodeDofs
elastic dof per node
Definition: 2s_13.h:165
MBSimFlexibleBody::FlexibleBody2s13::NodeCoordinates
fmatvec::Mat NodeCoordinates
matrix mapping nodes and coordinates (size number of nodes x number of node coordinates)
Definition: 2s_13.h:257
MBSimFlexibleBody::FlexibleBody2s13::FlexibleBody2s13
FlexibleBody2s13(const std::string &name)
constructor
Definition: 2s_13.cc:114
MBSimFlexibleBody::FlexibleBody2s13::computeThickness
double computeThickness(const double &r_)
Definition: 2s_13.cc:232
MBSimFlexibleBody::NurbsDisk2s
2s flexible
Definition: nurbs_disk_2s.h:54
MBSim::Object::q
fmatvec::Vec q
MBSimFlexibleBody::FlexibleBody2s13::ElementalNodes
std::vector< fmatvec::Vec > ElementalNodes
vector of boundary data of the FE (r1,j1,r2,j2)
Definition: 2s_13.h:229
MBSimFlexibleBody::FlexibleBody2s13::dr
double dr
radial and azimuthal length of an FE
Definition: 2s_13.h:202
MBSimFlexibleBody::FlexibleBody2s13::ILocked
fmatvec::RangeV ILocked
index of condensated dofs
Definition: 2s_13.h:281
MBSimFlexibleBody::FlexibleBody2s13::RefDofs
int RefDofs
dof of moving frame of reference
Definition: 2s_13.h:170
MBSimFlexibleBody::FlexibleBody2s13::m0
double m0
mass of the attached shaft
Definition: 2s_13.h:207
MBSimFlexibleBody::FlexibleBody2s13::ElementNodeList
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
MBSimFlexibleBody::FlexibleBody2s13::degV
int degV
degree of surface interpolation in radial and azimuthal direction
Definition: 2s_13.h:219
MBSimFlexibleBody::FlexibleBody2s13::~FlexibleBody2s13
~FlexibleBody2s13() override=default
destructor
MBSimFlexibleBody::FlexibleBody2s13::BuildElement
void BuildElement(const fmatvec::Vec &s)
detect involved element for contact description
Definition: 2s_13.cc:225
MBSimFlexibleBody::FlexibleBody2s13::G
fmatvec::SqrMat3 G
transformation matrix of the time derivates of the angles into tho angular velocity in reference coor...
Definition: 2s_13.h:296
MBSimFlexibleBody::FlexibleBody2s13::currentElement
int currentElement
number of element currently involved in contact calculations
Definition: 2s_13.h:234
MBSimFlexibleBody::FlexibleBody2s13::updateAG
virtual void updateAG()=0
update the transformation matrices A and G
MBSimFlexibleBody::FlexibleBody2s13
plate according to Reissner-Mindlin with moving frame of reference
Definition: 2s_13.h:75
MBSimFlexibleBody::FlexibleBody2s13::transformCW
virtual fmatvec::Vec transformCW(const fmatvec::Vec &WrPoint)=0
transform Cartesian to cylinder system
MBSim::Element::name
std::string name
MBSimFlexibleBody::FlexibleBody2s13::setNumberElements
void setNumberElements(int nr_, int nj_)
set number of elements in radial and azimuthal direction
Definition: 2s_13.cc:204
MBSimFlexibleBody::FlexibleBody2s
tbd
Definition: 2s.h:38
MBSimFlexibleBody::FlexibleBody2s13::rho
double rho
density
Definition: 2s_13.h:185
MBSimFlexibleBody::FlexibleBody2s13::drawDegree
int drawDegree
number of points drawn between nodes
Definition: 2s_13.h:224
MBSimFlexibleBody::FlexibleBody2s13::Dofs
int Dofs
total dof of disk with reference movement and elastic deformation but without including bearing
Definition: 2s_13.h:269
MBSimFlexibleBody::FlexibleBody2s13::d
fmatvec::Vec d
parameterization of thickness over radius function: d(0) + d(1)*r + d(2)*r*r
Definition: 2s_13.h:192
MBSimFlexibleBody::FlexibleBody2s13::LType
LockType LType
Dirichlet boundary condition concerning reference movement.
Definition: 2s_13.h:276
MBSimFlexibleBody::FlexibleBody2s13::initMatrices
virtual void initMatrices()=0
calculate the matrices for the first time
MBSimFlexibleBody::FlexibleBody2s13::E
double E
Young's modulus.
Definition: 2s_13.h:175
MBSimFlexibleBody::FlexibleBody2s13::K
fmatvec::SymMat K
stiffness matrix
Definition: 2s_13.h:244
MBSimFlexibleBody::FlexibleBody2s13::J0
fmatvec::SymMat3 J0
inertia of the attached shaft in local coordinates
Definition: 2s_13.h:212
MBSimFlexibleBody::FlexibleBody2s13::computePotentialEnergy
double computePotentialEnergy() override
Definition: 2s_13.h:137
MBSimFlexibleBody::FlexibleBody2s13::contour
NurbsDisk2s * contour
contour for contact description
Definition: 2s_13.h:306
MBSimFlexibleBody::FlexibleBody2s13::LockType
LockType
condensation setting for clamping to rigid body motion
Definition: 2s_13.h:81