wecopttool.waves
Provide the wave definition structure and provide functions for creating different common types of waves.
This module provides the (empty) data structure for waves in
wecopttool
.
It also provides functions for creating common types of waves such as
regular waves and irregular waves.
The data structure is a 2D complex xarray.DataArray
containing the complex amplitude.
The 2D coordinates are: wave angular frequency omega
(rad/s)
and direction wave_direction
(rad).
This module uses wave spectrum data in the
wavespectra.SpecArray
format, but does not require that you
use wavespectra.SpecArray
objects.
Functions
Construct the complex wave elevation |
|
Create the dataset for a regular wave. |
|
Create a complex frequency-domain wave elevation from an omnidirectional spectrum. |
|
Create a complex frequency-domain wave elevation from a spectrum. |
|
Generate random phases in range [-π, π) radians. |
|
Create the |
|
Create the |
|
Calculate the Pierson-Moskowitz omni-directional wave spectrum for the specified frequencies and parameters. |
|
Calculate the Joint North Sea Wave Project (JONSWAP) omni-directional wave spectrum for the specified frequencies and parameters. |
|
Calculate the Cosine-2s spreading function for the specified frequencies and wave directions. |
|
Create a spectrum function. |
|
Return the two PM parameters for the general spectrum formulation. |