-
-
September 4, 2019 at 1:02 am
liweiyi
SubscriberHi,
I'm working on Large eddy simulation with ANSYS Fluent. I have been using "data sampling" to obtain the time statistics, but I found it gave me very strange results.
The testing case shown below is a constant pressure driven channel flow at friction Reynolds number 2000. The two simulations were initialized with the same velocity field. As shown in the journal files below, I collected the instantaneous velocities and computed the statistics myself in the first simulation. In the second simulation, I activated the "data sampling" option. The data sampling frequencies were set the same for the both cases, but the results are quite different.
The results computed from instantaneous snapshots look more reasonable to us since we are able to close the momentum budget with the resolved shear stress but not the one solved by ANSYS Fluent.
Journal for the first simulation:
/file/set-tui-version "19.3"
/file/read-case-data "start"
solve/dual-time-iterate 2500
file/write-case-data 01_inst
solve/dual-time-iterate 2500
file/write-case-data 02_inst
solve/dual-time-iterate 2500
file/write-case-data 03_inst
solve/dual-time-iterate 2500
file/write-case-data 04_inst
solve/dual-time-iterate 2500
file/write-case-data 05_inst
solve/dual-time-iterate 2500
file/write-case-data 06_inst
solve/dual-time-iterate 2500
file/write-case-data 07_inst
solve/dual-time-iterate 2500
file/write-case-data 08_inst
solve/dual-time-iterate 2500
file/write-case-data 09_inst
solve/dual-time-iterate 2500
file/write-case-data 10_inst
solve/dual-time-iterate 2500
file/write-case-data 11_inst
solve/dual-time-iterate 2500
file/write-case-data 12_inst
solve/dual-time-iterate 2500
file/write-case-data 13_inst
solve/dual-time-iterate 2500
file/write-case-data 14_inst
solve/dual-time-iterate 2500
file/write-case-data 15_inst
solve/dual-time-iterate 2500
file/write-case-data 16_inst
solve/dual-time-iterate 2500
file/write-case-data 17_inst
solve/dual-time-iterate 2500
file/write-case-data 18_inst
solve/dual-time-iterate 2500
file/write-case-data 19_inst
solve/dual-time-iterate 2500
file/write-case-data 20_inst
exit yes
Journal for the second simulation:
/file/read-case-data "start"
solve/initialize/init-flow-statistics
/solve/set/data-sampling yes 2500 yes yes
solve/dual-time-iterate 50000
file/write-case-data final
exit yes
Best,
Weiyi
-
September 4, 2019 at 5:02 am
DrAmine
Ansys EmployeeData sampling make sense only after the flow developed itself. Saying that it has to be enabled after several flow throughout times. -
September 4, 2019 at 12:13 pm
liweiyi
SubscriberHi Amine,
Thanks for replying.
As I mentioned, I initiated the two simulations with the same velocity field, and the velocity field is interpolated from a simulation which reached steady state.
Even in the case that the flow is still in the transient period, the results of the two simulations in theory should be identical since the simulations are started from initialization and the data is collected at the same time steps.
Weiyi
-
September 4, 2019 at 1:43 pm
Rob
Ansys EmployeeIf you compare the data files do you see the same results? Trying to check whether something odd has happened in Fluent or if the data sampling is the issue.
-
September 4, 2019 at 2:36 pm
liweiyi
SubscriberI think the data sampling is the issue. I compared the instantaneous field at the last time step from the first simulation with the one from the second simulation. They are perfectly matched which suggests it's not the issue of the computation.
Please take a look on the journal files I provide and let me know if I did something wrong with the data sampling.
Weiyi
-
September 4, 2019 at 3:41 pm
Rob
Ansys EmployeeThe journals look to be viable, I'd use autosave in place of the first one. I'd look at how you've averaged the data in the external approach. If you check (for instance) mesh data (which is constant) do the results make sense in your approach?
-
September 4, 2019 at 5:21 pm
DrAmine
Ansys EmployeeHow are you calculating the Data? Is uv correlation referring to resolved turbulence stress or all turbulent stress? -
September 4, 2019 at 5:33 pm
liweiyi
SubscriberIn the first simulation, I first solve temporal average of the velocity and 2nd order moments which are 3 dimensional matrix, e.g.
where N is the number of the snapshots. Then I took spatial average to get the vertical profiles of those quantities.
In the second simulation, I read 3D temporal average of velocity and 2 order moments from Fluent like this:
Then again I took spatial average to get the vertical profiles.
UV here represents the resolved part of the shear stress.
-
September 4, 2019 at 6:01 pm
DrAmine
Ansys EmployeeResolved stress uv is Average of uv - Average of u*Average of v.
-
September 4, 2019 at 6:24 pm
-
September 5, 2019 at 9:27 am
DrAmine
Ansys EmployeeWhich version are you using?
-
September 5, 2019 at 1:41 pm
liweiyi
SubscriberANSYS Fluent 19.3
Cheers,
Weiyi
-
September 5, 2019 at 2:56 pm
DrAmine
Ansys Employee1/Sampling from time 0 is not good you need to start after several flow throughout times.
2/So for your external approach you are exporting the average of UV, U and V means?
-
September 5, 2019 at 3:36 pm
liweiyi
SubscriberI totally agree that I may need to run several flow throughout times for the transient period. However, the problem here is that no matter whether the flow had reached steady state, the two approach in theory should get identical results.
In the first approach, I saved the instantaneous fields every 2500 time steps. And then I externally solved mean velocity and 2nd order moments by the definition of those quantities, e.g. u'v'= Average of uv - Average of u*Average of v.
In the second approach, data sampling is activated with the frequency set to 2500. I was expecting it gave me the same results as the first approach.
Weiyi
-
September 6, 2019 at 8:35 am
DrAmine
Ansys EmployeeThe statistics you are using are quite loose: only 20 discrete time points are not enough!
The definition used in Fluent and deployed in your case does only hold of flow is statistically stationary and sufficiently averaged (so that one can write average of an average of phi is equal to average of phi). This means you need to start sampling after several flow throughout times and then sample every time step.
As ANSYS staff we cannot now dive into more details of your case.
-
September 6, 2019 at 7:47 pm
liweiyi
SubscriberI totally got the point that I have to wait several flow through time and collect more time steps to get a better statistics, but in both approach the statistics are solved based on the snapshots at the exactly same time steps. The statistics in theory should be identical unless Fluent is doing something different than I did in external approach. If it's the case, I don't know whether I can trust the statistics solved in Fluent.
Best,
Weiyi
-
September 9, 2019 at 5:04 am
DrAmine
Ansys EmployeeThe running average to get RMSE in Fluent is working as it should: this is what I can confirm after double checking internally.
-
- You must be logged in to reply to this topic.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Suppress Fluent to open with GUI while performing in journal file
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Difference between K-epsilon and K-omega Turbulence Model
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error in cfd post
-
2656
-
2120
-
1349
-
1118
-
461
© 2023 Copyright ANSYS, Inc. All rights reserved.