10#ifndef CCableElBasics_H
11#define CCableElBasics_H
15#include <fhsim/Exceptions.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 rhoWater,
64#ifdef FH_VISUALIZATION
66 virtual void RenderInit(Ogre::Root* ogreRoot);
69 virtual void RenderUpdate(
const double adPosA[3],
const double adPosB[3]);
94#ifdef FH_VISUALIZATION
95 std::string m_materialName;
96 unsigned short m_cableFaces;
103 const double adVelA[3],
104 const double adPosB[3],
105 const double adVelB[3],
106 const double adFluidVel[3],
107 const double rhoWater);
113 void AddGravityBuoyancy(
double adForceA[3],
double adForceB[3],
const double adPosA[3],
const double adPosB[3]);
137#ifdef FH_VISUALIZATION
138 Ogre::Root* m_ogreRoot;
139 Ogre::SceneManager* m_sceneMgr;
140 Ogre::Entity* m_renderElement;
141 Ogre::SceneNode* m_renderNode;
142 CDynamicLines* m_lines;
143 Ogre::ManualObject* m_cableRenderObj;
146 Ogre::Entity* m_renderSphere;
147 Ogre::SceneNode* m_renderNodeSphere;
Class containing a fundamental cable element object.
Definition CableElBasics.h:29
double ma_dDampingCoeff
A intermediate damping calculation to increase the computational efficiency.
Definition CableElBasics.h:121
void AddHydroForcesCable(double adForceA[3], double adForceB[3])
Calculates the hydrodynamic forces on the cable and the spheres and disks attached to it....
double ma_dVnAmp_A
The scalar hydrodynamic normal velocity of the end A.
Definition CableElBasics.h:130
~CableElBasics()
The destructor.
CableElBasics()
The constructor.
double ma_dCompressionSpeed
The speed at which the distance between the two ends decreases.
Definition CableElBasics.h:133
double m_rhoWater
The density of the surrounding water.
Definition CableElBasics.h:82
double ma_dVelAmp
The scalar average hydrodynamic velocity of the element.
Definition CableElBasics.h:123
double ma_dVnAmp
The scalar average normal hydrodynamic velocity of the element.
Definition CableElBasics.h:127
double m_dE
The Young modulus of the element.
Definition CableElBasics.h:77
double m_normalDragCoeff
The normal drag coefficient of the cable element.
Definition CableElBasics.h:81
double ma_adDirection[3]
Memory allocation to increase the computational efficiency.
Definition CableElBasics.h:120
double m_massInWaterPerMeter[2]
The mass in water distributed to each node, per meter cable.
Definition CableElBasics.h:93
double ma_adVel[3]
The average hydrodynamic velocity of the element.
Definition CableElBasics.h:122
double m_dD
The diameter of the element.
Definition CableElBasics.h:76
double ma_adVt[3]
The average tangential hydrodynamic velocity of the element.
Definition CableElBasics.h:124
double m_weightInWaterPerMeter[2]
The weight in water distributed to each node, per meter cable.
Definition CableElBasics.h:92
virtual void UpdateLength(double newLength)
Upates the length of the cable element, and its dependant properties.
double ma_dNormalDragFactor
A factor used when calculating the normal drag force.
Definition CableElBasics.h:135
double ma_dVnAmp_B
The scalar hydrodynamic normal velocity of the end B.
Definition CableElBasics.h:131
double m_minLength
The minimum length of the element.
Definition CableElBasics.h:83
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 bool CheckAndInitialize()
Does the initialization and checking to make sure that the element is ready for simulation.
void CalcFoundation(const double adPosA[3], const double adVelA[3], const double adPosB[3], const double adVelB[3], const double adFluidVel[3], const double rhoWater)
double ma_dTangentialDragFactor
A factor used when calculating the tangential drag force.
Definition CableElBasics.h:134
double m_addedWeightInWater
The weight in water added to the element.
Definition CableElBasics.h:79
double m_weightInWater[2]
The weight in water distributed to each node.
Definition CableElBasics.h:90
double m_eA
The linear stiffness of the element.
Definition CableElBasics.h:88
double ma_adVn_B[3]
The hydrodynamic normal velocity of the end B.
Definition CableElBasics.h:129
double ma_dLength
The actual distance between the ends.
Definition CableElBasics.h:132
double m_maxTension
The maximum tension in the element.
Definition CableElBasics.h:84
double m_dL0
The relaxed length of the element.
Definition CableElBasics.h:75
double m_dA
The cross sectional area of the cable.
Definition CableElBasics.h:89
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 rhoWater, double adForceA[3], double adForceB[3])
Calculates the end forces on the cable element.
double ma_adVn_A[3]
The hydrodynamic normal velocity of the end A.
Definition CableElBasics.h:128
double ma_dVtAmp
The scalar average tangential hydrodynamic velocity of the element.
Definition CableElBasics.h:125
double m_massInWater[2]
The mass in water distributed to each node.
Definition CableElBasics.h:91
double ma_adVn[3]
The average normal hydrodynamic velocity of the element.
Definition CableElBasics.h:126
unsigned long m_iD
The ID of the element.
Definition CableElBasics.h:73
virtual void CalcMassAndWeight()
Calculates the mass and weight of the element in water.
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.
virtual void SetConstants()
Calculates parameters and sets physical constants.
double m_tangentialFrictionCoeff
The tangential drag coefficient of the cable element.
Definition CableElBasics.h:80
double GetDampingCoeff() const
Returns the structural damping coefficient (negative value: -2*dampRatio*area*sqrt(E*rho)).
Definition CableElBasics.h:58
double m_rho
The density of the element material.
Definition CableElBasics.h:78
std::string m_cableName
The name of the parent cable.
Definition CableElBasics.h:74
double m_dampingRatio
The relative damping ratio of the cable.
Definition CableElBasics.h:85