CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Average temperature in a portion of my domain (http://www.cfd-online.com/Forums/openfoam/109204-average-temperature-portion-my-domain.html)

samiam1000 November 12, 2012 10:58

Average temperature in a portion of my domain
 
Dear All,

I am trying to figure out if-and-how it is possible to evaluate the avarage temperature in a certain zone of my domain (i.e. in all the cells with x < x_0).

Could anyone help?

Thanks a lot

fcollonv November 12, 2012 15:04

Hey Samuele,

Do you want the average in time for a portion of your domain or the average in space of a portion of your domain??

In the first case look in
src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.H

In the second case look in
src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.H

The function object system will save you ;)

Or you can do it in ParaView, Selecting the wanted cells then applying the filter "Integrate variables" on that selection.

Good luck

Frederic

samiam1000 November 26, 2012 05:07

Hi Frederic and thanks for answering.

Actually, I don't know why, but I got the notification of your asnwer today. Sorry.

Anyway, I am looking for the mean in space. The point is that "integrate variable" in paraview doesn't work (better, I am not able to make it work!)..

I'll try a bit more and then I will move on the function.

Thanks a lot,

Samuele

fcollonv November 26, 2012 07:11

Selection in Paraview
 
Hey Samuele

Quote:

Originally Posted by samiam1000 (Post 394153)
Anyway, I am looking for the mean in space. The point is that "integrate variable" in paraview doesn't work (better, I am not able to make it work!)..

I advice you to have a look at the chapter 2.1 of the Paraview tutorial (I have the one for the version 3.12 - you can download it there http://paraview.org/Wiki/The_ParaView_Tutorial )

Then apply the filter "Integrate variables" on the selection. In the spreadsheet, switch attribute from Point Data to Cell Data. Then to have the volume average of T, divide the value under the T column by the Volume.

Good luck,

Frederic


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