wecopttool.core.wave_excitation

wave_excitation(exc_coeff, wave)[source]

Calculate the complex, frequency-domain, excitation force due to the wave.

The resulting force is indexed only by frequency and not direction angle. The input wave frequencies must be same as exc_coeff, but the directions can be a subset.

Parameters:
  • exc_coeff (DataArray) – Complex excitation coefficients indexed by frequency, direction angle, and degree of freedom.

  • 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).

Raises:
  • ValueError – If the frequency vectors of exc_coeff and wave are different.

  • ValueError – If any of the directions in wave is not in exc_coeff.

Return type:

ndarray