FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
SCableSectionData.h
1#ifndef S_CABLE_SECTION_DATA_H
2#define S_CABLE_SECTION_DATA_H
3
4#include <marenv/marenv.h>
5#include <string>
6#include <vector>
7
8#include "net/NTrawlSpec.h"
9
11{
12 double D;
13 double E;
14 double L;
15 int Conn[2];
16 double Rho;
17 std::string MaterialName;
18 double DrawScale;
19 unsigned short NumSpheres;
20 double* SphereD;
21 double* SphereMass;
22 double* SpherePos;
23 unsigned short NumDisks;
24 double* DiskD;
25 double* DiskThickness;
26 double* DiskMass;
27 double* DiskPos;
28 double AddedWeightInWater;
29 double RefineFactor;
30 std::vector<std::string> VsSphereMaterial;
31 std::vector<std::string> VsDiskMaterial;
34 {
35 bool firstHalf;
36 double pos;
37 };
38 std::vector<HalfPlacement> SphereHalves;
39 std::vector<HalfPlacement> DiskHalves;
41
45 SCableSectionData& operator=(const SCableSectionData& old);
50 void Initialize(double dL = 10.0,
51 double dD = 0.01,
52 double dRho = marenv::seawaterDensity,
53 double dE = 1e9,
54 double dRefineFactor = 1,
55 std::string sMaterialName = "Trawl/Wire2",
56 double dDrawScale = 1);
57 void AddSpheres(unsigned short iNum, double dDiameter, double dRho, double dEndPos, double dStartPos, std::string sMaterial = "floater");
58 void AddSpheres(unsigned short iNum, double dDiameter, double dRho, std::string sMaterial = "floater");
59 void AddDisks(unsigned short iNum, double dDiameter, double dThickness, double dRho, double dEndPos, double dStartPos, std::string sMaterial = "floater");
60 void AddDisks(unsigned short iNum, double dDiameter, double dThickness, double dRho, std::string sMaterial = "floater");
61 void DeleteSpheres();
62 void DeleteDisks();
63 void ResetSpheres();
64 void ResetDisks();
65
66private:
68 void AddSphereGroup(unsigned short iNum, double dDiameter, double dRho, const std::vector<double>& positions,
69 const std::vector<HalfPlacement>& halves, const std::string& sMaterial);
71 void AddDiskGroup(unsigned short iNum, double dDiameter, double dThickness, double dRho, const std::vector<double>& positions,
72 const std::vector<HalfPlacement>& halves, const std::string& sMaterial);
73};
74#endif
constexpr double seawaterDensity
Ocean water density [kg/m^3].
Definition marenv.h:20
Where each sphere and disk goes if the line is divided into two mirror-image halves (GetHalfCable).
Definition SCableSectionData.h:34
bool firstHalf
On the first half, else on the second.
Definition SCableSectionData.h:35
double pos
Position on its half, a fraction from the half's outer end.
Definition SCableSectionData.h:36
Definition SCableSectionData.h:11
SCableSectionData GetHalfCable(bool bFirstHalf)
Definition NTrawlSpec.h:226