CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Time averaging in Fluent (http://www.cfd-online.com/Forums/fluent/101739-time-averaging-fluent.html)

Benjie29 May 12, 2012 18:50

Time averaging in Fluent
 
Users,
I have case and data files saved after ever 5s. I also enable data sampling statistics in the iterate panel. How do I get it? Any advice will be much appreciated.

LuckyTran May 12, 2012 22:51

Quote:

Originally Posted by Benjie29 (Post 360748)
Users,
I have case and data files saved after ever 5s. I also enable data sampling statistics in the iterate panel. How do I get it? Any advice will be much appreciated.

Did you enable data sampling before you started solving?

The data is stored in new variable names with either Mean or Rms at the end.

For example the instantaneous x-velocity, average x-velocity, and rms x-velocity are named, respectively:
X Velocity
X Velocity Mean
X Velocity Rms

any other variable that has statistics will also follow a similar nomenclature for the new variable names.

mali28 May 13, 2012 07:13

Quote:

Originally Posted by Benjie29 (Post 360748)
Users,
I have case and data files saved after ever 5s. I also enable data sampling statistics in the iterate panel. How do I get it? Any advice will be much appreciated.

This article explains how to get time average of simulation variable in transient simulation.
http://cape-forum.com/index.php/topic,1074.0.html

Benjie29 May 13, 2012 10:44

Time averagin followup
 
Thanks Tran and Mali.
Mali,
I used the UDF from the link. Where are the average values stored. I checked the UDS panel is post processing they show all zeros for the 12 scalars. The documentation provided with the .scm does not mention where the user is supposed to look for the averages. Also i think there is one step missing. One has to hook the execute on demand fuction in Define on Demand panel or else fluent complains "avg" chip exec not found.
Your calrifications in this matter will be of great help.

LuckyTran May 13, 2012 16:37

Quote:

Originally Posted by mali28 (Post 360781)
This article explains how to get time average of simulation variable in transient simulation.
http://cape-forum.com/index.php/topic,1074.0.html

You don't need this complicated UDF for time-averaged statistics since Fluent supports data sampling for time statistics in the newer versions

You can always access the results at each time step directly by reading the saved data file. You can access the time-averaged data (so far) up to any time step by accessing the data variables I mentioned earlier with the corresponding Mean of Rms. Other than loading the proper data or finding the right variable name, the rest is straightforward, just do what you usually do to manipulate/plot data.

You can use the UDF you want, but I don't think it's worth the hassle for a few button clicks.

sbaffini May 13, 2012 17:35

I would definitely not follow what mentioned in the link. First, as you have the ability to let Fluent activate its statistics (and these are available at least from Fluent 6) you also have the way to retrieve them, which is very simple: go under contours, unsteady statistics and you're done.

These variables are also accessible by UDF (a little bit more cumbersome than usual)

However, let us suppose you don't have this statistics feature. I would not certainly save all the cas and dat i want to average. Instead it is much more convenient to have running averages, variances and covariances defined as UDM and update them at each time step

Edit: LuckyTran explined much better what i wanted to say. It's just that i started the reply more than a hour ago and then i got stucked in something else.

Benjie29 May 14, 2012 07:00

Thanks for your replies.

haze_1986 March 25, 2013 13:37

May I clarify, what is the unit for the sampling interval? is it Hz (/s) or per time step size or something else? Please advise, thanks.

oj.bulmer March 27, 2013 11:59

It is per "so many timesteps" or "so many seconds" and you can specify value, how much.

OJ

haze_1986 March 27, 2013 12:13

Quote:

Originally Posted by oj.bulmer (Post 416777)
It is per "so many timesteps" or "so many seconds" and you can specify value, how much.

OJ

Yes that was my question, is it once every "so many timesteps" or once every "so many seconds"

i.e. my time step size is 0.1s, I want to sample once every second. Should I input 1 or 10 in the sampling interval?

oj.bulmer March 28, 2013 11:01

Time sampled option suggests the seconds for which the data is sampled. If you divide this time by timestep, it will give you the number of datasets used for creating statistics.

Documentation is elaborate on this.

OJ

haze_1986 March 28, 2013 11:06

Quote:

Originally Posted by oj.bulmer (Post 417014)
Time sampled option suggests the seconds for which the data is sampled. If you divide this time by timestep, it will give you the number of datasets used for creating statistics.

Documentation is elaborate on this.

OJ

Please share the documentation as I am unable to find an elaborate explanation on this topic, thanks.

oj.bulmer March 28, 2013 11:13

https://www.sharcnet.ca/Software/Flu...me_inputs.html

haze_1986 March 28, 2013 11:35

Quote:

Originally Posted by oj.bulmer (Post 417017)

I did not read anywhere that specifically mentions what exactly the sampling interval means. Whether it refers to the seconds or the timesteps.

You can set the Sampling Interval such that Data Sampling for Time Statistics can be performed at the specified frequency.

Here it mentioned frequency, isn't it supposed to be number of dataset created per second?

oj.bulmer March 28, 2013 12:21

Oh, I see your confusion now.

Sampling interval is no. of timesteps after which transient statistics is recorded for averaging. So if your time step size is 0.1 and you want to create time averaged data using results after every 1 sec, you should specify the value as 10 (1 sec/0.1 sec).

Sampled time is the total time for which the sampling will happen. So if your sampling time is 10 sec. the total datasets recorded for your time averaging is 10/1=10.

OJ

yjf11230301 April 27, 2013 02:30

Thank you!
Solution Initialization https://www.sharcnet.ca/Software/Flu...md0e235881.png Reset Statistics
Note that you can also reset the flow statistics after you have gathered some data for time statistics. If you perform, say, 10 time steps with the Data Sampling for Time Statistics option enabled, check the results, and then continue the calculation for 10 more time steps, the time statistics will include the data gathered in the first 10 time steps unless you reinitialize the flow statistics.

rsaha June 16, 2013 13:09

Quote:

Originally Posted by yjf11230301 (Post 423465)
Thank you!
Solution Initialization https://www.sharcnet.ca/Software/Flu...md0e235881.png Reset Statistics
Note that you can also reset the flow statistics after you have gathered some data for time statistics. If you perform, say, 10 time steps with the Data Sampling for Time Statistics option enabled, check the results, and then continue the calculation for 10 more time steps, the time statistics will include the data gathered in the first 10 time steps unless you reinitialize the flow statistics.

If I want to include the data generated in both first and second 10 time steps to be considered for time averaging, do I have to reinitialize the statistics after the second 10 time steps are done? So here the word 'reinitialize' means updating huh?

oj.bulmer June 16, 2013 13:19

No, if you do not reset statistics, you will have timeaveraged data for all 20 seconds. If you reset it, you will have data for last 10 seconds, ie, since you reset it.

OJ

rsaha June 16, 2013 13:33

Yes that is what I thought. But the above sentence confused me by saying that, unless I reinitialize it will include the result only for the first 10 time steps.

Thanks for your clarification.

djing June 11, 2014 07:23

Quote:

Originally Posted by mali28 (Post 360781)
This article explains how to get time average of simulation variable in transient simulation.
http://cape-forum.com/index.php/topic,1074.0.html

hi , i can't download this UDF if you can do it please give me an example . thanks


All times are GMT -4. The time now is 23:48.