FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
NetCableElementSpec.h
1
10
11#ifndef CNetCableElementSpec_H
12#define CNetCableElementSpec_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, NetCableElementSpec** 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
43 double m_nodeOffset;
44 int m_fromNodes[2];
45 int m_iD;
46 std::string m_cableName;
47 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;
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_dE;
67 double m_rho;
68 double m_minLength;
69 double m_maxTension;
70 // double m_dampingRatio; ///< The relative damping ratio of the cable.
71 double m_maxStep;
75
76 double m_tangentialFrictionCoeff;
77 double m_normalDragCoeff;
78
79#ifdef FH_VISUALIZATION
80 std::string m_materialName;
81 int m_cableFaces;
82 double m_drawScale;
83#endif
84#ifdef FH_VISUALIZATION
85#endif
86
87protected:
88
89 // Constants
93
94
95};
96
97
98#endif
Class containing a cable element object, allowing for disks and spheres to be connected.
Definition NetCableElementSpec.h:18
~NetCableElementSpec()
The destructor.
int m_iD
The ID of the element.
Definition NetCableElementSpec.h:45
int m_conn[2]
The node numbers that the element is connected to.
Definition NetCableElementSpec.h:47
double m_maxTension
The maximum tension in the element.
Definition NetCableElementSpec.h:69
double m_maxStep
The maximum step of the integration routine.
Definition NetCableElementSpec.h:71
double * m_diskThickness
The thickness of the connected disks.
Definition NetCableElementSpec.h:56
double m_meanTension
The mean tension of the cable element.
Definition NetCableElementSpec.h:72
bool Divide(int aiNodes[2], int newNode, int newElementID, NetCableElementSpec **sNewCable, double distance=0.5)
Divides the element in two.
std::string m_cableName
The name of the parent cable.
Definition NetCableElementSpec.h:46
double m_dE
The Young modulus of the element.
Definition NetCableElementSpec.h:66
double m_rho
The density of the element material.
Definition NetCableElementSpec.h:67
double m_nodeOffset
The offset between the original nodes of the added node of this cable.
Definition NetCableElementSpec.h:43
int m_fromNodes[2]
The nodes which this cable is constructed by dividing.
Definition NetCableElementSpec.h:44
double m_minLength
The minimum length of the element.
Definition NetCableElementSpec.h:68
double * m_spherePos
The position of the connected spheres.
Definition NetCableElementSpec.h:53
int m_foldingPoints
The number of knuckle points on the cable.
Definition NetCableElementSpec.h:49
double m_tangentialFrictionCoeffDisk
The normal drag coefficient of a disk.
Definition NetCableElementSpec.h:92
double * m_diskPos
The position of the connected disks.
Definition NetCableElementSpec.h:58
double m_eAdaptationPeriod
The time constant of the adaptation of the mean tension.
Definition NetCableElementSpec.h:73
NetCableElementSpec()
The constructor.
int m_numDisks
The number of disks connected.
Definition NetCableElementSpec.h:54
double m_normalDragCoeffDisk
The normal drag coefficient of a disk.
Definition NetCableElementSpec.h:91
double * m_diskD
The diameter of the connected disks.
Definition NetCableElementSpec.h:55
double * m_diskMass
The mass of the connected disks.
Definition NetCableElementSpec.h:57
double * m_sphereD
The diameter of the connected spheres.
Definition NetCableElementSpec.h:51
double m_addedWeightInWater
The weight in water added to the element.
Definition NetCableElementSpec.h:59
double m_refineFactor
The factor telling how much mesh refinement is desired for this element.
Definition NetCableElementSpec.h:48
double * m_sphereMass
The mass of the connected spheres.
Definition NetCableElementSpec.h:52
std::vector< std::string > m_VsSphereMeshName
The names of the materials of the attached spheres.
Definition NetCableElementSpec.h:61
int m_numSpheres
The number of spheres connected.
Definition NetCableElementSpec.h:50
double m_dragCoeffSphere
The drag coefficient of a sphere.
Definition NetCableElementSpec.h:90
double m_dL0
The relaxed length of the element.
Definition NetCableElementSpec.h:64
double m_dD
The diameter of the element.
Definition NetCableElementSpec.h:65
NetCableElementSpec(const NetCableElementSpec *old)
The copy constructor.
double m_stepSafetyFactor
The safety factor when calculating the Young modulus of the element.
Definition NetCableElementSpec.h:74
std::vector< std::string > m_VsDiskMeshName
The names of the materials of the attached disks.
Definition NetCableElementSpec.h:60