CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Calculating resolved turbulent kinetic energy for nonstationary flow (https://www.cfd-online.com/Forums/openfoam-solving/235285-calculating-resolved-turbulent-kinetic-energy-nonstationary-flow.html)

Jasper Z April 8, 2021 15:21

Calculating resolved turbulent kinetic energy for nonstationary flow
 
1 Attachment(s)
Dear Foamers,

I am struggling with the method of calculating resolved turbulent kinetic energy in LES. I have read a lot of threads and see that we can calculate TKE by: 0.5*(Uprime2Mean_XX+Uprime2Mean_YY+Uprime2Mean_ZZ) . But Uprime2Mean is calculated from: u-UMean, where UMean is time-averaged velocity. I know this should work with the statistically stationary flow. However, what if we have a nonstationary flow, like the figure below?

Shouldn't we get the Uprime2Mean by subtracting ensemble-averaged velocity from the instantaneous velocity? If we use UMean, the results will be totally different. Any ideas? :)

Kind Regards,
Jasper

KTG April 9, 2021 21:22

I think in that function object the UMean and will be over whatever window you specify - its not automatically going to use the full time period.

Tobermory April 10, 2021 05:33

Jasper - yes, you are right, that is the correct definition in a non-stationary flow (that is - Uprime2Mean needs to be calculated from u - Umean, but Umean must be the ensemble mean in this case).

To do the ensemble average you have to either run the simulation many many times (unlikely!) or find a homogeneous direction (eg. spanwise in a channel flow, as well as top half & bottom half) and average over that direction. To get a (statistically) good ensemble average, you need to ensure that you have a large enough homogenous direction.

You can dig up the old postChannel utility, and modify/use that, to do the spatial averaging. Good luck!

Jasper Z April 10, 2021 14:25

Quote:

Originally Posted by Tobermory (Post 801120)
Jasper - yes, you are right, that is the correct definition in a non-stationary flow (that is - Uprime2Mean needs to be calculated from u - Umean, but Umean must be the ensemble mean in this case).

To do the ensemble average you have to either run the simulation many many times (unlikely!) or find a homogeneous direction (eg. spanwise in a channel flow, as well as top half & bottom half) and average over that direction. To get a (statistically) good ensemble average, you need to ensure that you have a large enough homogenous direction.

You can dig up the old postChannel utility, and modify/use that, to do the spatial averaging. Good luck!

Thank you very much Tobermory. I will take a look at the postChannel utility!

Best Regards,

Jasper


All times are GMT -4. The time now is 05:13.