Hi Jason,

In my efforts to couple in different mooring models, I’ve been working to transmit the discrete wave spectrum generated by FAST to an external model. I am using values from within subroutine InitWaves of height, period, wave number, and phase of each discrete frequency component. These values are sent to external DLL. I am calculating the component wave heights based on the square root of WaveS1Sdd and the component phases using the angle of complex value WGNC.

Using these extracted amplitudes, periods, and phases, I have not been able to reproduce the wave elevation time series generated by FAST, and have absolutely no idea what I am doing wrong. Are there any “tricks” that FAST employs when performs the inverse Fourier transform to generator the wave elevation time series from WaveElevC0 that I may have overlooked?

Thank you for your help!

Dear Matt,

I’m not sure why you can’t reproduce the same wave-elevation time series FAST (HydroDyn) calculates.

Please note that the wave elevation calculation is presented in a misleading way in my 2007 PhD thesis-turned NREL report: www3.interscience.wiley.com/cgi- … 5/PDFSTART (see equation 6). Equation 6 follows the exact definition of the inverse Discrete Fourier Transform (inverse DFT):

x[n] = 1/N*SUM( X[k]**e^(j*2Pi*k*n/N), k = -N/2+1, -N/2+2, …, N/2) for n = 0, 1, … N-1

The corresponding DFT is:

X[k] = SUM( x[n]*e^(-j*2*Pi*k*n/N), n = 0, 1, …, N-1) for k = -N/2+1, -N/2+2, …, N/2

In Equation 6, x[n] is the time series of the wave elevation, zeta(t) at t = n*dt, and X[k] is the DFT of x[n], W[k]**SQRT(2*PiS2(omega)/dt) at omega = k*domega. In the HydroDyn source code, X[k] is represented by variable WaveElevC0 and x[n] is represented by variable WaveElev0.

I hope that helps.

Best regards,

Thanks, Jason. That was just what I needed to get things working. For some reason following equation (6) from the paper I still had discrepancies in the results, but using WaveElevC0 in the equation you typed out worked perfectly.

Best regards,

Matt