# SimpleFOAM how to plot the real pressures (not adimensionalized by density)

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

November 2, 2012, 05:37
SimpleFOAM how to plot the real pressures (not adimensionalized by density)
#1
New Member

edy
Join Date: Jul 2012
Location: Tokyo
Posts: 6
Rep Power: 0
Hello,

I was making a comparison between StarCCM+ and simpleFOAM using a sphere.
In simpleFoam dimensions of pressure become pressure divided by density.
But I would like to obtain in Paraview a plot with the real pressures.

1) is there a way in Paraview to multiply all the pressure field by the density?
or
2) is it possible to customize simpleFOAM in such a way that before results are written, all pressures are multiplied by the density? Which file should be modified simpleFoam.C or createFields.H or something else and how?
or other ideas?

-----------------------------------------------------------------------------------------------------------------------
reference
(http://openfoamwiki.net/index.php/Ma...ble_solvers.3F
=> simpleFoam sphere max pressure * 1.205 = 106.399 * 1.205 =128.2108Pa ~ 129.1Pa of StarCCM)
sphere case @
https://www.dropbox.com/sh/gg1ypj0c1...vYI_k/OpenFOAM
Attached Images
 simpleFoam.sphere.pressure.jpeg (88.4 KB, 30 views) simpleFoam.sphere.streamlines.jpg (56.7 KB, 29 views) starccm.sphere.pressure.jpeg (88.5 KB, 24 views)

November 2, 2012, 06:23
#2
Senior Member

Vieri Abolaffio
Join Date: Jul 2010
Location: Always on the move.
Posts: 308
Rep Power: 10
Quote:
 Originally Posted by alsdia Hello, 1) is there a way in Paraview to multiply all the pressure field by the density? or
add the filter calculator, there you can multiply your pressure by the density
__________________
Naval architecture and CFD consultancy

 June 10, 2016, 03:51 #3 New Member   Nan Join Date: Feb 2015 Posts: 6 Rep Power: 4 So the pressure p we see in paraview is indeed p divided by density for the simulations done in OpenFOAM. Can someone confirm this? Thanks.

June 10, 2016, 04:56
#4
New Member

Lorena Fernández Fernández
Join Date: May 2016
Location: Ferrol, A Coruña, Spain
Posts: 11
Rep Power: 3
Quote:
 Originally Posted by vinayvm So the pressure p we see in paraview is indeed p divided by density for the simulations done in OpenFOAM. Can someone confirm this? Thanks.
When a variable is defined in OpenFOAM there must be indicated the dimensions of this variable. For an example of p:
Code:
```FoamFile
{
version     2.0;
format      ascii;
class       volScalarField;
location    "0.2";
object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -2 0 0 0 0];
#....```

The numbers are the exponent that we have for each dimension. The place of the numbers is associated with the dimensions specified below:

Nº Property Dimension
1 Mass kg
2 Length m
3 Time s
4 Temperature K
5 Quantity mol
6 Current A
7 Luminous intensity cd

And for the previous case of p we have the units [kg / (m*s²) = Pa].

Best regards,
Lorena

 June 10, 2016, 05:35 #5 New Member   Nan Join Date: Feb 2015 Posts: 6 Rep Power: 4 Thanks for your reply Lorena2fdez My p file looks something as follows: Code: ```FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0;``` I thought eventually it gave output in Pascal which is correct pressure unit.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post sebastiank OpenFOAM Running, Solving & CFD 2 October 31, 2008 10:39 Suga FLUENT 1 February 3, 2006 04:40 ploceus OpenFOAM Paraview & paraFoam 1 January 5, 2006 08:22 Rashmi FLUENT 0 December 27, 2005 06:35 Cebeci FLUENT 18 September 6, 2003 03:40

All times are GMT -4. The time now is 12:09.