wecopttool.ncomponents

ncomponents(nfreq, zero_freq=True)[source]

Number of Fourier components (2*nfreq) for each DOF. The sine component of the highest frequency (the 2-point wave) is excluded as it will always evaluate to zero.

If zero_freq = False (not default), the mean (DC) component X0 is excluded, and the number of components is reduced by 1.

Parameters:
  • nfreq (int) – Number of frequencies.

  • zero_freq (bool | None) – Whether to include the zero-frequency.

Return type:

int