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/)
-   -   Average fields (http://www.cfd-online.com/Forums/openfoam-paraview/61079-average-fields.html)

jml December 15, 2008 05:55

Hello,I want to calculate the
 
Hello,I want to calculate the average of a field when I have finished my simulation. Does someone knows how it's possible to calculate it?

silva December 15, 2008 08:04

Hi Jml, Yup. You can use :
 
Hi Jml,

Yup. You can use :

yourField_.weightedAverage( mesh.V() );

You can find more info about this in the Doxygen documentation, as in:

http://foam.sourceforge.net/doc/Doxy...8C-source.html

Regards,
Luiz F.

silva December 15, 2008 08:19

Jml, I meant that you can a
 
Jml,

I meant that you can also write an OpenFOAM code that reads your field and provides the average you want (and then see the results in Paraview).

Still, I don't know if the newest version of Paraview can calculate the average of the field. But it is an option to use the OpenFOAM capabilities to do so.

Best regards,
Luiz F.

jml December 15, 2008 11:28

Can I choose the beginning and
 
Can I choose the beginning and the end of the average with weightedAverage if I have finished the simulation? is there any way to do the same with paraview?

villet December 15, 2008 12:55

Hi Jml, you can use almost any
 
Hi Jml, you can use almost any postprocessing utility (=source code) as an example. With your own utility you can postprocess all time directories or just selected ones. I presume you mean a field average. Then your can just print out average values for selected variables.

The second option is to use "Integrate variables" in Paraview. Then divide the integrated values with volume which you can find on the information tab.


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