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
26 namespace MBSimFlexibleBody {
27
40 class FiniteElement1s33ANCF : public DiscretizationInterface
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
232 FiniteElement1s33ANCF(const FiniteElement1s33ANCF&);
233
237 FiniteElement1s33ANCF& operator=(const FiniteElement1s33ANCF&);
238 };
239
240 }
241
242 #endif /* _FINITE_ELEMENT_1S_33_ANCF_H_ */
MBSimFlexibleBody::FiniteElement1s33ANCF::computeM
void computeM(const fmatvec::Vec &qElement) override
compute mass matrix
MBSimFlexibleBody::FiniteElement1s33ANCF::I0
double I0
polar moment of inertia
Definition: 1s_33_ancf.h:172
MBSimFlexibleBody::FiniteElement1s33ANCF::rho
double rho
density
Definition: 1s_33_ancf.h:152
MBSimFlexibleBody::FiniteElement1s33ANCF::StateBalken
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
MBSimFlexibleBody::FiniteElement1s33ANCF::wss01
double wss01
predefined bending curvature
Definition: 1s_33_ancf.h:187
MBSimFlexibleBody::FiniteElement1s33ANCF::g
fmatvec::Vec g
gravitation
Definition: 1s_33_ancf.h:202
MBSimFlexibleBody::FiniteElement1s33ANCF::FiniteElement1s33ANCF
FiniteElement1s33ANCF(double sl0, double srho, double sE, double sG, double sA, double sI0, double sI1, double sI2, const fmatvec::Vec &sg)
constructor
MBSimFlexibleBody::FiniteElement1s33ANCF::getM
const fmatvec::SymMat & getM() const override
Definition: 1s_33_ancf.h:58
MBSimFlexibleBody::FiniteElement1s33ANCF::computeKineticEnergy
double computeKineticEnergy(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement) override
compute kinetic energy
Definition: 1s_33_ancf.cc:391
MBSimFlexibleBody::FiniteElement1s33ANCF::getNormal
fmatvec::Vec3 getNormal(const fmatvec::Vec &qElement, double s)
returns the normal
Definition: 1s_33_ancf.cc:357
MBSimFlexibleBody::FiniteElement1s33ANCF::I2
double I2
area moment of inertia
Definition: 1s_33_ancf.h:182
MBSimFlexibleBody::FiniteElement1s33ANCF::getdhdq
const fmatvec::SqrMat & getdhdq() const override
Definition: 1s_33_ancf.h:60
MBSimFlexibleBody::FiniteElement1s33ANCF::getTangent
fmatvec::Vec3 getTangent(const fmatvec::Vec &qElement, double s)
returns the tangent
Definition: 1s_33_ancf.cc:342
MBSimFlexibleBody::FiniteElement1s33ANCF::GlobalShapeFunctions
fmatvec::Mat GlobalShapeFunctions(double s)
return the matrix of global shape functions
Definition: 1s_33_ancf.cc:323
MBSimFlexibleBody::FiniteElement1s33ANCF::E
double E
Young's modulus.
Definition: 1s_33_ancf.h:157
MBSimFlexibleBody::FiniteElement1s33ANCF::A
double A
cross-secion area
Definition: 1s_33_ancf.h:167
MBSimFlexibleBody::FiniteElement1s33ANCF::M
fmatvec::SymMat M
mass matrix
Definition: 1s_33_ancf.h:207
MBSimFlexibleBody::FiniteElement1s33ANCF::JGeneralized
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
MBSimFlexibleBody::FiniteElement1s33ANCF::getdhdu
const fmatvec::SqrMat & getdhdu() const override
Definition: 1s_33_ancf.h:61
MBSimFlexibleBody::FiniteElement1s33ANCF::geth
const fmatvec::Vec & geth() const override
Definition: 1s_33_ancf.h:59
MBSimFlexibleBody::FiniteElement1s33ANCF::computeh
void computeh(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement) override
compute smooth right hand side
Definition: 1s_33_ancf.cc:83
MBSimFlexibleBody::FiniteElement1s33ANCF::getqSize
int getqSize() const override
Definition: 1s_33_ancf.h:62
MBSimFlexibleBody::FiniteElement1s33ANCF::h
fmatvec::Vec h
right hand side
Definition: 1s_33_ancf.h:212
MBSimFlexibleBody::FiniteElement1s33ANCF::Dhq
fmatvec::SqrMat Dhq
derivative of right hand side with respect to positions
Definition: 1s_33_ancf.h:222
MBSimFlexibleBody::FiniteElement1s33ANCF::I1
double I1
area moment of inertia
Definition: 1s_33_ancf.h:177
MBSimFlexibleBody::FiniteElement1s33ANCF::getuSize
int getuSize() const override
Definition: 1s_33_ancf.h:63
MBSimFlexibleBody::FiniteElement1s33ANCF::wss02
double wss02
predefined bending curvature
Definition: 1s_33_ancf.h:192
MBSimFlexibleBody::FiniteElement1s33ANCF::l0
double l0
beam element length
Definition: 1s_33_ancf.h:147
MBSimFlexibleBody::FiniteElement1s33ANCF::computeElasticEnergy
double computeElasticEnergy(const fmatvec::Vec &qElement) override
compute elastic energy
Definition: 1s_33_ancf.cc:399
MBSimFlexibleBody::FiniteElement1s33ANCF
finite element for spatial beam using Absolute Nodal Coordinate Formulation (ANCF)
Definition: 1s_33_ancf.h:40
MBSimFlexibleBody::FiniteElement1s33ANCF::Damp
fmatvec::SqrMat Damp
damping matrix
Definition: 1s_33_ancf.h:217
MBSimFlexibleBody::FiniteElement1s33ANCF::Dhqp
fmatvec::SqrMat Dhqp
derivative of right hand side with respect to velocities
Definition: 1s_33_ancf.h:227
MBSimFlexibleBody::FiniteElement1s33ANCF::LocateBalken
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
MBSimFlexibleBody::DiscretizationInterface
discretization interface for flexible systems
Definition: discretization_interface.h:36
MBSimFlexibleBody::FiniteElement1s33ANCF::computedhdz
void computedhdz(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement) override
compute Jacobian for implicit integration
Definition: 1s_33_ancf.cc:387
MBSimFlexibleBody::FiniteElement1s33ANCF::getBinormal
fmatvec::Vec3 getBinormal(const fmatvec::Vec &qElement, double s)
returns the binormal
Definition: 1s_33_ancf.cc:372
MBSimFlexibleBody::FiniteElement1s33ANCF::computeGravitationalEnergy
double computeGravitationalEnergy(const fmatvec::Vec &qElement) override
compute gravitational energy
Definition: 1s_33_ancf.cc:395
MBSimFlexibleBody::FiniteElement1s33ANCF::operator=
FiniteElement1s33ANCF & operator=(const FiniteElement1s33ANCF &)
assignment operator is declared private
MBSimFlexibleBody::FiniteElement1s33ANCF::G
double G
shear modulus
Definition: 1s_33_ancf.h:162
MBSimFlexibleBody::FiniteElement1s33ANCF::depsilon
double depsilon
longitudinal damping
Definition: 1s_33_ancf.h:197
MBSimFlexibleBody::FiniteElement1s33ANCF::initM
void initM()
calculate constant mass matrix
Definition: 1s_33_ancf.cc:50