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
26 namespace MBSimFlexibleBody {
27
33 fmatvec::SqrMat differentiate_normalized_vector_respective_vector(const fmatvec::Vec &vector);
34
49 class FiniteElement1s21ANCF : public DiscretizationInterface
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
65 ~FiniteElement1s21ANCF() override;
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_ */
MBSimFlexibleBody::FiniteElement1s21ANCF::computeGravitationalEnergy
double computeGravitationalEnergy(const fmatvec::Vec &qElement) override
compute gravitational energy
Definition: 1s_21_ancf.cc:391
MBSimFlexibleBody::FiniteElement1s21ANCF::StateBalken
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
MBSimFlexibleBody::FiniteElement1s21ANCF::Dhqp
fmatvec::SqrMat Dhqp
derivative of right hand side with respect to velocities
Definition: 1s_21_ancf.h:218
MBSimFlexibleBody::FiniteElement1s21ANCF::GlobalShapeFunctions_1stDerivative
fmatvec::Mat GlobalShapeFunctions_1stDerivative(double s)
return 1st derivative of the matrix of global shape functions
Definition: 1s_21_ancf.cc:353
MBSimFlexibleBody::FiniteElement1s21ANCF::getdhdu
const fmatvec::SqrMat & getdhdu() const override
Definition: 1s_21_ancf.h:71
MBSimFlexibleBody::FiniteElement1s21ANCF::getTangent
fmatvec::Vec3 getTangent(const fmatvec::Vec &qElement, double s)
returns the tangent
Definition: 1s_21_ancf.cc:368
MBSimFlexibleBody::FiniteElement1s21ANCF::getuSize
int getuSize() const override
Definition: 1s_21_ancf.h:73
MBSimFlexibleBody::FiniteElement1s21ANCF::getdhdq
const fmatvec::SqrMat & getdhdq() const override
Definition: 1s_21_ancf.h:70
MBSimFlexibleBody::FiniteElement1s21ANCF
finite element for planar beam using Absolute Nodal Coordinate Formulation (ANCF)
Definition: 1s_21_ancf.h:49
MBSimFlexibleBody::FiniteElement1s21ANCF::initM
void initM()
calculate constant mass matrix
Definition: 1s_21_ancf.cc:50
MBSimFlexibleBody::FiniteElement1s21ANCF::computedhdz
void computedhdz(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement) override
compute Jacobian for implicit integration
Definition: 1s_21_ancf.cc:383
MBSimFlexibleBody::FiniteElement1s21ANCF::~FiniteElement1s21ANCF
~FiniteElement1s21ANCF() override
MBSimFlexibleBody::FiniteElement1s21ANCF::dkappa
double dkappa
curvature damping
Definition: 1s_21_ancf.h:193
MBSimFlexibleBody::FiniteElement1s21ANCF::setCurlRadius
void setCurlRadius(double R)
Definition: 1s_21_ancf.cc:40
MBSimFlexibleBody::FiniteElement1s21ANCF::EA
double EA
longitudinal stiffness
Definition: 1s_21_ancf.h:163
MBSimFlexibleBody::FiniteElement1s21ANCF::geth
const fmatvec::Vec & geth() const override
Definition: 1s_21_ancf.h:69
MBSimFlexibleBody::FiniteElement1s21ANCF::computeM
void computeM(const fmatvec::Vec &qElement) override
compute mass matrix
Definition: 1s_21_ancf.cc:399
MBSimFlexibleBody::FiniteElement1s21ANCF::computeKineticEnergy
double computeKineticEnergy(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement) override
compute kinetic energy
Definition: 1s_21_ancf.cc:387
MBSimFlexibleBody::FiniteElement1s21ANCF::EI
double EI
bending stiffness
Definition: 1s_21_ancf.h:168
MBSimFlexibleBody::FiniteElement1s21ANCF::GlobalShapeFunctions
fmatvec::Mat GlobalShapeFunctions(double s)
return the matrix of global shape functions
Definition: 1s_21_ancf.cc:338
MBSimFlexibleBody::FiniteElement1s21ANCF::wss0
double wss0
predefined bending curvature
Definition: 1s_21_ancf.h:183
MBSimFlexibleBody::FiniteElement1s21ANCF::M
fmatvec::SymMat M
mass matrix
Definition: 1s_21_ancf.h:203
MBSimFlexibleBody::FiniteElement1s21ANCF::computeh
void computeh(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement) override
compute smooth right hand side
Definition: 1s_21_ancf.cc:73
MBSimFlexibleBody::FiniteElement1s21ANCF::g
fmatvec::Vec g
gravitation
Definition: 1s_21_ancf.h:198
MBSimFlexibleBody::FiniteElement1s21ANCF::LocateBalken
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
MBSimFlexibleBody::FiniteElement1s21ANCF::v0
double v0
Euler perspective: constant longitudinal velocity.
Definition: 1s_21_ancf.h:178
MBSimFlexibleBody::FiniteElement1s21ANCF::Euler
bool Euler
Euler perspective: true if set.
Definition: 1s_21_ancf.h:173
MBSimFlexibleBody::FiniteElement1s21ANCF::JGeneralized
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
MBSimFlexibleBody::FiniteElement1s21ANCF::computeElasticEnergy
double computeElasticEnergy(const fmatvec::Vec &qElement) override
compute elastic energy
Definition: 1s_21_ancf.cc:395
MBSimFlexibleBody::FiniteElement1s21ANCF::Dhq
fmatvec::SqrMat Dhq
derivative of right hand side with respect to positions
Definition: 1s_21_ancf.h:213
MBSimFlexibleBody::DiscretizationInterface
discretization interface for flexible systems
Definition: discretization_interface.h:36
MBSimFlexibleBody::FiniteElement1s21ANCF::Arho
double Arho
line-density
Definition: 1s_21_ancf.h:158
MBSimFlexibleBody::FiniteElement1s21ANCF::getqSize
int getqSize() const override
Definition: 1s_21_ancf.h:72
MBSimFlexibleBody::FiniteElement1s21ANCF::h
fmatvec::Vec h
right hand side
Definition: 1s_21_ancf.h:208
MBSimFlexibleBody::FiniteElement1s21ANCF::l0
double l0
beam element length
Definition: 1s_21_ancf.h:153
MBSimFlexibleBody::FiniteElement1s21ANCF::getM
const fmatvec::SymMat & getM() const override
Definition: 1s_21_ancf.h:68
MBSimFlexibleBody::FiniteElement1s21ANCF::depsilon
double depsilon
longitudinal damping
Definition: 1s_21_ancf.h:188
MBSimFlexibleBody::FiniteElement1s21ANCF::FiniteElement1s21ANCF
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