19#include "CableSegmentWaterForce.h"
20#include "TrawlCableConstraintSets.h"
23#include <fhsim/simobject/ISimObjectCreator.h>
24#include <fhsim_coribo/ConstraintSolver.h>
28namespace trawl_mooring
61std::array<double, 2> ReadTensionStabilityFactors(ISimObjectCreator& creator,
const std::string& name,
double defaultFactor = 1.0);
73 double ElementLength()
const {
return m_elementLength; }
104 double m_elementLength;
105 double m_frequencyCoefficient;
109std::vector<double> ElementCentres(
double length,
int numElements);
124void LayOnCatenary(
const CoRiBoDynamics::vec3& P1,
const CoRiBoDynamics::vec3& P2,
double A,
double D,
const std::vector<double>& coordinates,
const std::vector<ElementStates>& elements,
double* states);
127constexpr double kStraightLineTolerance = 1e-9;
143void LayOutLine(ISimObjectCreator& creator,
const std::string& lengthParameter,
const CoRiBoDynamics::vec3& P1,
const CoRiBoDynamics::vec3& P2,
double length,
double unstretchedLength,
const std::vector<double>& coordinates,
const std::vector<ElementStates>& elements,
double* states);
146void LayOutLine(ISimObjectCreator& creator,
const std::string& lengthParameter,
const CoRiBoDynamics::vec3& P1,
const CoRiBoDynamics::vec3& P2,
double length,
const std::vector<ElementStates>& elements,
double* states);
Definition TrawlCableConstraintSets.h:134
One segment of equal rigid cylinders on the constraint solver.
Definition CableSegment.h:65
double ElementWeightInWater() const
The element's weight in water, g (m - ρV) [N], with the trawl cables' ρ and g.
CoRiBoDynamics::TrawlCableJointConstraint::CableProperties JointProperties(const std::vector< int > &elements) const
The joint properties of the segment over the solver elements elements.
double ElementMass() const
Mass per length times element length [kg].
double ElementDisplacedVolume() const
Element length times displacement area [m³].
trawl_cable_water::Segment WaterSegment() const
The element as the water forces and the added mass take it.
int AddElement(CoRiBoDynamics::ConstraintSolver &solver, ElementStates &element, const CoRiBoDynamics::EnvironmentForces &forces) const
Adds one element on solver with the added mass of its water (reading forces' environment) and sets it...
CoRiBoDynamics::EnvironmentForces::CableSegment EnvironmentSegment(const std::vector< int > &elements) const
The environment-force properties over elements.
CoRiBoDynamics::vec6 ElementInertia() const
Mass and the moments of inertia of a solid cylinder of the nominal diameter about its centre (z the a...
CableSegment(const CableMaterial &material, double elementLength, double frequencyCoefficient)
std::vector< int > AddElements(CoRiBoDynamics::ConstraintSolver &solver, std::vector< ElementStates >::iterator first, std::vector< ElementStates >::iterator last, const CoRiBoDynamics::EnvironmentForces &forces) const
Adds the elements [first, last) in order; returns their solver indices.
CoRiBoDynamics::TrawlCableCollisionManager::CableCollisionManagerProperties CollisionProperties(const std::vector< int > &elements, double stiffnessFactor, double collisionFrequencyCoefficient) const
Definition TrawlCableConstraintSets.h:136
Definition TrawlCableConstraintSets.h:74
Definition TrawlCableConstraintSets.h:16
The properties of the elements of one cable segment.
Definition CableSegmentWaterForce.h:28
The material of one cable segment.
Definition CableSegment.h:42
double tensileArea
Cross-section area of the load-bearing material [m²].
Definition CableSegment.h:44
double massPerLength
Mass per length [kg/m].
Definition CableSegment.h:50
double youngsModulus
E-modulus of the load-bearing material [Pa].
Definition CableSegment.h:47
std::array< double, 2 > tensionStability
Divides the bending frequency response; multiplies the bending stiffness.
Definition CableSegment.h:52
double displacementArea
Cross-section area that displaces water [m²].
Definition CableSegment.h:49
double shearModulus
G-modulus of the load-bearing material [Pa].
Definition CableSegment.h:48
double diameter
Nominal diameter [m].
Definition CableSegment.h:43
double secondAreaMoment
Second area moment of the load-bearing material [m⁴].
Definition CableSegment.h:45
double structuralDamping
Relative structural damping; 1 is critical.
Definition CableSegment.h:51
double torsionalAreaMoment
Torsional area moment of the load-bearing material [m⁴].
Definition CableSegment.h:46
The state indices of one rigid element and its index in the solver.
Definition CableSegment.h:32
int q
Orientation quaternion w, x, y, z (4 states).
Definition CableSegment.h:34
int p
Position (3 states).
Definition CableSegment.h:33
int w
Angular velocity (3 states).
Definition CableSegment.h:36
int v
Velocity (3 states).
Definition CableSegment.h:35
int n
The element's index in the constraint solver, set when it is added.
Definition CableSegment.h:37