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 
Hi,
take a look here: http://openfoamwiki.net/index.php/Co...unctionObjects .That should do this job. Regards, Stefan 
Thanks a lot for your help, it solved my problem.:)

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 
Quote:
Average this magnitude at the patches: patchAverage magU patchname 
Quote:
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 
hi Goutam
have a look at this topic: http://www.cfdonline.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 
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 
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 06:21. 