FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
hydro_body::Wrench Struct Reference

The sum of the loads on a body: the force [0..2] and the moment about the origin [3..5], body frame.

#include <HydroBody.h>

Public Member Functions

void Add (const double wrench[6])
 Adds the body-frame wrench wrench.
 
void AddForceAt (const FlowFrame &frame, const double pos_d[3], const double force_n[3])
 
void AddWeightAndBuoyancy (const FlowFrame &frame, double mass, const double cog_d[3], const double buoyancy_n[3])
 

Public Attributes

double values [6] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
 

Member Function Documentation

◆ AddForceAt()

void hydro_body::Wrench::AddForceAt ( const FlowFrame &  frame,
const double  pos_d[3],
const double  force_n[3] 
)

Adds the NED force force_n acting at the body-frame point pos_d, and its moment.

Parameters
[in]frameThe frame that rotates the force into the body frame.
[in]pos_dThe point of attack, body frame [m].
[in]force_nThe force, NED [N].

◆ AddWeightAndBuoyancy()

void hydro_body::Wrench::AddWeightAndBuoyancy ( const FlowFrame &  frame,
double  mass,
const double  cog_d[3],
const double  buoyancy_n[3] 
)

Adds the weight mass * marenv::gravity at the body-frame point cog_d and the NED force buoyancy_n at the origin.

The weight is rotated into the body frame, its moment about the origin taken at cog_d, the buoyancy rotated and added into the same local wrench, and that wrench added once. This is not two AddForceAt calls: those add the weight and the buoyancy to the sum one by one, (w + g) + b, where this adds w + (g + b).

Parameters
[in]frameThe frame that rotates the forces into the body frame.
[in]massThe mass of the body [kg].
[in]cog_dThe centre of gravity, body frame [m].
[in]buoyancy_nThe buoyancy force, NED [N], acting at the origin (so with no moment).

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