CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Contour plot in python

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 13, 2019, 23:57
Default Contour plot in python
  #1
New Member
 
Abhishek Mukherjee
Join Date: Nov 2018
Posts: 6
Rep Power: 8
absrocks007 is on a distinguished road
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 appreciated
https://ibb.co/F52Jqc6
https://ibb.co/0tNZBm7
absrocks007 is offline   Reply With Quote

Old   May 20, 2019, 00:50
Default
  #2
Senior Member
 
Svetlana Tkachenko
Join Date: Oct 2013
Location: Australia, Sydney
Posts: 416
Rep Power: 15
Svetlana is on a distinguished road
Can I see your code? Or is it exactly the same as at the page you linked?
Svetlana is offline   Reply With Quote

Old   May 23, 2019, 13:37
Default
  #3
New Member
 
Kevin Nolan
Join Date: Nov 2012
Posts: 13
Rep Power: 14
Kolan is on a distinguished road
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.
Kolan is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Working with Python: Query of through-plane flow of multiple clips in one plot PedroInvierno EnSight 8 April 10, 2017 10:23
How to Contour plot for omega_z ?? snehal OpenFOAM 3 March 11, 2017 06:41
generating 2d-planar contour plots from a contour plot on a curved surface alinik CFX 3 May 21, 2016 07:17
udf diffusivity in contour plot Lilly FLUENT 0 July 29, 2014 09:40
contour plot help jesse@uconn FLUENT 0 February 15, 2010 20:05


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