CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   SimpleFOAM how to plot the real pressures (not adimensionalized by density) (http://www.cfd-online.com/Forums/openfoam-post-processing/108825-simplefoam-how-plot-real-pressures-not-adimensionalized-density.html)

alsdia November 2, 2012 05:37

SimpleFOAM how to plot the real pressures (not adimensionalized by density)
 
3 Attachment(s)
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

sail November 2, 2012 06:23

Quote:

Originally Posted by alsdia (Post 389823)
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

vinayvm June 10, 2016 03:51

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.

Lorena2fdez June 10, 2016 04:56

Quote:

Originally Posted by vinayvm (Post 604232)
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

vinayvm June 10, 2016 05:35

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. :)


All times are GMT -4. The time now is 05:14.