CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Visualizing mesh regions with high courant number? (https://www.cfd-online.com/Forums/openfoam/122412-visualizing-mesh-regions-high-courant-number.html)

Endel August 19, 2013 09:29

Visualizing mesh regions with high courant number?
 
Hello everyone,

first of all: sorry, if this is a trivial question, I am still new to OpenFOAM.

I'm using OpenFOAM to simulate supersonic gas flow in complex 3D geometries with the sonicFoam solver - which brings us right to the point: as my geometries are quite complex, the mesh generation with snappyHexMesh is too. There are of course always regions where cells are small and such where cells are bigger. The cases usually run quite well, but I noticed that my average courant number differs strongly from my "max" courant number (at least i think, that the difference is large - I don't really know similar cases to compare these numbers with).

For Example: "Courant Number mean: 0.00134741 max: 1.59488"

My question: Is there a possibility to (for example) visualize the courant number inside your mesh in paraview, to identify regions, where the courant number is high? This would give me the opportunity to tailor the mesh accordingly and maybe save computational time.

If you have any suggestions about how to deal with this or maybe identify the cells with high courant number, I would be very grateful.

It would even be helpful if anyone knew a possibility to show/highlight/identify the smallest cells in a mesh in paraview - this might as well give me a hint.

Thank you very much,
Endel

Bernhard August 19, 2013 09:38

You can write the Courant number as a volScalarField using the "Co" utility. Then, you can either select the values with largest Courant number in paraview, or you can make a cellSet using the "topoSet" utility and the fieldToCell source (see the topoSetDict example on how to do this).

Endel August 20, 2013 03:57

Perfect, thank you very much, that helped a lot.

Just in case anyone else is interested in this: After running the Co utility you can plot Co in paraview. Select all cells through, apply the "Threshold" filter and select the upper and lower boundaries you are interested in - done.

I am goint to look into the topoSet utility too, but the above solution already helped.

Thanks again!
Endel


All times are GMT -4. The time now is 11:45.