Continuous Spectrums
WaveSpec.ContinuousSpectrums.Bretschneider — Type
Bretschneider(Hs, Tp)Creates a Bretschneider spectrum instance (also known as a Modified Pierson-Moskowitz). - Hs: Significant wave height (m) - Tp: Peak period (s)
The Bretschneider spectrum is self-normalizing and follows an f⁻⁵ slope.
WaveSpec.ContinuousSpectrums.Donelan — Type
Donelan(Hs, Tp, U10)Creates a Donelan spectrum instance. - Hs: Significant wave height (m) - Tp: Peak period (s) - U10: Wind speed at 10m height (m/s)
The Donelan spectrum follows an f⁻⁴ slope in the high-frequency equilibrium range.
WaveSpec.ContinuousSpectrums.JONSWAP — Type
JONSWAP(Hs, Tp, γ=nothing)Creates a JONSWAP (JOint North Sea WAve Project) spectrum instance with given: - significant wave height Hs (m) -> Average height of the highest third of waves - peak period Tp (s) -> Period of waves with the most energy - optional peak enhancement factor γ -> Controls the sharpness/height of the spectrum's peak, If γ is not provided, estimated based on Hs and Tp.
WaveSpec.ContinuousSpectrums.OchiHubble — Type
OchiHubble(Hs1, Tp1, λ1, Hs2, Tp2, λ2)Bimodal spectrum defined by two independent Ochi-Hubble components. Typically Component 1 is Swell and Component 2 is Wind Sea.
WaveSpec.ContinuousSpectrums.RegularWave — Type
RegularWave(H, T)Defines a regular (monochromatic) wave spectrum with: - wave height H (m) - wave period T (s) Implements AbstractSpectrum interface.
WaveSpec.ContinuousSpectrums.TMA — Type
TMA(Hs, Tp, h, γ=nothing)The TMA spectrum (Texel-Marsen-Arsloe) is a shallow-water extension of the JONSWAP spectrum (mathematically defined as a JONSWAP spectrum multiplied by the Kitaigorodskii factor Φ(f, h) ). The Φ function is essentially a depth-scaling law that describes how the equilibrium range of the spectrum (the high-frequency tail) is limited by water depth. In this model we will be implementing a Kitaigorodskii factor (Kitaigorodskii et al. (1975)) approximation.
WaveSpec.ContinuousSpectrums.compute_donelan_normalization — Method
compute_donelan_normalization(γ, fp)Numerical normalization for the Donelan shape.
WaveSpec.ContinuousSpectrums.compute_ochi_component — Method
compute_ochi_component(f, Hs, fp, λ)Calculates the f-based density for a single Ochi component. Formula: S(f) = [ (λ + 1/4) * fp^4 ]^λ / Γ(λ) * [ Hs^2 / 4 * f^(4λ+1) ] * exp[ -(λ + 1/4) * (fp/f)^4 ]
WaveSpec.ContinuousSpectrums.estimate_Hs — Function
estimate_Hs(Tp, γ=3.3)Estimation of Hs, given Tp and gamma
WaveSpec.ContinuousSpectrums.estimate_Tp — Function
estimate_Tp(Hs, γ=3.3)Estimation of Tp, given Hs and gamma
WaveSpec.ContinuousSpectrums.estimate_γ — Method
estimate_γ(Hs, Tp)Estimation of γ, given Hs and Tp
WaveSpec.ContinuousSpectrums.get_Hs — Method
get_Hs(s::AbstractSpectrum)Returns the significant wave height Hs [m] of the spectrum.
WaveSpec.ContinuousSpectrums.get_Hs — Method
get_Hs(s::RegularWave)Returns the wave height (H) for the regular wave.
WaveSpec.ContinuousSpectrums.get_Tp — Method
get_Tp(s::AbstractSpectrum)Returns the peak period Tp [s] of the spectrum.
WaveSpec.ContinuousSpectrums.get_Tp — Method
get_Tp(s::RegularWave)Returns the wave period (T) for the regular wave.
WaveSpec.ContinuousSpectrums.get_alpha — Method
get_alpha(s::JONSWAP)Estimation of α, given JONSWAP parameters
WaveSpec.ContinuousSpectrums.get_cumulative_energy — Method
get_cumulative_energy(s::AbstractSpectrum, f::Real, npoints, method=:symbol, order)Compute the CDF of abstract spectrum at frequency f, using npoints-1 bins and the selected method of integration.
WaveSpec.ContinuousSpectrums.get_density — Method
get_density(s::AbstractSpectrum, f::Real)Returns the spectral density S(f) in [m²s]. Must be implemented by all subtypes.
WaveSpec.ContinuousSpectrums.get_density — Method
get_density(s::Bretschneider, f::Real)Returns the spectral density S(f) [m²s]. Formula: S(f) = (1.25/4) * (Hs²/fp) * (f/fp)⁻⁵ * exp(-1.25 * (f/fp)⁻⁴)
WaveSpec.ContinuousSpectrums.get_density — Method
get_density(s::Donelan, f::Real)Returns the spectral density S(f). Note the f⁻⁴ dependency.
WaveSpec.ContinuousSpectrums.get_density — Method
get_density(s::JONSWAP, f::Real)Returns the spectral density S(f) in [m²s]. Assumes s.Ag is the normalization factor for the f-based JONSWAP.
WaveSpec.ContinuousSpectrums.get_density — Method
get_density(s::OchiHubble, f::Real)Returns the spectral density S(f) [m²s] by summing the two components.
WaveSpec.ContinuousSpectrums.get_density — Method
get_density(s::RegularWave, f::Real)Returns the spectral density S(f) for the regular wave. Implements a Dirac delta: returns H^2/8 at f = 1/T, 0 elsewhere.
WaveSpec.ContinuousSpectrums.get_fmax — Method
get_fmax(s::AbstractSpectrum; multiplier=5.0)Returns a recommended maximum frequency for numerical integration based on the peak frequency: fmax = multiplier * fp. According to literature, fmax between 3 to 5 times fp is sufficient to capture more than 99% of the energy.
WaveSpec.ContinuousSpectrums.get_γ_exponent — Method
get_γ_exponent(s::JONSWAP, fr::Real)Returns the γ exponent b for a given relative frequency fr = f/fp.
WaveSpec.ContinuousSpectrums.integrate — Method
integrate(s::AbstractSpectrum, fmin, fmax; npoints, method=:symbol, order)Returns the numeric integral of the spectrum between fmin and fmax, using npoints-1 bins and the selected method of integration