11#ifndef CNetCableElement_H
12#define CNetCableElement_H
18#include "NetCableElementSpec.h"
19#include "cable/subroutines/CableElDynStiff.h"
22#ifdef FH_VISUALIZATION
24# pragma warning(disable : 4251)
28# include "sfh/ogre/CDynamicLines.h"
46 const double adPosA[3],
47 const double adVelA[3],
48 const double adPosB[3],
49 const double adVelB[3],
50 const double adFluidVel[3],
51 const double rhoWater,
54 bool isScreen =
false);
68 void DeleteSpheresAndDisks();
70 void AddSpheres(
double* adD,
double* adMass,
double* adPos, std::vector<std::string> VsSphereMaterial,
unsigned int num);
71 void AddDisks(
double* adD,
double* adThickness,
double* adMass,
double* adPos, std::vector<std::string> VsDiskMaterial,
unsigned int num);
73 double GetStrainEnergy(
double deltaT,
const double adPosA[3],
const double adVelA[3],
const double adPosB[3],
const double adVelB[3],
const double adFluidVel[3],
const double rhoWater);
91#ifdef FH_VISUALIZATION
93 void RenderInit(Ogre::Root* ogreRoot);
96 void RenderUpdate(
const double adPosA[3],
const double adPosB[3]);
124#ifdef FH_VISUALIZATION
125 Ogre::Entity** m_renderSpheres;
126 Ogre::SceneNode** m_renderNodeSpheres;
127 Ogre::Entity** m_renderDisks;
128 Ogre::SceneNode** m_renderNodeDisks;
double ma_dDampingCoeff
A intermediate damping calculation to increase the computational efficiency.
Definition CableElBasics.h:121
double ma_dNormalDragFactor
A factor used when calculating the normal drag force.
Definition CableElBasics.h:135
double ma_dTangentialDragFactor
A factor used when calculating the tangential drag force.
Definition CableElBasics.h:134
double m_eA
The linear stiffness of the element.
Definition CableElBasics.h:88
Definition CableElDynStiff.h:34
double m_eFactor
The factor multiplied by the Young modulus.
Definition CableElDynStiff.h:64
Class containing a cable element object, allowing for disks and spheres to be connected.
Definition NetCableElementSpec.h:18
Class containing a cable element object, allowing for disks and spheres to be connected.
Definition NetCableElement.h:34
double * m_diskThickness
The thickness of the connected disks.
Definition NetCableElement.h:108
double * m_sphereD
The diameter of the connected spheres.
Definition NetCableElement.h:103
int m_fromNodes[2]
The nodes which this cable is constructed by dividing.
Definition NetCableElement.h:99
bool CheckAndInitialize()
Does the initialization and checking to make sure that the element is ready for simulation.
double m_addedWeightInWater
The weight in water added to the element.
Definition NetCableElement.h:111
double * m_sphereMass
The mass of the connected spheres.
Definition NetCableElement.h:104
double * m_diskD
The diameter of the connected disks.
Definition NetCableElement.h:107
unsigned int m_numDisks
The number of disks connected.
Definition NetCableElement.h:106
double m_nodeOffset
The offset between the original nodes of the added node of this cable.
Definition NetCableElement.h:98
double m_dragCoeffSphere
The drag coefficient of a sphere.
Definition NetCableElement.h:120
void AddHydroForcesAppendices(double adForceA[3], double adForceB[3])
Calculates the hydrodynamic forces on spheres and disks attached to the cable.
double * m_diskMass
The mass of the connected disks.
Definition NetCableElement.h:109
int m_conn[2]
The node numbers that the element is connected to.
Definition NetCableElement.h:100
double GetEffectiveDamping() const
Definition NetCableElement.h:82
void CalcMassAndWeight()
Calculates the mass and weight of the element in water.
unsigned int m_numSpheres
The number of spheres connected.
Definition NetCableElement.h:102
double m_normalDragCoeffDisk
The normal drag coefficient of a disk.
Definition NetCableElement.h:121
double m_refineFactor
The factor telling how much mesh refinement is desired for this element.
Definition NetCableElement.h:101
std::vector< std::string > m_VsDiskMeshName
The names of the materials of the attached disks.
Definition NetCableElement.h:112
double * m_diskPos
The position of the connected disks.
Definition NetCableElement.h:110
bool Divide(int aiNodes[2], int newNode, int newElementID, NetCableElement **sNewCable)
Divides the element in two.
void SetConstants()
Calculates parameters and sets physical constants.
double GetTangentialDragFactor() const
Definition NetCableElement.h:86
double * m_spherePos
The position of the connected spheres.
Definition NetCableElement.h:105
double GetNormalDragFactor() const
Normal drag prefactor (= ma_dNormalDragFactor).
Definition NetCableElement.h:89
std::vector< std::string > m_VsSphereMeshName
The names of the materials of the attached spheres.
Definition NetCableElement.h:113
double GetEffectiveStiffness() const
Definition NetCableElement.h:77
double m_tangentialFrictionCoeffDisk
The normal drag coefficient of a disk.
Definition NetCableElement.h:122