CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Paraview & paraFoam

Time Averaging a Field

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 7, 2009, 19:52
Default Time Averaging a Field
  #1
New Member
 
Suraj Deshpande
Join Date: Mar 2009
Location: Madison, WI, USA
Posts: 18
Rep Power: 7
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, 05:22
Default
  #2
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 213
Rep Power: 8
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;
}
);
}
);
santos is offline   Reply With Quote

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

Old   May 15, 2009, 05:11
Default
  #4
Member
 
Leonardo Giampani Morita
Join Date: Apr 2009
Location: Paris, France
Posts: 58
Rep Power: 7
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, 05:30
Default
  #5
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 213
Rep Power: 8
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, 05:54
Default
  #6
Member
 
Leonardo Giampani Morita
Join Date: Apr 2009
Location: Paris, France
Posts: 58
Rep Power: 7
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, 06:20
Default
  #7
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 213
Rep Power: 8
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, 06:24
Default
  #8
Member
 
Leonardo Giampani Morita
Join Date: Apr 2009
Location: Paris, France
Posts: 58
Rep Power: 7
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: 12
Rep Power: 7
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, 22:18
Default
  #10
New Member
 
Jie Zhang
Join Date: Sep 2010
Location: FL, U.S.
Posts: 20
Rep Power: 6
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
New Member
 
Arun S
Join Date: Feb 2012
Location: Chennai, India
Posts: 22
Rep Power: 5
arunsmec is on a distinguished road
Send a message via Skype™ to arunsmec
Does Prime2Mean refer the rms value?
arunsmec is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time step size and max iterations per time step pUl| FLUENT 25 February 11, 2015 07:58
Weird problems running unsteady braennstroem OpenFOAM Running, Solving & CFD 5 June 8, 2011 20:38
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
How to determine the time averaging factor? Hai-Wen Ge Main CFD Forum 2 April 18, 2001 21:19


All times are GMT -4. The time now is 14:55.