Martin7
Martin7

Reputation: 105

Welch periodogram for turbulence spectrum

I am trying to compute the turbulence density spectrum with a Welch periodogram. The results seem good but I do not manage to find the fluctuation of streamwise velocity that I am supposed to find when computing the integral of the spectrum.

Here is my code:

sr = 833.3  # Sampling rate i.e. samples per second (1/dt with dt=0.0012)
Nysquid = sr/2

# Perform Welch's periodogram with Hann window and 50% overlap
seg_len = 4
segment = int(seg_len * sr)
myhann = signal.get_window('hann', segment)

# obtain Power density with Hann window and 50% overlap
myparams2 = dict(fs = sr, nperseg = segment, window = myhann, 
                 noverlap = segment/2, scaling = 'density', return_onesided=True)

# xdat is an array composed of the streamwise velocity at a given
# location and for many times.
freqn, xn = signal.welch(x = xdat, **myparams2)

I compute the velocity fluctuation from the measured data as:

U = xdat
U_std = np.std(U)
print("uu=", 0.5 * U_std**2) 

I should be able to recover this value by integrating the spectrum but I do not succeed in it.

What is the expression I should you to recover the velocity fluctuation using the energy spectrum?

Thanks a lot

Upvotes: 0

Views: 52

Answers (0)

Related Questions