swiift.api.spectra¶
Consistant implementations of usual spectral formulations.
Spectra are defined as function of the frequency. Definitions are taken from [1].
References
Classes¶
Class encapsulating the Pierson--Moskowitz spectrum. |
|
Class encapsulating the Bretschneider spectrum. |
|
Class encapsulating the JONSWAP spectrum. |
Module Contents¶
- class swiift.api.spectra.PiersonMoskowitz¶
Bases:
_PMFamilyClass encapsulating the Pierson–Moskowitz spectrum.
- classmethod from_swh(swh, gravity)¶
Build a spectrum parameterised by the SWH.
- Parameters:
- Returns:
Initialised spectrum object.
- Return type:
- classmethod from_peak_frequency(peak_frequency, gravity)¶
Build a spectrum parameterised by the peak frequency.
- Parameters:
- Returns:
Initialised spectrum object.
- Return type:
- class swiift.api.spectra.Bretschneider¶
Bases:
_PMFamilyClass encapsulating the Bretschneider spectrum.
- classmethod from_peak_frequency_swh(peak_frequency, swh)¶
Build a spectrum parameterised by peak frequency and SWH.
- Parameters:
- Returns:
Initialised spectrum.
- Return type:
- class swiift.api.spectra.JONSWAP¶
Bases:
_UnimodalSpectrumClass encapsulating the JONSWAP spectrum.
The JONSWAP spectrum modifies the PM spectrum by introducing a peak enhancement factor.
- _base_spectrum¶
- Type:
- swh()¶
Significant wave height.
The SWH is computed with a cubic approximation.
- Returns:
Significant wave height, in m.
- Return type:
- classmethod from_parameters(peak_frequency, peakedness, gravity)¶
Build a spectrum.
Peak frequency and gravity are used to instantiate the underlying Pierson–Moskowitz spectrum, while peakedness is specific to the JONSWAP formulation.