CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   patchAverage utility (https://www.cfd-online.com/Forums/openfoam/77142-patchaverage-utility.html)

snehal June 14, 2010 17:04

patchAverage utility
 
Hello everybody,
I am a new OpenFoam user and want to use the patchAverage utility to write the averages of the Nusselt number calculated at the patch "CYLINDER".
I am running the case of cylinder in crossflow using pisoFoamTNu which is modified pisoFoam to calcualte temperature field and Nusselt number.

I want the patchAverage utility to write the average of Nusselt number in a data file which can be later used for plotting.

Please consider me a novice while giving a reply concerning patchAverage.

Thank you very much

herbert June 15, 2010 02:31

Hi,

take a look here: http://openfoamwiki.net/index.php/Co...unctionObjects .That should do this job.

Regards,
Stefan

snehal June 15, 2010 03:58

Thanks a lot for your help, it solved my problem.:)

yapalparvi November 30, 2010 19:18

Hi Snehal,

could you please help me with the same. I need to calculate averages on velocity field U on all the patches. How do I use patchAverage utility. Thanks

CedricVH December 2, 2010 08:55

Quote:

Originally Posted by yapalparvi (Post 285488)
Hi Snehal,

could you please help me with the same. I need to calculate averages on velocity field U on all the patches. How do I use patchAverage utility. Thanks

Calculate the magnitude of the velocity: foamCalc mag U
Average this magnitude at the patches: patchAverage magU patchname

Goutam March 4, 2012 06:49

Quote:

Originally Posted by snehal (Post 262973)
Hello everybody,
I am a new OpenFoam user and want to use the patchAverage utility to write the averages of the Nusselt number calculated at the patch "CYLINDER".
I am running the case of cylinder in crossflow using pisoFoamTNu which is modified pisoFoam to calcualte temperature field and Nusselt number.

I want the patchAverage utility to write the average of Nusselt number in a data file which can be later used for plotting.

Please consider me a novice while giving a reply concerning patchAverage.

Thank you very much

Dear Snehal,

I have calculated local Nusselt number at the hot wall for a cavity problem. How I will calculate average Nusselt Number? Also how I will add Temperature in PisoFOAM solver?

I am looking forward for your reply.

Thanks

uli September 10, 2012 20:16

hi Goutam

have a look at this topic: http://www.cfd-online.com/Forums/ope...-pisofoam.html

For mean Nusselt you can use the tool "patchaverage" which is included in the simpleFunctionobjects (http://openfoamwiki.net/index.php/Co...unctionObjects)


I actually didn't find a way to plot local Nusselt number of a patch, any suggestions?
I tried probes but it gives me strange results (constant zero for some probes, constant 10^300 for other probes).
I could use the data written by the solver but how to connect them with coordinates? Also to have them in one file would be much more convenient.

Have I just overlooked a feature of simplefunctionobjects?

Uli

Goutam September 11, 2012 04:28

See this link. This is the code for local Nusselt number calculation:
Code for Nusselt number.

Procedure of calculation of Average Nusselt number:

Three ways:

1) in your code, sum all your Nusselt number values for one patch (not all patches) times de area of each element; sum all areas of elements/cells of the same patch; divide the nusselt values sum by the area sum.

2) in paraFoam, use filter "extractBlock" to extract the patch you want the average, use filter "integrate variables", it will open an spreadsheet, look for Area value in Cells or Points, look for Nusselt value in Cells or Points, divide Nusselt integrated value by the Area integrated value.

3) write this in the terminal: patchAverage localNusselt patchName.

Cheers

Goutam

uli September 11, 2012 16:56

hi Goutam

thanks for your help. I should have given more background:

I modified pisoFoam in order to calculate temperature (whole solution domain) and temperature gradient (around cylinder).
For every timestep I get T and gradT written in my casefolder. Here local values of gradT for patch "cylinder" are already given - I just don't know which exact location each single value belongs to.

I use the tool "patchaverage" that comes with "swak4foam" to get the mean gradT at patch "cylinder", which works fine. I wonder if there's a feature to write gradT values and the location they belong to in a single file over time?
Unfortunately the probes function doesn't work, see my previous posting.

Thanks
Uli


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