|
FhSim
3.1.0
Marine systems simulation
|
#include <WaveCutoffs.h>
Public Attributes | |
| double | depthCutoffEpsilon = 0.0 |
| double | componentTolerance = 0.0 |
Options that make the linear wave classes (AiryWavesScalar, AiryWavesSimd) cheaper by dropping the part of the
wave field that is too small to matter at depth. Both options are off by default (0): then the results are those of a field built without this struct, bit for bit. The elevation and the surface normal are never changed. Gerstner waves ignore the struct.
Depth decay. A component of amplitude a, wave number k and depth h has, at depth z (down from the mean surface), the decay d(z) = e^{-kz} over deep water and cosh(k (h - z)) / cosh(k h) over depth h (z limited to the seabed). The horizontal velocity, the accelerations and the dynamic pressure of the component are proportional to d(z); the vertical velocity and acceleration to sinh(k (h - z)) / cosh(k h), which is not larger than d(z).
| double marenv::wave::WaveCutoffs::componentTolerance = 0.0 |
Component truncation (HP-7). 0 is off. With a tolerance tol > 0 [m], a query leaves out every component whose
a d(z) is below tol, in the velocity, the acceleration and the dynamic pressure (and in the total pressure through it). The elevation and the surface normal use all components. AiryWavesSimd sorts its components by wave number when this option is on (and only then), so a SIMD batch group with no component above tol is skipped as a whole; the sum order of the elevation changes then, which is rounding only. AiryWavesScalar tests each component. AiryWavesSimd skips a batch only when every one of its components, and all of the batches after it, are below tol, so it skips a subset of what AiryWavesScalar skips.
Error bound: with S the skipped components, each has a_i d_i(z) < tol. The error of the dynamic pressure is smaller than rho g sum_S |a_i| d_i(z) (less than |S| rho g tol), of the velocity smaller than sum_S |a_i| d_i(z) g k_i / omega_i, of the acceleration smaller than sum_S |a_i| d_i(z) g k_i. The sum of the skipped amplitudes |a_i| d_i(z) bounds all three.
| double marenv::wave::WaveCutoffs::depthCutoffEpsilon = 0.0 |
Depth cutoff (HP-6). 0 is off. With eps in (0, 1), a point deeper than the depth where every component has d(z) < eps
gets zero velocity, zero acceleration and zero dynamic pressure. The total pressure there is the hydrostatic part rho g z only. The cutoff depth is the largest z_i = ln(1/eps)/k_i over the components over deep water (the smallest wave number k_min gives the deepest one), and h - acosh(eps cosh(k h))/k for a component over finite depth, which has no cutoff when eps cosh(k h) <= 1. For finite depth this is the cosh decay, which is larger than the deep-water bound e^{-kz}, so the cut is made deeper, never shallower, than the deep-water rule says.
Error bound: below the cutoff each component has d(z) < eps, so the dropped part is smaller than eps sum |a_i| g k_i / omega_i in the velocity (each component), eps sum |a_i| g k_i in the acceleration and eps rho g sum |a_i| in the dynamic pressure. The recommended value is 0.01.