21 #ifndef FLEXIBLE_BODY_1S_REFERENCE_CURVE_H_
22 #define FLEXIBLE_BODY_1S_REFERENCE_CURVE_H_
24 #include <mbsimFlexibleBody/contours/neutral_contour/contour_1s_neutral_reference_curve.h>
26 #include <mbsimFlexibleBody/flexible_body.h>
28 #include <mbsim/functions/function.h>
30 namespace MBSimFlexibleBody {
48 virtual fmatvec::Vec3
computeVecAt(
double xi,
double Theta,
int derXi,
int derTheta) = 0;
77 virtual void init(MBSim::Element::InitStage stage);
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&);
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);
521 refBody->updateh(0, 0);
522 return refBody->geth(0);
fmatvec::Vec3 computeSqfElement(double xi, int derXi)
compute the deformation vector, i.e. S*qf, for the ring
Definition: flexible_body_1S_reference_curve.cc:878
std::vector< fmatvec::Vec > uElementAll
vector storing the values of the locked and not locked Dofs generelaized velocities ...
Definition: flexible_body_1S_reference_curve.h:373
std::vector< std::pair< int, int > > getElementAndLocalDoFNo(int globalColumn)
find the elemental DOF Number out of the global DOF Number
Definition: flexible_body_1S_reference_curve.cc:929
fmatvec::Mat3xV computeP(double xi, int derXi=0)
compute the P matrix
Definition: flexible_body_1S_reference_curve.cc:892
bool elongationActive
switch to enable / disable the elongation energy in the h-vector
Definition: flexible_body_1S_reference_curve.h:393
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 ...
bool useSpatialReferenceKinematics
switch to only use kinematical reference deformation
Definition: flexible_body_1S_reference_curve.h:260
std::vector< fmatvec::Vec > qElementAll
vector storing the values of the locked and not locked Dofs
Definition: flexible_body_1S_reference_curve.h:368
double rho
density of the body
Definition: flexible_body_1S_reference_curve.h:270
Contour1sNeutralFlexibleBody1SReferenceCurve * createNeutralPhase(const std::string &contourName)
create a neutral phase as a basis for overlaid contours
Definition: flexible_body_1S_reference_curve.cc:723
double tLastRefUpdate
marker since when the last update has been done on the reference
Definition: flexible_body_1S_reference_curve.h:388
int findElement(double &xi)
find the element number of the given global coordinate
Definition: flexible_body_1S_reference_curve.cc:914
fmatvec::Vec3 b
Binormal of the curve.
Definition: flexible_body_1S_reference_curve.h:310
this function returns basically three values. As these share some values it makes sense to not comput...
Definition: finite_element_1S_reference_curve_functions.h:157
fmatvec::VecV lambdaqF
lambda factors for qFs
Definition: flexible_body_1S_reference_curve.h:353
class that sets up the neutral contour for the body FlexibleBody1SReferenceCurve Not that as interfac...
Definition: contour_1s_neutral_reference_curve.h:37
bool usePT1
switch to use either the lambda PT1 version or not
Definition: flexible_body_1S_reference_curve.h:363
fmatvec::VecV qF
vector for PT1 in positions
Definition: flexible_body_1S_reference_curve.h:325
virtual void GlobalVectorContribution(int, const fmatvec::Vec &, fmatvec::Vec &)
insert 'local' information in global vectors
Definition: flexible_body_1S_reference_curve.cc:588
virtual void computeReference()=0
get the reference curve at a certain geometric ratio
fmatvec::VecV lambdaqFSwitches
these are the switches to the the lambdaqSwitches The first entrie is always the entro for "s" the ...
Definition: flexible_body_1S_reference_curve.h:342
fmatvec::VecV lambdauFSwitches
these are the switches to the the lambdauSwitches See the explanations for the qSwitches, however for the generalized velocities
Definition: flexible_body_1S_reference_curve.h:348
double E
Youngs modulus of the body.
Definition: flexible_body_1S_reference_curve.h:280
double length
length of belt
Definition: flexible_body_1S_reference_curve.h:59
fmatvec::Vec3 computedrdqk(double xi, int derXi, int qInd)
computes the derivative wrt the generalized positions
Definition: flexible_body_1S_reference_curve.cc:784
int referenceNotUpdated
counter of how many updates have been done since the last time
Definition: flexible_body_1S_reference_curve.h:383
flexible body entirely described within MBSim holding all informations about continuum approximations...
Definition: flexible_body.h:240
this is a interface definition for possible implementations of the reference curve used in the Flexib...
Definition: flexible_body_1S_reference_curve.h:35
Definition: flexible_body_1S_reference_curve.h:510
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: flexible_body_1S_reference_curve.cc:808
virtual void BuildElements()
references finite element coordinates to assembled coordinates
Definition: flexible_body_1S_reference_curve.cc:429
double Ib
area moment of inertia around binormal axis
Definition: flexible_body_1S_reference_curve.h:295
fmatvec::SymMatV integratePTP()
computes the integral needed for the mass matrix ( P^T P)
double dPulley
distance between pulleys
Definition: flexible_body_1S_reference_curve.h:305
double length
length of ring
Definition: flexible_body_1S_reference_curve.h:265
fmatvec::Vec3 integrateForWgammaWnWtau(int qInd)
computes the integral for the first part of the h vector coming from the potential energy (intForWgam...
double It
area moment of inertia around torsional axis
Definition: flexible_body_1S_reference_curve.h:300
int updateReferenceEvery
number of how often the reference movement should be updated compared to the local movements ...
Definition: flexible_body_1S_reference_curve.h:378
double In
area moment of inertia around normal axis
Definition: flexible_body_1S_reference_curve.h:290
class that implements an one dimensional nonlinear beam that uses a reference curve for the nonlinear...
Definition: flexible_body_1S_reference_curve.h:66
double dTheta
damping coefficient for theta
Definition: flexible_body_1S_reference_curve.h:315
virtual void GlobalMatrixContribution(int, const fmatvec::Mat &, fmatvec::Mat &)
insert 'local' information in global matrices
Definition: flexible_body_1S_reference_curve.h:95
Finite-Element class for the body FlexibleBody1SReferenceCurve.
Definition: finite_element_1S_reference_curve.h:37
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: flexible_body_1S_reference_curve.cc:778
fmatvec::VecV lambdauF
lambda factors for uFs
Definition: flexible_body_1S_reference_curve.h:358
virtual fmatvec::Vec3 computeVecAt(double xi, double Theta, int derXi, int derTheta)=0
computes the vector/point on the surface for specific derivatives
fmatvec::Vec computeNeutralState(const fmatvec::Vec &q0)
compute the neutral state, i.e. h = 0
Definition: flexible_body_1S_reference_curve.cc:757
double computePhysicalStrain(double xi)
compute the physical strain at the Eulerian coordinate xi
Definition: flexible_body_1S_reference_curve.cc:740
bool normalBendingActive
switch to enable / disable the normal bending energy in the h-vector
Definition: flexible_body_1S_reference_curve.h:398
fmatvec::Vec3 computenRef(double xi, int derXi=0, int derTheta=0)
compute the normal vector at the given position
Definition: flexible_body_1S_reference_curve.cc:851
ReferenceCurve * refCurve
the reference curve
Definition: flexible_body_1S_reference_curve.h:240
fmatvec::Vec3 computev(double xi)
compute the velocity and/or its derivative w.r.t. xi and/or theta
Definition: flexible_body_1S_reference_curve.cc:802
int nodeDoFs
DoFs per element.
Definition: flexible_body_1S_reference_curve.h:250
fmatvec::Vec3 computeSufElement(double xi, int derXi)
compute the deformation vector, i.e. S*uf, for the ring
Definition: flexible_body_1S_reference_curve.cc:885
double A
cross section Area of the body
Definition: flexible_body_1S_reference_curve.h:275
int elementOrder
DoFs per element.
Definition: flexible_body_1S_reference_curve.h:255
double nu
Poisson-ratio of the body.
Definition: flexible_body_1S_reference_curve.h:285
double integrateForWb(int qInd)
computes the integral for the second part of the h vector coming from the potential energy (intForWga...
fmatvec::SqrMatV integratePTdPdt()
computes the integral for the second part of the h vector coming from the kinetic energy ( P^T * dPdt...
int getEleDofs() const
get the number of DOFs for one element
Definition: flexible_body_1S_reference_curve.cc:945
fmatvec::SqrMatV integratePTdPdxi()
computes the integral for the first part of the h vector coming from the kinetic energy ( P^T * P') ...
fmatvec::SqrMatV integratePTdPdqk(int qInd)
computes the integral for the third part of the h vector coming from the kinetic energy ( P^T * dPdqk...
fmatvec::VecV uF
vector for PT1 in velocities
Definition: flexible_body_1S_reference_curve.h:330
double computeG() const
computes the shear modulus G
Definition: flexible_body_1S_reference_curve.h:403
fmatvec::Vec3 computeSElement(int globalDOF, double xi, int derXi)
compute the column of the elements S matrix
Definition: flexible_body_1S_reference_curve.cc:866
int elements
number of elements used
Definition: flexible_body_1S_reference_curve.h:245
fmatvec::Mat3xV computedPdqk(double xi, int qInd)
compute the P matrix derived wrt the generalized position
Definition: flexible_body_1S_reference_curve.cc:902
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: flexible_body_1S_reference_curve.cc:823
std::set< int > lockedDofsFull
this vector saves the locked DOFs of the system
Definition: flexible_body_1S_reference_curve.h:320