|
FhSim
3.1.0
Marine systems simulation
|
#include <LineKernel.h>
Public Member Functions | |
| LineKernelProfile (const LineSource &source, const KernelParams ¶ms) | |
| double | XStart () const |
| x_start = max(xStartFactor w, xStartMin), m. | |
| const double * | Position () const |
| Centre of the line, m, NED. | |
| LineCoordinates | Coordinates (const double pos[3]) const |
| Position of pos in the wake coordinates of the source. | |
| KernelCentreline | At (double x) const |
| Centreline amplitude A(x) and sigma at x >= x_start, m along flowDir; the amplitude is that of an infinitely long line (envelope 1). | |
| double | Amplitude (double sigma, double envelope) const |
| Centreline amplitude of the wake of sigma where the line carries the share envelope in [0, 1] of its momentum per unit length (the span envelope E(x, s)). | |
| double | PeakAmplitude (double xFrom, double xTo) const |
| double | HalfSpan () const |
| Projected half-length of the source, m. | |
The kernel of LineDeficit() along one line source's wake.
With L the length of the source projected on the plane normal to the flow (length times |axis x flowDir|), w its width, m' = M / L the momentum deficit per unit length, C_T = min(M / (L w), 0.96), the kernel is a plane wake:
d(x, y, s) = A(x, s) exp(-y^2 / (2 sigma(x)^2)) for x >= x_start = max(xStartFactor w, xStartMin), else 0, with A the centreline amplitude below.
The width is that of the axisymmetric kernel with w for D: sigma = k x + epsilon w with the epsilon of Bastankhah and Porte-Agel (2014), up to x_f = max(farWakeStartFactor w, x_p), and beyond it the plane-wake similarity sigma = sigma_f (1 + 2 k (x - x_f) / sigma_f)^(1/2), so sigma^2 is linear in x and sigma and its slope are continuous at x_f; farWakeStartFactor = infinity keeps the linear growth. The centreline amplitude keeps the momentum of a Gaussian plane wake, integral d (1 - d) dy = m' / 2, which gives C(x) = (1 - sqrt(1 - m' / (sqrt(pi) sigma))) / sqrt(2), and C = 1 / sqrt(2), the largest value, where the radicand is negative (close to the source). A(x) = min(C(x), d_near) with the momentum-theory near wake d_near = 1 - sqrt(1 - C_T), so the amplitude does not rise with x. x_p is where C reaches min(d_near, 1 / sqrt(2)) (owner ruling R128, as C(x_p) = d_mom of the axisymmetric kernel): sigma_p = m' / (2 sqrt(pi) (sqrt(2) d - d^2)) with that d, which is m' / sqrt(pi) for C_T >= 0.914. Before x_p the amplitude is capped and the wake carries less than M, in proportion to sigma (as MENV-0030 for the axisymmetric kernel); from x_p on it carries all of it. Far downstream C ~ 1 / sigma ~ x^(-1/2).
Along the span the wake ends smoothly: E(x, s) = (erf((s + L / 2) / (sqrt(2) sigma)) - erf((s - L / 2) / (sqrt(2) sigma))) / 2, a box of the projected length convolved with a Gaussian of the same sigma, so integral E ds = L at every x. The line carries the share E of its momentum per unit length at s: d(x, y, s) = min(C(m' E, sigma), d_near) exp(-y^2 / (2 sigma^2)), so integral d (1 - d) dy = m' E / 2 at every s and the momentum through a plane, integral of that over s, is M / 2 from x_p on, where the amplitude is no longer capped. The wake spreads along the span as it does across it.
| marenv::wake::LineKernelProfile::LineKernelProfile | ( | const LineSource & | source, |
| const KernelParams & | params | ||
| ) |
| [in] | source | The line source; flowDir need not be normalised here. |
| [in] | params | The kernel parameters (expansion, xStartFactor, xStartMin, farWakeStartFactor). |
| std::invalid_argument | for a non-finite position, direction, length, width or momentum deficit, a non-positive length or width, a negative momentum deficit, a zero flowDir or axis, or an axis parallel to flowDir. |
| double marenv::wake::LineKernelProfile::PeakAmplitude | ( | double | xFrom, |
| double | xTo | ||
| ) | const |
Upper bound of At(x).amplitude for x in [xFrom, xTo], x_start <= xFrom <= xTo, m.
The amplitude does not rise with x (k >= 0, which Validate() requires of the fields), so the bound is its value at xFrom.