CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Script to obtain "real" static pressure (pressure times density)

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

Like Tree3Likes
  • 1 Post By arnaud6
  • 2 Post By wyj216

LinkBack Thread Tools Search this Thread Display Modes
Old   January 6, 2015, 12:43
Default Script to obtain "real" static pressure (pressure times density)
New Member
Join Date: May 2013
Posts: 23
Rep Power: 12
arnaud6 is on a distinguished road

I am struggling with making the really easy scripting line which I am sure is very useful for all OpenFOAM users !
How to obtain the "real" static pressure from an openfoam incompressible solver ?
So performing p*density on the relevant lines.
Let's say in a bash line, it would be perfect !

for example, my "p" file looks like

PHP Code:
and after using
awk -F " " '{print $1*1.225}' p > p_output
PHP Code:
While of course I would like to have

PHP Code:
To have a p field still working in openfoam.

Any idea how to set this condition in awk ? Or using sed ? Or running something in openfoam ?
mizzou likes this.
arnaud6 is offline   Reply With Quote

Old   May 5, 2021, 10:22
New Member
Youjiang Wang
Join Date: Apr 2015
Location: Hamburg
Posts: 22
Rep Power: 10
wyj216 is on a distinguished road
If anybody comes to find solution here like me. I have tried out the simple way in OF2012

postProcess -func "staticPressure(p, pRef=**, rho=rhoInf, rhoInf=**)"
Just replace ** with the values you want. Results is then stored in static(p). I use this to transfer results from pimpleFoam to interPhaseChangeFoam.
Edee and rezaeimahdi like this.
wyj216 is offline   Reply With Quote


density, incompressible, script, static pressure

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
Pressure Inlet VS velocity Inlet difference Mohsin FLUENT 9 January 4, 2021 11:34
Static pressure problem Kiat110616 CFX 0 April 12, 2011 14:11
UDF to control Static Pressure (in cylinder) James FLUENT 0 July 20, 2004 08:54
Static vs Total Pressure Alfonso Ferrandez FLUENT 2 May 23, 2000 09:53
Hydrostatic pressure in 2-phase flow modeling (CFX4.2) HB &DS CFX 0 January 9, 2000 14:19

All times are GMT -4. The time now is 17:49.