CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Post-Processing (
-   -   How to calculate pressure drop (

Gearb0x March 8, 2010 09:34

How to calculate pressure drop

I have a channel solved with simplefoam and I would like to calculate the pressure drop ... How can I do that?

Thanks for the help

LVDH March 8, 2010 10:28

after the calculations you have you calculate the total pressure.
Then you should calculate the average over the boundaries you are analyzing. I do not know how to automatically calculate the difference using openfoam utilities, so you will either have to write your own program to do this or use your calculator (or brain).
Here are the commands you need:

patchAverage ptot inlet
patchAverage ptot outlet

I assumed you named our boundaries "inlet" and "outlet".

Gearb0x March 8, 2010 11:01


Thanks a lot for the help :)

Gearb0x March 10, 2010 12:37

How does the patchAverage utily work? Is it mass flow weighted? Area weighted?

Thanks for the information

LVDH March 11, 2010 05:00

I am not sure.
but as far as I know the massflow is the phi-field. When you execute yPlus it calculates phi. When you execute patchAverage it does not. So I think one can say that the patchAverage utility does not use the massflow.

You could take a look into the source code. I do not have the time for that right now but it should be easy to understand.

LVDH March 11, 2010 05:34

I took a look.
Its averaged over the area.

Gearb0x March 13, 2010 08:44

A big big thanks for the help!!
I've found something interesting on the wiki :

But I can't make it work. I don't know how to use it. Maybe I have to run the case to make it work and you cannot use a command tu run it after solving the problem ... :)

LVDH March 15, 2010 04:01

that does sound very interesting indeed.
I will check it out later today.

All times are GMT -4. The time now is 15:47.