mbsimflexiblebody  4.0.0
MBSim Flexible Body Module
1s_21_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_21_ANCF_H_
21#define _FINITE_ELEMENT_1S_21_ANCF_H_
22
23#include "mbsimFlexibleBody/discretization_interface.h"
24#include "fmatvec/fmatvec.h"
25
26namespace MBSimFlexibleBody {
27
33 fmatvec::SqrMat differentiate_normalized_vector_respective_vector(const fmatvec::Vec &vector);
34
50 {
51 public:
60 explicit FiniteElement1s21ANCF(double sl0, double sArho, double sEA, double sEI, const fmatvec::Vec &sg, bool sEuler=false, double sv0=0.);
61
66
67 /* INHERITED INTERFACE */
68 const fmatvec::SymMat& getM() const override { return M; }
69 const fmatvec::Vec& geth() const override { return h; }
70 const fmatvec::SqrMat& getdhdq() const override { return Dhq; }
71 const fmatvec::SqrMat& getdhdu() const override { return Dhqp; }
72 int getqSize() const override { return 8; }
73 int getuSize() const override { return 8; }
74 void computeM(const fmatvec::Vec& qElement) override;
75 void computeh(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement) override;
76 void computedhdz(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement) override;
77 double computeKineticEnergy(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement) override;
78 double computeGravitationalEnergy(const fmatvec::Vec& qElement) override;
79 double computeElasticEnergy(const fmatvec::Vec& qElement) override;
80 virtual fmatvec::Vec3 getPosition(const fmatvec::Vec& qElement, double s);
81 virtual fmatvec::SqrMat3 getOrientation(const fmatvec::Vec& qElement, double s);
82 virtual fmatvec::Vec3 getVelocity(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
83 virtual fmatvec::Vec3 getAngularVelocity(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
84 virtual fmatvec::Mat getJacobianOfMotion(const fmatvec::Vec& qElement, double s) { return JGeneralized(qElement,s); }
85 /***************************************************/
86
87// /**
88// * compute additional informations for element
89// */
90// fmatvec::Vec computeAdditionalElementData(fmatvec::Vec &qElement, fmatvec::Vec &qpElement);
91
92 /* GETTER / SETTER */
93 void setCurlRadius(double R);
94 void setMaterialDamping(double depsilon_, double dkappa_);
95 /***************************************************/
96
100 void initM();
101
108 fmatvec::Vec LocateBalken(const fmatvec::Vec& qElement, double s);
109
117 fmatvec::Vec StateBalken(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
118
125 fmatvec::Mat JGeneralized(const fmatvec::Vec& qElement, double s);
126
132 fmatvec::Mat GlobalShapeFunctions(double s);
133
139 fmatvec::Mat GlobalShapeFunctions_1stDerivative(double s);
140
147 fmatvec::Vec3 getTangent(const fmatvec::Vec& qElement, double s);
148
149 private:
153 double l0;
154
158 double Arho;
159
163 double EA;
164
168 double EI;
169
173 bool Euler;
174
178 double v0;
179
183 double wss0;
184
188 double depsilon;
189
193 double dkappa;
194
198 fmatvec::Vec g;
199
203 fmatvec::SymMat M;
204
208 fmatvec::Vec h;
209
213 fmatvec::SqrMat Dhq;
214
218 fmatvec::SqrMat Dhqp;
219 };
220
221}
222
223#endif /* _FINITE_ELEMENT_1S_21_ANCF_H_ */
discretization interface for flexible systems
Definition: discretization_interface.h:36
finite element for planar beam using Absolute Nodal Coordinate Formulation (ANCF)
Definition: 1s_21_ancf.h:50
fmatvec::SqrMat Dhq
derivative of right hand side with respect to positions
Definition: 1s_21_ancf.h:213
void computeM(const fmatvec::Vec &qElement) override
compute mass matrix
Definition: 1s_21_ancf.cc:399
fmatvec::Vec g
gravitation
Definition: 1s_21_ancf.h:198
double dkappa
curvature damping
Definition: 1s_21_ancf.h:193
fmatvec::Vec h
right hand side
Definition: 1s_21_ancf.h:208
double computeGravitationalEnergy(const fmatvec::Vec &qElement) override
compute gravitational energy
Definition: 1s_21_ancf.cc:391
fmatvec::Vec StateBalken(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement, double s)
return the planar state at a contour point (Lagrange/Euler)
Definition: 1s_21_ancf.cc:293
fmatvec::SymMat M
mass matrix
Definition: 1s_21_ancf.h:203
double depsilon
longitudinal damping
Definition: 1s_21_ancf.h:188
const fmatvec::SqrMat & getdhdu() const override
Definition: 1s_21_ancf.h:71
double EA
longitudinal stiffness
Definition: 1s_21_ancf.h:163
fmatvec::Mat GlobalShapeFunctions_1stDerivative(double s)
return 1st derivative of the matrix of global shape functions
Definition: 1s_21_ancf.cc:353
double l0
beam element length
Definition: 1s_21_ancf.h:153
fmatvec::SqrMat Dhqp
derivative of right hand side with respect to velocities
Definition: 1s_21_ancf.h:218
double wss0
predefined bending curvature
Definition: 1s_21_ancf.h:183
bool Euler
Euler perspective: true if set.
Definition: 1s_21_ancf.h:173
void computeh(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement) override
compute smooth right hand side
Definition: 1s_21_ancf.cc:73
fmatvec::Vec3 getTangent(const fmatvec::Vec &qElement, double s)
returns the tangent
Definition: 1s_21_ancf.cc:368
double computeKineticEnergy(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement) override
compute kinetic energy
Definition: 1s_21_ancf.cc:387
double EI
bending stiffness
Definition: 1s_21_ancf.h:168
double computeElasticEnergy(const fmatvec::Vec &qElement) override
compute elastic energy
Definition: 1s_21_ancf.cc:395
const fmatvec::SymMat & getM() const override
Definition: 1s_21_ancf.h:68
fmatvec::Vec LocateBalken(const fmatvec::Vec &qElement, double s)
return the planar position and angle at a contour point (Lagrange/Euler)
Definition: 1s_21_ancf.cc:283
void computedhdz(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement) override
compute Jacobian for implicit integration
Definition: 1s_21_ancf.cc:383
double v0
Euler perspective: constant longitudinal velocity.
Definition: 1s_21_ancf.h:178
FiniteElement1s21ANCF(double sl0, double sArho, double sEA, double sEI, const fmatvec::Vec &sg, bool sEuler=false, double sv0=0.)
constructor
Definition: 1s_21_ancf.cc:36
int getqSize() const override
Definition: 1s_21_ancf.h:72
const fmatvec::SqrMat & getdhdq() const override
Definition: 1s_21_ancf.h:70
void initM()
calculate constant mass matrix
Definition: 1s_21_ancf.cc:50
int getuSize() const override
Definition: 1s_21_ancf.h:73
fmatvec::Mat JGeneralized(const fmatvec::Vec &qElement, double s)
return the JACOBIAN of translation and rotation with respect to generalised coordinates
Definition: 1s_21_ancf.cc:313
double Arho
line-density
Definition: 1s_21_ancf.h:158
fmatvec::Mat GlobalShapeFunctions(double s)
return the matrix of global shape functions
Definition: 1s_21_ancf.cc:338
const fmatvec::Vec & geth() const override
Definition: 1s_21_ancf.h:69