mbsimflexiblebody  4.0.0
MBSim Flexible Body Module
1s_33_cosserat_translation.h
1/* Copyright (C) 2004-2012 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_COSSERAT_TRANSLATION_H_
21#define _FINITE_ELEMENT_1S_33_COSSERAT_TRANSLATION_H_
22
23#include "mbsimFlexibleBody/discretization_interface.h"
24#include "mbsimFlexibleBody/pointer.h"
25#include "fmatvec/fmatvec.h"
26
27namespace MBSimFlexibleBody {
28
53 public:
54
68 FiniteElement1s33CosseratTranslation(double l0_,double rho_,double A_,double E_,double G_,double I1_,double I2_,double I0_,const fmatvec::Vec& g_,CardanPtr ag_);
69
74
75 /* INHERITED INTERFACE OF DISCRETIZATIONINTERFACE */
76 const fmatvec::SymMat& getM() const override { return M; }
77 const fmatvec::Vec& geth() const override { return h; }
78 const fmatvec::SqrMat& getdhdq() const override { return dhdq; }
79 const fmatvec::SqrMat& getdhdu() const override { return dhdu; }
80 int getqSize() const override { return 9; }
81 int getuSize() const override { return 9; }
82
83 void computeM(const fmatvec::Vec& qG) override;
84 void computeh(const fmatvec::Vec& qG, const fmatvec::Vec& qGt) override;
85 void computedhdz(const fmatvec::Vec& qG, const fmatvec::Vec& qGt) override;
86 double computeKineticEnergy(const fmatvec::Vec& qG, const fmatvec::Vec& qGt) override;
87 double computeGravitationalEnergy(const fmatvec::Vec& qG) override;
88 double computeElasticEnergy(const fmatvec::Vec& qG) override;
89
90 virtual fmatvec::Vec3 getPosition(const fmatvec::Vec& qElement, double s);
91 virtual fmatvec::SqrMat3 getOrientation(const fmatvec::Vec& qElement, double s);
92 virtual fmatvec::Vec3 getVelocity(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
93 virtual fmatvec::Vec3 getAngularVelocity(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
94 virtual fmatvec::Mat computeJacobianOfMotion(const fmatvec::Vec& qG, double s) { return computeJXqG(qG,s); }
95
96 /* GETTER / SETTER */
97 void setMaterialDamping(double cEps0D_,double cEps1D_,double cEps2D_);
98 void setShearCorrectionFactors(double sigma1_, double sigma2_) { sigma1 = sigma1_; sigma2 = sigma2_; }
99 double getl0() const { return l0; }
100
107 const fmatvec::Vec& computeStateTranslation(const fmatvec::Vec& qG, const fmatvec::Vec& qGt, double s);
108
114 fmatvec::Mat computeJXqG(const fmatvec::Vec& qG,double x);
115
119 void initM();
120
121 private:
125 double l0;
126
130 double rho;
131
135 double A;
136
140 double E;
141
145 double G;
146
150 double I1, I2, I0;
151
155 fmatvec::Vec g;
156
160 double cEps0D, cEps1D, cEps2D;
161
165 double sigma1, sigma2;
166
170 fmatvec::SymMat M;
171 fmatvec::Vec h;
172
176 fmatvec::SqrMat dhdq, dhdu;
177
181 fmatvec::Vec X;
182
186 CardanPtr ag;
187
188 FiniteElement1s33CosseratTranslation(); // standard constructor
190 FiniteElement1s33CosseratTranslation& operator=(const FiniteElement1s33CosseratTranslation&); // assignment operator
191 };
192
193}
194
195#endif /* _FINITE_ELEMENT_1S_33_COSSERAT_TRANSLATION_H_ */
discretization interface for flexible systems
Definition: discretization_interface.h:36
finite element for spatial beam using Cosserat model
Definition: 1s_33_cosserat_translation.h:52
void computeM(const fmatvec::Vec &qG) override
compute mass matrix
Definition: 1s_33_cosserat_translation.cc:42
double computeElasticEnergy(const fmatvec::Vec &qG) override
compute elastic energy
Definition: 1s_33_cosserat_translation.cc:196
fmatvec::SymMat M
global system description
Definition: 1s_33_cosserat_translation.h:170
const fmatvec::SymMat & getM() const override
Definition: 1s_33_cosserat_translation.h:76
fmatvec::Vec g
gravitation
Definition: 1s_33_cosserat_translation.h:155
fmatvec::SqrMat dhdq
matrices for implicit integration
Definition: 1s_33_cosserat_translation.h:176
double computeGravitationalEnergy(const fmatvec::Vec &qG) override
compute gravitational energy
Definition: 1s_33_cosserat_translation.cc:192
FiniteElement1s33CosseratTranslation(double l0_, double rho_, double A_, double E_, double G_, double I1_, double I2_, double I0_, const fmatvec::Vec &g_, CardanPtr ag_)
constructor
double l0
length of finite element
Definition: 1s_33_cosserat_translation.h:125
void initM()
initialize translational part of mass matrix
Definition: 1s_33_cosserat_translation.cc:221
fmatvec::Vec X
state at Lagrangian coordinate
Definition: 1s_33_cosserat_translation.h:181
double rho
density
Definition: 1s_33_cosserat_translation.h:130
const fmatvec::SqrMat & getdhdu() const override
Definition: 1s_33_cosserat_translation.h:79
double G
shear modulus
Definition: 1s_33_cosserat_translation.h:145
CardanPtr ag
Cardan-object.
Definition: 1s_33_cosserat_translation.h:186
double E
Young's modulus.
Definition: 1s_33_cosserat_translation.h:140
const fmatvec::Vec & computeStateTranslation(const fmatvec::Vec &qG, const fmatvec::Vec &qGt, double s)
compute state of finite element
Definition: 1s_33_cosserat_translation.cc:211
void computeh(const fmatvec::Vec &qG, const fmatvec::Vec &qGt) override
compute smooth right hand side
Definition: 1s_33_cosserat_translation.cc:57
const fmatvec::Vec & geth() const override
Definition: 1s_33_cosserat_translation.h:77
const fmatvec::SqrMat & getdhdq() const override
Definition: 1s_33_cosserat_translation.h:78
double cEps0D
strain damping
Definition: 1s_33_cosserat_translation.h:160
int getuSize() const override
Definition: 1s_33_cosserat_translation.h:81
void computedhdz(const fmatvec::Vec &qG, const fmatvec::Vec &qGt) override
compute Jacobian for implicit integration
Definition: 1s_33_cosserat_translation.cc:231
int getqSize() const override
Definition: 1s_33_cosserat_translation.h:80
fmatvec::Mat computeJXqG(const fmatvec::Vec &qG, double x)
compute JACOBIAN of contact description in global coordinates
Definition: 1s_33_cosserat_translation.cc:251
double I1
geometrical moment of inertia
Definition: 1s_33_cosserat_translation.h:150
double computeKineticEnergy(const fmatvec::Vec &qG, const fmatvec::Vec &qGt) override
compute kinetic energy
Definition: 1s_33_cosserat_translation.cc:168
double sigma1
shear correction factors
Definition: 1s_33_cosserat_translation.h:165
double A
cross sectional area
Definition: 1s_33_cosserat_translation.h:135