|
mbsimflexiblebody
4.0.0
|
00001 /* Copyright (C) 2004-2012 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_COSSERAT_ROTATION_H_ 00021 #define _FINITE_ELEMENT_1S_33_COSSERAT_ROTATION_H_ 00022 00023 #include "mbsim/discretization_interface.h" 00024 #include "mbsim/mbsim_event.h" 00025 #include "mbsim/contour_pdata.h" 00026 #include "mbsimFlexibleBody/pointer.h" 00027 #include "fmatvec/fmatvec.h" 00028 00029 namespace MBSimFlexibleBody { 00030 00048 class FiniteElement1s33CosseratRotation : public MBSim::DiscretizationInterface { 00049 public: 00050 00061 FiniteElement1s33CosseratRotation(double l0_,double E_,double G_,double I1_,double I2_,double I0_,CardanPtr ag_); 00062 00066 virtual ~FiniteElement1s33CosseratRotation(); 00067 00068 /* INHERITED INTERFACE OF DISCRETIZATIONINTERFACE */ 00069 virtual const fmatvec::SymMat& getM() const; 00070 virtual const fmatvec::Vec& geth() const; 00071 virtual const fmatvec::SqrMat& getdhdq() const; 00072 virtual const fmatvec::SqrMat& getdhdu() const; 00073 virtual int getqSize() const; 00074 virtual int getuSize() const; 00075 00076 virtual void computeM(const fmatvec::Vec& qG); 00077 virtual void computeh(const fmatvec::Vec& qG, const fmatvec::Vec& qGt); 00078 virtual void computedhdz(const fmatvec::Vec& qG, const fmatvec::Vec& qGt); 00079 virtual double computeKineticEnergy(const fmatvec::Vec& qG, const fmatvec::Vec& qGt); 00080 virtual double computeGravitationalEnergy(const fmatvec::Vec& qG); 00081 virtual double computeElasticEnergy(const fmatvec::Vec& qG); 00082 00083 virtual fmatvec::Vec computePosition(const fmatvec::Vec& q, const MBSim::ContourPointData &data); 00084 virtual fmatvec::SqrMat computeOrientation(const fmatvec::Vec& q, const MBSim::ContourPointData &data); 00085 virtual fmatvec::Vec computeVelocity(const fmatvec::Vec& q, const fmatvec::Vec& u, const MBSim::ContourPointData &data); 00086 virtual fmatvec::Vec computeAngularVelocity(const fmatvec::Vec& q, const fmatvec::Vec& u, const MBSim::ContourPointData &data); 00087 virtual fmatvec::Mat computeJacobianOfMotion(const fmatvec::Vec& qG, const MBSim::ContourPointData& data); 00088 00089 /* GETTER / SETTER */ 00090 void setCurlRadius(double R1,double R2); 00091 double getl0() const; 00092 00098 fmatvec::Mat computeJXqG(const fmatvec::Vec& qG,double x); 00099 00100 private: 00104 double l0; 00105 00109 double E; 00110 00114 double G; 00115 00119 double I1, I2, I0; 00120 00126 double k10, k20; 00127 00131 fmatvec::Vec h; 00132 00136 fmatvec::Vec X; 00137 00141 fmatvec::SqrMat dhdq, dhdu; 00142 00146 CardanPtr ag; 00147 00148 FiniteElement1s33CosseratRotation(); // standard constructor 00149 FiniteElement1s33CosseratRotation(const FiniteElement1s33CosseratRotation&); // copy constructor 00150 FiniteElement1s33CosseratRotation& operator=(const FiniteElement1s33CosseratRotation&); // assignment operator 00151 }; 00152 00153 inline const fmatvec::SymMat& FiniteElement1s33CosseratRotation::getM() const { throw MBSim::MBSimError("(FiniteElement1s33CosseratRotation::getM): Not implemented"); } 00154 inline const fmatvec::Vec& FiniteElement1s33CosseratRotation::geth() const { return h; } 00155 inline const fmatvec::SqrMat& FiniteElement1s33CosseratRotation::getdhdq() const { return dhdq; } 00156 inline const fmatvec::SqrMat& FiniteElement1s33CosseratRotation::getdhdu() const { return dhdu; } 00157 inline int FiniteElement1s33CosseratRotation::getqSize() const { return 9; } 00158 inline int FiniteElement1s33CosseratRotation::getuSize() const { return 9; } 00159 inline void FiniteElement1s33CosseratRotation::computeM(const fmatvec::Vec& qG) { throw MBSim::MBSimError("(FiniteElement1s33CosseratRotation::computeM): Not implemented"); } 00160 inline void FiniteElement1s33CosseratRotation::computedhdz(const fmatvec::Vec& qG, const fmatvec::Vec& qGt) { throw MBSim::MBSimError("(FiniteElement1s33CosseratRotation::computedhdz): Not implemented"); } 00161 inline double FiniteElement1s33CosseratRotation::computeKineticEnergy(const fmatvec::Vec& qG, const fmatvec::Vec& qGt) { throw MBSim::MBSimError("(FiniteElement1s33CosseratRotation::computeKineticEnergy): Not implemented"); } 00162 inline double FiniteElement1s33CosseratRotation::computeGravitationalEnergy(const fmatvec::Vec& qG) { throw MBSim::MBSimError("(FiniteElement1s33CosseratRotation::computeGravitationalEnergy): Not implemented"); } 00163 inline fmatvec::Vec FiniteElement1s33CosseratRotation::computePosition(const fmatvec::Vec& q, const MBSim::ContourPointData &data) { throw MBSim::MBSimError("(FiniteElement1s33CosseratRotation::computePosition): Not implemented!"); } 00164 inline fmatvec::SqrMat FiniteElement1s33CosseratRotation::computeOrientation(const fmatvec::Vec& q, const MBSim::ContourPointData &data) { throw MBSim::MBSimError("(FiniteElement1s33CosseratRotation::computeOrientation): Not implemented!"); } 00165 inline fmatvec::Vec FiniteElement1s33CosseratRotation::computeVelocity(const fmatvec::Vec& q, const fmatvec::Vec& u, const MBSim::ContourPointData &data) { throw MBSim::MBSimError("(FiniteElement1s33CosseratRotation::computeVelocity): Not implemented!"); } 00166 inline fmatvec::Vec FiniteElement1s33CosseratRotation::computeAngularVelocity(const fmatvec::Vec& q, const fmatvec::Vec& u, const MBSim::ContourPointData &data) { throw MBSim::MBSimError("(FiniteElement1s33CosseratRotation::computeAngularVelocity): Not implemented!"); } 00167 inline fmatvec::Mat FiniteElement1s33CosseratRotation::computeJacobianOfMotion(const fmatvec::Vec& qG,const MBSim::ContourPointData& data) { return computeJXqG(qG,data.getLagrangeParameterPosition()(0)); } 00168 inline double FiniteElement1s33CosseratRotation::getl0() const { return l0; } 00169 inline fmatvec::Mat FiniteElement1s33CosseratRotation::computeJXqG(const fmatvec::Vec& qG,double x) { throw MBSim::MBSimError("(FiniteElement1s33CosseratRotation::computeJXqG): Not implemented!"); } 00170 00171 } 00172 00173 #endif /* _FINITE_ELEMENT_1S_33_COSSERAT_ROTATION_H_ */
1.8.0