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

Average values on Boundary Conditions

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 23, 2012, 12:21
Default Average values on Boundary Conditions
  #1
New Member
 
Join Date: Feb 2012
Posts: 5
Rep Power: 5
helloworld11 is on a distinguished road
Hi everyone,
I am quite new to OpenFoam world and I need some help. I would like to calculate average values of velocity and pressure on my boundary patches. Any idea how can I do it? Any help will be appreciated
helloworld11 is offline   Reply With Quote

Old   February 23, 2012, 13:00
Default
  #2
Senior Member
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin,Ireland
Posts: 565
Rep Power: 19
bigphil will become famous soon enoughbigphil will become famous soon enough
Hi,

You could use the patchAverage and/or the patchIntegrate post processing OpenFOAM utilities.

For example, to calculate the average pressure on a patch called myInlet:
Code:
patchAverage p myInlet
Philip
bigphil is offline   Reply With Quote

Old   February 23, 2012, 13:09
Default
  #3
New Member
 
Join Date: Feb 2012
Posts: 5
Rep Power: 5
helloworld11 is on a distinguished road
Hello Philip,
Thank your for your answer. I just tied patchAverage p inlet for my case works fine.
But for the velocity values if type patchAverage U inlet, I get the error :

Only possible to average volScalarFields

Is there any way to over come that error?
helloworld11 is offline   Reply With Quote

Old   February 23, 2012, 13:16
Default
  #4
Senior Member
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin,Ireland
Posts: 565
Rep Power: 19
bigphil will become famous soon enoughbigphil will become famous soon enough
helloworld11,

patchIntegrate and patchAverage only operate on volScalarFields, so if you decompose your velocity field into its components first using foamCalc, i.e.
Code:
foamCalc components U
Then you can run patchAverage on each component:
Code:
patchAverage Ux myInlet
You can also use foamCalc to do other things like calculate the magnitude of a volVectorField:
Code:
foamCalc mag U
If you type something like "foamCalc banana" it will give you all the options.

Philip
bigphil is offline   Reply With Quote

Old   February 23, 2012, 13:24
Default
  #5
New Member
 
Join Date: Feb 2012
Posts: 5
Rep Power: 5
helloworld11 is on a distinguished road
Philip,

I followed the instructions you gave and now I am able to get values. Thank you very much.
helloworld11 is offline   Reply With Quote

Reply

Tags
average field, average presure, average velocity

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating Face in CFD Post and export Values as Boundary Conditions flow87 CFX 2 June 4, 2011 04:06
OpenFOAM Variable Velocity Boundary Conditions NickolasPl OpenFOAM Programming & Development 2 May 19, 2011 05:37
Domain Imbalance HMR CFX 3 March 6, 2011 21:10
mesh file for flow over a circular cylinder Ardalan Main CFD Forum 6 April 17, 2010 23:40
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55


All times are GMT -4. The time now is 06:55.