mbsimflexiblebody  4.0.0
MBSim Flexible Body Module
1s_33_ancf.h
1/* Copyright (C) 2004-2014 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_ANCF_H_
21#define _FINITE_ELEMENT_1S_33_ANCF_H_
22
23#include "mbsimFlexibleBody/discretization_interface.h"
24#include "fmatvec/fmatvec.h"
25
26namespace MBSimFlexibleBody {
27
41 {
42 public:
55 explicit FiniteElement1s33ANCF(double sl0, double srho, double sE, double sG, double sA, double sI0, double sI1, double sI2, const fmatvec::Vec &sg);
56
57 /* INHERITED INTERFACE */
58 const fmatvec::SymMat& getM() const override { return M; }
59 const fmatvec::Vec& geth() const override { return h; }
60 const fmatvec::SqrMat& getdhdq() const override { return Dhq; }
61 const fmatvec::SqrMat& getdhdu() const override { return Dhqp; }
62 int getqSize() const override { return 12; }
63 int getuSize() const override { return 12; }
64 void computeM(const fmatvec::Vec& qElement) override;
65 void computeh(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement) override;
66 void computedhdz(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement) override;
67 double computeKineticEnergy(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement) override;
68 double computeGravitationalEnergy(const fmatvec::Vec& qElement) override;
69 double computeElasticEnergy(const fmatvec::Vec& qElement) override;
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 computeJacobianOfMotion(const fmatvec::Vec& qElement, double s) { return JGeneralized(qElement,s); }
75 /***************************************************/
76
77 /* GETTER / SETTER */
78 void setCurlRadius(double R1, double R2);
79 void setMaterialDamping(double depsilons);
80 /***************************************************/
81
85 void initM();
86
93 fmatvec::Vec LocateBalken(const fmatvec::Vec& qElement, double s);
94
102 fmatvec::Vec StateBalken(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
103
110 fmatvec::Mat JGeneralized(const fmatvec::Vec& qElement, double s);
111
117 fmatvec::Mat GlobalShapeFunctions(double s);
118
125 fmatvec::Vec3 getTangent(const fmatvec::Vec& qElement, double s);
126
133 fmatvec::Vec3 getNormal(const fmatvec::Vec& qElement, double s);
134
141 fmatvec::Vec3 getBinormal(const fmatvec::Vec& qElement, double s);
142
143 private:
147 double l0;
148
152 double rho;
153
157 double E;
158
162 double G;
163
167 double A;
168
172 double I0;
173
177 double I1;
178
182 double I2;
183
187 double wss01;
188
192 double wss02;
193
197 double depsilon;
198
202 fmatvec::Vec g;
203
207 fmatvec::SymMat M;
208
212 fmatvec::Vec h;
213
217 fmatvec::SqrMat Damp;
218
222 fmatvec::SqrMat Dhq;
223
227 fmatvec::SqrMat Dhqp;
228
233
238 };
239
240}
241
242#endif /* _FINITE_ELEMENT_1S_33_ANCF_H_ */
discretization interface for flexible systems
Definition: discretization_interface.h:36
finite element for spatial beam using Absolute Nodal Coordinate Formulation (ANCF)
Definition: 1s_33_ancf.h:41
int getuSize() const override
Definition: 1s_33_ancf.h:63
double wss02
predefined bending curvature
Definition: 1s_33_ancf.h:192
fmatvec::Vec LocateBalken(const fmatvec::Vec &qElement, double s)
return the position and Cardan angles at a contour point
Definition: 1s_33_ancf.cc:252
double A
cross-secion area
Definition: 1s_33_ancf.h:167
double rho
density
Definition: 1s_33_ancf.h:152
fmatvec::Vec StateBalken(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement, double s)
return the state including Cardan angles at a contour point
Definition: 1s_33_ancf.cc:260
void computeM(const fmatvec::Vec &qElement) override
compute mass matrix
FiniteElement1s33ANCF(const FiniteElement1s33ANCF &)
copy constructor is declared private
void computeh(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement) override
compute smooth right hand side
Definition: 1s_33_ancf.cc:83
double computeElasticEnergy(const fmatvec::Vec &qElement) override
compute elastic energy
Definition: 1s_33_ancf.cc:399
fmatvec::Vec3 getTangent(const fmatvec::Vec &qElement, double s)
returns the tangent
Definition: 1s_33_ancf.cc:342
fmatvec::SqrMat Dhq
derivative of right hand side with respect to positions
Definition: 1s_33_ancf.h:222
int getqSize() const override
Definition: 1s_33_ancf.h:62
fmatvec::Vec3 getNormal(const fmatvec::Vec &qElement, double s)
returns the normal
Definition: 1s_33_ancf.cc:357
fmatvec::SqrMat Damp
damping matrix
Definition: 1s_33_ancf.h:217
fmatvec::Mat JGeneralized(const fmatvec::Vec &qElement, double s)
return the JACOBIAN of translation and rotation with respect to generalised coordinates
Definition: 1s_33_ancf.cc:271
double G
shear modulus
Definition: 1s_33_ancf.h:162
double E
Young's modulus.
Definition: 1s_33_ancf.h:157
double I1
area moment of inertia
Definition: 1s_33_ancf.h:177
double depsilon
longitudinal damping
Definition: 1s_33_ancf.h:197
FiniteElement1s33ANCF(double sl0, double srho, double sE, double sG, double sA, double sI0, double sI1, double sI2, const fmatvec::Vec &sg)
constructor
const fmatvec::SqrMat & getdhdu() const override
Definition: 1s_33_ancf.h:61
FiniteElement1s33ANCF & operator=(const FiniteElement1s33ANCF &)
assignment operator is declared private
const fmatvec::Vec & geth() const override
Definition: 1s_33_ancf.h:59
double I0
polar moment of inertia
Definition: 1s_33_ancf.h:172
double I2
area moment of inertia
Definition: 1s_33_ancf.h:182
fmatvec::Vec g
gravitation
Definition: 1s_33_ancf.h:202
void initM()
calculate constant mass matrix
Definition: 1s_33_ancf.cc:50
fmatvec::SqrMat Dhqp
derivative of right hand side with respect to velocities
Definition: 1s_33_ancf.h:227
fmatvec::SymMat M
mass matrix
Definition: 1s_33_ancf.h:207
double wss01
predefined bending curvature
Definition: 1s_33_ancf.h:187
double computeKineticEnergy(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement) override
compute kinetic energy
Definition: 1s_33_ancf.cc:391
void computedhdz(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement) override
compute Jacobian for implicit integration
Definition: 1s_33_ancf.cc:387
fmatvec::Vec h
right hand side
Definition: 1s_33_ancf.h:212
fmatvec::Mat GlobalShapeFunctions(double s)
return the matrix of global shape functions
Definition: 1s_33_ancf.cc:323
const fmatvec::SymMat & getM() const override
Definition: 1s_33_ancf.h:58
fmatvec::Vec3 getBinormal(const fmatvec::Vec &qElement, double s)
returns the binormal
Definition: 1s_33_ancf.cc:372
double computeGravitationalEnergy(const fmatvec::Vec &qElement) override
compute gravitational energy
Definition: 1s_33_ancf.cc:395
const fmatvec::SqrMat & getdhdq() const override
Definition: 1s_33_ancf.h:60
double l0
beam element length
Definition: 1s_33_ancf.h:147