wecopttool.waves.spread_cos2s

spread_cos2s(freq, directions, dm, fp, s_max)[source]

Calculate the Cosine-2s spreading function for the specified frequencies and wave directions.

This is included as one example of a spreading function.

Return is in units of \(1/degrees\).

Parameters:
  • freq (float | ArrayLike) – Wave frequencies in Hz.

  • directions (float | ArrayLike) – Wave directions relative to mean/wind direction in degrees.

  • dm (float) – Mean wave direction in degrees.

  • fp (float) – Peak frequency of the sea-state in \(Hz\).

  • s_max (float) – The spreading parameter. Larger values corresponds to less spread. For fully developed seas a value of 10 is a good choice.

Return type:

float | ndarray