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:
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:
where \(H_s\) is the significant wave height and \(\omega_p = \frac{2\pi}{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.,
\(H_s\) and \(T_p\)):
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:
where,
\(S_{PM}(w)\) is the modified Pierson-Moskowitz (PM) spectrum.
\(\gamma\) is a peak enhancement factor.
\(\alpha_{\gamma}\) is a normalizing factor.
\(\omega_p = \frac{2\pi}{Tp}\) is the angular spectral peak frequency.
\(\sigma\) is the spectral width parameter, given by:
It is common to use \(\sigma_a = 0.07\) and \(\sigma_b = 0.09\) (established from experimental data). Then, the normalizing factor becomes \(\alpha_{\gamma} = 1 - 0.287 \cdot ln(\gamma)\), and the JONSWAP spectrum simplifies to a three-parameter spectrum described by \(H_s\), \(T_p\) and \(\gamma\).
The JONSWAP class provides functionality for generating a 1-D
JONSWAP spectrum given three parameters (i.e., \(H_s\), \(T_p\) and \(\gamma\)):
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 \(\gamma = 1\), JONSWAP corresponds to the modified Pierson-Moskowitz spectrum.
The JONSWAP spectrum is expected to be a reasonable model for:
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:
where,
\(H_{sj}\) is the significant wave height for wave component \(j\).
\(\omega_{pj} = \frac{2\pi}{T_{pj}}\) is the angular spectral peak frequency for wave component \(j\).
\(q_i\) 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., \(H_s\), \(T_p\)
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. \(H_s\) and \(T_p\)), and is given by:
where,
Furthermore,
\(A_i = \frac{3.26}{16} H_{si}^2 \omega_{pi}^3\)
\(B_i = \omega_{pi}^4\)
\(H_{si}\) is the significant wave height for wave component \(i\).
\(\omega_{pi} = \frac{2\pi}{T_{pi}}\) is the angular spectral peak frequency for wave component \(i\).
\(\gamma\) is a peak enhancement factor.
\(\alpha_{\gamma}\) is a normalizing factor.
\(\sigma\) is the spectral width parameter, given by:
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., \(H_s\), \(T_p\)):
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(\omega)\), and a directional spreading function, \(D(\theta, \omega)\):
Since the frequency spectrum is obtained by integrating the directional spectrum over the directional domain (i.e., [0, 360) degrees, or [0, 2\(\pi\)) radians),
we get the following requirement for the spreading function for each frequency, \(\omega_i\):
In general, the spreading function is a function of both frequency, \(\omega\), and direction, \(\theta\). 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:
This can be done by adding together two different WaveSpectrum objects:
wave_tot = swell + wind
Cosine-2s based spreading#
Standardized spreading functions (denoted \(\kappa(\hat{\theta})\) here), are usually defined such that they have their maximum value at \(\hat{\theta} = 0\). From these standardized spreading functions, we can obtain a spreading function with an arbitrary peak direction, \(\theta_p\), by taking:
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:
where \(s\) is a spreading coefficient, and \(\Gamma\) is the Gamma function.
The CosineHalfSpreading class provides directional spreading
according to:
where \(s\) is a spreading coefficient, and \(\Gamma\) 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.