CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Average value over entire domain (http://www.cfd-online.com/Forums/openfoam-post-processing/110703-average-value-over-entire-domain.html)

ris December 18, 2012 11:52

Average value over entire domain
 
Hello,
I am currently processing a sprayFoam case and would like to plot the average values of some parameters over time.For example is there a way to plot the average heat release rate,dQ of the entire domain over time? I have been playing around with the temporal filters but can't seem to get anything going.

Many thanks,

ris

Bernhard December 19, 2012 07:49

Can you be more specific? Are there variables you want to average over a patch, or over the domain? For specific timestep? Do you want to integrate in time as well? It is not completely clear to me at the moment.

ris December 19, 2012 09:36

Hello Bernhard,

I would like to plot for example the average domain temperature against time. The temperature value will be the average domain temperature at that time-step.
I have sort of found a way to do this by saving the cell data as .csv for each time step. I then have a script to read the values, sum them and divide them by the number of cells, which gives me an average domain temperature for each time step. Is there a way to do this in paraview?

Many thanks,

ris.

Bernhard December 19, 2012 09:41

I would highly encourage you to use functionObjects, such that you can computere it during runtime, and get the data-file right from the simulation. See for example: http://openfoamwiki.net/index.php/Co...unctionObjects

ris December 19, 2012 10:14

Yes, I came across that on one of the forums, thank you for the direct link. This will definitely save me time.

Many thanks,

ris.

gschaider December 19, 2012 11:26

Quote:

Originally Posted by ris (Post 398258)
Yes, I came across that on one of the forums, thank you for the direct link. This will definitely save me time.

I think there is also a fieldAverage in OpenFOAM but I think that is "only" time-Averaging. Anyway. If you're considering the simpleFunctionObjects you might go for swak4Foam (which the simpleFunctionObjects are now a part of) ("Come to the dark side, Luke")

ris December 19, 2012 11:40

Hello,
Yes, I installed swak4foam and implemented the simpleFunctionObjects, it is working very well.
Is there any way of implementing this/something similar after the simulation is completed? I have a number of cases which are complete and would like to process, without the need for rerunning them.

ris.

gschaider December 19, 2012 11:53

Quote:

Originally Posted by ris (Post 398274)
Hello,
Yes, I installed swak4foam and implemented the simpleFunctionObjects, it is working very well.
Is there any way of implementing this/something similar after the simulation is completed? I have a number of cases which are complete and would like to process, without the need for rerunning them.

There is a utility execFlowFunctionObjects in the standard-distro that executes functionObjects "after the fact".

swak4Foam has a separate utility funkyDoCalc that executes swak-expressions from a dictionary and prints the results

Both have their advantages, but both fail if the fields you need have not been written to disc


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