Marine systems simulation
Loading...
Searching...
No Matches
marenv::wake::WakeField Class Referenceabstract

#include <WakeField.h>

+ Inheritance diagram for marenv::wake::WakeField:
+ Collaboration diagram for marenv::wake::WakeField:

Public Member Functions

virtual Status GetCurrentVelocityFactor (double time, const double pos[3], const double currentDirection[3], double &factorOut)=0
 

Detailed Description

Models the effect of objects (ships, structures) on the surrounding flow field.

The primary function GetCurrentVelocityFactor() returns a multiplicative factor applied to the ambient current velocity. A factor of 1.0 represents undisturbed flow, while values less than 1.0 indicate flow attenuation (e.g., wake shadow behind a vessel).

When multiple wake sources are present, their effects compose multiplicatively.

Example usage:

auto wake = std::make_shared<SimpleWake>();
env.AddWakeField("ship_wake", wake);
double pos[3] = {0.0, 0.0, -5.0};
double currentVelocity[3];
env.GetCurrentVelocity(0.0, pos, currentVelocity);
Definition EnvironmentFacade.h:29

Member Function Documentation

◆ GetCurrentVelocityFactor()

virtual Status marenv::wake::WakeField::GetCurrentVelocityFactor ( double  time,
const double  pos[3],
const double  currentDirection[3],
double &  factorOut 
)
pure virtual

Returns the current velocity attenuation factor at a given position and time.

Parameters
[in]timeSimulation time.
[in]posPosition (x,y,z) to query.
[in]currentDirectionDirection of the ambient (unattenuated) current velocity (x,y,z).
[out]factorOutAttenuation factor in [0, 1].
Returns
marenv::Status::OK on success. See marenv::Status for other values.

A factor of 1.0 means undisturbed current, 0.0 means zero current. The current direction is provided so that directional wake effects (e.g. shadow behind a structure) can be modelled.


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