mbsimflexiblebody  4.0.0
finite_element_2s_13_disk.h
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 _FINITE_ELEMENT_2S_13_DISK_H_
00021 #define _FINITE_ELEMENT_2S_13_DISK_H_
00022 
00023 #include<cmath>
00024 #include "mbsim/discretization_interface.h"
00025 #include "mbsim/mbsim_event.h"
00026 
00027 namespace MBSimFlexibleBody {
00028 
00039   class FiniteElement2s13Disk : public MBSim::DiscretizationInterface {
00040     public:
00047       FiniteElement2s13Disk(double E_,double nu_,double rho_);
00048 
00052       virtual ~FiniteElement2s13Disk() {}    
00053 
00054       /* INTERFACE OF DISCRETIZATIONINTERFACE */
00055       virtual const fmatvec::SymMat& getM() const;    
00056       virtual const fmatvec::Vec& geth() const;
00057       virtual const fmatvec::SqrMat& getdhdq() const;
00058       virtual const fmatvec::SqrMat& getdhdu() const;
00059       virtual int getqSize() const;
00060       virtual int getuSize() const;
00061       virtual void computeM(const fmatvec::Vec& q);
00062       virtual void computeh(const fmatvec::Vec& q,const fmatvec::Vec& u);
00063       virtual void computedhdz(const fmatvec::Vec& q,const fmatvec::Vec& u);
00064       virtual double computeKineticEnergy(const fmatvec::Vec& q,const fmatvec::Vec& u);
00065       virtual double computeGravitationalEnergy(const fmatvec::Vec& q);
00066       virtual double computeElasticEnergy(const fmatvec::Vec& q);
00067       virtual fmatvec::Vec computePosition(const fmatvec::Vec& q, const MBSim::ContourPointData &data);
00068       virtual fmatvec::SqrMat computeOrientation(const fmatvec::Vec& q, const MBSim::ContourPointData &data);
00069       virtual fmatvec::Vec computeVelocity(const fmatvec::Vec& q, const fmatvec::Vec& u, const MBSim::ContourPointData &data);
00070       virtual fmatvec::Vec computeAngularVelocity(const fmatvec::Vec& q, const fmatvec::Vec& u, const MBSim::ContourPointData &data);
00071       virtual fmatvec::Mat computeJacobianOfMotion(const fmatvec::Vec& q,const MBSim::ContourPointData &data);
00072       /***************************************************/
00073 
00074       /* GETTER / SETTER */
00075       const fmatvec::SymMat& getK() const;
00076       void setEModul(double E_);
00077       void setPoissonRatio(double nu_);
00078       void setDensity(double rho_);
00079       void setShearCorrectionFactor(double alp_);
00080       /***************************************************/
00081 
00088       void computeConstantSystemMatrices(const fmatvec::Vec &NodeCoordinates,double d1,double d2);
00089 
00099       fmatvec::Vec computeState(const fmatvec::Vec &NodeCoordinates,const fmatvec::Vec &qElement,const fmatvec::Vec &qpElement,const fmatvec::Vec &s,double d1,double d2);
00100 
00106       fmatvec::Mat JGeneralized(const fmatvec::Vec &NodeCoordinates,const fmatvec::Vec &s);
00107 
00108     private:
00112       double E;
00113 
00117       double nu;
00118 
00122       double G;
00123 
00127       double rho;
00128 
00132       double alphaS;
00133 
00137       int RefDofs;
00138 
00142       int NodeDofs;
00143 
00147       int Nodes;
00148 
00152       fmatvec::SymMat M, K;
00153   };
00154 
00155   inline const fmatvec::SymMat& FiniteElement2s13Disk::getM() const { return M; }
00156   inline const fmatvec::Vec& FiniteElement2s13Disk::geth() const { throw MBSim::MBSimError("ERROR(FiniteElement2s13Disk::geth): Not implemented!"); } 
00157   inline const fmatvec::SqrMat& FiniteElement2s13Disk::getdhdq() const { throw MBSim::MBSimError("ERROR(FiniteElement2s13Disk::getdhdq): Not implemented!"); } 
00158   inline const fmatvec::SqrMat& FiniteElement2s13Disk::getdhdu() const { throw MBSim::MBSimError("ERROR(FiniteElement2s13Disk::getdhdu): Not implemented!"); } 
00159   inline int FiniteElement2s13Disk::getqSize() const { return RefDofs + 4*NodeDofs; }
00160   inline int FiniteElement2s13Disk::getuSize() const { return RefDofs + 4*NodeDofs; }
00161   inline void FiniteElement2s13Disk::computeM(const fmatvec::Vec& q) { throw MBSim::MBSimError("ERROR(FiniteElement2s13Disk::computeM): Not implemented!"); } 
00162   inline void FiniteElement2s13Disk::computeh(const fmatvec::Vec& q,const fmatvec::Vec& u) { throw MBSim::MBSimError("ERROR(FiniteElement2s13Disk::computeh): Not implemented!"); } 
00163   inline void FiniteElement2s13Disk::computedhdz(const fmatvec::Vec& q,const fmatvec::Vec& u) { throw MBSim::MBSimError("ERROR(FiniteElement2s13Disk::computedhdz): Not implemented!"); } 
00164   inline double FiniteElement2s13Disk::computeKineticEnergy(const fmatvec::Vec& q,const fmatvec::Vec& u) { throw MBSim::MBSimError("ERROR(FiniteElement2s13Disk::computeKineticEnergy): Not implemented!"); } 
00165   inline double FiniteElement2s13Disk::computeGravitationalEnergy(const fmatvec::Vec& q) { throw MBSim::MBSimError("ERROR(FiniteElement2s13Disk::computeGravitationalEnergy): Not implemented!"); } 
00166   inline double FiniteElement2s13Disk::computeElasticEnergy(const fmatvec::Vec& q) { throw MBSim::MBSimError("ERROR(FiniteElement2s13Disk::computeElasticEnergy): Not implemented!"); } 
00167   inline fmatvec::Vec FiniteElement2s13Disk::computePosition(const fmatvec::Vec& q, const MBSim::ContourPointData &data) { throw MBSim::MBSimError("ERROR(FiniteElement2s13Disk::computePosition): Not implemented!"); } 
00168   inline fmatvec::SqrMat FiniteElement2s13Disk::computeOrientation(const fmatvec::Vec& q, const MBSim::ContourPointData &data) { throw MBSim::MBSimError("ERROR(FiniteElement2s13Disk::computeOrientation): Not implemented!"); } 
00169   inline fmatvec::Vec FiniteElement2s13Disk::computeVelocity(const fmatvec::Vec& q, const fmatvec::Vec& u, const MBSim::ContourPointData &data) { throw MBSim::MBSimError("ERROR(FiniteElement2s13Disk::computeVelocity): Not implemented!"); } 
00170   inline fmatvec::Vec FiniteElement2s13Disk::computeAngularVelocity(const fmatvec::Vec& q, const fmatvec::Vec& u, const MBSim::ContourPointData &data) { throw MBSim::MBSimError("ERROR(FiniteElement2s13Disk::computeAngularVelocity): Not implemented!"); } 
00171   inline fmatvec::Mat FiniteElement2s13Disk::computeJacobianOfMotion(const fmatvec::Vec& qG,const MBSim::ContourPointData& data) { throw MBSim::MBSimError("ERROR(FiniteElement2s13Disk::computeJacobianOfMotion): Not implemented!"); } 
00172 
00173   inline const fmatvec::SymMat& FiniteElement2s13Disk::getK() const { return K; }
00174   inline void FiniteElement2s13Disk::setEModul(double E_) { E = E_; }
00175   inline void FiniteElement2s13Disk::setPoissonRatio(double nu_) { nu = nu_; }
00176   inline void FiniteElement2s13Disk::setDensity(double rho_) { rho = rho_; }
00177   inline void FiniteElement2s13Disk::setShearCorrectionFactor(double alphaS_) { alphaS = alphaS_; }
00178 }
00179 
00180 #endif /* _FINITE_ELEMENT_2S_13_RCM_H_ */
00181