CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Paraview & paraFoam (http://www.cfd-online.com/Forums/openfoam-paraview/)
-   -   Time Averaging a Field (http://www.cfd-online.com/Forums/openfoam-paraview/63414-time-averaging-field.html)

suraj April 7, 2009 19:52

Time Averaging a Field
 
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

santos April 8, 2009 05:22

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;
}
);
}
);

suraj April 8, 2009 09:48

Thanks!
 
Thanks Santos!

leonardo.morita May 15, 2009 05:11

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

santos May 15, 2009 05:30

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

leonardo.morita May 15, 2009 05:54

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

santos May 15, 2009 06:20

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

leonardo.morita May 15, 2009 06:24

Ok, I'll search a little more...thank you!

alexisespinosa March 23, 2010 00:33

libfieldFunctionObjects.so
 
/*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

jiez March 31, 2011 22:18

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 (Post 216229)
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


arunsmec November 12, 2012 01:24

Does Prime2Mean refer the rms value?


All times are GMT -4. The time now is 02:20.