Data sampling in LES mode

  • 28 Views
  • Last Post 1 weeks ago
liweiyi posted this 2 weeks ago

Hi,

 

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

Order By: Standard | Newest | Votes
abenhadj posted this 2 weeks ago

Data sampling make sense only after the flow developed itself. Saying that it has to be enabled after several flow throughout times.

Best regards,

Amine

liweiyi posted this 2 weeks ago

Hi 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

 

 

rwoolhou posted this 2 weeks ago

If 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. 

liweiyi posted this 2 weeks ago

I 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

rwoolhou posted this 2 weeks ago

The 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?

abenhadj posted this 2 weeks ago

How are you calculating the Data? Is uv correlation referring to resolved turbulence stress or all turbulent stress?

Best regards,

Amine

liweiyi posted this 2 weeks ago

In 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.

 

 

abenhadj posted this 2 weeks ago

Resolved stress uv is Average of uv - Average of u*Average of v.

Best regards,

Amine

liweiyi posted this 2 weeks ago

Yes, that's how I compute the resolved shear stress in the external approach:

 

abenhadj posted this 2 weeks ago

Which version are you using?

Best regards,

Amine

liweiyi posted this 2 weeks ago

ANSYS Fluent 19.3

 

Cheers,

Weiyi

abenhadj posted this 2 weeks ago

1/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?

Best regards,

Amine

liweiyi posted this 2 weeks ago

I 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

 

abenhadj posted this 2 weeks ago

The 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.

Best regards,

Amine

liweiyi posted this 2 weeks ago

I 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

 

abenhadj posted this 1 weeks ago

The running average to get RMSE in Fluent is working as it should: this is what I can confirm after double checking internally.

Best regards,

Amine

Close