CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   How to plot Mach contour in OF 4.0 (https://www.cfd-online.com/Forums/openfoam-post-processing/184159-how-plot-mach-contour-4-0-a.html)

PeterShi February 23, 2017 12:13

How to plot Mach contour in OF 4.0
 
Hello all,

I wanna to plot Mach contour in OF 4.0, using postProcess.

I know the syntax is like postProcess -func "MachNo(U)", and then input this line in the terminal.

However, the same error always occur, and I have no ideas what to do, please help me:

Time = 8000

Reading fields:
volVectorFields: U

Executing functionObjects
--> FOAM Warning : functionObject MachNo: Cannot find required field U

End


Thanks in advance.
Best,
Peter

PeterShi February 26, 2017 18:44

Hello all,

I am here to solve my own question again.

First of all, for OpenFOAM 4.1 the warning message of MachNo is misleading. And this has been reported and revised by someone, please have a look at links below:
https://bugs.openfoam.org/view.php?id=2352
https://github.com/OpenFOAM/OpenFOAM...a50f0a044ffd79

Next, for incompressible cases, plotting Mach Number contour is impossible, since OpenFOAM misses many thermodynamic parameters. As such, magnitude of velocity's contour is okay, considering the speed of sound is infinite when the medium is incompressible.

I hope this post will help someone later.

Best,
Peter

deepbandivadekar April 20, 2018 11:55

Quote:

Originally Posted by PeterShi (Post 638615)
Hello all,

I am here to solve my own question again.

First of all, for OpenFOAM 4.1 the warning message of MachNo is misleading. And this has been reported and revised by someone, please have a look at links below:
https://bugs.openfoam.org/view.php?id=2352
https://github.com/OpenFOAM/OpenFOAM...a50f0a044ffd79

Next, for incompressible cases, plotting Mach Number contour is impossible, since OpenFOAM misses many thermodynamic parameters. As such, magnitude of velocity's contour is okay, considering the speed of sound is infinite when the medium is incompressible.

I hope this post will help someone later.



Best,
Peter


Thank you.This helped for OF5.0 case of mine.
This was giving me error:
Code:

postProcess -func MachNo
Error for the record:
Code:

Reading fields:
    volVectorFields: U

Executing functionObjects
--> FOAM Warning :    functionObjects::MachNo MachNo cannot find required object thermophysicalProperties of type fluidThermo
--> FOAM Warning :    functionObjects::MachNo MachNo failed to execute.

The correct command at least for 5.x version is:
Code:

sonicFoam -postProcess -func MachNo

P.S. Although I have no idea how this error, as also mentioned in the development note here helps one to identify the source of error. Or maybe am missing to read something?


All times are GMT -4. The time now is 18:10.