mbsimflexiblebody  4.0.0
MBSim Flexible Body Module
1s_23_bta.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_23_BTA_H_
21#define _FINITE_ELEMENT_1S_23_BTA_H_
22
23#include "mbsimFlexibleBody/discretization_interface.h"
24#include "fmatvec/fmatvec.h"
25
26namespace MBSimFlexibleBody {
27
37 public:
48 FiniteElement1s23BTA(double l0, double Arho, double EIyy, double EIzz, double Itrho, double GIt, const fmatvec::Vec &g);
49
53 ~FiniteElement1s23BTA() override = default;
54
55 /* INHERITED INTERFACE OF DISCRETIZATIONINTERFACE */
56 const fmatvec::SymMat& getM() const override { return M; }
57 const fmatvec::Vec& geth() const override { return h; }
58 const fmatvec::SqrMat& getdhdq() const override { return Dhq; }
59 const fmatvec::SqrMat& getdhdu() const override { return Dhqp; }
60 int getqSize() const override { return 10; }
61 int getuSize() const override { return 10; }
62
63 void computeM(const fmatvec::Vec& qG) override;
64 void computeh(const fmatvec::Vec& qG,const fmatvec::Vec& qGt) override;
65 void computedhdz(const fmatvec::Vec& qG, const fmatvec::Vec& qGt) override;
66 double computeKineticEnergy(const fmatvec::Vec& q,const fmatvec::Vec& u) override;
67 double computeGravitationalEnergy(const fmatvec::Vec& q) override;
68 double computeElasticEnergy(const fmatvec::Vec& q) override;
69
70 virtual fmatvec::Vec3 getPosition(const fmatvec::Vec& qElement, double s);
71 virtual fmatvec::SqrMat3 getOrientation(const fmatvec::Vec& qElement, double s);
72 virtual fmatvec::Vec3 getVelocity (const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
73 virtual fmatvec::Vec3 getAngularVelocity(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
74 virtual fmatvec::Mat getJacobianOfMotion(const fmatvec::Vec& qElement, double s) { return JGeneralized(qElement,s); }
75 /*****************************************************/
76
77 /* GETTER / SETTER */
78 void setMaterialDamping(double);
79 void setLehrDamping(double);
80 void setTorsionalDamping(double dTorsional_) { dTorsional=dTorsional_; }
81 /*****************************************************/
82
88 fmatvec::Vec3 getTangent(const fmatvec::Vec& q, double s);
89
90 fmatvec::Vector<fmatvec::Fixed<6>, double> getPositions(const fmatvec::Vec& qElement, double s);
91
92 fmatvec::Vector<fmatvec::Fixed<6>, double> getVelocities(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
93
94// /*!
95// * \brief compute accompanying trihedral
96// * \param global coordinates
97// * \param LAGRANGIAN parameter
98// */
99// fmatvec::SqrMat3 getOrientation(const fmatvec::Vec& q, double s);
100
101// /*!
102// * \brief compute global state
103// * \param global coordinates
104// * \param global velocities
105// * \param LAGRANGIAN parameter
106// * \return x,y,z,alpha,2x bending angle and velocities
107// */
108// fmatvec::Vec StateAxis(const fmatvec::Vec& q, const fmatvec::Vec& v, double s);
109
116 fmatvec::Mat JGeneralized(const fmatvec::Vec& q, double s);
117
118 private:
122 double l0;
123
127 double Arho;
128
132 double EIyy, EIzz;
133
137 double Itrho;
138
142 double GIt;
143
147 fmatvec::Vec g;
148
152 double depsilon, dTorsional;
153
157 fmatvec::SymMat M;
158 fmatvec::Vec h;
159
163 fmatvec::SqrMat Dhq, Dhqp;
164
168 fmatvec::SqrMat Damp;
169
173 double l0h2, l0h3;
174 };
175
176 inline double Sec(double alpha) { return 1.0/cos(alpha); }
177 inline double Power(double base, int exponent) { return pow(base,exponent); }
178}
179
180#endif /* _FINITE_ELEMENT_1S_23_BTA_H_ */
discretization interface for flexible systems
Definition: discretization_interface.h:36
finite element for bending torsional axis
Definition: 1s_23_bta.h:36
const fmatvec::SqrMat & getdhdu() const override
Definition: 1s_23_bta.h:59
double computeKineticEnergy(const fmatvec::Vec &q, const fmatvec::Vec &u) override
compute kinetic energy
Definition: 1s_23_bta.cc:318
void computedhdz(const fmatvec::Vec &qG, const fmatvec::Vec &qGt) override
compute Jacobian for implicit integration
Definition: 1s_23_bta.cc:119
double EIyy
Young's modulus multiplied with geometrical moment of inertia.
Definition: 1s_23_bta.h:132
double GIt
shear modulus multiplied with geometrical moment of inertia
Definition: 1s_23_bta.h:142
fmatvec::Vec3 getTangent(const fmatvec::Vec &q, double s)
compute tangent
Definition: 1s_23_bta.cc:151
fmatvec::SymMat M
global system description
Definition: 1s_23_bta.h:157
fmatvec::Vec g
gravitation
Definition: 1s_23_bta.h:147
int getuSize() const override
Definition: 1s_23_bta.h:61
double computeGravitationalEnergy(const fmatvec::Vec &q) override
compute gravitational energy
Definition: 1s_23_bta.cc:322
double l0h2
beam length powers
Definition: 1s_23_bta.h:173
const fmatvec::SymMat & getM() const override
Definition: 1s_23_bta.h:56
void computeM(const fmatvec::Vec &qG) override
compute mass matrix
Definition: 1s_23_bta.cc:35
double Arho
cross sectional area multiplied with density
Definition: 1s_23_bta.h:127
const fmatvec::Vec & geth() const override
Definition: 1s_23_bta.h:57
double Itrho
geometrical moment of inertia multiplied with density
Definition: 1s_23_bta.h:137
fmatvec::SqrMat Dhq
matrices for implicit integration
Definition: 1s_23_bta.h:163
double depsilon
prolongational and torsional damping
Definition: 1s_23_bta.h:152
fmatvec::Mat JGeneralized(const fmatvec::Vec &q, double s)
compute global state
Definition: 1s_23_bta.cc:234
double l0
length of finite element
Definition: 1s_23_bta.h:122
void computeh(const fmatvec::Vec &qG, const fmatvec::Vec &qGt) override
compute smooth right hand side
Definition: 1s_23_bta.cc:86
int getqSize() const override
Definition: 1s_23_bta.h:60
fmatvec::SqrMat Damp
internal damping matrix
Definition: 1s_23_bta.h:168
double computeElasticEnergy(const fmatvec::Vec &q) override
compute elastic energy
Definition: 1s_23_bta.cc:326
const fmatvec::SqrMat & getdhdq() const override
Definition: 1s_23_bta.h:58
~FiniteElement1s23BTA() override=default
destructor
FiniteElement1s23BTA(double l0, double Arho, double EIyy, double EIzz, double Itrho, double GIt, const fmatvec::Vec &g)
constructor
Definition: 1s_23_bta.cc:30