21#ifndef FLEXIBLE_BODY_1S_REFERENCE_CURVE_H_
22#define FLEXIBLE_BODY_1S_REFERENCE_CURVE_H_
24#include <mbsimFlexibleBody/contours/nc/contour_1s_neutral_reference_curve.h>
26#include <mbsimFlexibleBody/flexible_body.h>
28#include <mbsim/functions/function.h>
30namespace MBSimFlexibleBody {
48 virtual fmatvec::Vec3
computeVecAt(
double xi,
double Theta,
int derXi,
int derTheta) = 0;
78 virtual void initInfo(fmatvec::Vec
q0 = fmatvec::Vec(0,fmatvec::NONINIT), fmatvec::Vec u0 = fmatvec::Vec(0,fmatvec::NONINIT));
82 virtual void updateh(
int k = 0);
83 virtual void updateM();
84 virtual void updatedq();
85 virtual void updatedu();
86 virtual void updateud();
87 virtual void updateqd();
89 virtual void plot(
double t,
double dt = 1.);
93 virtual void GlobalMatrixContribution(
int,
const fmatvec::Mat3xV&, fmatvec::Mat3xV&);
98 virtual void GlobalMatrixContribution(
int,
const fmatvec::SymMat&, fmatvec::SymMat&);
107 virtual void setq0(fmatvec::Vec q0_) {
111 virtual void setu0(fmatvec::Vec u0_) {
112 FlexibleBodyContinuum<double>::setu0(u0_);
117 void setLength(
double length_) {
120 double getlength()
const {
123 void setDensity(
double rho_) {
126 double getrho()
const {
129 void setCrossSectionalArea(
double A_) {
132 double getA()
const {
135 void setEModul(
double E_) {
138 double getE()
const {
141 void setNu(
double nu_) {
144 double getNu()
const {
147 void setIn(
double In_) {
150 double getIn()
const {
153 void setIb(
double Ib_) {
156 double getIb()
const {
159 void setIt(
double It_) {
162 double getIt()
const {
165 void setdPulley(
double dPulley_) {
168 double getdPulley()
const {
172 void setNumberElements(
int elements_) {
176 void setElementOrder(
int elementOrder_) {
180 void setNodeDofs(
int nodeDofs_) {
184 void setUseSpatialReferenceKinematics(
bool switch_) {
188 void setThetaDamping(
double dTheta_) {
192 void setLockedDofs(std::set<int> lockedDofs_) {
196 void setLambdaqSwitches(
const fmatvec::VecV & lambdaqSwitches_) {
200 void setLambdauSwitches(
const fmatvec::VecV & lambdauSwitches_) {
204 virtual void setelongationActive(
bool val) {
208 virtual void setnormalBendingActive(
bool val) {
212 virtual double gets() {
224 Contour1sNeutralFlexibleBody1SReferenceCurve*
createNeutralPhase(
const std::string & contourName);
404 return E / (2 * (1 +
nu));
410 fmatvec::Vec3
computer(
double xi,
int derXi = 0,
int derTheta = 0);
425 fmatvec::Vec3
computerRef(
double xi,
int derXi = 0,
int derTheta = 0);
430 fmatvec::SqrMat3
computeARef(
double xi,
int derXi = 0,
int derTheta = 0);
435 fmatvec::Vec3
computenRef(
double xi,
int derXi = 0,
int derTheta = 0);
455 fmatvec::Mat3xV
computeP(
double xi,
int derXi = 0);
519 fmatvec::Vec operator()(
const fmatvec::Vec & q) {
521 refBody->updateh(0, 0);
522 return refBody->geth(0);
class that sets up the neutral contour for the body FlexibleBody1SReferenceCurve Not that as interfac...
Definition: 1s_neutral_reference_curve.h:37
Finite-Element class for the body FlexibleBody1SReferenceCurve.
Definition: 1S_reference_curve.h:37
class that implements an one dimensional nonlinear beam that uses a reference curve for the nonlinear...
Definition: 1S_reference_curve.h:66
fmatvec::Vec3 b
Binormal of the curve.
Definition: 1S_reference_curve.h:310
fmatvec::Vec computeNeutralState(const fmatvec::Vec &q0)
compute the neutral state, i.e. h = 0
Definition: 1S_reference_curve.cc:752
int referenceNotUpdated
counter of how many updates have been done since the last time
Definition: 1S_reference_curve.h:383
double A
cross section Area of the body
Definition: 1S_reference_curve.h:275
int updateReferenceEvery
number of how often the reference movement should be updated compared to the local movements
Definition: 1S_reference_curve.h:378
std::vector< std::pair< int, int > > getElementAndLocalDoFNo(int globalColumn)
find the elemental DOF Number out of the global DOF Number
Definition: 1S_reference_curve.cc:924
double It
area moment of inertia around torsional axis
Definition: 1S_reference_curve.h:300
ReferenceCurve * refCurve
the reference curve
Definition: 1S_reference_curve.h:240
int elements
number of elements used
Definition: 1S_reference_curve.h:245
fmatvec::VecV lambdaqFSwitches
these are the switches to the the lambdaqSwitches The first entrie is always the entro for "s" the se...
Definition: 1S_reference_curve.h:342
double E
Youngs modulus of the body.
Definition: 1S_reference_curve.h:280
double nu
Poisson-ratio of the body.
Definition: 1S_reference_curve.h:285
fmatvec::Vec3 computerRef(double xi, int derXi=0, int derTheta=0)
compute the position and its derivatives w.r.t. xi or theta at position xi and ratio Theta
Definition: 1S_reference_curve.cc:803
double dPulley
distance between pulleys
Definition: 1S_reference_curve.h:305
fmatvec::Vec3 computedrdqk(double xi, int derXi, int qInd)
computes the derivative wrt the generalized positions
Definition: 1S_reference_curve.cc:779
double integrateForWb(int qInd)
computes the integral for the second part of the h vector coming from the potential energy (intForWga...
double Ib
area moment of inertia around binormal axis
Definition: 1S_reference_curve.h:295
int findElement(double &xi)
find the element number of the given global coordinate
Definition: 1S_reference_curve.cc:909
double tLastRefUpdate
marker since when the last update has been done on the reference
Definition: 1S_reference_curve.h:388
std::vector< fmatvec::Vec > uElementAll
vector storing the values of the locked and not locked Dofs generelaized velocities
Definition: 1S_reference_curve.h:373
int nodeDoFs
DoFs per element.
Definition: 1S_reference_curve.h:250
bool elongationActive
switch to enable / disable the elongation energy in the h-vector
Definition: 1S_reference_curve.h:393
fmatvec::SqrMatV integratePTdPdqk(int qInd)
computes the integral for the third part of the h vector coming from the kinetic energy (\int P^T * d...
std::set< int > lockedDofsFull
this vector saves the locked DOFs of the system
Definition: 1S_reference_curve.h:320
virtual void GlobalMatrixContribution(int, const fmatvec::Mat &, fmatvec::Mat &)
insert 'local' information in global matrices
Definition: 1S_reference_curve.h:95
fmatvec::VecV uF
vector for PT1 in velocities
Definition: 1S_reference_curve.h:330
double length
length of ring
Definition: 1S_reference_curve.h:265
fmatvec::Vec3 computeSqfElement(double xi, int derXi)
compute the deformation vector, i.e. S*qf, for the ring
Definition: 1S_reference_curve.cc:873
Contour1sNeutralFlexibleBody1SReferenceCurve * createNeutralPhase(const std::string &contourName)
create a neutral phase as a basis for overlaid contours
Definition: 1S_reference_curve.cc:718
fmatvec::SqrMatV integratePTdPdt()
computes the integral for the second part of the h vector coming from the kinetic energy (\int P^T * ...
fmatvec::Vec3 computer(double xi, int derXi=0, int derTheta=0)
compute the position and/or its derivative w.r.t. xi and/or theta
Definition: 1S_reference_curve.cc:773
bool normalBendingActive
switch to enable / disable the normal bending energy in the h-vector
Definition: 1S_reference_curve.h:398
double dTheta
damping coefficient for theta
Definition: 1S_reference_curve.h:315
fmatvec::Vec3 computev(double xi)
compute the velocity and/or its derivative w.r.t. xi and/or theta
Definition: 1S_reference_curve.cc:797
fmatvec::Vec3 computenRef(double xi, int derXi=0, int derTheta=0)
compute the normal vector at the given position
Definition: 1S_reference_curve.cc:846
fmatvec::Vec3 computeSufElement(double xi, int derXi)
compute the deformation vector, i.e. S*uf, for the ring
Definition: 1S_reference_curve.cc:880
virtual void GlobalVectorContribution(int, const fmatvec::Vec &, fmatvec::Vec &)
insert 'local' information in global vectors
Definition: 1S_reference_curve.cc:583
fmatvec::Vec3 integrateForWgammaWnWtau(int qInd)
computes the integral for the first part of the h vector coming from the potential energy (intForWgam...
double rho
density of the body
Definition: 1S_reference_curve.h:270
int getEleDofs() const
get the number of DOFs for one element
Definition: 1S_reference_curve.cc:940
int elementOrder
DoFs per element.
Definition: 1S_reference_curve.h:255
bool useSpatialReferenceKinematics
switch to only use kinematical reference deformation
Definition: 1S_reference_curve.h:260
fmatvec::Mat3xV computeP(double xi, int derXi=0)
compute the P matrix
Definition: 1S_reference_curve.cc:887
fmatvec::VecV lambdauF
lambda factors for uFs
Definition: 1S_reference_curve.h:358
fmatvec::Vec3 computeSElement(int globalDOF, double xi, int derXi)
compute the column of the elements S matrix
Definition: 1S_reference_curve.cc:861
fmatvec::SqrMatV integratePTdPdxi()
computes the integral for the first part of the h vector coming from the kinetic energy (\int P^T * P...
std::vector< fmatvec::Vec > qElementAll
vector storing the values of the locked and not locked Dofs
Definition: 1S_reference_curve.h:368
bool usePT1
switch to use either the lambda PT1 version or not
Definition: 1S_reference_curve.h:363
fmatvec::SymMatV integratePTP()
computes the integral needed for the mass matrix (\int P^T P)
fmatvec::VecV qF
vector for PT1 in positions
Definition: 1S_reference_curve.h:325
double computePhysicalStrain(double xi)
compute the physical strain at the Eulerian coordinate xi
Definition: 1S_reference_curve.cc:735
fmatvec::VecV lambdaqF
lambda factors for qFs
Definition: 1S_reference_curve.h:353
fmatvec::VecV lambdauFSwitches
these are the switches to the the lambdauSwitches See the explanations for the qSwitches,...
Definition: 1S_reference_curve.h:348
fmatvec::Mat3xV computedPdqk(double xi, int qInd)
compute the P matrix derived wrt the generalized position
Definition: 1S_reference_curve.cc:897
double In
area moment of inertia around normal axis
Definition: 1S_reference_curve.h:290
fmatvec::SqrMat3 computeARef(double xi, int derXi=0, int derTheta=0)
compute the local transformation Matrix A and its derivatives w.r.t. xi or theta at position xi and r...
Definition: 1S_reference_curve.cc:818
double computeG() const
computes the shear modulus G
Definition: 1S_reference_curve.h:403
virtual void BuildElements()
references finite element coordinates to assembled coordinates
Definition: 1S_reference_curve.cc:424
flexible body entirely described within MBSim holding all informations about continuum approximations
Definition: flexible_body.h:227
this is a interface definition for possible implementations of the reference curve used in the Flexib...
Definition: 1S_reference_curve.h:35
double length
length of belt
Definition: 1S_reference_curve.h:59
virtual void computeReference()=0
get the reference curve at a certain geometric ratio
virtual fmatvec::VecV computeC1Positions(const fmatvec::Vec &qRef)=0
compute the only C1-continuous position in case the integral over the FE has to be split
virtual fmatvec::Vec3 computeVecAt(double xi, double Theta, int derXi, int derTheta)=0
computes the vector/point on the surface for specific derivatives
this function returns basically three values. As these share some values it makes sense to not comput...
Definition: 1S_reference_curve_functions.h:157
Definition: 1S_reference_curve.h:510