|
mbsimflexiblebody
4.0.0
|
00001 /* Copyright (C) 2004-2014 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 _FINITE_ELEMENT_1S_21_ANCF_H_ 00021 #define _FINITE_ELEMENT_1S_21_ANCF_H_ 00022 00023 #include "mbsim/discretization_interface.h" 00024 #include "mbsim/contour_pdata.h" 00025 #include "mbsim/mbsim_event.h" 00026 #include "fmatvec/fmatvec.h" 00027 00028 namespace MBSimFlexibleBody { 00029 00035 fmatvec::SqrMat differentiate_normalized_vector_respective_vector(const fmatvec::Vec &vector); 00036 00051 class FiniteElement1s21ANCF : public MBSim::DiscretizationInterface 00052 { 00053 public: 00062 explicit FiniteElement1s21ANCF(double sl0, double sArho, double sEA, double sEI, fmatvec::Vec sg, bool sEuler=false, double sv0=0.); 00063 00067 virtual ~FiniteElement1s21ANCF(); 00068 00069 /* INHERITED INTERFACE */ 00070 virtual const fmatvec::SymMat& getM() const { return M; } 00071 virtual const fmatvec::Vec& geth() const { return h; } 00072 virtual const fmatvec::SqrMat& getdhdq() const { return Dhq; } 00073 virtual const fmatvec::SqrMat& getdhdu() const { return Dhqp; } 00074 virtual int getqSize() const { return 8; } 00075 virtual int getuSize() const { return 8; } 00076 virtual void computeM(const fmatvec::Vec& qElement); 00077 virtual void computeh(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement); 00078 virtual void computedhdz(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement) { throw MBSim::MBSimError("ERROR (FiniteElement1s21ANCF::computedhdz): not implemented!"); } 00079 virtual double computeKineticEnergy(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement) { throw MBSim::MBSimError("ERROR (FiniteElement1s21ANCF::computeKineticEnergy): not implemented!"); } 00080 virtual double computeGravitationalEnergy(const fmatvec::Vec& qElement) { throw MBSim::MBSimError("ERROR (FiniteElement1s21ANCF::computeGravitationalEnergy): not implemented!"); } 00081 virtual double computeElasticEnergy(const fmatvec::Vec& qElement) { throw MBSim::MBSimError("ERROR (FiniteElement1s21ANCF::computeElasticEnergy): not implemented!"); } 00082 virtual fmatvec::Vec computePosition(const fmatvec::Vec& qElement, const MBSim::ContourPointData& cp); 00083 virtual fmatvec::SqrMat computeOrientation(const fmatvec::Vec& qElement, const MBSim::ContourPointData& cp); 00084 virtual fmatvec::Vec computeVelocity(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, const MBSim::ContourPointData& cp); 00085 virtual fmatvec::Vec computeAngularVelocity(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, const MBSim::ContourPointData& cp); 00086 virtual fmatvec::Mat computeJacobianOfMotion(const fmatvec::Vec& qElement, const MBSim::ContourPointData& cp) { return JGeneralized(qElement,cp.getLagrangeParameterPosition()(0)); } 00087 /***************************************************/ 00088 00092 fmatvec::Vec computeAdditionalElementData(fmatvec::Vec &qElement, fmatvec::Vec &qpElement); 00093 00094 /* GETTER / SETTER */ 00095 void setCurlRadius(double R); 00096 void setMaterialDamping(double depsilon_, double dkappa_); 00097 /***************************************************/ 00098 00102 void initM(); 00103 00110 fmatvec::Vec LocateBalken(const fmatvec::Vec& qElement, const double& s); 00111 00119 fmatvec::Vec StateBalken(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, const double&s); 00120 00127 fmatvec::Mat JGeneralized(const fmatvec::Vec& qElement, const double& s); 00128 00134 fmatvec::Mat GlobalShapeFunctions(const double& s); 00135 00141 fmatvec::Mat GlobalShapeFunctions_1stDerivative(const double& s); 00142 00149 fmatvec::Vec tangent(const fmatvec::Vec& qElement, const double& s); 00150 00151 private: 00155 double l0; 00156 00160 double Arho; 00161 00165 double EA; 00166 00170 double EI; 00171 00175 bool Euler; 00176 00180 double v0; 00181 00185 double wss0; 00186 00190 double depsilon; 00191 00195 double dkappa; 00196 00200 fmatvec::Vec g; 00201 00205 fmatvec::SymMat M; 00206 00210 fmatvec::Vec h; 00211 00215 fmatvec::SqrMat Dhq; 00216 00220 fmatvec::SqrMat Dhqp; 00221 }; 00222 00223 inline void FiniteElement1s21ANCF::computeM(const fmatvec::Vec& qG) { throw MBSim::MBSimError("Error(FiniteElement1s21ANCF::computeM): Not implemented"); } 00224 } 00225 00226 #endif /* _FINITE_ELEMENT_1S_21_ANCF_H_ */
1.8.0