Standardized wave spectra#

Idealized 1-D spectra#

It is common practice to approximate the actual wave spectrum with a standardized wave spectrum (which there exists many of). waveresponse provides the most common standardized 1D wave spectra.

Pierson-Moskowitz#

Pierson-Moskowitz (PM) type spectra has the following form:

SPM(ω)=Aω5exp(Bω4)

Many of the most common standardized wave spectra today are of the PM type (or extends it). The modified Pierson-Moskowitz spectrum and the JONSWAP spectrum are two examples.

Modified Pierson-Moskowitz#

The modified Pierson-Moskowits spectrum (also known as Bretschneider or ISSC) is given by:

SPM(ω)=516Hs2ωp4ω5exp(54(ωpω)4)

where Hs is the significant wave height and ωp=2πTp is the angular spectral peak frequency.

The ModifiedPiersonMoskowitz class provides functionality for generating a 1-D (modified) Pierson-Moskowitz spectrum given two parameters (i.e., Hs and Tp):

import numpy as np
import waveresponse as wr


freq = np.arange(0.01, 1, 0.01)
spectrum = wr.ModifiedPiersonMoskowitz(freq, freq_hz=True)

hs = 3.5
tp = 10.0
freq, vals = spectrum(hs, tp)

JONSWAP#

The JONSWAP spectrum is given by:

SJ(ω)=αγSPM(ω)γexp((ωωp)22σ2ωp2)

where,

  • SPM(w) is the modified Pierson-Moskowitz (PM) spectrum.

  • γ is a peak enhancement factor.

  • αγ is a normalizing factor.

  • ωp=2πTp is the angular spectral peak frequency.

  • σ is the spectral width parameter, given by:

σ={σaif ωωpσbif ω>ωp

It is common to use σa=0.07 and σb=0.09 (established from experimental data). Then, the normalizing factor becomes αγ=10.287ln(γ), and the JONSWAP spectrum simplifies to a three-parameter spectrum described by Hs, Tp and γ.

The JONSWAP class provides functionality for generating a 1-D JONSWAP spectrum given three parameters (i.e., Hs, Tp and γ):

import numpy as np
import waveresponse as wr


freq = np.arange(0.01, 1, 0.01)
spectrum = wr.JONSWAP(freq, freq_hz=True)

hs = 3.5
tp = 10.0
freq, vals = spectrum(hs, tp, gamma=3.3)

Note

For the special case where γ=1, JONSWAP corresponds to the modified Pierson-Moskowitz spectrum.

The JONSWAP spectrum is expected to be a reasonable model for:

3.6TpHs5

Ochi-Hubble#

The Ochi-Hubble spectrum allows you to set up a double-peaked spectrum that represents sea states which includes both a remotely generated swell component (with low frequency energy) and a locally generated wind component (with high frequency energy). The Ochi-Hubble spectrum is described by six parameters (three for each wave component), and is given by:

SOH(ω)=14j(4qj+14ωpj)qjΓ(qj)Hsj2ω4qj+1exp(4qj+14(ωpjω)4)

where,

  • Hsj is the significant wave height for wave component j.

  • ωpj=2πTpj is the angular spectral peak frequency for wave component j.

  • qi is a spectral shape parameter for wave component j.

The index, j=1,2, represents the lower frequency component (i.e., swell) and higher frequency component (i.e., wind) respectively.

Note

The Ochi-Hubble spectrum is implemented according to the orinal paper by M. K. Ochi and E. N. Hubble published in 1976. Refer to this paper for full implementation details.

The OchiHubble class provides functionality for generating a 1-D Ochi-Hubble spectrum component given three parameters (i.e., Hs, Tp and q). The total spectrum is obtained by adding together the two wave components.

import numpy as np
import waveresponse as wr


freq = np.arange(0.01, 1, 0.01)
spectrum = wr.OchiHubble(freq, freq_hz=True)

# Swell component (i.e., j=1)
hs_swell = 3.5
tp_swell = 10.0
q_swell = 2.0
freq, vals_swell = spectrum(hs_swell, tp_swell, q=q_swell)

# Wind component (i.e., j=2)
hs_wind = 1.5
tp_wind = 5.0
q_wind = 2.0
freq, vals_wind = spectrum(hs_wind, tp_wind, q=q_wind)

# Total wave
vals_tot = vals_swell + vals_wind

Note

For the special case where q=1, Ochi-Hubble corresponds to the modified Pierson-Moskowitz spectrum.

Torsethaugen#

The Torsethaugen spectrum allows you to set up a double-peaked spectrum that represents sea states which includes both a remotely generated swell component (with low frequency energy) and a locally generated wind component (with high frequency energy). The spectral model was developed based on average measured spectra for Norwegian waters (Haltenbanken and Statfjord). The Torsethaugen spectrum is described by two parameter (i.e. Hs and Tp), and is given by:

S(ω)=αγS1(ω;Hs1,Tp1)γexp((ωωp1)22σ2ωp12)+S2(ω;Hs2,Tp2)

where,

Si(ω)=Aiω4exp(Biω4)

Furthermore,

  • Ai=3.2616Hsi2ωpi3

  • Bi=ωpi4

  • Hsi is the significant wave height for wave component i.

  • ωpi=2πTpi is the angular spectral peak frequency for wave component i.

  • γ is a peak enhancement factor.

  • αγ is a normalizing factor.

  • σ is the spectral width parameter, given by:

σ={σaif ωωp1σbif ω>ωp1

Note

The Torsethaugen spectrum is implemented according to the original paper by Torsethaugen and Haver published in 2004. Refer to this paper for full implementation details.

The Torsethaugen class provides functionality for generating a 1-D Torsethaugen spectrum given two parameters (i.e., Hs, Tp):

import numpy as np
import waveresponse as wr


freq = np.arange(0.01, 1, 0.01)
spectrum = wr.Torsethaugen(freq, freq_hz=True)

hs = 3.5
tp = 10.0
freq, vals = spectrum(hs, tp)

Directional spectrum#

The directional spectrum is usually standardized in a similar way as the 1-D frequency spectrum. The standardization is based on expressing the directional spectrum as a product of a frequency spectrum, S(ω), and a directional spreading function, D(θ,ω):

S(ω,θ)=S(ω)D(θ,ω)

Since the frequency spectrum is obtained by integrating the directional spectrum over the directional domain (i.e., [0, 360) degrees, or [0, 2π) radians),

S(ω)=02πS(ω,θ)dθ

we get the following requirement for the spreading function for each frequency, ωi:

02πD(ωi,θ)dθ=1

In general, the spreading function is a function of both frequency, ω, and direction, θ. However, it is common to use the same spreading for all frequencies.

With waveresponse it is easy to construct a (directional) WaveSpectrum object from a 1-D frequency spectrum and a spreading function:

import numpy as np
import waveresponse as wr


freq = np.arange(0.01, 1, 0.01)
dirs = np.linspace(0.0, 360.0, endpoint=False)
hs = 3.5
tp = 10.0
dirp = 45.0

_, spectrum1d = wr.JONSWAP(freq, freq_hz=True)(hs, tp)
spread_fun = wr.CosineFullSpreading(s=2, degrees=True)

wave = wr.WaveSpectrum.from_spectrum1d(
    freq,
    dirs,
    spectrum1d,
    spread_fun,
    dirp,
    freq_hz=True,
    degrees=True,
    clockwise=False,
    waves_coming_from=False,
)

A multimodal wave spectrum (with more than one peak) can be constructed by adding together two (or more) wave spectrum components. E.g., if you have one swell and one wind spectrum component, you can construct a two-peaked directional wave spectrum by:

Stot(ω,θ)=Sswell(ω,θ)+Swind(ω,θ)

This can be done by adding together two different WaveSpectrum objects:

wave_tot = swell + wind

Cosine-2s based spreading#

Standardized spreading functions (denoted κ(θ^) here), are usually defined such that they have their maximum value at θ^=0. From these standardized spreading functions, we can obtain a spreading function with an arbitrary peak direction, θp, by taking:

D(ω,θ)=κ(θθp)

Cosine-based spreading functions are most common. waveresponse provides two variations of the cosine-based spreading: one that spreads the wave energy over the full directional domain, and one that spreads the energy over half the domain.

The CosineFullSpreading class provides directional spreading according to:

κ(θ^)=22s1πΓ2(s+1)Γ2(2s+1)cos2s(θ^2)

where s is a spreading coefficient, and Γ is the Gamma function.

The CosineHalfSpreading class provides directional spreading according to:

κ(θ^)={22sπΓ2(s+1)Γ2(2s+1)cos2s(θ^)if π2θ^π20otherwise

where s is a spreading coefficient, and Γ is the Gamma function.

In addition, the spreading functions in waveresponse cand determine discrete direction bins with equal energy:

import waveresponse as wr


spread_fun = wr.CosineFullSpreading(s=2, degrees=True)
discrete_dirs = spread_fun.discrete_directions(5, direction_offset=0.0)

which may be used to spread 1-D ‘non-directional’ wave spectrum into waves with equal energy.