Marine systems simulation
CCableElDynStiff.h
1
10
11#ifndef CCableElDynStiff_H
12#define CCableElDynStiff_H
13
14// Includes
15//#include <string>
16#include "cable/subroutines/CCableElBasics.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#include "sfh/ogre/CDynamicLines.h"
28
29#endif
30
31//Class definition
33{
34public:
37
40
42 virtual bool CheckAndInitialize();
43
45 virtual void UpdateLength(double dNewLength, double dStep, bool bForceUpdate = false);
46
48 void UpdateMeanTension(double dStep);
49
50 double m_dMaxStep;
54//protected: HACK kga
56 virtual void AddStructuralForces( double adForceA[3], double adForceB[3]);
57protected:
58 double ma_dEps;
59 double m_dEFactor;
61 //double m_dMeanTensionProp; ///< The mean tension of the cable element.
62
63 double ma_adMeanTensionForceA[3];
64 double ma_dAdaptationDamping;
65
66#ifdef CCableElDynStiff_USE_PID
67 sfh::filters::PID m_MeanTensionController;
68#endif
69};
70
71
72#endif
Class containing a fundamental cable element object.
Definition: CCableElBasics.h:29
Definition: CCableElDynStiff.h:33
virtual bool CheckAndInitialize()
Does the initialization and checking to make sure that the element is ready for simulation.
CCableElDynStiff()
The constructor.
double m_dStepSafetyFactor
The safety factor when calculating the Young modulus of the element.
Definition: CCableElDynStiff.h:53
double ma_dEps
The stretching of the cable.
Definition: CCableElDynStiff.h:58
void UpdateMeanTension(double dStep)
Updates the mean tension of the cable element.
double m_dEFactor
The factor multiplied by the Young modulus.
Definition: CCableElDynStiff.h:59
double m_dEAdaptationPeriod
The time constant of the adaptation of the mean tension.
Definition: CCableElDynStiff.h:52
~CCableElDynStiff()
The destructor.
double m_dMaxStep
The maximum step of the integration routine.
Definition: CCableElDynStiff.h:50
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.
double m_dMeanTensionDamp
The damping of the development of the mean tension.
Definition: CCableElDynStiff.h:60
double m_dMeanTension
The mean tension of the cable element.
Definition: CCableElDynStiff.h:51
virtual void UpdateLength(double dNewLength, double dStep, bool bForceUpdate=false)
Updates the length of the cable element, and its dependant properties.