mbsimflexiblebody  4.0.0
MBSim Flexible Body Module
1s_33_cosserat_rotation.h
1/* Copyright (C) 2004-2012 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_COSSERAT_ROTATION_H_
21#define _FINITE_ELEMENT_1S_33_COSSERAT_ROTATION_H_
22
23#include "mbsimFlexibleBody/discretization_interface.h"
24#include "mbsimFlexibleBody/pointer.h"
25#include "fmatvec/fmatvec.h"
26
27namespace MBSimFlexibleBody {
28
47 public:
48
59 FiniteElement1s33CosseratRotation(double l0_,double E_,double G_,double I1_,double I2_,double I0_,CardanPtr ag_);
60
65
66 /* INHERITED INTERFACE OF DISCRETIZATIONINTERFACE */
67 const fmatvec::SymMat& getM() const override;
68 const fmatvec::Vec& geth() const override { return h; }
69 const fmatvec::SqrMat& getdhdq() const override { return dhdq; }
70 const fmatvec::SqrMat& getdhdu() const override { return dhdu; }
71 int getqSize() const override { return 9; }
72 int getuSize() const override { return 9; }
73
74 void computeM(const fmatvec::Vec& qG) override;
75 void computeh(const fmatvec::Vec& qG, const fmatvec::Vec& qGt) override;
76 void computedhdz(const fmatvec::Vec& qG, const fmatvec::Vec& qGt) override;
77 double computeKineticEnergy(const fmatvec::Vec& qG, const fmatvec::Vec& qGt) override;
78 double computeGravitationalEnergy(const fmatvec::Vec& qG) override;
79 double computeElasticEnergy(const fmatvec::Vec& qG) override;
80
81 virtual fmatvec::Vec3 getPosition(const fmatvec::Vec& qElement, double s);
82 virtual fmatvec::SqrMat3 getOrientation(const fmatvec::Vec& qElement, double s);
83 virtual fmatvec::Vec3 getVelocity(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
84 virtual fmatvec::Vec3 getAngularVelocity(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
85 virtual fmatvec::Mat computeJacobianOfMotion(const fmatvec::Vec& qG, double s) { return computeJXqG(qG,s); }
86
87 /* GETTER / SETTER */
88 void setCurlRadius(double R1,double R2);
89 double getl0() const { return l0; }
90
96 fmatvec::Mat computeJXqG(const fmatvec::Vec& qG,double x);
97
98 private:
102 double l0;
103
107 double E;
108
112 double G;
113
117 double I1, I2, I0;
118
124 double k10, k20;
125
129 fmatvec::Vec h;
130
134 fmatvec::Vec X;
135
139 fmatvec::SqrMat dhdq, dhdu;
140
144 CardanPtr ag;
145
146 FiniteElement1s33CosseratRotation(); // standard constructor
148 FiniteElement1s33CosseratRotation& operator=(const FiniteElement1s33CosseratRotation&); // assignment operator
149 };
150
151}
152
153#endif /* _FINITE_ELEMENT_1S_33_COSSERAT_ROTATION_H_ */
discretization interface for flexible systems
Definition: discretization_interface.h:36
finite element for spatial beam using Cosserat model : rotation element for bending and torsion
Definition: 1s_33_cosserat_rotation.h:46
double computeGravitationalEnergy(const fmatvec::Vec &qG) override
compute gravitational energy
Definition: 1s_33_cosserat_rotation.cc:119
fmatvec::Vec h
global system description
Definition: 1s_33_cosserat_rotation.h:129
const fmatvec::SymMat & getM() const override
Definition: 1s_33_cosserat_rotation.cc:103
const fmatvec::SqrMat & getdhdq() const override
Definition: 1s_33_cosserat_rotation.h:69
int getqSize() const override
Definition: 1s_33_cosserat_rotation.h:71
double k10
predefined bending k10: precurvature in t-b-plane k20: precurvature in t-n-plane
Definition: 1s_33_cosserat_rotation.h:124
double l0
length of finite element
Definition: 1s_33_cosserat_rotation.h:102
double G
shear modulus
Definition: 1s_33_cosserat_rotation.h:112
int getuSize() const override
Definition: 1s_33_cosserat_rotation.h:72
fmatvec::Mat computeJXqG(const fmatvec::Vec &qG, double x)
compute JACOBIAN of contact description in global coordinates
Definition: 1s_33_cosserat_rotation.cc:139
fmatvec::SqrMat dhdq
matrices for implicit integration
Definition: 1s_33_cosserat_rotation.h:139
double E
Young's modulus.
Definition: 1s_33_cosserat_rotation.h:107
void computedhdz(const fmatvec::Vec &qG, const fmatvec::Vec &qGt) override
compute Jacobian for implicit integration
Definition: 1s_33_cosserat_rotation.cc:111
void computeM(const fmatvec::Vec &qG) override
compute mass matrix
Definition: 1s_33_cosserat_rotation.cc:107
const fmatvec::SqrMat & getdhdu() const override
Definition: 1s_33_cosserat_rotation.h:70
void computeh(const fmatvec::Vec &qG, const fmatvec::Vec &qGt) override
compute smooth right hand side
Definition: 1s_33_cosserat_rotation.cc:41
CardanPtr ag
Cardan-object.
Definition: 1s_33_cosserat_rotation.h:144
double computeKineticEnergy(const fmatvec::Vec &qG, const fmatvec::Vec &qGt) override
compute kinetic energy
Definition: 1s_33_cosserat_rotation.cc:115
double I1
geometrical moment of inertia
Definition: 1s_33_cosserat_rotation.h:117
const fmatvec::Vec & geth() const override
Definition: 1s_33_cosserat_rotation.h:68
fmatvec::Vec X
state at Lagrangian coordinate
Definition: 1s_33_cosserat_rotation.h:134
double computeElasticEnergy(const fmatvec::Vec &qG) override
compute elastic energy
Definition: 1s_33_cosserat_rotation.cc:88