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

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

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 2, 2012, 04:37
Default 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
alsdia is on a distinguished road
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
File Type: jpeg simpleFoam.sphere.pressure.jpeg (88.4 KB, 35 views)
File Type: jpg simpleFoam.sphere.streamlines.jpg (56.7 KB, 33 views)
File Type: jpeg starccm.sphere.pressure.jpeg (88.5 KB, 29 views)
alsdia is offline   Reply With Quote

Old   November 2, 2012, 05:23
Default
  #2
Senior Member
 
sail's Avatar
 
Vieri Abolaffio
Join Date: Jul 2010
Location: Always on the move.
Posts: 308
Rep Power: 16
sail is on a distinguished road
Quote:
Originally Posted by alsdia View Post
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
__________________
http://www.leadingedge.it/
Naval architecture and CFD consultancy
sail is offline   Reply With Quote

Old   June 10, 2016, 03:51
Default
  #3
New Member
 
Nan
Join Date: Feb 2015
Posts: 6
Rep Power: 11
vinayvm is on a distinguished road
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.
vinayvm is offline   Reply With Quote

Old   June 10, 2016, 04:56
Default
  #4
New Member
 
Lorena Fernández Fernández
Join Date: May 2016
Location: Spain
Posts: 21
Rep Power: 9
Lorena2fdez is on a distinguished road
Quote:
Originally Posted by vinayvm View Post
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
Lorena2fdez is offline   Reply With Quote

Old   June 10, 2016, 05:35
Default
  #5
New Member
 
Nan
Join Date: Feb 2015
Posts: 6
Rep Power: 11
vinayvm is on a distinguished road
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.
vinayvm is offline   Reply With Quote

Reply

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
SimpleFoam How to specify density sebastiank OpenFOAM Running, Solving & CFD 3 July 27, 2023 09:45
[OpenFOAM] How to get density color plot in twoPhaseEulerFoam ploceus ParaView 2 February 19, 2020 13:38
Please help me run UDF code for source Suga FLUENT 1 February 3, 2006 03:40
udf error Rashmi FLUENT 0 December 27, 2005 05:35
Optimizing UDF Code Cebeci FLUENT 18 September 6, 2003 03:40


All times are GMT -4. The time now is 00:31.