FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
Kernel.h
1#pragma once
4
5#include <marenv/wake/WakeTypes.h>
6
7namespace marenv::wake
8{
58double ElementaryDeficit(const ElementarySource& source, const KernelParams& params, const double pos[3]);
59
69void Validate(const KernelParams& params);
70
79{
80 int count;
81 double z[2];
82};
83
89
99{
100 double offset;
101 double sign;
102
104 double QueryDepth(double z) const { return offset + sign * z; }
105
107 double ImageDepth(double z) const { return sign * (z - offset); }
108};
109
114{
115 int count;
117};
118
131
136{
137 double amplitude;
138 double sigma;
139};
140
149{
150public:
153 KernelProfile(const ElementarySource& source, const KernelParams& params);
154
156 double XStart() const { return m_xStart; }
157
159 KernelCentreline At(double x) const;
160
167 double PeakAmplitude(double xFrom, double xTo) const;
168
169private:
171 double CentrelineAmplitude(double x, double pinnedAmplitude) const;
172
174 double LinearSigma(double x) const;
175
177 double Sigma(double x) const;
178
179 double m_diameter;
180 double m_expansion;
181 double m_xStart;
182 double m_thrustCoefficient;
183 double m_nearWakeDeficit;
184 double m_epsilon;
185 double m_plateau;
186 double m_plateauEnd;
187 double m_blendEnd;
188 bool m_porous;
189 double m_farWakeStart;
190 double m_farWakeSigma;
191};
192
200double ElementaryDeficit(const ElementarySource& source, const KernelProfile& profile, const double pos[3]);
201} // namespace marenv::wake
Definition Kernel.h:149
KernelProfile(const ElementarySource &source, const KernelParams &params)
KernelCentreline At(double x) const
Centreline amplitude and sigma at x >= x_start, m along flowDir.
double XStart() const
x_start = max(xStartFactor D, xStartMin), m.
Definition Kernel.h:156
double PeakAmplitude(double xFrom, double xTo) const
double ElementaryDeficit(const ElementarySource &source, const KernelParams &params, const double pos[3])
void Validate(const KernelParams &params)
ImageSet MirrorImages(const KernelParams &params)
ImagePlanes MirrorPlanes(const KernelParams &params)
Definition WakeTypes.h:33
Definition Kernel.h:99
double sign
-1 for a mirror image, +1 for a translated one.
Definition Kernel.h:101
double offset
m.
Definition Kernel.h:100
double QueryDepth(double z) const
Depth at which the source's deficit equals the image's deficit at depth z, m.
Definition Kernel.h:104
double ImageDepth(double z) const
Depth of the image of a source at depth z, m (the inverse of QueryDepth()).
Definition Kernel.h:107
Definition Kernel.h:79
int count
Number of planes, 0 to 2.
Definition Kernel.h:80
double z[2]
Depths of the planes, m: 0 (the free surface) if params.surfaceImage, then params....
Definition Kernel.h:81
Definition Kernel.h:114
ImageMap maps[4]
The images: the first level (MirrorPlanes()), then the second.
Definition Kernel.h:116
int count
Number of images, 0 to 4.
Definition Kernel.h:115
Definition Kernel.h:136
double sigma
Gaussian width sigma across the wake axis, m.
Definition Kernel.h:138
double amplitude
Centreline deficit, the amplitude of the Gaussian.
Definition Kernel.h:137
Definition WakeTypes.h:98