CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Time-averaging of variables over different time periods for transient case

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By LuckyTran
  • 1 Post By LuckyTran

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 14, 2017, 11:49
Default Time-averaging of variables over different time periods for transient case
  #1
Member
 
Muhammad Ali Uzair
Join Date: Sep 2017
Posts: 44
Rep Power: 9
m.uzair is on a distinguished road
Hi everyone,

I want to get the time averaged (say ~15s average) of the variables like velocity profiles, temperature, mass flow at a cross-section of the geometry.

In my (transient case) simulations, the real flow time is 10 seconds. I enabled data sampling for time statistics in fluent from 0 seconds. So, I am getting time averaged values of lets say velocity magnitude from 0 to 10 s. But I want time-averaged values from 5 to 10 seconds. I saved case and data files every 100 time steps.

I need to find the "average solution" for the past "n" timesteps from the data files that have already been saved.
Is there any method to get those time-averaged values between specific intervals of time?

Let me explain a bit more. The user has iterated the case till time step no. 20000, saving files after every 100 time steps. Now the user wants to see the average solution for time steps 500 to 1200. Is there a way to load the appropriate data files (for these intervals of time), call a UDF to find the averages of variables?
Thank you in advance.
m.uzair is offline   Reply With Quote

Old   December 14, 2017, 20:35
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,751
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
The algebra is simple. The implementation is tricky.

(N1 + N2)*Final_Avg = N1*1st_Avg +N2*2nd_Avg

And you want to find the 2nd_Avg

One way is to use custom field functions and set them equal to the mean variables at time-step 100. Then write an interpolate file which you can then read into the simulation at time-step 20 000 or whatever. Then again using custom field functions, you can then do the calculation to remove the 1st average. This is not so bad to do manually if you only have a few variables, but if you have a lot, then it needs to be done with a journal.
m.uzair likes this.
LuckyTran is offline   Reply With Quote

Old   December 15, 2017, 08:44
Default
  #3
Member
 
Muhammad Ali Uzair
Join Date: Sep 2017
Posts: 44
Rep Power: 9
m.uzair is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
The algebra is simple. The implementation is tricky.

(N1 + N2)*Final_Avg = N1*1st_Avg +N2*2nd_Avg

And you want to find the 2nd_Avg

One way is to use custom field functions and set them equal to the mean variables at time-step 100. Then write an interpolate file which you can then read into the simulation at time-step 20 000 or whatever. Then again using custom field functions, you can then do the calculation to remove the 1st average. This is not so bad to do manually if you only have a few variables, but if you have a lot, then it needs to be done with a journal.
Dear, Thanx for your advice.
How can I do it with the journal file, writing data of a lot of time steps to a file. Can you explain it a bit more comprehensively. I am new to this.
Thanks again
m.uzair is offline   Reply With Quote

Old   December 15, 2017, 09:05
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,751
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by m.uzair View Post
Dear, Thanx for your advice.
How can I do it with the journal file, writing data of a lot of time steps to a file. Can you explain it a bit more comprehensively. I am new to this.
Thanks again
Learn how to do it manually using only TUI (i.e. the text commands). Then simply put these text into a text file.

If this is too complicated, it might be faster just to re-run the simulation and average over the correct window.
m.uzair likes this.
LuckyTran is offline   Reply With Quote

Old   December 20, 2017, 06:40
Default
  #5
Member
 
Muhammad Ali Uzair
Join Date: Sep 2017
Posts: 44
Rep Power: 9
m.uzair is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
The algebra is simple. The implementation is tricky.

(N1 + N2)*Final_Avg = N1*1st_Avg +N2*2nd_Avg

And you want to find the 2nd_Avg

One way is to use custom field functions and set them equal to the mean variables at time-step 100. Then write an interpolate file which you can then read into the simulation at time-step 20 000 or whatever. Then again using custom field functions, you can then do the calculation to remove the 1st average. This is not so bad to do manually if you only have a few variables, but if you have a lot, then it needs to be done with a journal.

If I take into account first average, it will affect results. I want to exclude first average because the first 5 seconds of my simulation are unsteady.
If I can put instantaneous results into a file and average it, that will work. But I don't know how to do it
m.uzair is offline   Reply With Quote

Reply

Tags
fluent, time average problem


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to export time series of variables for one point? mary mor OpenFOAM Post-Processing 8 July 19, 2017 11:54
Stuck in a Rut- interDyMFoam! xoitx OpenFOAM Running, Solving & CFD 14 March 25, 2016 08:09
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
dynamic Mesh is faster than MRF???? sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 08:47
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 13:24


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