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)
 
- Public Member Functions inherited from marenv::wake::BlendedField< detail::JetSnapshot, JetFieldTraits >
Status Sample (double t, const double pos[3], Value &out) const override
 
Traits::Parts SampleParts (double t, const double pos[3]) const override
 
bool MayReach (const WakeQueryRegion &region) const override
 
std::uint64_t Revision () const override
 The number of publishes (see WakeField::Revision()).
 
bool StaticFrom (double t) const override
 No blend at t or later and the published snapshot at rest (see WakeField::StaticFrom()).
 
void SampleMany (double t, std::span< const std::array< double, 3 > > positions, std::span< Value > out, std::span< Status > status) const override
 Sample() at every point, the published state loaded once (see WakeField::SampleMany()).
 
void Sketch (double t, FieldSketch &out) const override
 Appends the sketch of the snapshot blended to at t (see WakeField::Sketch()); nothing before the first publish.
 

Additional Inherited Members

- Public Types inherited from marenv::wake::BlendedField< detail::JetSnapshot, JetFieldTraits >
using Value = typename Traits::Value
 The sample type of the field, Traits::Value.
 
- Protected Types inherited from marenv::wake::BlendedField< detail::JetSnapshot, JetFieldTraits >
using Blend = WakeBlend< detail::JetSnapshot, Value, typename Traits::Sum, typename Traits::Samples >
 The blend between the two published snapshots (WakeBlend).
 
- Protected Member Functions inherited from marenv::wake::BlendedField< detail::JetSnapshot, JetFieldTraits >
Status SampleWith (double t, const double pos[3], const Sampler &sampler, Value &out) const
 
Traits::Parts PartsWith (double t, const double pos[3], const Sampler &sampler) const
 SampleParts() with each snapshot sampled by sampler, as SampleWith().
 
- Protected Attributes inherited from marenv::wake::BlendedField< detail::JetSnapshot, JetFieldTraits >
Blend m_blend
 The published snapshots and the blend between them (single writer).
 

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.

Reach (MayReach(), 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().

The virtuals that only load the state and forward to the snapshot (Sample(), SampleParts(), MayReach(), Revision(), StaticFrom(), SampleMany(), Sketch()) are those of BlendedField. Sample() returns Status::OK once a published jet contributes and Status::ERROR_NOT_SET, with Δu = 0, before the first Publish() and before the first blend has started. Sketch() appends the axis of the jet blended to, from the propeller over five lengths of the zone of flow establishment (about 10 D_p) at t.

Member Function Documentation

◆ 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.

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