wecopttool.core.WEC.residual

WEC.residual(x_wec, x_opt, wave)[source]

Return the residual of the dynamic equation (r = m⋅a-Σf).

Parameters:
  • x_wec (ndarray) – WEC state vector.

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

  • wave (DataArray) – 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).

Return type:

float