|
mbsimflexiblebody
3.2.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 _BODY_FLEXIBLE_1S_21_ANCF_H_ 00022 #define _BODY_FLEXIBLE_1S_21_ANCF_H_ 00023 00024 #include "body_flexible.h" 00025 00026 namespace MBSim { 00027 00028 class FiniteElement1s21ANCF; 00029 class Contour1sFlexible; 00030 00035 class BodyFlexible1s21ANCF : public BodyFlexible1s { 00036 00037 protected: 00038 FiniteElement1s21ANCF *balken; 00039 static const int NodeDOFs; 00040 static const int ElementalDOFs; 00041 00042 int Elements; 00043 double L, E, A, I, rho; 00044 bool openStructure; 00045 bool implicit; 00046 00047 Vec qElement,uElement; 00048 int CurrentElement; 00049 SqrMat Dhq, Dhqp; 00050 00051 // KOS-Definition und Lage des ersten Knoten im Weltsystem 00052 Vec WrON00,WrON0; 00053 00054 void BuildElement(const int&); 00055 double BuildElement(const double&); 00056 00057 void updateStateDependentVariables(double t); 00058 void updatePorts(double t); 00059 00060 void updateh(double t); 00061 void init(InitStage stage); 00062 void initM(); 00063 bool initialized; 00064 double alphaRelax0, alphaRelax; 00065 00066 double sTangent; 00067 Vec Wt, Wn, WrOC, WvC, Womega; 00068 00070 Contour1sFlexible *contourR, *contourL; 00071 00072 public: 00073 BodyFlexible1s21ANCF(const string &name, bool openStructure); 00074 00075 void setNumberElements(int n); 00076 void setLength(double L_) {L = L_;} 00077 void setEModul(double E_) {E = E_;} 00078 void setCrossSectionalArea(double A_) {A = A_;} 00079 void setMomentInertia(double I_) {I = I_;} 00080 void setDensity(double rho_) {rho = rho_;} 00081 /* void setCurleRadius(double r) {rc = r;if(initialized) balken->setCurleRadius(rc);} */ 00082 /* void setMaterialDamping(double d) {dm = d;if(initialized) balken->setMaterialDamping(dm);} */ 00083 /* void setLehrDamping(double d) {dl = d;if(initialized) balken->setLehrDamping(dl);} */ 00084 00085 using BodyFlexible1s::addPort; 00089 void addPort(const string &name, const int &node); 00090 00091 Mat computeJacobianMatrix(const ContourPointData &data); 00092 00093 Mat computeWt (const ContourPointData &S_); 00094 Vec computeWn (const ContourPointData &S_); 00095 Vec computeWrOC(const ContourPointData &S_); 00096 Vec computeWvC (const ContourPointData &S_); 00097 Vec computeWomega(const ContourPointData &S_); 00098 00099 bool hasConstMass() const {return true;} 00100 00101 void setJT(const Mat &JT_) {assert(JT_.cols()==2); JT = JT_;}; 00102 void setJR(const Mat &JR_) {assert(JR_.cols()==1); JR = JR_;}; 00103 00104 void setWrON00(const Vec &WrON00_) {WrON00 = WrON00_;} 00105 void initRelaxed(double alpha); 00106 }; 00107 00108 } 00109 00110 #endif
1.8.0