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

#include <GaussPointDrag.h>

Public Member Functions

void Begin (double length)
 
void Add (const Eigen::Vector3d &centre, const Eigen::Vector3d &axis)
 
void Build ()
 Finds the Gauss points from the elements added.
 
int NumElements () const
 The number of elements in the chain.
 
int NumPoints () const
 The number of points: two per element.
 
const Eigen::Vector3d & Position (int point) const
 The position of point point [m], NED.
 
void AppendPositions (std::vector< double > &points) const
 
void QueryWater (const environment::wake::ElementFlowInteraction &flow, double T, int firstPoint)
 
EndWater WaterOf (int element) const
 

Detailed Description

The two Gauss points of every element of a chain, 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.

Element i has the points 2 i (at s = −a along its axis) and 2 i + 1 (at s = +a), a = L / (2 √3), the points of the two-point Gauss rule that the drag is integrated with (owner ruling 2026-10-29; before, the water was queried at the joints and interpolated). Each point is queried once per evaluation, and the wakes of other objects are taken at the same points (AppendPositions, in PreOdeFcn), so that the held wake of point p is the one a live query there gives: element i of the chain is point firstPoint + 2 i + end.

Member Function Documentation

◆ Add()

void wet_cylinder_water::ElementGaussPoints::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.

◆ AppendPositions()

void wet_cylinder_water::ElementGaussPoints::AppendPositions ( std::vector< double > &  points) const
inline

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

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

◆ Begin()

void wet_cylinder_water::ElementGaussPoints::Begin ( double  length)
inline

Starts a new chain and forgets the old one.

Parameters
lengthThe length of every element [m].

◆ QueryWater()

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

Queries the water velocity once at every point: the wakes are taken at the points, so point p takes point firstPoint + p.

Parameters
flowThe element flow.
TTime [s].
firstPointThe wake point of Gauss point 0 (the points of the chain are consecutive).

◆ WaterOf()

EndWater wet_cylinder_water::ElementGaussPoints::WaterOf ( int  element) const
inline

The water of element element after QueryWater, in the form of environment::wet_cylinder::GaussPointDragLoad.

The law interpolates linearly from two end values and reads the result at the Gauss points, so the ends are the straight line through the two Gauss-point samples u− and u+, extended to ±L/2: mean ∓ slope L/2 with slope = (u+ − u−) / (2 a). The law then reads u− and u+ back exactly, and Mean() (the water at the centre for everything but the drag) is their mean.


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