CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] Time Averaging a Field

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By santos

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 7, 2009, 20:52
Default Time Averaging a Field
  #1
New Member
 
Suraj Deshpande
Join Date: Mar 2009
Location: Madison, WI, USA
Posts: 18
Rep Power: 17
suraj is on a distinguished road
Hello!
I have simulation results at multiple time steps. I need to know what the time averaged field looks like. Is there a way to do it in openFOAM?

Thanks,
Suraj
suraj is offline   Reply With Quote

Old   April 8, 2009, 06:22
Default
  #2
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Hi,

To obtain time-averaged fields insert the following lines at the bottom of your controlDict file (you may include other fields than U and p, just make sure they are declared in createFields.H file of your solver):

functions
(
fieldAverage1
{
// Type of functionObject
type fieldAverage;

// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldAverage.so");

// Fields to be probed. runTime modifiable!
fields
(
U
{
mean on;
prime2Mean on;
base time;
}
p
{
mean on;
prime2Mean on;
base time;
}
);
}
);
vivek05 likes this.
santos is offline   Reply With Quote

Old   April 8, 2009, 10:48
Default Thanks!
  #3
New Member
 
Suraj Deshpande
Join Date: Mar 2009
Location: Madison, WI, USA
Posts: 18
Rep Power: 17
suraj is on a distinguished road
Thanks Santos!
suraj is offline   Reply With Quote

Old   May 15, 2009, 06:11
Default
  #4
Member
 
Leonardo Giampani Morita
Join Date: Apr 2009
Location: Paris, France
Posts: 58
Rep Power: 17
leonardo.morita is on a distinguished road
Hello!

Do you know if it is possible to choose the time at which averaging starts?
And is there a way to probe Mean and Prime2Mean, since they are not present in createFields.H ?

Thanks!

Leonardo
leonardo.morita is offline   Reply With Quote

Old   May 15, 2009, 06:30
Default
  #5
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Hi,

I think your first question has already been discussed in the forum, please use the search option.

What do you have in mind with probing mean and prime2mean? These fields are already written each time step when using the fieldAverage function as I posted above.

Regards,
Jose Santos
santos is offline   Reply With Quote

Old   May 15, 2009, 06:54
Default
  #6
Member
 
Leonardo Giampani Morita
Join Date: Apr 2009
Location: Paris, France
Posts: 58
Rep Power: 17
leonardo.morita is on a distinguished road
Hi again,

I think I was not clear...actually I'd like to choose the beginning of averaging in the middle of the simulation, after the steady-state is achieved. I see that these statistics are calculated starting from the "startFrom" time, but can I change it during the calculations only to reset the beginning of averaging?

Concerning the probing, this may really be useless, but actually Mean and Prime2Mean are written for each "writeInterval", not necessary the "deltaT". Anyway, would it be possible to probe them, if I needed to?

Thank you!

Regards,

Leonardo
leonardo.morita is offline   Reply With Quote

Old   May 15, 2009, 07:20
Default
  #7
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
To be honest, I dont know how to change it , but I have read it before here in the forum.

I think the only option you have to probe mean and prime2mean for a time interval different than deltaT would be to change deltaT to the one you need.

Regards,
Jose
santos is offline   Reply With Quote

Old   May 15, 2009, 07:24
Default
  #8
Member
 
Leonardo Giampani Morita
Join Date: Apr 2009
Location: Paris, France
Posts: 58
Rep Power: 17
leonardo.morita is on a distinguished road
Ok, I'll search a little more...thank you!
leonardo.morita is offline   Reply With Quote

Old   March 23, 2010, 00:33
Default libfieldFunctionObjects.so
  #9
New Member
 
Alexis Espinosa
Join Date: Aug 2009
Location: Australia
Posts: 20
Rep Power: 17
alexisespinosa is on a distinguished road
/*I found that in OpenFoam1.6.x the library to use is:*/
functionObjectLibs ("libfieldFunctionObjects.so");

/*and you also need to add output control:*/

outputControl outputTime; //For example
alexisespinosa is offline   Reply With Quote

Old   March 31, 2011, 23:18
Default
  #10
New Member
 
Jie (Jay) Zhang
Join Date: Sep 2010
Location: Phoenix, AZ, U.S.
Posts: 28
Rep Power: 16
jiez is on a distinguished road
To choose the beginning of averaging in the middle of the simulation, you can just delete all the information, such as UMean, which needed for next step averaging calculation. Then a new averaging calculation will begin.

Quote:
Originally Posted by leonardo.morita View Post
Hi again,

I think I was not clear...actually I'd like to choose the beginning of averaging in the middle of the simulation, after the steady-state is achieved. I see that these statistics are calculated starting from the "startFrom" time, but can I change it during the calculations only to reset the beginning of averaging?

Concerning the probing, this may really be useless, but actually Mean and Prime2Mean are written for each "writeInterval", not necessary the "deltaT". Anyway, would it be possible to probe them, if I needed to?

Thank you!

Regards,

Leonardo
jiez is offline   Reply With Quote

Old   November 12, 2012, 02:24
Default
  #11
Member
 
Aru
Join Date: Feb 2012
Location: Chennai, India
Posts: 40
Rep Power: 14
arunsmec is on a distinguished road
Does Prime2Mean refer the rms value?
arunsmec is offline   Reply With Quote

Old   August 10, 2015, 06:02
Default
  #12
Member
 
Join Date: May 2014
Location: Germany
Posts: 32
Rep Power: 12
hester is on a distinguished road
No, prime2Mean stands for prime-squared mean (meaning sample variance http://en.wikipedia.org/wiki/Variance#Sample_variance).
Description can be found under: /src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.H

\overline{x'}^2 = \frac{1}{N}\displaystyle\sum\limits_{i=0}^N                                            (x_i - \overline{x})^2
hester is offline   Reply With Quote

Reply


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
''unknown radialModelType type Gidaspow'' PROBLEM WITH THE BED TUTORIAL AndoniBM OpenFOAM Running, Solving & CFD 2 March 25, 2015 19:44
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 01:01
plot over time fferroni OpenFOAM Post-Processing 7 June 8, 2012 08:56
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07


All times are GMT -4. The time now is 00:46.