FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
wet_cylinder_water::ChainJoints Class Reference

#include <GaussPointDrag.h>

Public Member Functions

void Begin (double length, bool closed=false)
 
void Add (const Eigen::Vector3d &centre, const Eigen::Vector3d &axis)
 
void Build ()
 Finds the joints and their positions from the elements added.
 
int NumElements () const
 The number of elements in the chain.
 
int NumJoints () const
 The number of joints: one more than the number of elements in an open chain, as many in a closed loop, none for an empty chain.
 
const Eigen::Vector3d & JointPosition (int joint) const
 The position of joint joint [m], NED.
 
int JointOfEnd (int element, int end) const
 
void AppendJointPositions (std::vector< double > &points) const
 
void QueryWater (const environment::wake::ElementFlowInteraction &flow, double T, int firstPoint)
 
EndWater WaterOf (int element) const
 The water at the ends of element element, after QueryWater.
 

Detailed Description

The joints of a chain of equal elements, and the water at them.

Fill it with Begin, Add (once per element, in chain order) and Build; then QueryWater. The buffers keep their size from call to call, so a chain of fixed length allocates nothing after the first call.

In an open chain joint j lies between element j − 1 and element j; joint 0 is the free end of the first element, joint n the free end of the last. In a closed loop (at least three elements) there are n joints, and joint j lies between element j and element (j + 1) mod n. Which end of an element touches its neighbour is found from the geometry, not from the axis direction: the end of element i nearest the centre of element i + 1 goes to joint i + 1, the other end to joint i (the last element: the end nearest the centre of the one before goes to joint n − 1, the other to joint n).

Member Function Documentation

◆ Add()

void wet_cylinder_water::ChainJoints::Add ( const Eigen::Vector3d &  centre,
const Eigen::Vector3d &  axis 
)
inline

Adds the next element of the chain.

Parameters
centreThe element's centre [m], NED.
axisIts unit axis.

◆ AppendJointPositions()

void wet_cylinder_water::ChainJoints::AppendJointPositions ( std::vector< double > &  points) const
inline

Appends the joint positions to the points of a wake take (3 coordinates per joint, NED), in joint order.

Parameters
pointsThe points the wakes are taken at; joint j becomes point firstPoint + j, with firstPoint the number of points already in it.

◆ Begin()

void wet_cylinder_water::ChainJoints::Begin ( double  length,
bool  closed = false 
)
inline

Starts a new chain and forgets the old one.

Parameters
lengthThe length of every element [m].
closedTrue for a closed loop: the last element is a neighbour of the first.

◆ JointOfEnd()

int wet_cylinder_water::ChainJoints::JointOfEnd ( int  element,
int  end 
) const
inline

The joint at an end of an element.

Parameters
elementThe element's index in the chain.
end0 for the minus end, 1 for the plus end.

◆ QueryWater()

void wet_cylinder_water::ChainJoints::QueryWater ( const environment::wake::ElementFlowInteraction &  flow,
double  T,
int  firstPoint 
)
inline

Queries the water velocity once at every joint. The wakes are taken at the joints, so joint j takes point firstPoint + j.

Parameters
flowThe element flow.
TTime [s].
firstPointThe point of joint 0 (the points of the joints are consecutive).

The documentation for this class was generated from the following file: