netsse.analys.buoy.Shannon_MEMII_Newton#
- netsse.analys.buoy.Shannon_MEMII_Newton(a1, a2, b1, b2, freq, theta, maxiter, tol_error, miniter=50, approx=False)#
Reconstructs the directional spreading function based on the first four Fourier coefficients of a directional wave spectrum.
The function implements the Maximum Entropy Principle (Hashimoto, 1997), either via running the Newton local linearisation method or following the approximation method by Kim et al. (1994).
- Parameters:
a1 (array_like of shape (Nf,)) – First four Fourier coefficients of the directional wave spectrum.
a2 (array_like of shape (Nf,)) – First four Fourier coefficients of the directional wave spectrum.
b1 (array_like of shape (Nf,)) – First four Fourier coefficients of the directional wave spectrum.
b2 (array_like of shape (Nf,)) – First four Fourier coefficients of the directional wave spectrum.
freq (array_like of shape (Nf,)) – Vector of (discretized) wave frequencies [Hz].
theta (array_like of shape (Ntheta,)) – Vector of wave headings [deg].
maxiter (int) – Maximum number of iterations.
tol_error (float) – Tolerance in the relative error.
miniter (int, default 50) – Minimum number of iterations.
approx (bool, default False) – Boolean which indicates whether the approximation method should be used for finding the Lagrangian multipliers.
- Returns:
D (array_like of shape (Nf,Ntheta)) – Directional spreading function.
flag (array_like of shape (Nf,)) – Boolean flag indicating unconverged frequencies (
flag = 0
for unconverged)L1, L2, L3, L4 (array_like of shape (Nf,)) – Optimized Lagrange multipliers.
See also
cross_spec2Fourier_coef
Computes the Fourier coefficients from the cross-spectra of a heave-East-North wave buoy.
netsse.analys.emep.emep
Extended Maximum Entropy Principle (EMEP) method for reconstructing the directional spreading function based on the cross-power spectra of measured wave-induced responses.
References
Benoit, M., Frigaard, P., & Schäffer, H. A. (1997). Analysing Multidirectional Wave Spectra: A tentative classification of available methods. Proceedings of the 27th IAHR Congress, San Francisco, CA, USA (pp. 131–158). Canadian Government Publishing.
Hashimoto, N. (1997). Analysis of the Directional Wave Spectrum from Field Data. Advances in coastal and ocean engineering. 3:103-44.
Kim, T., Lin, L.-H., & Wang, H. (1994). Application of Maximum Entropy Method to the Real Sea Data. In Coastal Engineering (pp. 340–355).
Example
>>> D, flag, L1, L2, L3, L4 = ... Shannon_MEMII_Newton(a1,a2,b1,b2,freq,theta,maxiter,tol_error,miniter=50,False)