FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
WakeTypes.h
1#pragma once
7
8#include <limits>
9#include <vector>
10
11namespace marenv::wake
12{
21{
22 double deficit;
23 double sourceVelocity[3];
24};
25
27inline constexpr int kUntaggedSource = -1;
28
36{
37 double pos[3];
38 double flowDir[3];
39 double area;
41 double solidity = 0.0;
42 int tag = kUntaggedSource;
43};
44
55{
56 double pos[3];
57 double flowDir[3];
58 double axis[3];
59 double length;
60 double width;
62};
63
70{
71 double origin[3];
72 double axes[3][3];
73 double velocity[3];
74 double t0;
75};
76
81{
83 double halfWidth;
84 double halfHeight;
86 int n[3];
87};
88
92enum class Superposition
93{
94 Product,
96};
97
102{
103 double expansion = 0.05;
104 double cutoff = 1e-3;
105 double xStartFactor = 0.5;
106 double xStartMin = 0.02;
107 double rampFactor = 0.0;
108 double farWakeStartFactor = 10.0;
109 bool surfaceImage = true;
110 double seabedDepth = std::numeric_limits<double>::infinity();
112};
113
118{
119 std::vector<ElementarySource> points;
120 std::vector<LineSource> lines;
121};
122
124struct GriddedSnapshot;
125
127class SourceSetWake;
128
130class GriddedWake;
138{
139 double deficit;
140 double sourceVelocity[3];
142 double jetVelocity[3] = {};
143 int numJets = 0;
144
146 void Apply(double vel[3]) const;
147};
148} // namespace marenv::wake
Definition GriddedWake.h:112
Definition SourceSetWake.h:111
Superposition
Definition WakeTypes.h:93
@ MomentumFlux
D (1 - D) = sum d_i (1 - d_i), the momentum flux kept point by point (R95, replacing R88's min(1,...
@ Product
d = 1 - prod(1 - d_i), screens in series (KF2012 Eq. 15): for sources whose M is normalised by their ...
Definition WakeTypes.h:36
double area
The panel's own area, m^2; the footprint is D = sqrt(4 area / pi).
Definition WakeTypes.h:39
double solidity
Solidity Sn of a porous panel, for nets the calculated solidity Snc (R56); Sn > 0 selects the MF2022 ...
Definition WakeTypes.h:41
double pos[3]
Source centroid, m, NED.
Definition WakeTypes.h:37
int tag
The caster's id of the source (a net's panel, a body), for leaving it out of a query at its own sampl...
Definition WakeTypes.h:42
double momentumDeficit
M = drag / (0.5 rho |U|^2), m^2; the effective thrust coefficient is C_T,eff = M / area.
Definition WakeTypes.h:40
double flowDir[3]
Unit direction of the relative flow at the source (along the wake axis), NED.
Definition WakeTypes.h:38
Definition WakeTypes.h:81
double halfHeight
Half extent along axes[2], m.
Definition WakeTypes.h:84
int n[3]
Number of cells along each frame axis.
Definition WakeTypes.h:86
double halfWidth
Half extent along axes[1], m.
Definition WakeTypes.h:83
double lengthDownstream
Extent along axes[0] downstream of the origin, m.
Definition WakeTypes.h:82
double upstreamMargin
Extent along axes[0] upstream of the origin, m.
Definition WakeTypes.h:85
Definition GriddedWake.h:24
Definition WakeTypes.h:102
double xStartFactor
x_start = max(xStartFactor * D, xStartMin).
Definition WakeTypes.h:105
Superposition superposition
How the field composes its sources and their images (R88, R95); lumped fields set MomentumFlux; WakeB...
Definition WakeTypes.h:111
double rampFactor
Onset ramp L_ramp = rampFactor * D (w for a line source): the kernel times the smoothstep of (x - x_s...
Definition WakeTypes.h:107
double farWakeStartFactor
x_f = max(farWakeStartFactor * D, x_p): from x_f on the wake is the self-similar far wake,...
Definition WakeTypes.h:108
bool surfaceImage
Mirror image of every source at the free surface z = 0, so no wake momentum leaves the water (R53); w...
Definition WakeTypes.h:109
double xStartMin
Minimum x_start, m.
Definition WakeTypes.h:106
double expansion
Wake expansion rate k in sigma/D = k x/D + epsilon (Bastankhah and Porte-Agel 2014).
Definition WakeTypes.h:103
double seabedDepth
Depth of the flat seabed plane of the seabed image (R53), m, > 0; infinity: no seabed image....
Definition WakeTypes.h:110
double cutoff
Deficit below which a footprint is truncated.
Definition WakeTypes.h:104
Definition WakeTypes.h:55
double flowDir[3]
Unit direction of the relative flow at the source (along the wake), NED.
Definition WakeTypes.h:57
double axis[3]
Direction of the body's long axis, NED; not necessarily normal to flowDir, but not parallel to it.
Definition WakeTypes.h:58
double pos[3]
Centre of the line, m, NED; for a lumped source the centre of its rear face.
Definition WakeTypes.h:56
double width
Width of the body across the flow and across its projected axis, m; the footprint normal to the flow ...
Definition WakeTypes.h:60
double momentumDeficit
M = drag / (0.5 rho |U|^2), m^2; the effective thrust coefficient is C_T,eff = M / (projected length ...
Definition WakeTypes.h:61
double length
Length of the body along axis, m.
Definition WakeTypes.h:59
Definition WakeTypes.h:118
std::vector< ElementarySource > points
Elementary (axisymmetric) sources, world NED at the publish time t0.
Definition WakeTypes.h:119
std::vector< LineSource > lines
Line sources of slender bodies (MENV-0044), world NED at t0.
Definition WakeTypes.h:120
Definition WakeTypes.h:138
int numSources
Number of wake fields with a non-zero deficit.
Definition WakeTypes.h:141
double sourceVelocity[3]
Deficit-weighted mean of the source velocities u_s,i, m/s, NED; zero when d_tot = 0.
Definition WakeTypes.h:140
void Apply(double vel[3]) const
Applies the wake in place to a water velocity: vel += d_tot (u_s - vel), then vel += sum Δu_j if any ...
int numJets
Number of jet fields with a finite, non-zero excess velocity.
Definition WakeTypes.h:143
double deficit
d_tot = 1 - (1 - D) (1 - d_own), D the momentum-flux composition of the registered d_i (R95),...
Definition WakeTypes.h:139
double jetVelocity[3]
Sum of the jet fields' excess velocities Δu_j, m/s, NED (ADR 0003).
Definition WakeTypes.h:142
Definition WakeTypes.h:70
double t0
Reference time of origin, s.
Definition WakeTypes.h:74
double velocity[3]
Frame translation velocity, m/s, NED.
Definition WakeTypes.h:73
double origin[3]
Frame origin at t0, m, NED.
Definition WakeTypes.h:71
double axes[3][3]
Rows are the unit frame axes in NED; axes[0] is the mean relative flow direction.
Definition WakeTypes.h:72
Definition WakeTypes.h:21
double sourceVelocity[3]
Deficit-weighted source velocity u_s of the contributing sources, m/s, NED.
Definition WakeTypes.h:23
double deficit
Combined velocity deficit d in [0, 1]; the velocity ratio is r = 1 - d.
Definition WakeTypes.h:22