mbsimflexiblebody  4.0.0
finite_element_1s_33_ancf.h
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_33_ANCF_H_
00021 #define _FINITE_ELEMENT_1S_33_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 
00042   class FiniteElement1s33ANCF : public MBSim::DiscretizationInterface
00043   {
00044     public:
00057       explicit FiniteElement1s33ANCF(double sl0, double srho, double sE, double sG, double sA, double sI0, double sI1, double sI2, fmatvec::Vec sg);
00058 
00062       virtual ~FiniteElement1s33ANCF();
00063 
00064       /* INHERITED INTERFACE */
00065       virtual const fmatvec::SymMat& getM() const { return M; }
00066       virtual const fmatvec::Vec& geth() const { return h; }
00067       virtual const fmatvec::SqrMat& getdhdq() const { return Dhq; }
00068       virtual const fmatvec::SqrMat& getdhdu() const { return Dhqp; }
00069       virtual int getqSize() const { return 12; }
00070       virtual int getuSize() const { return 12; }
00071       virtual void computeM(const fmatvec::Vec& qElement);
00072       virtual void computeh(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement);
00073       virtual void computedhdz(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement) { throw MBSim::MBSimError("(FiniteElement1s33ANCF::computedhdz): not implemented!"); }
00074       virtual double computeKineticEnergy(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement) { throw MBSim::MBSimError("(FiniteElement1s33ANCF::computeKineticEnergy): not implemented!"); }
00075       virtual double computeGravitationalEnergy(const fmatvec::Vec& qElement) { throw MBSim::MBSimError("(FiniteElement1s33ANCF::computeGravitationalEnergy): not implemented!"); }
00076       virtual double computeElasticEnergy(const fmatvec::Vec& qElement) { throw MBSim::MBSimError("(FiniteElement1s33ANCF::computeElasticEnergy): not implemented!"); }
00077       virtual fmatvec::Vec computePosition(const fmatvec::Vec& qElement, const MBSim::ContourPointData& cp);
00078       virtual fmatvec::SqrMat computeOrientation(const fmatvec::Vec& qElement, const MBSim::ContourPointData& cp);
00079       virtual fmatvec::Vec computeVelocity(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, const MBSim::ContourPointData& cp);
00080       virtual fmatvec::Vec computeAngularVelocity(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, const MBSim::ContourPointData& cp);
00081       virtual fmatvec::Mat computeJacobianOfMotion(const fmatvec::Vec& qElement, const MBSim::ContourPointData& cp) { return JGeneralized(qElement,cp.getLagrangeParameterPosition()(0)); }
00082       /***************************************************/
00083 
00084       /* GETTER / SETTER */
00085       void setCurlRadius(double R1, double R2);
00086       void setMaterialDamping(double depsilons);
00087       /***************************************************/
00088 
00092       void initM();
00093 
00100       fmatvec::Vec LocateBalken(const fmatvec::Vec& qElement, const double& s); 
00101 
00109       fmatvec::Vec StateBalken(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, const double&s); 
00110 
00117       fmatvec::Mat JGeneralized(const fmatvec::Vec& qElement, const double& s);
00118 
00124       fmatvec::Mat GlobalShapeFunctions(const double& s);
00125 
00132       fmatvec::Vec tangent(const fmatvec::Vec& qElement, const double& s);
00133 
00140       fmatvec::Vec normal(const fmatvec::Vec& qElement, const double& s);
00141 
00148       fmatvec::Vec binormal(const fmatvec::Vec& qElement, const double& s);
00149 
00150     private:
00154       double l0;
00155 
00159       double rho;
00160 
00164       double E;
00165 
00169       double G;
00170 
00174       double A;
00175 
00179       double I0;
00180 
00184       double I1;
00185 
00189       double I2;
00190 
00194       double wss01;
00195 
00199       double wss02;
00200 
00204       double depsilon;
00205 
00209       fmatvec::Vec g;
00210 
00214       fmatvec::SymMat M;
00215 
00219       fmatvec::Vec h;
00220 
00224       fmatvec::SqrMat Damp;
00225 
00229       fmatvec::SqrMat Dhq;
00230 
00234       fmatvec::SqrMat Dhqp;
00235 
00239       FiniteElement1s33ANCF(const FiniteElement1s33ANCF&);
00240 
00244       FiniteElement1s33ANCF& operator=(const FiniteElement1s33ANCF&);
00245   };
00246 
00247   inline void  FiniteElement1s33ANCF::computeM(const fmatvec::Vec& qG) { throw MBSim::MBSimError("(FiniteElement1s33ANCF::computeM): Not implemented"); }
00248 }
00249 
00250 #endif /* _FINITE_ELEMENT_1S_33_ANCF_H_ */