FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
CableElDynStiff.h
1
10
11#ifndef CCableElDynStiff_H
12#define CCableElDynStiff_H
13
14// Includes
15// #include <string>
16#include "cable/subroutines/CableElBasics.h"
17
18
19// #define USE_OLD_MEAN_TENSION_CALC
20#define CCableElDynStiff_USE_PID
21#ifdef CCableElDynStiff_USE_PID
22# include "sfh/filters/PID.h"
23#endif
24
25#ifdef FH_VISUALIZATION
26# include "Ogre.h"
27
28# include "sfh/ogre/CDynamicLines.h"
29
30#endif
31
32// Class definition
34{
35public:
38
41
43 virtual bool CheckAndInitialize();
44
46 virtual void UpdateLength(double newLength, double step, bool forceUpdate = false);
47
49 void UpdateMeanTension(double step);
50
52 double GetEFactor() const { return m_eFactor; }
53
54 double m_maxStep;
58 // protected: HACK kga
60 virtual void AddStructuralForces(double adForceA[3], double adForceB[3]);
61
62protected:
63 double ma_dEps;
64 double m_eFactor;
66 // double m_meanTensionProp; ///< The mean tension of the cable element.
67
68 double ma_adMeanTensionForceA[3];
69 double ma_dAdaptationDamping;
70
71#ifdef CCableElDynStiff_USE_PID
72 sfh::filters::PID m_MeanTensionController;
73#endif
74};
75
76
77#endif
Class containing a fundamental cable element object.
Definition CableElBasics.h:29
Definition CableElDynStiff.h:34
double m_meanTensionDamp
The damping of the development of the mean tension.
Definition CableElDynStiff.h:65
double m_eAdaptationPeriod
The time constant of the adaptation of the mean tension.
Definition CableElDynStiff.h:56
double m_stepSafetyFactor
The safety factor when calculating the Young modulus of the element.
Definition CableElDynStiff.h:57
double GetEFactor() const
Returns the current stiffness reduction factor (1 = full stiffness, <1 = reduced for numerical stabil...
Definition CableElDynStiff.h:52
double ma_dEps
The stretching of the cable.
Definition CableElDynStiff.h:63
~CableElDynStiff()
The destructor.
double m_maxStep
The maximum step of the integration routine.
Definition CableElDynStiff.h:54
virtual bool CheckAndInitialize()
Does the initialization and checking to make sure that the element is ready for simulation.
double m_eFactor
The factor multiplied by the Young modulus.
Definition CableElDynStiff.h:64
CableElDynStiff()
The constructor.
virtual void AddStructuralForces(double adForceA[3], double adForceB[3])
Adds the forces from tension and internal damping to the nodes. CalcFoundation must be run first.
virtual void UpdateLength(double newLength, double step, bool forceUpdate=false)
Updates the length of the cable element, and its dependant properties.
void UpdateMeanTension(double step)
Updates the mean tension of the cable element.
double m_meanTension
The mean tension of the cable element.
Definition CableElDynStiff.h:55