1#ifndef SHIP2_VESSELDATA_H
2#define SHIP2_VESSELDATA_H
15using Matrix6d = Eigen::Matrix<double, 6, 6>;
16using Vector6d = Eigen::Matrix<double, 6, 1>;
17using Vector6cd = Eigen::Matrix<std::complex<double>, 6, 1>;
42 std::string attribution;
49 double lpp = 0.0, beam = 0.0, draught = 0.0, loa = 0.0;
53 Eigen::Vector3d
cog = Eigen::Vector3d::Zero();
54 Eigen::Vector3d
radii = Eigen::Vector3d::Zero();
57 std::vector<double> omega;
58 std::vector<Matrix6d> addedMass;
59 std::vector<Matrix6d> damping;
60 Matrix6d addedMassZero = Matrix6d::Zero();
61 Matrix6d addedMassInfinite = Matrix6d::Zero();
62 bool hasZero =
false, hasInfinite =
false;
68 std::vector<double> omegaExcitation;
69 std::vector<double> betaExcitation;
70 std::vector<std::vector<Vector6cd>> excitation;
73 std::vector<double> omegaDrift;
74 std::vector<double> betaDrift;
75 std::vector<std::vector<Eigen::Vector3d>> drift;
77 std::vector<Section> sections;
95 Eigen::Vector3d
Drift(
double w,
double beta)
const;
99 Matrix6d DampingAt(
double w)
const;
Superclass of control algorithms for the control system.
Definition CableAttach.h:58
Definition VesselData.h:35
std::vector< Eigen::Vector2d > points
(y, z): half-section from the keel to the deck edge, z down
Definition VesselData.h:37
double x
[m] from the origin
Definition VesselData.h:36
Definition VesselData.h:33
static VesselData Load(const std::string &vesselFile)
Eigen::Vector3d cog
centre of gravity [m]
Definition VesselData.h:53
bool symmetric
Definition VesselData.h:81
Matrix6d AddedMassAt(double w) const
Added mass and damping at frequency w (linear between the frequencies, held at the ends).
Vector6cd Excitation(double w, double beta) const
double mass
[kg]
Definition VesselData.h:52
std::string directory
where the files are
Definition VesselData.h:43
Eigen::Vector3d Drift(double w, double beta) const
The mean drift force (surge, sway, yaw) per unit amplitude squared (zero without drift data).
Matrix6d RigidBodyMass() const
The rigid-body mass matrix about the origin (the centre of gravity's offset included).
Eigen::Vector3d radii
radii of gyration about it, roll, pitch, yaw [m]
Definition VesselData.h:54
Matrix6d restoring
The restoring matrix about the origin, buoyancy and the gravity of mass at cog (WAMIT's convention).
Definition VesselData.h:65