FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
PropellerJet.h
1#pragma once
4
5#include <marenv/marenv.h>
6#include <marenv/wake/BlendedField.h>
7#include <marenv/wake/JetField.h>
8#include <marenv/wake/Kernel.h> // ImageSet
9#include <marenv/wake/WakeBlend.h>
10
11#include <memory>
12
13namespace marenv::wake
14{
19{
20 double amplitude;
21 double sigma;
22};
23
37{
38public:
40 explicit JetProfile(const JetSourceInput& input);
41
43 bool Active() const { return m_active; }
44
46 double AdvanceSpeed() const { return m_advanceSpeed; }
47
49 double Efflux() const { return m_efflux; }
50
52 double InitialSigma() const { return m_initialSigma; }
53
55 double ZoneEnd() const { return m_zoneEnd; }
56
58 double RampLength() const { return m_rampLength; }
59
61 double VelocityScale() const { return m_advanceSpeed + m_efflux; }
62
64 JetCentreline At(double x) const;
65
67 double CentrelineExcess(double sigma) const;
68
70 double DistanceAt(double sigma) const;
71
73 double SigmaAt(double x) const;
74
80 double PeakAmplitude(double xFrom, double xTo) const;
81
82private:
83 bool m_active;
84 double m_advanceSpeed;
85 double m_momentum;
86 double m_efflux;
87 double m_initialSigma;
88 double m_zoneEnd;
89 double m_rampLength;
90};
91
92namespace detail
93{
97struct JetSnapshot
98{
99 double origin[3];
100 double axis[3];
101 double velocity[3];
102 double t0;
103 ImageSet images;
104 JetProfile profile;
105
107 bool Sample(double t, const double pos[3], JetSample& out) const;
108
110 bool MayReach(const WakeQueryRegion& region) const;
111
113 void Sketch(double t, FieldSketch& out) const;
114
116 bool Stationary() const { return velocity[0] == 0.0 && velocity[1] == 0.0 && velocity[2] == 0.0; }
117};
118} // namespace detail
119
152class PropellerJet : public BlendedField<detail::JetSnapshot, JetFieldTraits>
153{
154public:
155 PropellerJet() = default;
156 ~PropellerJet() override = default;
157
173 void Publish(const JetSourceInput& input, const double velocity[3], double t0, double blendTime, double seabedDepth, bool surfaceImage);
174
175private:
176 using Snapshot = detail::JetSnapshot;
177};
178} // namespace marenv::wake
Definition BlendedField.h:104
Definition PropellerJet.h:37
double InitialSigma() const
sigma_0 = D_p / sqrt(8), m.
Definition PropellerJet.h:52
double Efflux() const
The efflux velocity Δu₀, m/s; 0 when not active.
Definition PropellerJet.h:49
double SigmaAt(double x) const
The width sigma(x) of the established jet at x >= x_0, m (inverse of DistanceAt()).
double PeakAmplitude(double xFrom, double xTo) const
double ZoneEnd() const
x_0 = sigma_0 / c, the end of the zone of flow establishment, m.
Definition PropellerJet.h:55
double CentrelineExcess(double sigma) const
The centreline excess Δu_c = sqrt(U^2 + q / sigma^2) - U at width sigma, m/s.
double DistanceAt(double sigma) const
The distance x(sigma) >= x_0 at which the established jet has width sigma >= sigma_0,...
bool Active() const
True if the jet casts anything: T_eff > 0.
Definition PropellerJet.h:43
JetCentreline At(double x) const
Centreline amplitude, the onset ramp included, and sigma at x, m downstream of the propeller plane.
double VelocityScale() const
The jet's velocity scale U + Δu₀, m/s, against which MayReach() applies a cutoff.
Definition PropellerJet.h:61
double RampLength() const
L_ramp = kJetRampFactor D_p, m.
Definition PropellerJet.h:58
double AdvanceSpeed() const
The co-flow speed U = max(u_a, 0), m/s.
Definition PropellerJet.h:46
JetProfile(const JetSourceInput &input)
Definition PropellerJet.h:153
void Publish(const JetSourceInput &input, const double velocity[3], double t0, double blendTime, double seabedDepth, bool surfaceImage)
Definition FieldSketch.h:16
Definition Kernel.h:131
Definition PropellerJet.h:19
double sigma
Gaussian width sigma across the jet axis, m.
Definition PropellerJet.h:21
double amplitude
Centreline excess velocity S(x / L_ramp) Δu_c(x), m/s; 0 upstream of the propeller plane.
Definition PropellerJet.h:20
Definition JetField.h:20
Definition JetField.h:116
Definition WakeField.h:23