FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
marenv::wake::GriddedSnapshot Struct Reference

#include <GriddedWake.h>

+ Collaboration diagram for marenv::wake::GriddedSnapshot:

Public Member Functions

bool Deficit (double t, const double pos[3], double &deficit) const
 
bool Sample (double t, const double pos[3], WakeSample &out) const
 
void ToFrame (double t, const double pos[3], double xi[3]) const
 

Public Attributes

WakeFrame frame
 Frame of the grid; pose(t) = origin + velocity (t - t0).
 
grid::UniformGrid3< double > logRatio
 L = sum log(1 - d_i) at the nodes, frame coordinates.
 
double sourceVelocity [3]
 Source velocity u_s of the sources, m/s, NED.
 
std::string warning
 Resolution warning of WakeBuilder::Finish; empty when x_start >= 1.5 cells for every source.
 

Detailed Description

One immutable build of a gridded wake, produced by WakeBuilder::Finish (contract C4).

The grid holds the log velocity ratio L = sum log(1 - d_i) of the composed sources at its nodes, in frame coordinates (xi along frame.axes[0], the mean relative flow). A query interpolates L trilinearly and returns d = 1 - exp(L), which stays in [0, 1].

Member Function Documentation

◆ Deficit()

bool marenv::wake::GriddedSnapshot::Deficit ( double  t,
const double  pos[3],
double &  deficit 
) const

Returns the deficit at a point.

Parameters
[in]tSimulation time, s; the frame is extrapolated to pose(t).
[in]posQuery position, m, world NED.
[out]deficitd in [0, 1]; 0 outside the grid.
Returns
true inside the grid, false outside.

◆ Sample()

bool marenv::wake::GriddedSnapshot::Sample ( double  t,
const double  pos[3],
WakeSample &  out 
) const

Returns the deficit and the snapshot's source velocity at a point (WakeBlendSnapshot).

Parameters
[in]tSimulation time, s; the frame is extrapolated to pose(t).
[in]posQuery position, m, world NED.
[out]outDeficit d in [0, 1], 0 outside the grid, and the source velocity u_s.
Returns
true inside the grid, false outside.

◆ ToFrame()

void marenv::wake::GriddedSnapshot::ToFrame ( double  t,
const double  pos[3],
double  xi[3] 
) const

Transforms a world position into frame coordinates.

Parameters
[in]tSimulation time, s; the frame is extrapolated to pose(t).
[in]posPosition, m, world NED.
[out]xiCoordinates along frame.axes[0], axes[1] and axes[2] from pose(t), m.

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