FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
NetCableElementTestSpec.h
1
10
11#ifndef CNetCableElementTestSpec_H
12#define CNetCableElementTestSpec_H
13#include <string>
14#include <vector>
15
16//Class definition
18{
19public:
20 enum NodePosition
21 {
22 NODE_ON_EDGE=1001
23 };
24
27
30
33
35 bool Divide(int aiNodes[2], int newNode, int newElementID, NetCableElementTestSpec** sNewCable, double distance=0.5);
36
37 void DeleteSpheresAndDisks();
38
39 void AddSpheres(double* adD, double* adMass, double* adPos, std::vector<std::string> VsSphereMaterial, int num);
40 void AddDisks(double* adD, double* adThickness, double* adMass, double* adPos, std::vector<std::string> VsDiskMaterial, int num);
41 NodePosition NodesDefineEdge( int aiNodes[2]);
42
45 int m_fromNodes[2];
46 int m_iD;
47 std::string m_cableName;
48 int m_conn[2];
51 double* m_sphereD;
52 double* m_sphereMass;
53 double* m_spherePos;
55 double* m_diskD;
57 double* m_diskMass;
58 double* m_diskPos;
59 //double m_addedWeightInWater; ///< The weight in water added to the element.
60 std::vector<std::string> m_VsDiskMeshName;
61 std::vector<std::string> m_VsSphereMeshName;
62
63
64 double m_dL0;
65 double m_dD;
66 double m_dhyd;
67 double m_dE;
68 double m_rho;
69 // double m_dampingRatio; ///< The relative damping ratio of the cable.
70
71#ifdef FH_VISUALIZATION
72 std::string m_materialName;
73 int m_cableFaces;
74 double m_drawScale;
75#endif
76#ifdef FH_VISUALIZATION
77#endif
78
79protected:
80
81 // Constants
85};
86
87
88#endif
Class containing a cable element object, allowing for disks and spheres to be connected.
Definition NetCableElementTestSpec.h:18
NetCableElementTestSpec(const NetCableElementTestSpec *old)
The copy constructor.
double m_dE
The Young modulus of the element.
Definition NetCableElementTestSpec.h:67
double m_normalDragCoeffDisk
The normal drag coefficient of a disk.
Definition NetCableElementTestSpec.h:83
double m_dhyd
The hydrodynamic diameter of the element.
Definition NetCableElementTestSpec.h:66
int m_numSpheres
The number of spheres connected.
Definition NetCableElementTestSpec.h:50
double m_nodeOffsetA
The offset between the original nodes of the added node of this cable.
Definition NetCableElementTestSpec.h:43
double m_dragCoeffSphere
The drag coefficient of a sphere.
Definition NetCableElementTestSpec.h:82
double m_dD
The diameter of the element.
Definition NetCableElementTestSpec.h:65
double * m_diskMass
The mass of the connected disks.
Definition NetCableElementTestSpec.h:57
double m_tangentialFrictionCoeffDisk
The normal friction coefficient of a disk.
Definition NetCableElementTestSpec.h:84
double * m_sphereMass
The mass of the connected spheres.
Definition NetCableElementTestSpec.h:52
double m_rho
The density of the element material.
Definition NetCableElementTestSpec.h:68
int m_iD
The ID of the element.
Definition NetCableElementTestSpec.h:46
~NetCableElementTestSpec()
The destructor.
NetCableElementTestSpec()
The constructor.
std::vector< std::string > m_VsDiskMeshName
The names of the materials of the attached disks.
Definition NetCableElementTestSpec.h:60
std::string m_cableName
The name of the parent cable.
Definition NetCableElementTestSpec.h:47
int m_conn[2]
The node numbers that the element is connected to.
Definition NetCableElementTestSpec.h:48
double * m_diskPos
The position of the connected disks.
Definition NetCableElementTestSpec.h:58
double * m_diskD
The diameter of the connected disks.
Definition NetCableElementTestSpec.h:55
double * m_sphereD
The diameter of the connected spheres.
Definition NetCableElementTestSpec.h:51
int m_numDisks
The number of disks connected.
Definition NetCableElementTestSpec.h:54
int m_fromNodes[2]
The nodes which this cable is constructed by dividing.
Definition NetCableElementTestSpec.h:45
std::vector< std::string > m_VsSphereMeshName
The names of the materials of the attached spheres.
Definition NetCableElementTestSpec.h:61
bool Divide(int aiNodes[2], int newNode, int newElementID, NetCableElementTestSpec **sNewCable, double distance=0.5)
Divides the element in two.
double * m_diskThickness
The thickness of the connected disks.
Definition NetCableElementTestSpec.h:56
double m_dL0
The relaxed length of the element.
Definition NetCableElementTestSpec.h:64
int m_foldingPoints
The number of knuckle points on the cable.
Definition NetCableElementTestSpec.h:49
double * m_spherePos
The position of the connected spheres.
Definition NetCableElementTestSpec.h:53
double m_nodeOffsetB
The offset between the original nodes of the added node of this cable.
Definition NetCableElementTestSpec.h:44