wecopttool.waves.regular_wave

regular_wave(f1, nfreq, freq, amplitude, phase=None, direction=0.0)[source]

Create the dataset for a regular wave.

Parameters:
  • f1 (float) – Fundamental frequency f1 [Hz].

  • nfreq (int) – Number of frequencies (not including zero frequency), i.e., freq = [0, f1, 2*f1, ..., nfreq*f1].

  • freq (float) – Frequency (in Hz) of the regular wave. If freq is not in the frequency array, the closest value is used and a warning is displayed.

  • amplitude (float) – Amplitude (in meters) of the regular wave.

  • phase (float | None) – Phase (in degrees) of the regular wave.

  • direction (float) – Direction (in degrees) of the regular wave.

Return type:

DataArray