All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
finite_element_1s_21_rcm.h
1 /* Copyright (C) 2004-2014 MBSim Development Team
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  *
17  * Contact: thorsten.schindler@mytum.de
18  */
19 
20 #ifndef _FINITE_ELEMENT_1S_21_RCM_H_
21 #define _FINITE_ELEMENT_1S_21_RCM_H_
22 
23 #include "mbsimFlexibleBody/discretization_interface.h"
24 #include "fmatvec/fmatvec.h"
25 
26 namespace MBSimFlexibleBody {
27 
44  public:
53  FiniteElement1s21RCM(double l0_, double Arho_, double EA_, double EI_, fmatvec::Vec g_);
54 
58  virtual ~FiniteElement1s21RCM() { }
59 
60  /* INHERITED INTERFACE */
61  virtual const fmatvec::SymMat& getM() const { return M; }
62  virtual const fmatvec::Vec& geth() const { return h; }
63  virtual const fmatvec::SqrMat& getdhdq() const { return Dhq; }
64  virtual const fmatvec::SqrMat& getdhdu() const { return Dhqp; }
65  virtual int getqSize() const { return 8; }
66  virtual int getuSize() const { return 8; }
67  virtual void computeM(const fmatvec::Vec& qElement);
68  virtual void computeh(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement);
69  virtual void computedhdz(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement);
70  virtual double computeKineticEnergy(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement);
71  virtual double computeGravitationalEnergy(const fmatvec::Vec& qElement);
72  virtual double computePhysicalStrain(const fmatvec::Vec& qElement);
73  virtual double computeElasticEnergy(const fmatvec::Vec& qElement);
74  virtual fmatvec::Vec3 getPosition(const fmatvec::Vec& qElement, double s);
75  virtual fmatvec::SqrMat3 getOrientation(const fmatvec::Vec& qElement, double s);
76  virtual fmatvec::Vec3 getVelocity (const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
77  virtual fmatvec::Vec3 getAngularVelocity(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
78  virtual fmatvec::Mat getJacobianOfMotion(const fmatvec::Vec& qElement, double s) { return JGeneralized(qElement,s); }
79  /***************************************************/
83  fmatvec::Vec computeAdditionalElementData(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement);
84 
85  /* GETTER / SETTER */
86  void setCurlRadius(double R);
87  void setMaterialDamping(double depsilons);
88  void setLehrDamping(double D);
89  /***************************************************/
90 
91  fmatvec::Vec3 getPositions(const fmatvec::Vec& qElement, double s);
92 
93  fmatvec::Vec3 getVelocities(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s);
94 
101  fmatvec::Mat JGeneralizedInternal(const fmatvec::Vec& qElement, double s);
102 
109  fmatvec::Mat JGeneralized (const fmatvec::Vec& qElement, double s);
110 
119  fmatvec::Mat JpGeneralized(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, double s, double sp);
120 
127  fmatvec::Vec ElementData(fmatvec::Vec qElement, fmatvec::Vec qpElement);
128 
129  protected:
133  double l0, Arho, EA, EI;
134 
138  double wss0;
139 
143  double depsilon;
144 
149 
154 
159 
164 
169 
173  fmatvec::Vec qLocal, qpLocal, hIntermediate;
174 
179 
184 
188  fmatvec::Vec qElement_Old, qpElement_Old;
189 
193  double tol_comp;
194 
195  private:
201  void BuildqLocal(const fmatvec::Vec& qGlobal, fmatvec::Vec& qLocal);
202 
209 
217  void BuildJacobi(const fmatvec::Vec& qLocal, const fmatvec::Vec& qpIntern, fmatvec::SqrMat& Jeg, fmatvec::SqrMat& Jegp);
218 
225  fmatvec::Vec3 evalLocalPositions(const fmatvec::Vec& qLocal, double s);
226 
234  fmatvec::Vec3 evalLocalVelocities(const fmatvec::Vec& qLocal, const fmatvec::Vec& qpLocal, double s);
235 
248  fmatvec::Mat hFullJacobi(const fmatvec::Vec& qElement, const fmatvec::Vec& qpElement, const fmatvec::Vec& qLocal, const fmatvec::Vec& qpLocal, const fmatvec::SqrMat& Jeg, const fmatvec::SqrMat& Jegp, const fmatvec::SymMat& MLocal, const fmatvec::Vec& hIntermediate);
249 
253  double l0h2, l0h3, l0h4, l0h5, l0h7, l0h8;
254 
259  };
260 
261  inline double Sec(double alpha) { return 1.0/cos(alpha); }
262  inline double Power(double base, int exponent) { return pow(base,exponent); }
263 }
264 
265 #endif /* _FINITE_ELEMENT_1S_21_RCM_H_ */
266 
fmatvec::SymMat MLocal
local mass matrix
Definition: finite_element_1s_21_rcm.h:178
virtual const fmatvec::Vec & geth() const
Definition: finite_element_1s_21_rcm.h:62
fmatvec::Mat JpGeneralized(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement, double s, double sp)
return the derivative of the JACOBIAN of translation and rotation with respect to generalised global ...
Definition: finite_element_1s_21_rcm.cc:362
fmatvec::SqrMat Damp
damping matrix
Definition: finite_element_1s_21_rcm.h:168
fmatvec::Mat hFullJacobi(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement, const fmatvec::Vec &qLocal, const fmatvec::Vec &qpLocal, const fmatvec::SqrMat &Jeg, const fmatvec::SqrMat &Jegp, const fmatvec::SymMat &MLocal, const fmatvec::Vec &hIntermediate)
calculates JACOBIAN of implicit integration
Definition: finite_element_1s_21_rcm.cc:688
finite element for planar beam using Redundant Coordinate Method (RCM)
Definition: finite_element_1s_21_rcm.h:43
virtual double computeGravitationalEnergy(const fmatvec::Vec &qElement)
compute gravitational energy
Definition: finite_element_1s_21_rcm.cc:204
virtual void computeM(const fmatvec::Vec &qElement)
compute mass matrix
Definition: finite_element_1s_21_rcm.cc:40
fmatvec::SqrMat Dhq
derivative of right hand side with respect to positions and velocities
Definition: finite_element_1s_21_rcm.h:163
fmatvec::Vec3 evalLocalVelocities(const fmatvec::Vec &qLocal, const fmatvec::Vec &qpLocal, double s)
calculates Cartesian velocity
Definition: finite_element_1s_21_rcm.cc:663
fmatvec::Vec g
gravitation
Definition: finite_element_1s_21_rcm.h:148
fmatvec::Vec qLocal
internal position and velocities as well as smooth right hand side
Definition: finite_element_1s_21_rcm.h:173
fmatvec::Vec h
right hand side
Definition: finite_element_1s_21_rcm.h:158
virtual ~FiniteElement1s21RCM()
Definition: finite_element_1s_21_rcm.h:58
fmatvec::Mat JGeneralizedInternal(const fmatvec::Vec &qElement, double s)
return the JACOBIAN of translation and rotation with respect to generalised internal coordinates ...
Definition: finite_element_1s_21_rcm.cc:284
fmatvec::Mat JGeneralized(const fmatvec::Vec &qElement, double s)
return the JACOBIAN of translation and rotation with respect to generalised global coordinates ...
Definition: finite_element_1s_21_rcm.cc:356
fmatvec::SymMat M
mass matrix
Definition: finite_element_1s_21_rcm.h:153
virtual const fmatvec::SqrMat & getdhdq() const
Definition: finite_element_1s_21_rcm.h:63
fmatvec::Vec3 evalLocalPositions(const fmatvec::Vec &qLocal, double s)
calculates Cartesian position
Definition: finite_element_1s_21_rcm.cc:642
fmatvec::Vec qElement_Old
global and local state of the last time step
Definition: finite_element_1s_21_rcm.h:188
fmatvec::Vec computeAdditionalElementData(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement)
Definition: finite_element_1s_21_rcm.cc:443
double l0h2
powers of the beam length
Definition: finite_element_1s_21_rcm.h:253
virtual const fmatvec::SymMat & getM() const
Definition: finite_element_1s_21_rcm.h:61
virtual int getqSize() const
Definition: finite_element_1s_21_rcm.h:65
FiniteElement1s21RCM()
constructor is declared private
Definition: finite_element_1s_21_rcm.h:258
virtual const fmatvec::SqrMat & getdhdu() const
Definition: finite_element_1s_21_rcm.h:64
discretization interface for flexible systems
Definition: discretization_interface.h:36
double wss0
predefined bending curvature
Definition: finite_element_1s_21_rcm.h:138
virtual void computeh(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement)
compute smooth right hand side
Definition: finite_element_1s_21_rcm.cc:90
void BuildJacobi(const fmatvec::Vec &qLocal, fmatvec::SqrMat &Jeg)
calculates the JACOBIAN of transformation
Definition: finite_element_1s_21_rcm.cc:496
double depsilon
longitudinal damping
Definition: finite_element_1s_21_rcm.h:143
double tol_comp
tolerance for comparison of state with old state
Definition: finite_element_1s_21_rcm.h:193
virtual double computeElasticEnergy(const fmatvec::Vec &qElement)
compute elastic energy
Definition: finite_element_1s_21_rcm.cc:221
virtual double computeKineticEnergy(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement)
compute kinetic energy
Definition: finite_element_1s_21_rcm.cc:179
fmatvec::SqrMat Jeg
transformation global -> internal coordinates coordinates and its derivative
Definition: finite_element_1s_21_rcm.h:183
void BuildqLocal(const fmatvec::Vec &qGlobal, fmatvec::Vec &qLocal)
calculates the local beam coordinates
Definition: finite_element_1s_21_rcm.cc:475
virtual void computedhdz(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement)
compute Jacobian for implicit integration
Definition: finite_element_1s_21_rcm.cc:171
fmatvec::Vec ElementData(fmatvec::Vec qElement, fmatvec::Vec qpElement)
return some additional element data
double l0
length, line-density, longitudinal and bending stiffness
Definition: finite_element_1s_21_rcm.h:133
virtual int getuSize() const
Definition: finite_element_1s_21_rcm.h:66

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML