CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

patchAverage utility

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 2 Post By herbert
  • 1 Post By Goutam

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 14, 2010, 18:04
Default patchAverage utility
  #1
New Member
 
Snehal Janwe
Join Date: May 2010
Location: Stuttgart
Posts: 10
Rep Power: 15
snehal is on a distinguished road
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
snehal is offline   Reply With Quote

Old   June 15, 2010, 03:31
Default
  #2
Senior Member
 
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 17
herbert is on a distinguished road
Hi,

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

Regards,
Stefan
Luttappy and sourav90 like this.
herbert is offline   Reply With Quote

Old   June 15, 2010, 04:58
Default
  #3
New Member
 
Snehal Janwe
Join Date: May 2010
Location: Stuttgart
Posts: 10
Rep Power: 15
snehal is on a distinguished road
Thanks a lot for your help, it solved my problem.
snehal is offline   Reply With Quote

Old   November 30, 2010, 20:18
Default
  #4
Member
 
Ramesh Yapalparvi
Join Date: Jun 2009
Posts: 53
Rep Power: 16
yapalparvi is on a distinguished road
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
yapalparvi is offline   Reply With Quote

Old   December 2, 2010, 09:55
Default
  #5
Member
 
Cedric Van Holsbeke
Join Date: Dec 2009
Location: Belgium
Posts: 81
Rep Power: 16
CedricVH is on a distinguished road
Quote:
Originally Posted by yapalparvi View Post
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
CedricVH is offline   Reply With Quote

Old   March 4, 2012, 07:49
Default
  #6
Senior Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 14
Goutam is on a distinguished road
Quote:
Originally Posted by snehal View Post
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
Goutam is offline   Reply With Quote

Old   September 10, 2012, 21:16
Default
  #7
uli
New Member
 
Join Date: Jun 2012
Posts: 25
Rep Power: 13
uli is on a distinguished road
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
uli is offline   Reply With Quote

Old   September 11, 2012, 05:28
Default
  #8
Senior Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 14
Goutam is on a distinguished road
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
Gubevens likes this.
Goutam is offline   Reply With Quote

Old   September 11, 2012, 17:56
Default
  #9
uli
New Member
 
Join Date: Jun 2012
Posts: 25
Rep Power: 13
uli is on a distinguished road
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
uli is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sample Utility not working in OpenFoam 1.6 titio OpenFOAM Post-Processing 6 November 15, 2014 19:04
problem with sampling Utility in openFOAM 1.6 carmir OpenFOAM Post-Processing 10 February 26, 2014 03:00
How to compile a new utility rudy OpenFOAM 4 October 1, 2011 23:48
StreamFunction utility titio OpenFOAM Post-Processing 0 May 19, 2010 17:04
Sample Utility not working in OpenFoam 1.6 titio OpenFOAM Post-Processing 0 February 5, 2010 13:12


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