FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
marenv::wake::PropellerJet Class Reference

#include <PropellerJet.h>

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

Public Member Functions

void Publish (const JetSourceInput &input, const double velocity[3], double t0, double blendTime, double seabedDepth, bool surfaceImage)
 
Status Sample (double t, const double pos[3], JetSample &out) const override
 
JetSampleParts SampleParts (double t, const double pos[3]) const override
 The sample split into the parts the blend weighs (see JetField::SampleParts()).
 
bool MayReach (const WakeQueryRegion &region) const override
 

Detailed Description

A propeller jet as a jet field, cross-faded from one publish to the next (doc/wake.md § 4.2, ADR 0003; contract C4).

One Publish(input, velocity, t0, blendTime, seabedDepth, surfaceImage) fixes the jet's source at its position at t0, its axis -shaftDir and its JetProfile, and translates it with velocity from t0 on without rotating, as SourceSetWake translates its sources: the query (t, p) is the source's at p - velocity (t - t0). The images are those of a wake (MirrorImages(), owner rulings R53, R98) with the vector rule of 2026-10-12: a mirror image (sign -1) returns the source's Δu at its query depth with Δu_z flipped, a translated image (sign +1) returns it unchanged.

Blending (WakeBlend, R22): the field cross-fades linearly in Δu from the jet in use to the new one over blendTime from t0; the first jet fades in from none. Publish() refuses a new blend while the previous one runs. Thread safety as SourceSetWake: one writer, any number of readers, one atomic load per query.

Member Function Documentation

◆ MayReach()

bool marenv::wake::PropellerJet::MayReach ( const WakeQueryRegion &  region) const
overridevirtual

Returns false only if the published jets add nothing in the region (see JetField::MayReach(); doc/wake.md § 4.2, "Reach").

Exact tier: false only where the sphere, swept back by the source's translation, lies wholly upstream of the propeller plane at the query depths of the source and of every image. Cutoff tier: also false where the sum over the source and its images of the bound PeakAmplitude() exp(-r_min^2 / (2 sigma_max^2)), over the jet's VelocityScale(), is below region.cutoff. The blend counts the jet blended to from its publish instant on and the jet blended from until the blend has ended (WakeBlend::MayReach()). During a blend the scale of the cutoff is the blended scale w V_to + (1 - w) V_from, since each jet bounds its own Δu by its own VelocityScale(). True before the first Publish().

Reimplemented from marenv::wake::JetField.

◆ Publish()

void marenv::wake::PropellerJet::Publish ( const JetSourceInput &  input,
const double  velocity[3],
double  t0,
double  blendTime,
double  seabedDepth,
bool  surfaceImage 
)

Publishes the jet of input, blended in from the jet in use.

Parameters
[in]inputThe source, world NED at t0; shaftDir is normalised.
[in]velocityVelocity of the source frame, m/s, NED: the jet translates with it from t0 on.
[in]t0Time at which the source is at input.pos and the blend starts, s.
[in]blendTimeDuration of the cross-fade, s; 0 switches at once.
[in]seabedDepthDepth of the seabed image plane (R53), m, > 0; infinity: no seabed image.
[in]surfaceImageAdd the mirror image at the free surface z = 0 (R53).
Exceptions
std::logic_errorif the previous blend has not ended by t0 (R22).
std::invalid_argumentfor a negative blend time, a non-finite t0, velocity, position, shaft direction, diameter, thrust, advance speed or density, a zero shaft direction, a non-positive diameter or density, or a seabed depth that is not positive. A throwing Publish() leaves the field in use unchanged.

◆ Sample()

Status marenv::wake::PropellerJet::Sample ( double  t,
const double  pos[3],
JetSample &  out 
) const
overridevirtual

Returns the blended Δu at pos (see JetField::Sample()).

Returns
Status::OK once a published jet contributes; Status::ERROR_NOT_SET, Δu = 0, before the first Publish() and before the first blend has started.

Implements marenv::wake::JetField.

◆ SampleParts()

JetSampleParts marenv::wake::PropellerJet::SampleParts ( double  t,
const double  pos[3] 
) const
overridevirtual

Reimplemented from marenv::wake::JetField.


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