Skip to content

Time series generation

Pete Bachant edited this page Jan 29, 2014 · 2 revisions

Once a random wave spectrum has been computed, it is converted to the time domain using an inverse fast Fourier transform with a random (normally-distributed) phase for each component, i.e.,

<math> \eta(t) = IFFT \left( e^{i \phi}\sqrt{S N \frac{1}{\Delta t} } \right), </math>

where <math>\phi</math> is the phase, <math>N</math> is the number of frequencies, and <math>1/\Delta t</math> is the sample rate of the time series.

In code:

phase = np.random.normal(0, pi, len(spec))
ts = np.fft.irfft(np.sqrt(spec*len(spec)*sr)*np.exp(1j*phase))

Alternative approach

This approach is currently not used in the application.

Once a wave spectrum is specified, the amplitude of each frequency component, <math>A_j</math>, is found as

<math> A_j= [2S(\omega_j)\Delta\omega]^{\frac{1}{2}}. </math>

The surface elevation time series, <math>\eta</math>, is then found as

<math> \eta(t) =\sum\limits_{j=1}^N A_j \sin(\omega_j t - k_j x + \epsilon_j), </math>

where <math>N</math> is the number of frequency components in the random sea, <math>t</math> is time, <math>k_j</math> is the wave number associated with the frequency (found by the dispersion relation), and <math>\epsilon_j</math> is a random phase distributed evenly between 0 and 2<math>\pi</math>. <math>\zeta</math> is in meters if <math>S(\omega)</math> has units of <math>m^2/\frac{\mathrm{rad}}{s}</math> (wave energy per frequency band) [1].

Clone this wiki locally