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 _FINITE_ELEMENT_1S_33_RCM_H_
21 #define _FINITE_ELEMENT_1S_33_RCM_H_
22
23 #include "mbsimFlexibleBody/discretization_interface.h"
24 #include "mbsimFlexibleBody/pointer.h"
25 #include "mbsimFlexibleBody/flexible_body/fe/1s_33_rcm/weight33RCM.h"
26 #include "fmatvec/fmatvec.h"
27
28 namespace MBSimFlexibleBody {
29
39 class FiniteElement1s33RCM : public DiscretizationInterface {
40 public:
54 FiniteElement1s33RCM(double l0_, double rho_, double A_, double E_, double G_, double I1_, double I2_, double I0_, const fmatvec::Vec& g_, RevCardanPtr ag_);
55
56 /* INHERITED INTERFACE OF DISCRETIZATIONINTERFACE */
57 const fmatvec::SymMat& getM() const override;
58 const fmatvec::Vec& geth() const override;
59 const fmatvec::SqrMat& getdhdq() const override;
60 const fmatvec::SqrMat& getdhdu() const override;
61 int getqSize() const override;
62 int getuSize() const override;
63
64 void computeM(const fmatvec::Vec& qG) override;
65 void computeh(const fmatvec::Vec& qG, const fmatvec::Vec& qGt) override;
66 void computedhdz(const fmatvec::Vec& qG, const fmatvec::Vec& qGt) override;
67 double computeKineticEnergy(const fmatvec::Vec& qG, const fmatvec::Vec& qGt) override;
68 double computeGravitationalEnergy(const fmatvec::Vec& qG) override;
69 double computeElasticEnergy(const fmatvec::Vec& qG) override;
70
71 virtual fmatvec::Vec3 getPosition(const fmatvec::Vec& qElement, double s);
72 virtual fmatvec::SqrMat3 getOrientation(const fmatvec::Vec& qElement, double s);
73 virtual fmatvec::Vec3 getVelocity(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
74 virtual fmatvec::Vec3 getAngularVelocity(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
75 virtual fmatvec::Mat computeJacobianOfMotion(const fmatvec::Vec& qG, double s) { return computeJXqG(qG,s); }
76 /*****************************************************/
77
78 /* GETTER / SETTER */
79 void setGauss(int nGauss);
80 void setCurlRadius(double R1, double R2);
81 void setMaterialDamping(double epstD_, double k0D_);
82 void setLehrDamping(double epstL, double k0L);
83 double getl0() const;
84 /*****************************************************/
85
86 fmatvec::Vector<fmatvec::Fixed<6>, double> getPositions(const fmatvec::Vec& qElement, double s);
87
88 fmatvec::Vector<fmatvec::Fixed<6>, double> getVelocities(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
89
95 fmatvec::Mat computeJXqG(const fmatvec::Vec& qG, double x);
96
102 fmatvec::Vec computeData(const fmatvec::Vec& qG, const fmatvec::Vec& qGt);
103
109 double computePhysicalStrain(const fmatvec::Vec& qG, const fmatvec::Vec& qGt);
110
111 private:
115 double l0;
116
120 double rho;
121
125 double A;
126
130 double E;
131
135 double G;
136
140 double I1, I2, I0;
141
145 fmatvec::Vec g;
146
150 double k10, k20;
151
155 double epstD, k0D;
156
160 fmatvec::SymMat M;
161 fmatvec::Vec h;
162
166 fmatvec::SqrMat dhdq, dhdu;
167
171 fmatvec::SymMat MI;
172
176 fmatvec::SqrMat Damp;
177
181 double l0h2, l0h3;
182
186 double x_Old;
187
191 fmatvec::Vec qG_Old, qGt_Old;
192
196 double tol_comp;
197
201 fmatvec::Mat drS, drSH;
202 fmatvec::RowVec depstil, dk0;
203
207 RevCardanPtr ag;
208
212 Trafo33RCMPtr tf;
213
217 Weight33RCMPtr wt;
218
222 void computedrS();
223
227 void computedepstil();
228
232 void computedk0();
233 };
234
235 inline void FiniteElement1s33RCM::setGauss(int nGauss) { wt->setGauss(nGauss); }
236 inline double FiniteElement1s33RCM::getl0() const { return l0; }
237 inline const fmatvec::SymMat& FiniteElement1s33RCM::getM() const { return M; }
238 inline const fmatvec::Vec& FiniteElement1s33RCM::geth() const { return h; }
239 inline const fmatvec::SqrMat& FiniteElement1s33RCM::getdhdq() const { return dhdq; }
240 inline const fmatvec::SqrMat& FiniteElement1s33RCM::getdhdu() const { return dhdu; }
241 inline int FiniteElement1s33RCM::getqSize() const { return 16; }
242 inline int FiniteElement1s33RCM::getuSize() const { return 16; }
243
244 }
245
246 #endif /* _FINITE_ELEMENT_1S_33_RCM_H_ */
MBSimFlexibleBody::FiniteElement1s33RCM::computeM
void computeM(const fmatvec::Vec &qG) override
compute mass matrix
Definition: 1s_33_rcm.cc:64
MBSimFlexibleBody::FiniteElement1s33RCM::computeGravitationalEnergy
double computeGravitationalEnergy(const fmatvec::Vec &qG) override
compute gravitational energy
Definition: 1s_33_rcm.cc:253
MBSimFlexibleBody::FiniteElement1s33RCM::A
double A
cross sectional area
Definition: 1s_33_rcm.h:125
MBSimFlexibleBody::FiniteElement1s33RCM::getdhdu
const fmatvec::SqrMat & getdhdu() const override
Definition: 1s_33_rcm.h:240
MBSimFlexibleBody::FiniteElement1s33RCM::computeData
fmatvec::Vec computeData(const fmatvec::Vec &qG, const fmatvec::Vec &qGt)
compute interesting data
Definition: 1s_33_rcm.cc:386
MBSimFlexibleBody::FiniteElement1s33RCM::ag
RevCardanPtr ag
reversed Cardan-object
Definition: 1s_33_rcm.h:207
MBSimFlexibleBody::FiniteElement1s33RCM::MI
fmatvec::SymMat MI
internal system description
Definition: 1s_33_rcm.h:171
MBSimFlexibleBody::FiniteElement1s33RCM::epstD
double epstD
prolongational and torsional damping
Definition: 1s_33_rcm.h:155
MBSimFlexibleBody::FiniteElement1s33RCM::l0h2
double l0h2
beam length powers
Definition: 1s_33_rcm.h:181
MBSimFlexibleBody::FiniteElement1s33RCM::computedrS
void computedrS()
compute delta matrix for CP with respect to translation
Definition: 1s_33_rcm.cc:410
MBSimFlexibleBody::FiniteElement1s33RCM::computedhdz
void computedhdz(const fmatvec::Vec &qG, const fmatvec::Vec &qGt) override
compute Jacobian for implicit integration
Definition: 1s_33_rcm.cc:204
MBSimFlexibleBody::FiniteElement1s33RCM::computeKineticEnergy
double computeKineticEnergy(const fmatvec::Vec &qG, const fmatvec::Vec &qGt) override
compute kinetic energy
Definition: 1s_33_rcm.cc:236
MBSimFlexibleBody::FiniteElement1s33RCM::x_Old
double x_Old
last Lagrangian coordinate in state calculation
Definition: 1s_33_rcm.h:186
MBSimFlexibleBody::FiniteElement1s33RCM::M
fmatvec::SymMat M
global system description
Definition: 1s_33_rcm.h:160
MBSimFlexibleBody::FiniteElement1s33RCM::computeElasticEnergy
double computeElasticEnergy(const fmatvec::Vec &qG) override
compute elastic energy
Definition: 1s_33_rcm.cc:263
MBSimFlexibleBody::FiniteElement1s33RCM::dhdq
fmatvec::SqrMat dhdq
matrices for implicit integration
Definition: 1s_33_rcm.h:166
MBSimFlexibleBody::FiniteElement1s33RCM::computedepstil
void computedepstil()
compute delta matrix for elongation
Definition: 1s_33_rcm.cc:417
MBSimFlexibleBody::FiniteElement1s33RCM::geth
const fmatvec::Vec & geth() const override
Definition: 1s_33_rcm.h:238
MBSimFlexibleBody::FiniteElement1s33RCM::l0
double l0
length of finite element
Definition: 1s_33_rcm.h:115
MBSimFlexibleBody::FiniteElement1s33RCM::getM
const fmatvec::SymMat & getM() const override
Definition: 1s_33_rcm.h:237
MBSimFlexibleBody::FiniteElement1s33RCM::computePhysicalStrain
double computePhysicalStrain(const fmatvec::Vec &qG, const fmatvec::Vec &qGt)
compute the physical strain as defined in Schindler2010, p. 25, eq. (2.52)
Definition: 1s_33_rcm.cc:403
MBSimFlexibleBody::FiniteElement1s33RCM::getuSize
int getuSize() const override
Definition: 1s_33_rcm.h:242
MBSimFlexibleBody::FiniteElement1s33RCM::g
fmatvec::Vec g
gravitation
Definition: 1s_33_rcm.h:145
MBSimFlexibleBody::FiniteElement1s33RCM::computeJXqG
fmatvec::Mat computeJXqG(const fmatvec::Vec &qG, double x)
compute JACOBIAN of contact description in global coordinates
Definition: 1s_33_rcm.cc:276
MBSimFlexibleBody::FiniteElement1s33RCM::rho
double rho
density
Definition: 1s_33_rcm.h:120
MBSimFlexibleBody::FiniteElement1s33RCM::computedk0
void computedk0()
compute delta matrix for torsion
Definition: 1s_33_rcm.cc:421
MBSimFlexibleBody::FiniteElement1s33RCM::I1
double I1
geometrical moment of inertia
Definition: 1s_33_rcm.h:140
MBSimFlexibleBody::FiniteElement1s33RCM::qG_Old
fmatvec::Vec qG_Old
global and local state of the last time step
Definition: 1s_33_rcm.h:191
MBSimFlexibleBody::FiniteElement1s33RCM::Damp
fmatvec::SqrMat Damp
internal damping matrix
Definition: 1s_33_rcm.h:176
MBSimFlexibleBody::FiniteElement1s33RCM::tol_comp
double tol_comp
tolerance for comparison of state with old state
Definition: 1s_33_rcm.h:196
MBSimFlexibleBody::FiniteElement1s33RCM::getdhdq
const fmatvec::SqrMat & getdhdq() const override
Definition: 1s_33_rcm.h:239
MBSimFlexibleBody::FiniteElement1s33RCM::computeh
void computeh(const fmatvec::Vec &qG, const fmatvec::Vec &qGt) override
compute smooth right hand side
Definition: 1s_33_rcm.cc:93
MBSimFlexibleBody::FiniteElement1s33RCM::getqSize
int getqSize() const override
Definition: 1s_33_rcm.h:241
MBSimFlexibleBody::FiniteElement1s33RCM
finite element for spatial beam using Redundant Coordinate Method (RCM)
Definition: 1s_33_rcm.h:39
MBSimFlexibleBody::FiniteElement1s33RCM::k10
double k10
predefined bending
Definition: 1s_33_rcm.h:150
MBSimFlexibleBody::DiscretizationInterface
discretization interface for flexible systems
Definition: discretization_interface.h:36
MBSimFlexibleBody::FiniteElement1s33RCM::G
double G
shear modulus
Definition: 1s_33_rcm.h:135
MBSimFlexibleBody::FiniteElement1s33RCM::drS
fmatvec::Mat drS
delta matrices
Definition: 1s_33_rcm.h:201
MBSimFlexibleBody::FiniteElement1s33RCM::tf
Trafo33RCMPtr tf
trafo-object
Definition: 1s_33_rcm.h:212
MBSimFlexibleBody::FiniteElement1s33RCM::E
double E
Young's modulus.
Definition: 1s_33_rcm.h:130
MBSimFlexibleBody::FiniteElement1s33RCM::FiniteElement1s33RCM
FiniteElement1s33RCM(double l0_, double rho_, double A_, double E_, double G_, double I1_, double I2_, double I0_, const fmatvec::Vec &g_, RevCardanPtr ag_)
constructor
Definition: 1s_33_rcm.cc:32
MBSimFlexibleBody::FiniteElement1s33RCM::wt
Weight33RCMPtr wt
weight-function-object
Definition: 1s_33_rcm.h:217