You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generating contour plots with Matplotlib, specifically with tricontourf on nonregular domains, can be extremely slow on 2D meshes with a few thousand elements. On the isentropic vortex case, with 50x50 rectangles (total of 5000 triangles), Matplotlib takes 4 mins to post process if the regular mesh setting is used, and about 30 mins if regular mesh is set to false. Since certain 2D problems of interest (such as oblique shocks) cannot be post processed with a regular mesh, it is desired to find an alternative tool chain to produce these plots more efficiently.
Some profiling was done to verify that this is a Matplotlib issue, not a Quail issue. Attached is an icicle plot from cProfile/Snakeviz that shows that almost all of the run time for this case was spent in Matplotlib's tricontourf function.
Suggested Solutions
There are several potential options for post processing. Paraview is a commonly used CFD post processing library that is free and open source, and has a Python interface. Other potential libraries of interest may be VTK or Mayavi. Software such as Tecplot may not be desirable, since it is not open source.
The text was updated successfully, but these errors were encountered:
alilasemi
changed the title
Add capability to post process with external tools to overcome Matplotlib's slow contour plot generation
Feature Request: Add capability to post process with external tools to overcome Matplotlib's slow contour plot generation
Dec 16, 2020
Problem
Generating contour plots with Matplotlib, specifically with tricontourf on nonregular domains, can be extremely slow on 2D meshes with a few thousand elements. On the isentropic vortex case, with 50x50 rectangles (total of 5000 triangles), Matplotlib takes 4 mins to post process if the regular mesh setting is used, and about 30 mins if regular mesh is set to false. Since certain 2D problems of interest (such as oblique shocks) cannot be post processed with a regular mesh, it is desired to find an alternative tool chain to produce these plots more efficiently.
Some profiling was done to verify that this is a Matplotlib issue, not a Quail issue. Attached is an icicle plot from cProfile/Snakeviz that shows that almost all of the run time for this case was spent in Matplotlib's tricontourf function.

Suggested Solutions
There are several potential options for post processing. Paraview is a commonly used CFD post processing library that is free and open source, and has a Python interface. Other potential libraries of interest may be VTK or Mayavi. Software such as Tecplot may not be desirable, since it is not open source.
The text was updated successfully, but these errors were encountered: