All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
weight33RCM.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 WEIGHT33RCM_H_
21 #define WEIGHT33RCM_H_
22 
23 #include "fmatvec/fmatvec.h"
24 #include "mbsimFlexibleBody/pointer.h"
25 
26 namespace MBSimFlexibleBody {
27 
33  class Weight33RCM {
34  public:
38  Weight33RCM(double l0_,double l0h2_,double l0h3_,Trafo33RCMPtr tf_);
41  virtual ~Weight33RCM();
42 
43  /* GETTER / SETTER */
48  void setCurvature(double k10_,double k20_);
49 
53  void setGauss(int nGauss);
54 
55  const fmatvec::RowVec& getvxvt() const;
56  const fmatvec::Vec& getvxvtH() const;
57  const fmatvec::RowVec& getxvxvt() const;
58  const fmatvec::Vec& getxvxvtH() const;
59  const fmatvec::SymMat& getvxvtwxwt() const;
60  const fmatvec::RowVec& getvvt() const;
61  const fmatvec::Vec& getvvtH() const;
62  const fmatvec::RowVec& getxvvt() const;
63  const fmatvec::Vec& getxvvtH() const;
64  const fmatvec::SymMat& getvvtwwt() const;
65 
66  const double& getIwh1() const;
67  const double& getIwh2() const;
68  const double& getIwh1t() const;
69  const double& getIwh2t() const;
70  const double& getIxwh1() const;
71  const double& getIxwh2() const;
72  const double& getIxwh1t() const;
73  const double& getIxwh2t() const;
74  const double& getIwh1twh1() const;
75  const double& getIwh1twh2() const;
76  const double& getIwh1twh1t() const;
77  const double& getIwh1wh1() const;
78  const double& getIwh1wh2t() const;
79  const double& getIwh1wh2() const;
80  const double& getIwh2twh2t() const;
81  const double& getIwh2twh2() const;
82  const double& getIwh2wh2() const;
83  const double& getIwh1twh2t() const;
84  const double& getIwh1xwh1x() const;
85  const double& getIwh2xwh2x() const;
86  const double& getIwh1xxwh1xx() const;
87  const double& getIwh2xxwh2xx() const;
88  const fmatvec::RowVec& getIwh1xxwxxwt() const;
89  const fmatvec::RowVec& getIwh2xxwxxwt() const;
90  const fmatvec::RowVec& getIwh1wwt() const;
91  const fmatvec::RowVec& getIwh2wwt() const;
92  const fmatvec::Vec& getIwh1wwtH() const;
93  const fmatvec::Vec& getIwh2wwtH() const;
94  const fmatvec::RowVec& getIwh1twwt() const;
95  const fmatvec::RowVec& getIwh2twwt() const;
96  const fmatvec::Vec& getIwh1twwtH() const;
97  const fmatvec::Vec& getIwh2twwtH() const;
98  const fmatvec::RowVec& getIwh1xwxwt() const;
99  const fmatvec::RowVec& getIwh2xwxwt() const;
100 
101  const fmatvec::Vec& getw1coef() const;
102  const fmatvec::Vec& getw2coef() const;
103  const fmatvec::Vec& getw1tcoef() const;
104  const fmatvec::Vec& getw2tcoef() const;
105  const fmatvec::Mat& getw1coefqI() const;
106  const fmatvec::Mat& getw2coefqI() const;
107  const fmatvec::Vec& getwh1coef() const;
108  const fmatvec::Vec& getwh2coef() const;
109  const fmatvec::Vec& getwh1tcoef() const;
110  const fmatvec::Vec& getwh2tcoef() const;
111  const fmatvec::Mat& getwh1coefqI() const;
112  const fmatvec::Mat& getwh2coefqI() const;
113  fmatvec::Mat getwh1coefqIH() const;
114  fmatvec::Mat getwh2coefqIH() const;
115  const fmatvec::Mat& getwh1tcoefqI() const;
116  const fmatvec::Mat& getwh2tcoefqI() const;
117  const fmatvec::Mat& getwh1coefqInunutH() const;
118  const fmatvec::Mat& getwh2coefqInunutH() const;
119 
120  const fmatvec::Mat& gettSqI() const;
121  const fmatvec::Mat& getnSqI() const;
122  const fmatvec::Mat& getbSqI() const;
123  const fmatvec::Mat& getnSqIH() const;
124  const fmatvec::Mat& getbSqIH() const;
125  const fmatvec::Mat& gettStqI() const;
126  const fmatvec::Mat& getnStqI() const;
127  const fmatvec::Mat& getbStqI() const;
128 
129  const double& getTtil() const;
130  const fmatvec::RowVec& getTtilqI() const;
131  const fmatvec::SymMat& getTtilqItqIt() const;
132  const fmatvec::Vec& getTtilqItqIqIt() const;
133 
134  const fmatvec::Mat& getdpS() const;
135  const fmatvec::Mat& getdpSH() const;
136  /***************************************************/
137 
138  /* BASIC INTEGRALS */
139  double intv(const fmatvec::Vec& vt) const;
140  double intvx(const fmatvec::Vec& vt) const;
141  double intxv(const fmatvec::Vec& vt) const;
142  double intxvx(const fmatvec::Vec& vt) const;
143  double intvw(const fmatvec::Vec& vt,const fmatvec::Vec& wt) const;
144  double intvxwx(const fmatvec::Vec& vt,const fmatvec::Vec& wt) const;
145  double intvxxvxx(const fmatvec::Vec& vt,double C) const;
146  void intvvt();
147  void intvvtH();
148  void intvxvt();
149  void intvxvtH();
150  void intxvvt();
151  void intxvvtH();
152  void intxvxvt();
153  void intxvxvtH();
154  fmatvec::RowVec intvwwt(const fmatvec::Vec& vt) const;
155  fmatvec::RowVec intvxwxwt(const fmatvec::Vec& vt) const;
156  fmatvec::RowVec intvxxwxxwt(const fmatvec::Vec& vt,double C) const;
157  void intvvtwwt();
158  void intvxvtwxwt();
159  /***************************************************/
160 
166  void computeint(const fmatvec::Vec& qG,const fmatvec::Vec& qGt);
167 
173  void computeintD(const fmatvec::Vec& qG,const fmatvec::Vec& qGt);
174 
179  void computewcoefPos(const fmatvec::Vec& qG);
180 
186  void computewcoefVel(const fmatvec::Vec& qG,const fmatvec::Vec& qGt);
187 
192  void computewhcoefPos(const fmatvec::Vec& qG);
193 
199  void computewhcoefVel(const fmatvec::Vec& qG,const fmatvec::Vec& qGt);
200 
204  void computewcoefPosD();
205 
210  void computewhcoefPosD(const fmatvec::Vec& qG);
211 
219  fmatvec::Vec computewcoef(double dL,double dR,double bL,double bR) const;
220 
225  fmatvec::Vec computew(const fmatvec::Vec& wt,double x) const;
226 
227  private:
231  Trafo33RCMPtr tf;
232 
236  double l0, l0h2, l0h3, l0h4, l0h5, l0h7, l0h9, l0h11;
237 
241  double k10, k20;
242 
246  fmatvec::RowVec Ivvt, Ivxvt, Ixvvt, Ixvxvt;
247  fmatvec::SymMat Ivvtwwt, Ivxvtwxwt;
248  fmatvec::Vec IvvtH, IvxvtH, IxvvtH, IxvxvtH;
249 
253  double Iwh1, Iwh2, Iwh1t, Iwh2t, Ixwh1, Ixwh2, Ixwh1t, Ixwh2t;
254  double Iwh1twh1, Iwh1twh2, Iwh1twh1t, Iwh1wh1, Iwh1wh2t, Iwh1wh2, Iwh2twh2t;
255  double Iwh2twh2, Iwh2wh2, Iwh1twh2t;
256  fmatvec::RowVec Iwh1wwt, Iwh1twwt, Iwh2wwt, Iwh2twwt;
257  fmatvec::Vec Iwh1wwtH, Iwh1twwtH, Iwh2wwtH, Iwh2twwtH;
258 
259  double Iwh1xwh1x, Iwh2xwh2x, Iwh1xxwh1xx, Iwh2xxwh2xx;
260  fmatvec::RowVec Iwh1xwxwt, Iwh2xwxwt;
261  fmatvec::RowVec Iwh1xxwxxwt, Iwh2xxwxxwt;
262 
266  fmatvec::Vec w1coef, w2coef, w1tcoef, w2tcoef;
267  fmatvec::Vec wh1coef, wh2coef, wh1tcoef, wh2tcoef;
268  fmatvec::Mat w1coefqI, w2coefqI;
269  fmatvec::Mat wh1coefqI, wh2coefqI, wh1tcoefqI, wh2tcoefqI;
270  fmatvec::Mat wh1coefqInunutH, wh2coefqInunutH;
271 
275  fmatvec::Mat tSqI, nSqI, bSqI;
276  fmatvec::Mat tStqI, nStqI, bStqI;
277  fmatvec::Mat nSqIH, bSqIH;
278  fmatvec::Mat ntilSqI, btilSqI;
279  fmatvec::RowVec xintilqI, xibtilqI, etantilqI, etabtilqI;
280 
284  double omgt;
285  fmatvec::RowVec omgtqI, omgtqIt;
286  fmatvec::Vec omgtqItqIqIt;
287 
291  double Ttil;
292  fmatvec::RowVec TtilqI;
293  fmatvec::SymMat TtilqItqIt;
294  fmatvec::Vec TtilqItqIqIt;
295 
299  fmatvec::Vec gp, xip; // cannot be initialised in constructor
300  double bam;
301 
306 
310  void computeint();
311 
315  void computewcoefPos();
316 
320  void computewcoefVel();
321 
325  void computewhcoefPos();
326 
330  void computewhcoefVel();
331 
335  void computewhcoefPosD();
336 
340  void computewhcoefVelD();
341 
344  void computeomgt(double x);
345 
349  void computeT();
350 
354  void computedpS();
355  };
356 
357  inline void Weight33RCM::setCurvature(double k10_,double k20_) { k10 = k10_; k20 = k20_; }
358  inline void Weight33RCM::intvvtH() { IvvtH = Ivvt.T(); }
359  inline void Weight33RCM::intvxvtH() { IvxvtH = Ivxvt.T(); }
360  inline void Weight33RCM::intxvvtH() { IxvvtH = Ixvvt.T(); }
361  inline void Weight33RCM::intxvxvtH() { IxvxvtH = Ixvxvt.T(); }
362 
363  inline const fmatvec::RowVec& Weight33RCM::getvxvt() const { return Ivxvt; }
364  inline const fmatvec::Vec& Weight33RCM::getvxvtH() const { return IvxvtH; }
365  inline const fmatvec::RowVec& Weight33RCM::getxvxvt() const { return Ixvxvt; }
366  inline const fmatvec::Vec& Weight33RCM::getxvxvtH() const { return IxvxvtH; }
367  inline const fmatvec::SymMat& Weight33RCM::getvxvtwxwt() const { return Ivxvtwxwt; }
368  inline const fmatvec::RowVec& Weight33RCM::getvvt() const { return Ivvt; }
369  inline const fmatvec::Vec& Weight33RCM::getvvtH() const { return IvvtH; }
370  inline const fmatvec::RowVec& Weight33RCM::getxvvt() const { return Ixvvt; }
371  inline const fmatvec::Vec& Weight33RCM::getxvvtH() const { return IxvvtH; }
372  inline const fmatvec::SymMat& Weight33RCM::getvvtwwt() const { return Ivvtwwt; }
373 
374  inline const double& Weight33RCM::getIwh1() const { return Iwh1; }
375  inline const double& Weight33RCM::getIwh2() const { return Iwh2; }
376  inline const double& Weight33RCM::getIwh1t() const { return Iwh1t; }
377  inline const double& Weight33RCM::getIwh2t() const { return Iwh2t; }
378  inline const double& Weight33RCM::getIxwh1() const { return Ixwh1; }
379  inline const double& Weight33RCM::getIxwh2() const { return Ixwh2; }
380  inline const double& Weight33RCM::getIxwh1t() const { return Ixwh1t; }
381  inline const double& Weight33RCM::getIxwh2t() const { return Ixwh2t; }
382  inline const double& Weight33RCM::getIwh1twh1() const { return Iwh1twh1; }
383  inline const double& Weight33RCM::getIwh1twh2() const { return Iwh1twh2; }
384  inline const double& Weight33RCM::getIwh1twh1t() const { return Iwh1twh1t; }
385  inline const double& Weight33RCM::getIwh1wh1() const { return Iwh1wh1; }
386  inline const double& Weight33RCM::getIwh1wh2t() const { return Iwh1wh2t; }
387  inline const double& Weight33RCM::getIwh1wh2() const { return Iwh1wh2; }
388  inline const double& Weight33RCM::getIwh2twh2t() const { return Iwh2twh2t; }
389  inline const double& Weight33RCM::getIwh2twh2() const { return Iwh2twh2; }
390  inline const double& Weight33RCM::getIwh2wh2() const { return Iwh2wh2; }
391  inline const double& Weight33RCM::getIwh1twh2t() const { return Iwh1twh2t; }
392  inline const double& Weight33RCM::getIwh1xwh1x() const { return Iwh1xwh1x; }
393  inline const double& Weight33RCM::getIwh2xwh2x() const { return Iwh2xwh2x; }
394  inline const double& Weight33RCM::getIwh1xxwh1xx() const { return Iwh1xxwh1xx; }
395  inline const double& Weight33RCM::getIwh2xxwh2xx() const { return Iwh2xxwh2xx; }
396  inline const fmatvec::RowVec& Weight33RCM::getIwh1xxwxxwt() const { return Iwh1xxwxxwt; }
397  inline const fmatvec::RowVec& Weight33RCM::getIwh2xxwxxwt() const { return Iwh2xxwxxwt; }
398  inline const fmatvec::RowVec& Weight33RCM::getIwh1wwt() const { return Iwh1wwt; }
399  inline const fmatvec::RowVec& Weight33RCM::getIwh2wwt() const { return Iwh2wwt; }
400  inline const fmatvec::Vec& Weight33RCM::getIwh1wwtH() const { return Iwh1wwtH; }
401  inline const fmatvec::Vec& Weight33RCM::getIwh2wwtH() const { return Iwh2wwtH; }
402  inline const fmatvec::RowVec& Weight33RCM::getIwh1twwt() const { return Iwh1twwt; }
403  inline const fmatvec::RowVec& Weight33RCM::getIwh2twwt() const { return Iwh2twwt; }
404  inline const fmatvec::Vec& Weight33RCM::getIwh1twwtH() const { return Iwh1twwtH; }
405  inline const fmatvec::Vec& Weight33RCM::getIwh2twwtH() const { return Iwh2twwtH; }
406  inline const fmatvec::RowVec& Weight33RCM::getIwh1xwxwt() const { return Iwh1xwxwt; }
407  inline const fmatvec::RowVec& Weight33RCM::getIwh2xwxwt() const { return Iwh2xwxwt; }
408 
409  inline const fmatvec::Vec& Weight33RCM::getw1coef() const { return w1coef; }
410  inline const fmatvec::Vec& Weight33RCM::getw2coef() const { return w2coef; }
411  inline const fmatvec::Vec& Weight33RCM::getw1tcoef() const { return w1tcoef; }
412  inline const fmatvec::Vec& Weight33RCM::getw2tcoef() const { return w2tcoef; }
413  inline const fmatvec::Mat& Weight33RCM::getw1coefqI() const { return w1coefqI; }
414  inline const fmatvec::Mat& Weight33RCM::getw2coefqI() const { return w2coefqI; }
415  inline const fmatvec::Vec& Weight33RCM::getwh1coef() const { return wh1coef; }
416  inline const fmatvec::Vec& Weight33RCM::getwh2coef() const { return wh2coef; }
417  inline const fmatvec::Vec& Weight33RCM::getwh1tcoef() const { return wh1tcoef; }
418  inline const fmatvec::Vec& Weight33RCM::getwh2tcoef() const { return wh2tcoef; }
419  inline const fmatvec::Mat& Weight33RCM::getwh1coefqI() const { return wh1coefqI; }
420  inline const fmatvec::Mat& Weight33RCM::getwh2coefqI() const { return wh2coefqI; }
421  inline fmatvec::Mat Weight33RCM::getwh1coefqIH() const { return wh1coefqI.T(); }
422  inline fmatvec::Mat Weight33RCM::getwh2coefqIH() const { return wh2coefqI.T(); }
423  inline const fmatvec::Mat& Weight33RCM::getwh1tcoefqI() const { return wh1tcoefqI; }
424  inline const fmatvec::Mat& Weight33RCM::getwh2tcoefqI() const { return wh2tcoefqI; }
425  inline const fmatvec::Mat& Weight33RCM::getwh1coefqInunutH() const { return wh1coefqInunutH; }
426  inline const fmatvec::Mat& Weight33RCM::getwh2coefqInunutH() const { return wh2coefqInunutH; }
427 
428  inline const fmatvec::Mat& Weight33RCM::gettSqI() const { return tSqI; }
429  inline const fmatvec::Mat& Weight33RCM::getnSqI() const { return nSqI; }
430  inline const fmatvec::Mat& Weight33RCM::getbSqI() const { return bSqI; }
431  inline const fmatvec::Mat& Weight33RCM::getnSqIH() const { return nSqIH; }
432  inline const fmatvec::Mat& Weight33RCM::getbSqIH() const { return bSqIH; }
433  inline const fmatvec::Mat& Weight33RCM::gettStqI() const { return tStqI; }
434  inline const fmatvec::Mat& Weight33RCM::getnStqI() const { return nStqI; }
435  inline const fmatvec::Mat& Weight33RCM::getbStqI() const { return bStqI; }
436 
437  inline const double& Weight33RCM::getTtil() const { return Ttil; }
438  inline const fmatvec::RowVec& Weight33RCM::getTtilqI() const { return TtilqI; }
439  inline const fmatvec::SymMat& Weight33RCM::getTtilqItqIt() const { return TtilqItqIt; }
440  inline const fmatvec::Vec& Weight33RCM::getTtilqItqIqIt() const { return TtilqItqIqIt; }
441 
442  inline const fmatvec::Mat& Weight33RCM::getdpS() const { return dpS; }
443  inline const fmatvec::Mat& Weight33RCM::getdpSH() const { return dpSH; }
444  /*******************************************************************/
445 
446 }
447 
448 #endif /*WEIGHT33RCM_H_*/
449 
void computewcoefVel()
computes the time differentiated coefficients of bending polynomials w
Definition: weight33RCM.cc:209
fmatvec::Vec computew(const fmatvec::Vec &wt, double x) const
evaluates the bending polynomial and its x-derivative
Definition: weight33RCM.cc:183
fmatvec::Vec w1coef
bending coefficients
Definition: weight33RCM.h:266
Weight33RCM(double l0_, double l0h2_, double l0h3_, Trafo33RCMPtr tf_)
constructor
Definition: weight33RCM.cc:31
void computedpS()
compute delta matrix for CP with respect to rotation
Definition: weight33RCM.cc:401
double l0
length of FEM1s33RCM
Definition: weight33RCM.h:236
fmatvec::Mat dpS
delta matrix for pS
Definition: weight33RCM.h:305
virtual ~Weight33RCM()
Destructor.
Definition: weight33RCM.cc:72
void computewcoefPosD()
computes the derivative of w-coefficients with respect to bending coordinates
Definition: weight33RCM.cc:246
void computewhcoefVelD()
computes bending polynomial values on velocity level
Definition: weight33RCM.cc:276
void computeint()
computes the integrals of bending polynomials
Definition: weight33RCM.cc:134
double omgt
omgtS
Definition: weight33RCM.h:284
integrals of bending parametrisation for FiniteElement1s33RCM
Definition: weight33RCM.h:33
void computeomgt(double x)
compute angular velocity around tangent
Definition: weight33RCM.cc:335
void computewhcoefPosD()
computes bending polynomial values on position level
Definition: weight33RCM.cc:256
fmatvec::Vec computewcoef(double dL, double dR, double bL, double bR) const
computes the coefficients of w and wt
Definition: weight33RCM.cc:320
fmatvec::Mat tSqI
COSY.
Definition: weight33RCM.h:275
void setCurvature(double k10_, double k20_)
Definition: weight33RCM.h:357
double Iwh1
special integrals
Definition: weight33RCM.h:253
fmatvec::Vec gp
Gauss integration.
Definition: weight33RCM.h:299
void computewcoefPos()
computes the coefficients of bending polynomials w
Definition: weight33RCM.cc:196
Trafo33RCMPtr tf
Trafo-Object.
Definition: weight33RCM.h:231
double k10
predefined bendings
Definition: weight33RCM.h:241
double Ttil
rotational kinetic energy
Definition: weight33RCM.h:291
void computeT()
compute rotational kinetic energy
Definition: weight33RCM.cc:382
void computeintD(const fmatvec::Vec &qG, const fmatvec::Vec &qGt)
computes the vector integrals of bending polynomials
Definition: weight33RCM.cc:163
void computewhcoefVel()
computes the coefficients of bending polynomials w and wh and their time derivatives ...
Definition: weight33RCM.cc:237
void computewhcoefPos()
computes the coefficients of bending polynomials w and wh
Definition: weight33RCM.cc:222
void setGauss(int nGauss)
Definition: weight33RCM.cc:74
fmatvec::RowVec Ivvt
general integrals
Definition: weight33RCM.h:246

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML