|
mbsimflexiblebody
4.0.0
|
00001 /* Copyright (C) 2004-2011 MBSim Development Team 00002 * 00003 * This library is free software; you can redistribute it and/or 00004 * modify it under the terms of the GNU Lesser General Public 00005 * License as published by the Free Software Foundation; either 00006 * version 2.1 of the License, or (at your option) any later version. 00007 * 00008 * This library is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 * Lesser General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU Lesser General Public 00014 * License along with this library; if not, write to the Free Software 00015 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00016 * 00017 * Contact: thorsten.schindler@mytum.de 00018 * rzander@users.berlios.de 00019 */ 00020 00021 #ifndef _FLEXIBLE_BODY_1S_23_BTA_H_ 00022 #define _FLEXIBLE_BODY_1S_23_BTA_H_ 00023 00024 #include "mbsimFlexibleBody/flexible_body.h" 00025 #include "mbsimFlexibleBody/contours/cylinder_flexible.h" 00026 #ifdef HAVE_OPENMBVCPPINTERFACE 00027 #include <openmbvcppinterface/spineextrusion.h> 00028 #endif 00029 00030 namespace MBSimFlexibleBody { 00031 00039 class FlexibleBody1s23BTA : public FlexibleBodyContinuum<double> { 00040 public: 00045 FlexibleBody1s23BTA(const std::string &name=""); 00046 00050 virtual ~FlexibleBody1s23BTA() {} 00051 00052 /* INHERITED INTERFACE OF FLEXIBLE BODY */ 00053 virtual void BuildElements(); 00054 virtual void GlobalVectorContribution(int n, const fmatvec::Vec& locVec, fmatvec::Vec& gloVec); 00055 virtual void GlobalMatrixContribution(int n, const fmatvec::Mat& locMat, fmatvec::Mat& gloMat); 00056 virtual void GlobalMatrixContribution(int n, const fmatvec::SymMat& locMat, fmatvec::SymMat& gloMat); 00057 virtual void updateKinematicsForFrame(MBSim::ContourPointData &cp, MBSim::Frame::Feature ff, MBSim::Frame *frame=0); 00058 virtual void updateJacobiansForFrame(MBSim::ContourPointData &data, MBSim::Frame *frame=0); 00059 /***************************************************/ 00060 00061 /* INHERITED INTERFACE OF OBJECT */ 00062 virtual void init(InitStage stage); 00063 /***************************************************/ 00064 00065 /* INHERITED INTERFACE OF ELEMENT */ 00066 virtual void plot(double t, double dt=1); 00067 virtual std::string getType() const { return "FlexibleBody1s23BTA"; } 00068 virtual void initializeUsingXML(xercesc::DOMElement *element); 00069 /***************************************************/ 00070 00071 /* GETTER / SETTER */ 00075 void setNumberElements(int n); 00076 void setLength(double L_) { L = L_; } 00077 void setElastModuls(double E_, double G_) { E = E_;G = G_; } 00078 void setDensity(double rho_) { rho = rho_; } 00079 void setCrossSectionalArea(double A_) { A = A_; } 00080 void setMomentsInertia(double Iyy_,double Izz_,double It_) { Iyy = Iyy_; Izz = Izz_; It = It_; } 00081 void setContourRadius(double r) { cylinderFlexible->setRadius(r); } 00082 void setTorsionalDamping(double d) { dTorsional = d; } 00083 #ifdef HAVE_OPENMBVCPPINTERFACE 00084 void setOpenMBVSpineExtrusion(const boost::shared_ptr<OpenMBV::SpineExtrusion> &body) { openMBVBody=body; } 00085 #endif 00086 /***************************************************/ 00087 00088 protected: 00095 void BuildElement(const double& sGlobal, double& sLocal, int& currentElement); 00096 00100 int Elements; 00101 00105 double L, l0; 00106 00110 double E, G; 00111 00115 double A; 00116 00120 double Iyy, Izz, It; 00121 00125 double rho; 00126 00130 double rc; 00131 00135 double dTorsional; 00136 00140 CylinderFlexible *cylinderFlexible; 00141 }; 00142 00143 } 00144 00145 #endif /* _FLEXIBLE_BODY_1S_23_BTA_H_ */ 00146
1.8.0