View Issue Details

IDProjectCategoryView StatusLast Update
0003095OpenFOAMBugpublic2018-10-30 08:31
ReporterScottAssigned To 
Status newResolutionopen 
Platformx64OSWindowsOS Version1803
Product Version6 
Fixed in Version 
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.

postProcess -func "totalPressureIncompressible(p,U)"
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):
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web:
\\/ M anipulation |
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:
#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


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.

TagsNo tags attached.



2018-10-30 01:32

reporter (11,612 bytes)


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:
2018-10-30 08:31 henry Note Added: 0010121