mbsimflexiblebody 4.0.0 MBSim Flexible Body Module

1s_23_bta.h
1 /* Copyright (C) 2004-2015 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 _FLEXIBLE_BODY_1S_23_BTA_H_
21 #define _FLEXIBLE_BODY_1S_23_BTA_H_
22
23 #include "mbsimFlexibleBody/flexible_body/1s.h"
24
25 namespace MBSimFlexibleBody {
26
27 class NodeFrame;
28
36 class FlexibleBody1s23BTA : public FlexibleBody1s {
37 public:
42 FlexibleBody1s23BTA(const std::string &name="");
43
47 ~FlexibleBody1s23BTA() override = default;
48
49 /* INHERITED INTERFACE OF FLEXIBLE BODY */
50 void BuildElements() override;
51 void GlobalVectorContribution(int n, const fmatvec::Vec& locVec, fmatvec::Vec& gloVec) override;
52 void GlobalMatrixContribution(int n, const fmatvec::Mat& locMat, fmatvec::Mat& gloMat) override;
53 void GlobalMatrixContribution(int n, const fmatvec::SymMat& locMat, fmatvec::SymMat& gloMat) override;
54
55 void updatePositions(Frame1s* frame) override;
56 void updateVelocities(Frame1s* frame) override;
57 void updateAccelerations(Frame1s* frame) override;
58 void updateJacobians(Frame1s* frame, int j=0) override;
59 void updateGyroscopicAccelerations(Frame1s* frame) override;
60
61 virtual void updatePositions(NodeFrame* frame);
62 virtual void updateVelocities(NodeFrame* frame);
63 virtual void updateAccelerations(NodeFrame* frame);
64 virtual void updateJacobians(NodeFrame* frame, int j=0);
65 virtual void updateGyroscopicAccelerations(NodeFrame* frame);
66
67 fmatvec::Vec3 getAngles(double s) override;
68 /***************************************************/
69
70 /* INHERITED INTERFACE OF OBJECT */
71 void init(InitStage stage, const MBSim::InitConfigSet &config) override;
72 /***************************************************/
73
74 /* INHERITED INTERFACE OF ELEMENT */
75 void initializeUsingXML(xercesc::DOMElement *element) override;
76 /***************************************************/
77
78 /* GETTER / SETTER */
82 void setNumberElements(int n);
83 void setElastModuls(double E_, double G_) { E = E_;G = G_; }
84 void setDensity(double rho_) { rho = rho_; }
85 void setCrossSectionalArea(double A_) { A = A_; }
86 void setMomentsInertia(double Iyy_,double Izz_,double It_) { Iyy = Iyy_; Izz = Izz_; It = It_; }
87 // void setContourRadius(double r) { cylinderFlexible->setRadius(r); }
88 void setTorsionalDamping(double d) { dTorsional = d; }
89 /***************************************************/
90
95 fmatvec::Vector<fmatvec::Fixed<6>, double> getPositions(double x);
96
101 fmatvec::Vector<fmatvec::Fixed<6>, double> getVelocities(double x);
102
103 fmatvec::SqrMat3 getOrientation(double x) override;
104
105 protected:
112 void BuildElement(const double& sGlobal, double& sLocal, int& currentElement);
113
117 int Elements;
118
122 double l0{0.};
123
127 double E{0}, G;
128
132 double A{0};
133
137 double Iyy{0}, Izz{0}, It;
138
142 double rho{0};
143
147 double rc{0};
148
152 double dTorsional;
153
154 // /**
155 // * \brief contour of body
156 // */
157 // CylinderFlexible *cylinderFlexible;
158 };
159
160 }
161
162 #endif /* _FLEXIBLE_BODY_1S_23_BTA_H_ */
MBSimFlexibleBody::FlexibleBody1s23BTA::setNumberElements
void setNumberElements(int n)
sets size of positions and velocities
Definition: 1s_23_bta.cc:151
MBSimFlexibleBody::FlexibleBody1s23BTA::Elements
int Elements
number of elements
Definition: 1s_23_bta.h:117
MBSimFlexibleBody::FlexibleBody1s23BTA::A
double A
area of cross-section
Definition: 1s_23_bta.h:132
MBSimFlexibleBody::FlexibleBody1s23BTA::getPositions
fmatvec::Vector< fmatvec::Fixed< 6 >, double > getPositions(double x)
compute positions and angle at Lagrangian coordinate in local FE coordinates
Definition: 1s_23_bta.cc:160
MBSimFlexibleBody::FlexibleBody1s23BTA::rho
double rho
density
Definition: 1s_23_bta.h:142
MBSimFlexibleBody::FlexibleBody1s23BTA::l0
double l0
length of entire beam and finite elements
Definition: 1s_23_bta.h:122
MBSimFlexibleBody::FlexibleBody1s23BTA::Iyy
double Iyy
area moment of inertia
Definition: 1s_23_bta.h:137
MBSimFlexibleBody::FlexibleBody1s
tbd
Definition: 1s.h:33
MBSimFlexibleBody::Frame1s
Definition: frame_1s.h:27
MBSimFlexibleBody::FlexibleBody1s23BTA::BuildElements
void BuildElements() override
references finite element coordinates to assembled coordinates
Definition: 1s_23_bta.cc:43
MBSimFlexibleBody::FlexibleBody1s23BTA::GlobalMatrixContribution
void GlobalMatrixContribution(int n, const fmatvec::Mat &locMat, fmatvec::Mat &gloMat) override
insert 'local' information in global matrices
Definition: 1s_23_bta.cc:57
MBSimFlexibleBody::FlexibleBody1s23BTA::BuildElement
void BuildElement(const double &sGlobal, double &sLocal, int &currentElement)
detect current finite element
Definition: 1s_23_bta.cc:181
MBSimFlexibleBody::FlexibleBody1s23BTA::rc
double rc
contour radius
Definition: 1s_23_bta.h:147
MBSimFlexibleBody::FlexibleBody1s23BTA::FlexibleBody1s23BTA
FlexibleBody1s23BTA(const std::string &name="")
constructor
Definition: 1s_23_bta.cc:38
MBSim::Element::InitStage
InitStage
MBSim::Element::name
std::string name
MBSim::Body::frame
std::vector< Frame * > frame
MBSimFlexibleBody::FlexibleBody1s23BTA::getVelocities
fmatvec::Vector< fmatvec::Fixed< 6 >, double > getVelocities(double x)
compute velocities and differentiated angles at Lagrangian coordinate in local FE coordinates
Definition: 1s_23_bta.cc:167
MBSimFlexibleBody::FlexibleBody1s23BTA
bending torsional axis
Definition: 1s_23_bta.h:36
MBSimFlexibleBody::FlexibleBody1s23BTA::dTorsional
double dTorsional
damping
Definition: 1s_23_bta.h:152
MBSimFlexibleBody::NodeFrame
cartesian frame on nodes of flexible bodies
Definition: node_frame.h:31
MBSimFlexibleBody::FlexibleBody1s23BTA::E
double E
elastic modules
Definition: 1s_23_bta.h:127
MBSimFlexibleBody::FlexibleBody1s23BTA::GlobalVectorContribution
void GlobalVectorContribution(int n, const fmatvec::Vec &locVec, fmatvec::Vec &gloVec) override
insert 'local' information in global vectors
Definition: 1s_23_bta.cc:52
MBSimFlexibleBody::FlexibleBody1s23BTA::~FlexibleBody1s23BTA
~FlexibleBody1s23BTA() override=default
destructor