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

totalPressureIncompressible Default Rho value = 1.2

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By AnnaF
  • 1 Post By AnnaF

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 28, 2018, 07:34
Default totalPressureIncompressible Default Rho value = 1.2
  #1
Member
 
Scott
Join Date: Sep 2009
Posts: 44
Rep Power: 16
scott is on a distinguished road
Hi there,

I'm running the following command after a simulation to get the total pressure field around my geometry.

Code:
postProcess -func "totalPressureIncompressible(p,U)"
The Total pressure in the freestream always appears to be greater than what it should be based on the nu value used, which equates to a density of 1.184. It always seems to result in a density of 1.2.

I've tested with different velocities and the corresponding total pressure in the freestream always comes back to 1.2, once you recalculate density based on the new total pressure value.

I've also tested with random values of nu, and it does not affect the freestream total pressure, again, we always get 1.2, but the total pressure value doesn't change, so it is not actually dependent on nu.

It appears that it is using the following equation fro freestream total pressure 0.5 *density*velocity^2 = 0.5*1.2*U^2. My problem is, I don't want it to use 1.2 as a default, I just can't work out how to change it!

Can anyone confirm that this is the intent? I've tried setting rho an rhoInf to 1.184 in many places so far with no apparent change to the result.

For completeness, I am running this command in OpenFOAM v1706 Windows10.

Once this command is executed, the freestream pressure can be seen in /0/total(p) based on initial conditions. It also is apparent in paraview.

Thanks for your time!

Note: I am using simpleFoam, and I know that the density is not used in the solve calculations, and that to get the correct pressure values I need to multiply by density due to the way OpenFOAM calculates. As part of the type of work we do, we typically use Total Pressure as an output hence I'm trying to work out how to get the correct output. I guess I could scale the field as I know how far out it is, but there has to be somewhere that this 1.2 value is being pulled from, and I'd like to modify it if anyone can help.
scott is offline   Reply With Quote

Old   July 23, 2018, 19:29
Default
  #2
New Member
 
Carlitre
Join Date: Jun 2013
Posts: 1
Rep Power: 0
Balzuka is on a distinguished road
Hi,


According to



https://github.com/OpenFOAM/OpenFOAM...Incompressible


the value is 1.2


try to change in totalPressureIncompressible.cfg



/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\/ M anipulation |
-------------------------------------------------------------------------------
Description
Calculates the total pressure field for a case where the solver is
incompressible (pressure is kinematic, e.g. m^2/s^2).
\*---------------------------------------------------------------------------*/

#includeEtc "caseDicts/postProcessing/pressure/totalPressureIncompressible.cfg"

pRef 0.0;
rhoInf 1.2;

// ************************************************** *********************** //
Balzuka is offline   Reply With Quote

Old   October 19, 2018, 05:34
Default
  #3
Member
 
Martin
Join Date: Aug 2018
Posts: 33
Rep Power: 7
artymk4 is on a distinguished road
I cannot change value 1.2 in file /etc/caseDicts/postProcessing/pressure/staticPressure because I don't have permission to change this file.

Is there a way to set custom rho value that will be used by postProcess tool staticPressure instead of reading dafault value 1.2?
artymk4 is offline   Reply With Quote

Old   October 26, 2018, 04:52
Default
  #4
Member
 
Anna Feichtner
Join Date: Dec 2016
Location: Cornwall (UK)
Posts: 36
Rep Power: 9
AnnaF is on a distinguished road
Hi artymk4

I think you would create your own copies of the totalPressureIncompressible and the totalPressureIncompressible.cfg files, in wich you can modify the values of pref and rhoInf - with adapting the "#include..."-path accordingly.

Does that help?

Regards,
Anna
artymk4 likes this.
AnnaF is offline   Reply With Quote

Old   October 28, 2018, 19:44
Default
  #5
Member
 
Scott
Join Date: Sep 2009
Posts: 44
Rep Power: 16
scott is on a distinguished road
Hi everyone,

I've tried all combinations of adding a config file and having the #include in the controlDict.

Does anyone have this working? I've been tring with rho of 6 as an example but still get a rho equivalent to 1.2 when I run:

postProcess -func "totalPressureIncompressible(p,U)"

Hoping someone can save me further hours...

Thanks,

Scott
scott is offline   Reply With Quote

Old   October 29, 2018, 03:40
Default
  #6
Member
 
Anna Feichtner
Join Date: Dec 2016
Location: Cornwall (UK)
Posts: 36
Rep Power: 9
AnnaF is on a distinguished road
Hi Scott,

have you tried it with
Code:
<solvername> -postProcess -fields "(p U)" -func totalPressureIncompressible
?

Anna
AnnaF is offline   Reply With Quote

Old   October 29, 2018, 18:11
Default
  #7
Member
 
Scott
Join Date: Sep 2009
Posts: 44
Rep Power: 16
scott is on a distinguished road
Hi Anna,

Yes I've tried with both:

Code:
postProcess -func "totalPressureIncompressible(p,U)"
Code:
simpleFoam -postProcess -fields "(p U)" -func totalPressureIncompressible
This is my totalPressureIncompressible.cfg file, which appears to be being read when I run the above commands as it errors out if I change #includeEtc to #include to force an error):
Code:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\/ M anipulation |
-------------------------------------------------------------------------------
Description
Calculates the total pressure field for a case where the solver is
incompressible (pressure is kinematic, e.g. m^2/s^2).
\*---------------------------------------------------------------------------*/

#includeEtc "caseDicts/postProcessing/pressure/totalPressureIncompressible.cfg"

pRef 0.0;
rho rhoInf;
rhoInf 6;

// ************************************************************************* //
I've tried with all types of combinations of rho, rhoInf in this file and also in the fields passed to the postProcess program.

It doesn't seem as straightforward as it should be.

Oh, I also have this in my controlDict:
Code:
functions
{
#includeEtc "/mnt/c/OpenFOAM/Total_Pressure_Value_Test/system/totalPressureIncompressible.cfg"
}
Have you see simpleFoam give the correct Total Pressure using something like this, or have you always had rho = 1.2? If no one has seen it working then I might ask to see if it is a bug.

Thanks!

Scott
scott is offline   Reply With Quote

Old   October 30, 2018, 04:58
Default
  #8
Member
 
Anna Feichtner
Join Date: Dec 2016
Location: Cornwall (UK)
Posts: 36
Rep Power: 9
AnnaF is on a distinguished road
Hi Scott

it works for me with:

I have a "totalPressureIncompressible1" file in the system folder:

Code:
#includeEtc "caseDicts/postProcessing/pressure/totalPressureIncompressible.cfg"

pRef    0.0;
rhoInf  6; //1.2;
and those lines in the controlDict:
Code:
functions
{
#includeFunc totalPressureIncompressible1
}
Then I call it with
Code:
simpleFoam -postProcess -fields "(p U)" -func totalPressureIncompressible1
This gives me a "total(p)" file in each written time step.


Anna
artymk4 likes this.
AnnaF is offline   Reply With Quote

Reply


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
chtMultiRegionFoam- too slow sandymech1 OpenFOAM Running, Solving & CFD 4 November 20, 2017 18:51
writing execFlowFunctionObjects immortality OpenFOAM Post-Processing 30 September 15, 2013 06:16
what does this verbose error mean? immortality OpenFOAM Running, Solving & CFD 1 February 6, 2013 16:47
pisoFoam with k-epsilon turb blows up - Some questions Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 03:34
CFX-Pre problem, pls help!!! cth_yao CFX 0 February 17, 2012 00:52


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