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

elevation_fd

Construct the complex wave elevation xarray.DataArray.

regular_wave

Create the dataset for a regular wave.

long_crested_wave

Create a complex frequency-domain wave elevation from an omnidirectional spectrum.

irregular_wave

Create a complex frequency-domain wave elevation from a spectrum.

random_phase

Generate random phases in range [-π, π) radians.