|
FhSim
3.1.0
Marine systems simulation
|
#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. | |
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].
| bool marenv::wake::GriddedSnapshot::Deficit | ( | double | t, |
| const double | pos[3], | ||
| double & | deficit | ||
| ) | const |
Returns the deficit at a point.
| [in] | t | Simulation time, s; the frame is extrapolated to pose(t). |
| [in] | pos | Query position, m, world NED. |
| [out] | deficit | d in [0, 1]; 0 outside the grid. |
| 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).
| [in] | t | Simulation time, s; the frame is extrapolated to pose(t). |
| [in] | pos | Query position, m, world NED. |
| [out] | out | Deficit d in [0, 1], 0 outside the grid, and the source velocity u_s. |
| void marenv::wake::GriddedSnapshot::ToFrame | ( | double | t, |
| const double | pos[3], | ||
| double | xi[3] | ||
| ) | const |
Transforms a world position into frame coordinates.
| [in] | t | Simulation time, s; the frame is extrapolated to pose(t). |
| [in] | pos | Position, m, world NED. |
| [out] | xi | Coordinates along frame.axes[0], axes[1] and axes[2] from pose(t), m. |