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

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

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

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

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:
scalar
part
         1
hexa8
 6.11803e+02
 6.11877e+02
 6.11775e+02
 6.11666e+02 
and after using
Quote:
awk -F " " '{print $1*1.225}' p > p_output
PHP Code:
0
0
1.225
0
749.459
749.549
749.424
749.291 
While of course I would like to have

PHP Code:
scalar
part
         1
hexa8
  749.459
  749.549
  749.424
  749.291 
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 ?
arnaud6 is offline   Reply With Quote

Reply

Tags
density, incompressible, script, static pressure

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
Pressure Inlet VS velocity Inlet difference Mohsin FLUENT 6 January 15, 2015 18:15
Static pressure problem Kiat110616 CFX 0 April 12, 2011 13:11
UDF to control Static Pressure (in cylinder) James FLUENT 0 July 20, 2004 07:54
Static vs Total Pressure Alfonso Ferrandez FLUENT 2 May 23, 2000 08: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 09:07.