CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Input values in Energy Spectra (https://www.cfd-online.com/Forums/main/241109-input-values-energy-spectra.html)

MichaelBham February 9, 2022 01:12

Input values in Energy Spectra
 
Dear all,

I read several threads about how to calculate energy spectra and they said it should be about the instantaneous velocity field. However, in Pope's book, it takes the two-point correlation first, in which the velocity fluctuation u' (u - u(mean on time)) is involved.

Moreover, the turbulent kinetic energy is the integral of E(k) on k (the area under E line in the E-k plot), which further shows that E should be about the fluctuation u' instead of the instantaneous velocity u.

I know this question may be very fundamental but I am really confused. Which property should I use to get the energy spectra to verify Kolmogorov -5/3 Law?

Greetings




P.S.

Here is how I calculate energy speactra (for 2D):

1. Get the Fourier Transform of the velocity (u or u' I am not sure) field F(u) and F(v). Their wavenumber kx and ky are also obtained.

2. phi = F(u)*(F(u).conjugate) + F(v)*(F(v).conjugate). With the correlation theorem the correlation process can be simplified.

3. For a specific wavenumber k, E(k) = sum(phi) with its sqrt(kx**2 + ky**2) between (k - 1/2 dk) and (k + 1/2 dk).

FMDenaro February 9, 2022 04:21

You can also compute the 1d spectra. That is quite common in literature.

MichaelBham February 9, 2022 07:15

Quote:

Originally Posted by FMDenaro (Post 821921)
You can also compute the 1d spectra. That is quite common in literature.

Hi, I mean, should I use u or u' for the energy spectra? Many thanks.

FMDenaro February 9, 2022 08:02

Quote:

Originally Posted by MichaelBham (Post 821944)
Hi, I mean, should I use u or u' for the energy spectra? Many thanks.

The contribution given by the steady mean velocity appears only in the zero-th Fourier coefficient, thus don’t worry much about the difference.

MichaelBham February 9, 2022 09:22

Quote:

Originally Posted by FMDenaro (Post 821955)
The contribution given by the steady mean velocity appears only in the zero-th Fourier coefficient, thus don’t worry much about the difference.

The time-mean velocity is not a constant among the spatial field so that the Fourier transform of u and u' is totally different. By 'zero-th Fourier coefficient' do you mean the 0-wavenumber term in the FFT result, like the difference between FFT(0,1,0,1) and FFT(1,2,1,2)?

Here the difference is (1,1,1,1) so that only the 0-wavenumber term in the FFT result will be influenced. However, the time-mean velocity field may be like (0.5,0.2,-0.1,0.6) and FFT(0,1,0,1) and FFT(0.5,1.2,-0.1,1.6) will be totally different. I tried u and u' for the spectra, they have different results but both were close to Kolmogorov -5/3 law. This law is obtained by u', rather than u. Is it correct?

FMDenaro February 9, 2022 09:30

Quote:

Originally Posted by MichaelBham (Post 821963)
The time-mean velocity is not a constant among the spatial field so that the Fourier transform of u and u' is totally different. By 'zero-th Fourier coefficient' do you mean the 0-wavenumber term in the FFT result, like the difference between FFT(0,1,0,1) and FFT(1,2,1,2)?

Here the difference is (1,1,1,1) so that only the 0-wavenumber term in the FFT result will be influenced. However, the time-mean velocity field may be like (0.5,0.2,-0.1,0.6) and FFT(0,1,0,1) and FFT(0.5,1.2,-0.1,1.6) will be totally different.


In general yes, the mean field has a spectral distribution due to possibile variability in space but as the original question in the post concerne the comparison with the inertial range -5/3 I suppose that the flow problem is standard, like homogeneous turbulence (no variation, zero mean) or channel flow (mean velocity varies only in vertical direction not along the homogeneous directions).

MichaelBham February 9, 2022 09:45

Quote:

Originally Posted by FMDenaro (Post 821965)
In general yes, the mean field has a spectral distribution due to possibile variability in space but as the original question in the post concerne the comparison with the inertial range -5/3 I suppose that the flow problem is standard, like homogeneous turbulence (no variation, zero mean) or channel flow (mean velocity varies only in vertical direction not along the homogeneous directions).

Actually it is the benchmark driven-lid cavity case, which is not homogeneous. Does Kolmogorov law still apply to such case? If yes, which (u or u') should be used for the energy spectra, as the time-mean velocity field varies in both x and y directions?

LuckyTran February 9, 2022 09:53

If you're really unsure and want to do things the "right" way then use the u'. Now the issue you will encounter is how the heck do you get u' in practice because you don't know the mean field without running the entire simulation first. Then you have to go back and subtract the mean from u at every spacetime to get u'. This is impossible if you didn't save u at every location at every time. Even if you did save it, you're probably out of hard disk space unless you are working on small calculations like an individual line. Hence, ppl that have experience calculating these spectra will abuse certain similarities of the transforms of u and u'.

If you have a spatially varying mean flow (i.e. anything that isn't a uniform flow) then you have two-point correlations that end up depending on the x-coordinate and spectra with different y-intercepts E(k=0) at each spatial location: i.e. you have E(x,k) instead of E(k) but really the spatial mean flow is described by E(x,k=0) an the energy spectrum at values of k not zero will be proportional to the mean flow at k=0. So yes it change the scales when you plot the spectrum of u and u' side by side, but you can math it back together. And it doesn't affect the shape/slope.


I also do not have any experience with the lid-driven cavity problem to tell you what the spectra is supposed to look like.

FMDenaro February 9, 2022 10:02

Quote:

Originally Posted by MichaelBham (Post 821967)
Actually it is the benchmark driven-lid cavity case, which is not homogeneous. Does Kolmogorov law still apply to such case? If yes, which (u or u') should be used for the energy spectra, as the time-mean velocity field varies in both x and y directions?

No, you cannot compute that from a 2d lid driven cavity flow. Be aware that the flow is totally confined. The only case I can think could produce some similar behavior to be compared at the inertial range is the 3d lid driven cavity but with the periodic spanwise direction. And you can check the 1d spectra along such direction but only in the center of the cavity, far from the walls.
But I am not aware of published results about this test problem.

FMDenaro February 9, 2022 10:28

Quote:

Originally Posted by LuckyTran (Post 821969)
If you're really unsure and want to do things the "right" way then use the u'. Now the issue you will encounter is how the heck do you get u' in practice because you don't know the mean field without running the entire simulation first. Then you have to go back and subtract the mean from u at every spacetime to get u'. This is impossible if you didn't save u at every location at every time. Even if you did save it, you're probably out of hard disk space unless you are working on small calculations like an individual line. Hence, ppl that have experience calculating these spectra will abuse certain similarities of the transforms of u and u'.

If you have a spatially varying mean flow (i.e. anything that isn't a uniform flow) then you have two-point correlations that end up depending on the x-coordinate and spectra with different y-intercepts E(k=0) at each spatial location: i.e. you have E(x,k) instead of E(k) but really the spatial mean flow is described by E(x,k=0) an the energy spectrum at values of k not zero will be proportional to the mean flow at k=0. So yes it change the scales when you plot the spectrum of u and u' side by side, but you can math it back together. And it doesn't affect the shape/slope.


I also do not have any experience with the lid-driven cavity problem to tell you what the spectra is supposed to look like.




That's right but if one wants to compute an energy spectra along a direction, the use of the FFT implies that such direction is of homogeneity for the flow, thus there is no possibility for the statistics to depend on the position. On the other hand, if the flow is not homogeneous the periodicity does not apply and the method must be changed.

LuckyTran February 9, 2022 11:14

Quote:

Originally Posted by FMDenaro (Post 821973)
That's right but if one wants to compute an energy spectra along a direction, the use of the FFT implies that such direction is of homogeneity for the flow, thus there is no possibility for the statistics to depend on the position. On the other hand, if the flow is not homogeneous the periodicity does not apply and the method must be changed.


I would normally assume that either windowing or periodic extensions are being applied such that the FFT makes sense and the person using it knows what they're doing to interpret such results but since you brought it up... and the person asking the question actually has this specific confusion... yeah you should only try to calculate spectra along homogeneous directions for statistical reasons, otherwise you can confuse the hell out of yourself with the results.


This example is actually the reason why it really doesn't matter if you try to calculate energy spectra using u or u'. If they're different beyond the zero-frequency coefficient then you shouldn't have been trying to do it in the first place because you're not doing the proper statistic treatment of the flow along homogeneous directions.

MichaelBham February 14, 2022 23:11

Quote:

Originally Posted by FMDenaro (Post 821973)
That's right but if one wants to compute an energy spectra along a direction, the use of the FFT implies that such direction is of homogeneity for the flow, thus there is no possibility for the statistics to depend on the position. On the other hand, if the flow is not homogeneous the periodicity does not apply and the method must be changed.

Quote:

Originally Posted by LuckyTran (Post 821977)
I would normally assume that either windowing or periodic extensions are being applied such that the FFT makes sense and the person using it knows what they're doing to interpret such results but since you brought it up... and the person asking the question actually has this specific confusion... yeah you should only try to calculate spectra along homogeneous directions for statistical reasons, otherwise you can confuse the hell out of yourself with the results.


This example is actually the reason why it really doesn't matter if you try to calculate energy spectra using u or u'. If they're different beyond the zero-frequency coefficient then you shouldn't have been trying to do it in the first place because you're not doing the proper statistic treatment of the flow along homogeneous directions.



Thanks a lot.

For a 2D channel flow, in which the flow is along x direction:

(1) x direction is homogeneous since u = u(y).
(2) The energy spectra should only be applied to u/u' along x line (1D).

Is it correct?

FMDenaro February 15, 2022 03:17

Quote:

Originally Posted by MichaelBham (Post 822301)
Thanks a lot.

For a 2D channel flow, in which the flow is along x direction:

(1) x direction is homogeneous since u = u(y).
(2) The energy spectra should only be applied to u/u' along x line (1D).

Is it correct?

Yes, you can compute the 1d spectra at different vertical directions y.
But if you have a 2D code that makes no physical meaning, is only an exercise.


All times are GMT -4. The time now is 16:45.