wecopttool.pto.PTO.average_power

PTO.average_power(wec, x_wec, x_opt, wave=None, nsubsteps=1)[source]

Calculate the average power in each PTO DOF for a given system state.

Parameters:
  • wec (WEC) – wecopttool.WEC object.

  • x_wec (ndarray) – WEC dynamic state.

  • x_opt (ndarray) – Optimization (control) state.

  • wave (DataArray | None) – 2D xarray.DataArray containing the wave’s complex amplitude for a single realization as a function of wave angular frequency omega (rad/s) and direction wave_direction (rad).

  • nsubsteps (int | None) – Number of steps between the default (implied) time steps. A value of 1 corresponds to the default step length.

Return type:

float