10#ifndef CCableElBasics_H
11#define CCableElBasics_H
15#include "CExceptions.h"
17#ifdef FH_VISUALIZATION
21#pragma warning( disable : 4251 )
24#include "sfh/ogre/CDynamicLines.h"
39 const double adPosA[3],
40 const double adVelA[3],
41 const double adPosB[3],
42 const double adVelB[3],
43 const double adFluidVel[3],
44 const double dRhoWater,
61#ifdef FH_VISUALIZATION
63 virtual void RenderInit(Ogre::Root* pOgreRoot);
66 virtual void RenderUpdate(
const double adPosA[3],
const double adPosB[3]);
91#ifdef FH_VISUALIZATION
92 std::string m_sMaterialName;
93 unsigned short m_iCableFaces;
100 const double adVelA[3],
101 const double adPosB[3],
102 const double adVelB[3],
103 const double adFluidVel[3],
104 const double dRhoWater);
110 void AddGravityBuoyancy(
double adForceA[3],
double adForceB[3],
const double adPosA[3],
const double adPosB[3]);
134#ifdef FH_VISUALIZATION
135 Ogre::Root* m_pOgreRoot;
136 Ogre::SceneManager* m_pSceneMgr;
137 Ogre::Entity* m_pRenderElement;
138 Ogre::SceneNode* m_pRenderNode;
139 CDynamicLines* m_pLines;
140 Ogre::ManualObject* m_pCableRenderObj;
143 Ogre::Entity* m_pRenderSphere;
144 Ogre::SceneNode* m_pRenderNodeSphere;
Class containing a fundamental cable element object.
Definition: CCableElBasics.h:29
double ma_dTangentialDragFactor
A factor used when calculating the tangential drag force.
Definition: CCableElBasics.h:131
double m_dE
The Young modulus of the element.
Definition: CCableElBasics.h:74
double ma_adDirection[3]
Memory allocation to increase the computational efficiency.
Definition: CCableElBasics.h:117
double ma_dVnAmp
The scalar average normal hydrodynamic velocity of the element.
Definition: CCableElBasics.h:124
unsigned long m_iID
The ID of the element.
Definition: CCableElBasics.h:70
double ma_adVt[3]
The average tangential hydrodynamic velocity of the element.
Definition: CCableElBasics.h:121
virtual void CalcMassAndWeight()
Calculates the mass and weight of the element in water.
double m_dD
The diameter of the element.
Definition: CCableElBasics.h:73
double ma_dVnAmp_B
The scalar hydrodynamic normal velocity of the end B.
Definition: CCableElBasics.h:128
double ma_adVn[3]
The average normal hydrodynamic velocity of the element.
Definition: CCableElBasics.h:123
double ma_dNormalDragFactor
A factor used when calculating the normal drag force.
Definition: CCableElBasics.h:132
double ma_adVn_A[3]
The hydrodynamic normal velocity of the end A.
Definition: CCableElBasics.h:125
double ma_adVn_B[3]
The hydrodynamic normal velocity of the end B.
Definition: CCableElBasics.h:126
double m_dAddedWeightInWater
The weight in water added to the element.
Definition: CCableElBasics.h:76
double m_dNormalDragCoeff
The normal drag coefficient of the cable element.
Definition: CCableElBasics.h:78
double m_dRhoWater
The density of the surrounding water.
Definition: CCableElBasics.h:79
double ma_dCompressionSpeed
The speed at which the distance between the two ends decreases.
Definition: CCableElBasics.h:130
void AddHydroForcesCable(double adForceA[3], double adForceB[3])
Calculates the hydrodynamic forces on the cable and the spheres and disks attached to it....
double m_dL0
The relaxed length of the element.
Definition: CCableElBasics.h:72
double m_adMassInWater[2]
The mass in water distributed to each node.
Definition: CCableElBasics.h:88
double m_adWeightInWaterPerMeter[2]
The weight in water distributed to each node, per meter cable.
Definition: CCableElBasics.h:89
void CalcFoundation(const double adPosA[3], const double adVelA[3], const double adPosB[3], const double adVelB[3], const double adFluidVel[3], const double dRhoWater)
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 ma_dDampingCoeff
A intermediate damping calculation to increase the computational efficiency.
Definition: CCableElBasics.h:118
double m_dMinLength
The minimum length of the element.
Definition: CCableElBasics.h:80
std::string m_sCableName
The name of the parent cable.
Definition: CCableElBasics.h:71
double ma_adVel[3]
The average hydrodynamic velocity of the element.
Definition: CCableElBasics.h:119
virtual void AddEndForces(const double adPosA[3], const double adVelA[3], const double adPosB[3], const double adVelB[3], const double adFluidVel[3], const double dRhoWater, double adForceA[3], double adForceB[3])
Calculates the end forces on the cable element.
double m_adWeightInWater[2]
The weight in water distributed to each node.
Definition: CCableElBasics.h:87
~CCableElBasics()
The destructor.
double m_adMassInWaterPerMeter[2]
The mass in water distributed to each node, per meter cable.
Definition: CCableElBasics.h:90
double m_dRho
The density of the element material.
Definition: CCableElBasics.h:75
double m_dA
The cross sectional area of the cable.
Definition: CCableElBasics.h:86
void AddGravityBuoyancy(double adForceA[3], double adForceB[3], const double adPosA[3], const double adPosB[3])
Adds the forces from gravity and buoyancy to the nodes. CalcFoundation must be run first.
double ma_dLength
The actual distance between the ends.
Definition: CCableElBasics.h:129
double m_dMaxTension
The maximum tension in the element.
Definition: CCableElBasics.h:81
double ma_dVtAmp
The scalar average tangential hydrodynamic velocity of the element.
Definition: CCableElBasics.h:122
double m_dTangentialFrictionCoeff
The tangential drag coefficient of the cable element.
Definition: CCableElBasics.h:77
virtual void SetConstants()
Calculates parameters and sets physical constants.
double m_dDampingRatio
The relative damping ratio of the cable.
Definition: CCableElBasics.h:82
double ma_dVelAmp
The scalar average hydrodynamic velocity of the element.
Definition: CCableElBasics.h:120
virtual bool CheckAndInitialize()
Does the initialization and checking to make sure that the element is ready for simulation.
double ma_dVnAmp_A
The scalar hydrodynamic normal velocity of the end A.
Definition: CCableElBasics.h:127
double m_dEA
The linear stiffness of the element.
Definition: CCableElBasics.h:85
virtual void UpdateLength(double dNewLength)
Upates the length of the cable element, and its dependant properties.
CCableElBasics()
The constructor.