CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Contour plot in python (https://www.cfd-online.com/Forums/main/217474-contour-plot-python.html)

absrocks007 May 13, 2019 22:57

Contour plot in python
 
Hi, I have unstructured grid data set with which I want to get pressure and velocity contours. I am using python to plot the contours. Here is the link which provided the details how to plot contours from unstructured grid data


https://scipy-cookbook.readthedocs.i...aced_data.html


I used the above mentioned method to plot pressure and velocity contours. In the velocity contour the wall region is properly visualized, whereas in the pressure contour the region is not visible, the region is filed by the color. The images are attached


Any help regarding this will be appreciatedhttp://ibb.co/F52Jqc6http://ibb.co/0tNZBm7
https://ibb.co/F52Jqc6
https://ibb.co/0tNZBm7

Светлана May 19, 2019 23:50

Can I see your code? Or is it exactly the same as at the page you linked?

Kolan May 23, 2019 12:37

If your data is unstructured you may first need to convert the scattered points to a plaid array. The scipy function griddata will do this for you. Then use matplotlib’s contourf.

However looking at your images the data looks clipped. Just adjust the contour levels.


All times are GMT -4. The time now is 06:08.