wecopttool.time

time(f1, nfreq, nsubsteps=1)[source]

Assemble the time vector with nsubsteps subdivisions.

Returns the 1D time vector, in seconds, starting at time 0, and not containing the end time tf=1/f1. The time vector has length (2*nfreq)*nsubsteps. The timestep length is dt = dt_default * 1/nsubsteps, where dt_default=tf/(2*nfreq).

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

  • nfreq (int) – Number of frequencies.

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

Return type:

ndarray