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/JetField.h>
7#include <marenv/wake/Kernel.h> // ImageSet
8#include <marenv/wake/WakeBlend.h>
9
10#include <memory>
11
12namespace marenv::wake
13{
18{
19 double amplitude;
20 double sigma;
21};
22
36{
37public:
39 explicit JetProfile(const JetSourceInput& input);
40
42 bool Active() const { return m_active; }
43
45 double AdvanceSpeed() const { return m_advanceSpeed; }
46
48 double Efflux() const { return m_efflux; }
49
51 double InitialSigma() const { return m_initialSigma; }
52
54 double ZoneEnd() const { return m_zoneEnd; }
55
57 double RampLength() const { return m_rampLength; }
58
60 double VelocityScale() const { return m_advanceSpeed + m_efflux; }
61
63 JetCentreline At(double x) const;
64
66 double CentrelineExcess(double sigma) const;
67
69 double DistanceAt(double sigma) const;
70
72 double SigmaAt(double x) const;
73
79 double PeakAmplitude(double xFrom, double xTo) const;
80
81private:
82 bool m_active;
83 double m_advanceSpeed;
84 double m_momentum;
85 double m_efflux;
86 double m_initialSigma;
87 double m_zoneEnd;
88 double m_rampLength;
89};
90
106class PropellerJet : public JetField
107{
108public:
109 PropellerJet() = default;
110 ~PropellerJet() override = default;
111
127 void Publish(const JetSourceInput& input, const double velocity[3], double t0, double blendTime, double seabedDepth, bool surfaceImage);
128
131 Status Sample(double t, const double pos[3], JetSample& out) const override;
132
134 JetSampleParts SampleParts(double t, const double pos[3]) const override;
135
147 bool MayReach(const WakeQueryRegion& region) const override;
148
149private:
151 struct Snapshot
152 {
153 double origin[3];
154 double axis[3];
155 double velocity[3];
156 double t0;
157 ImageSet images;
158 JetProfile profile;
159
161 bool Sample(double t, const double pos[3], JetSample& out) const;
162
164 bool MayReach(const WakeQueryRegion& region) const;
165 };
166
168
170 static Status SampleState(const Blend::State* state, double t, const double pos[3], JetSample& out);
171
172 Blend m_blend;
173};
174} // namespace marenv::wake
Definition JetField.h:129
Definition PropellerJet.h:36
double InitialSigma() const
sigma_0 = D_p / sqrt(8), m.
Definition PropellerJet.h:51
double Efflux() const
The efflux velocity Δu₀, m/s; 0 when not active.
Definition PropellerJet.h:48
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:54
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:42
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:60
double RampLength() const
L_ramp = kJetRampFactor D_p, m.
Definition PropellerJet.h:57
double AdvanceSpeed() const
The co-flow speed U = max(u_a, 0), m/s.
Definition PropellerJet.h:45
JetProfile(const JetSourceInput &input)
Definition PropellerJet.h:107
void Publish(const JetSourceInput &input, const double velocity[3], double t0, double blendTime, double seabedDepth, bool surfaceImage)
bool MayReach(const WakeQueryRegion &region) const override
JetSampleParts SampleParts(double t, const double pos[3]) const override
The sample split into the parts the blend weighs (see JetField::SampleParts()).
Status Sample(double t, const double pos[3], JetSample &out) const override
Definition WakeBlend.h:67
Status
Definition marenv.h:40
Definition Kernel.h:130
Definition PropellerJet.h:18
double sigma
Gaussian width sigma across the jet axis, m.
Definition PropellerJet.h:20
double amplitude
Centreline excess velocity S(x / L_ramp) Δu_c(x), m/s; 0 upstream of the propeller plane.
Definition PropellerJet.h:19
Definition JetField.h:87
Definition JetField.h:15
Definition JetField.h:111
Definition WakeField.h:17