View Issue Details

IDProjectCategoryView StatusLast Update
0003095OpenFOAMBugpublic2019-03-11 21:55
ReporterScott Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Platformx64OSWindowsOS Version1803
Summary0003095: Incorrect Total Pressure Post Processing in simpleFoam - Uses default rho=1.2
DescriptionI'm trying to postprocess using the following for total pressure. It always uses the default value of rho=1.2 though. I need to be able to update this to another value.

Code:
postProcess -func "totalPressureIncompressible(p,U)"
Code:
simpleFoam -postProcess -fields "(p U)" -func totalPressureIncompressible

This is my totalPressureIncompressible.cfg file (in the system folder), 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?

Also, or as a workaround, would there be a tool/utility that would allow me to just scale the total(p) file to give me the correct total(p). ie total(p) x new_rho/1.2

Thanks!

Scott
Steps To Reproduce./run

open car.foam and view internalMesh coloured by total(p). See scale for max and min values. Shows 1500, which equates to rho=1.2 with 50m/s , should show 7500 for rho = 6 and 50m/s.

optional:
 ./clean
TagsNo tags attached.

Activities

Scott

2018-10-30 01:32

reporter  

henry

2018-10-30 08:31

manager   ~0010121

The default rho is set in OpenFOAM-6/etc/caseDicts/postProcessing/pressure/totalPressureIncompressible

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

pRef 0.0;
rhoInf 1.2;

and you can create a local version of "totalPressureIncompressible" and override the rhoInf value.

Issue History

Date Modified Username Field Change
2018-10-30 01:32 Scott New Issue
2018-10-30 01:32 Scott File Added: Total_Pressure_Value_simpleFoam.zip
2018-10-30 08:31 henry Note Added: 0010121
2019-03-11 21:55 wyldckat Assigned To => henry
2019-03-11 21:55 wyldckat Status new => closed
2019-03-11 21:55 wyldckat Resolution open => no change required