20#ifndef _FINITE_ELEMENT_1S_21_RCM_H_
21#define _FINITE_ELEMENT_1S_21_RCM_H_
23#include "mbsimFlexibleBody/discretization_interface.h"
24#include "fmatvec/fmatvec.h"
26namespace MBSimFlexibleBody {
61 const fmatvec::SymMat&
getM()
const override {
return M; }
62 const fmatvec::Vec&
geth()
const override {
return h; }
63 const fmatvec::SqrMat&
getdhdq()
const override {
return Dhq; }
64 const fmatvec::SqrMat&
getdhdu()
const override {
return Dhqp; }
67 void computeM(
const fmatvec::Vec& qElement)
override;
68 void computeh(
const fmatvec::Vec& qElement,
const fmatvec::Vec& qpElement)
override;
69 void computedhdz(
const fmatvec::Vec& qElement,
const fmatvec::Vec& qpElement)
override;
70 double computeKineticEnergy(
const fmatvec::Vec& qElement,
const fmatvec::Vec& qpElement)
override;
72 virtual double computePhysicalStrain(
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); }
86 void setCurlRadius(
double R);
87 void setMaterialDamping(
double depsilons);
88 void setLehrDamping(
double D);
91 fmatvec::Vec3 getPositions(
const fmatvec::Vec& qElement,
double s);
93 fmatvec::Vec3 getVelocities(
const fmatvec::Vec& qElement,
const fmatvec::Vec& qpElement,
double s);
109 fmatvec::Mat
JGeneralized (
const fmatvec::Vec& qElement,
double s);
119 fmatvec::Mat
JpGeneralized(
const fmatvec::Vec& qElement,
const fmatvec::Vec& qpElement,
double s,
double sp);
127 fmatvec::Vec
ElementData(fmatvec::Vec qElement, fmatvec::Vec qpElement);
133 double l0, Arho, EA, EI;
163 fmatvec::SqrMat
Dhq, Dhqp;
173 fmatvec::Vec
qLocal, qpLocal, hIntermediate;
183 fmatvec::SqrMat
Jeg, Jegp;
217 void BuildJacobi(
const fmatvec::Vec&
qLocal,
const fmatvec::Vec& qpIntern, fmatvec::SqrMat&
Jeg, fmatvec::SqrMat& Jegp);
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);
253 double l0h2, l0h3, l0h4, l0h5, l0h7, l0h8;
261 inline double Sec(
double alpha) {
return 1.0/cos(alpha); }
262 inline double Power(
double base,
int exponent) {
return pow(base,exponent); }
discretization interface for flexible systems
Definition: discretization_interface.h:36
finite element for planar beam using Redundant Coordinate Method (RCM)
Definition: 1s_21_rcm.h:43
int getuSize() const override
Definition: 1s_21_rcm.h:66
fmatvec::Vec computeAdditionalElementData(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement)
Definition: 1s_21_rcm.cc:443
void BuildJacobi(const fmatvec::Vec &qLocal, const fmatvec::Vec &qpIntern, fmatvec::SqrMat &Jeg, fmatvec::SqrMat &Jegp)
calculates the JACOBIAN of transformation and its time derivative
fmatvec::Vec qLocal
internal position and velocities as well as smooth right hand side
Definition: 1s_21_rcm.h:173
fmatvec::SqrMat Jeg
transformation global -> internal coordinates coordinates and its derivative
Definition: 1s_21_rcm.h:183
fmatvec::SqrMat Damp
damping matrix
Definition: 1s_21_rcm.h:168
fmatvec::Vec qElement_Old
global and local state of the last time step
Definition: 1s_21_rcm.h:188
FiniteElement1s21RCM(double l0_, double Arho_, double EA_, double EI_, const fmatvec::Vec &g_)
constructor
fmatvec::SqrMat Dhq
derivative of right hand side with respect to positions and velocities
Definition: 1s_21_rcm.h:163
double l0h2
powers of the beam length
Definition: 1s_21_rcm.h:253
void computedhdz(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement) override
compute Jacobian for implicit integration
Definition: 1s_21_rcm.cc:171
double computeGravitationalEnergy(const fmatvec::Vec &qElement) override
compute gravitational energy
Definition: 1s_21_rcm.cc:204
fmatvec::Vec h
right hand side
Definition: 1s_21_rcm.h:158
void computeM(const fmatvec::Vec &qElement) override
compute mass matrix
Definition: 1s_21_rcm.cc:40
void computeh(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement) override
compute smooth right hand side
Definition: 1s_21_rcm.cc:90
void BuildJacobi(const fmatvec::Vec &qLocal, fmatvec::SqrMat &Jeg)
calculates the JACOBIAN of transformation
fmatvec::SymMat M
mass matrix
Definition: 1s_21_rcm.h:153
fmatvec::Vec g
gravitation
Definition: 1s_21_rcm.h:148
fmatvec::Vec3 evalLocalVelocities(const fmatvec::Vec &qLocal, const fmatvec::Vec &qpLocal, double s)
calculates Cartesian velocity
Definition: 1s_21_rcm.cc:663
const fmatvec::SqrMat & getdhdq() const override
Definition: 1s_21_rcm.h:63
fmatvec::Mat JGeneralized(const fmatvec::Vec &qElement, double s)
return the JACOBIAN of translation and rotation with respect to generalised global coordinates
Definition: 1s_21_rcm.cc:356
double l0
length, line-density, longitudinal and bending stiffness
Definition: 1s_21_rcm.h:133
~FiniteElement1s21RCM() override=default
FiniteElement1s21RCM()=default
constructor is declared private
double tol_comp
tolerance for comparison of state with old state
Definition: 1s_21_rcm.h:193
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: 1s_21_rcm.cc:688
fmatvec::SymMat MLocal
local mass matrix
Definition: 1s_21_rcm.h:178
fmatvec::Vec ElementData(fmatvec::Vec qElement, fmatvec::Vec qpElement)
return some additional element data
double wss0
predefined bending curvature
Definition: 1s_21_rcm.h:138
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: 1s_21_rcm.cc:362
const fmatvec::SymMat & getM() const override
Definition: 1s_21_rcm.h:61
void BuildqLocal(const fmatvec::Vec &qGlobal, fmatvec::Vec &qLocal)
calculates the local beam coordinates
Definition: 1s_21_rcm.cc:475
double computeElasticEnergy(const fmatvec::Vec &qElement) override
compute elastic energy
Definition: 1s_21_rcm.cc:221
fmatvec::Vec3 evalLocalPositions(const fmatvec::Vec &qLocal, double s)
calculates Cartesian position
Definition: 1s_21_rcm.cc:642
double computeKineticEnergy(const fmatvec::Vec &qElement, const fmatvec::Vec &qpElement) override
compute kinetic energy
Definition: 1s_21_rcm.cc:179
fmatvec::Mat JGeneralizedInternal(const fmatvec::Vec &qElement, double s)
return the JACOBIAN of translation and rotation with respect to generalised internal coordinates
Definition: 1s_21_rcm.cc:284
const fmatvec::SqrMat & getdhdu() const override
Definition: 1s_21_rcm.h:64
const fmatvec::Vec & geth() const override
Definition: 1s_21_rcm.h:62
int getqSize() const override
Definition: 1s_21_rcm.h:65
double depsilon
longitudinal damping
Definition: 1s_21_rcm.h:143