|
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 */ 00019 00020 #ifndef FLEXIBLEBODY2S13_H_ 00021 #define FLEXIBLEBODY2S13_H_ 00022 00023 #include "mbsimFlexibleBody/flexible_body.h" 00024 00025 namespace MBSimFlexibleBody { 00026 00027 class NurbsDisk2s; 00028 00035 fmatvec::Mat condenseMatrixRows(fmatvec::Mat A, fmatvec::Index I); 00036 00043 fmatvec::Mat condenseMatrixCols(fmatvec::Mat A, fmatvec::Index I); 00044 00051 fmatvec::SymMat condenseMatrix(fmatvec::SymMat A,fmatvec::Index I); 00052 00057 void MapleOutput(fmatvec::Mat A, std::string MatName, std::string file); 00058 00063 void MapleOutput(fmatvec::SymMat C, std::string MatName, std::string file); 00064 00075 class FlexibleBody2s13 : public FlexibleBodyContinuum<fmatvec::Vec> { 00076 00077 public: 00081 enum LockType { innerring,outerring }; 00082 00087 FlexibleBody2s13(const std::string &name, const int & DEBUGLEVEL_=0); 00088 00092 virtual ~FlexibleBody2s13() {} 00093 00094 /* INHERITED INTERFACE OF OBJECTINTERFACE */ 00095 virtual void updateh(double t, int j=0); 00096 virtual void updatedhdz(double t); 00097 virtual void updateStateDependentVariables(double t); 00098 /******************************************/ 00099 00100 /* INHERITED INTERFACE OF OBJECT */ 00101 virtual void facLLM() {}; 00102 00103 /* INHERITED INTERFACE OF ELEMENT */ 00104 virtual void plot(double t, double dt=1); 00105 virtual std::string getType() const { return "FlexibleBody2s13"; } 00106 /***************************************************/ 00107 00108 /* GETTER/SETTER */ 00109 void setRadius(double Ri_,double Ra_) { Ri = Ri_; Ra = Ra_; } 00110 void setEModul(double E_) { E = E_; } 00111 void setPoissonRatio(double nu_) { nu = nu_; } 00112 void setThickness(const fmatvec::Vec &d_) { d = d_; } 00113 fmatvec::Vec getThickness() const { return d; } 00114 void setDensity(double rho_) { rho = rho_; } 00115 int getReferenceDegreesOfFreedom() const { return RefDofs; } 00116 int getRadialNumberOfElements() const { return nr; } 00117 int getAzimuthalNumberOfElements() const { return nj; } 00118 double getInnerRadius() const { return Ri; } 00119 double getOuterRadius() const { return Ra; } 00120 double getAzimuthalDegree() const { return degU; } 00121 double getRadialDegree() const { return degV; } 00122 fmatvec::SqrMat getA() const { return A; } 00123 fmatvec::SqrMat getG() const { return G; } 00124 void setReferenceInertia(double m0_, fmatvec::SymMat J0_) { m0 = m0_; J0 = J0_; } 00125 void setLockType(LockType LT_) { LType = LT_; } 00126 /***************************************************/ 00127 00133 void setNumberElements(int nr_,int nj_); 00134 00138 double computePotentialEnergy() { return 0.5*q.T()*K*q; } 00139 00145 virtual fmatvec::Vec transformCW(const fmatvec::Vec& WrPoint) = 0; 00146 00147 protected: 00151 int Elements; 00152 00156 int NodeDofs; 00157 00161 int RefDofs; 00162 00166 double E; 00167 00171 double nu; 00172 00176 double rho; 00177 00183 fmatvec::Vec d; 00184 00188 double Ri, Ra; 00189 00193 double dr, dj; 00194 00198 double m0; 00199 00203 fmatvec::SymMat J0; 00204 00210 int degV, degU; 00211 00215 int drawDegree; 00216 00220 std::vector<fmatvec::Vec> ElementalNodes; 00221 00225 int currentElement; 00226 00230 fmatvec::SymMat MConst; 00231 00235 fmatvec::SymMat K; 00236 00240 int nr, nj, Nodes; 00241 00248 fmatvec::Mat NodeCoordinates; 00249 00255 fmatvec::Matrix<fmatvec::General,fmatvec::Ref,fmatvec::Ref,int> ElementNodeList; 00256 00260 int Dofs; 00261 00267 LockType LType; 00268 00272 fmatvec::Index ILocked; 00273 00277 fmatvec::Vec qext, uext; 00278 00282 fmatvec::SqrMat A; 00283 00287 fmatvec::SqrMat G; 00288 00289 /* 00290 * \brief Jacobian for condensation with size Dofs x qSize 00291 */ 00292 fmatvec::Mat Jext; 00293 00297 NurbsDisk2s *contour; 00298 00299 /* 00300 * \brief Debug-Output-Level 00301 * 00302 * 0 = no Debug output 00303 * 1 = console Debug Output 00304 * 2 = File Debug Output 00305 */ 00306 int DEBUGLEVEL; 00307 00312 void BuildElement(const fmatvec::Vec &s); 00313 00317 virtual void initMatrices() = 0; 00318 00322 virtual void updateAG() = 0; 00323 00328 double computeThickness(const double &r_); 00329 }; 00330 00331 } 00332 00333 #endif /* FLEXIBLEBODY2S13_H_ */ 00334
1.8.0