CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

how to plot contour of alpha=0.5 in matlab

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 15, 2020, 15:27
Question how to plot contour of alpha=0.5 in matlab
  #1
Member
 
Join Date: Apr 2018
Location: UK
Posts: 78
Rep Power: 8
JM27 is on a distinguished road
Hi,

I want to plot the bubble contour using alpha = 0.5 in order to compare the bubble shape at various times in my simulation. I want to do this in Matlab by plotting various times on the same plot.

I create the contour in Paraview and I save the coordinates of alpha=0.5 contour using File --> Save Data.

The problem is that when I plot the coordinates in Matlab the points are joined differently to what I see in Paraview (see attached image). I have tried sorting the data but Matlab just fills the whole shape of the bubble instead of showing only the outline.

Can someone please tell me how I can solve this problem or a better way to do this?
Attached Images
File Type: jpg alpha_contour.jpg (62.1 KB, 20 views)
JM27 is offline   Reply With Quote

Old   May 15, 2020, 17:49
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
Hi,

Not sure if you are aware of the current forum for the post - hence my message - might be better to raise this question in a MATLAB forum.

Hope you find solution to ur problem.
HPE is offline   Reply With Quote

Old   May 16, 2020, 21:25
Default
  #3
Senior Member
 
abdikerim kurbanaliev
Join Date: Jun 2010
Location: Kyrgyzstan, Osh
Posts: 120
Rep Power: 15
kerim is on a distinguished road
Quote:
Originally Posted by JM27 View Post
Hi,

I want to plot the bubble contour using alpha = 0.5 in order to compare the bubble shape at various times in my simulation. I want to do this in Matlab by plotting various times on the same plot.

I create the contour in Paraview and I save the coordinates of alpha=0.5 contour using File --> Save Data.

The problem is that when I plot the coordinates in Matlab the points are joined differently to what I see in Paraview (see attached image). I have tried sorting the data but Matlab just fills the whole shape of the bubble instead of showing only the outline.

Can someone please tell me how I can solve this problem or a better way to do this?
Hi,
Have you used griddata function?
kerim is offline   Reply With Quote

Old   October 26, 2020, 12:55
Default
  #4
Senior Member
 
Join Date: Jul 2019
Posts: 148
Rep Power: 6
Bodo1993 is on a distinguished road
Hi, I use the file 'surfaces' to extract 2D surfaces of the phase fraction from OpenFOAM transient results. I postprocess the data using MATLAB to plot contours of the phase fraction and make videos. I am wondering if I have to use the interpolation function 'griddata' to do so. The problem with 'griddata' is that it takes time to do the interpolation, e.g. a simulation with 100 time steps may take more than an hour to generate the video. Any suggestions?
Bodo1993 is offline   Reply With Quote

Reply

Tags
matlab; bubble contour;


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
Export/Import data contour plots with Matlab meangreen FLUENT 11 October 28, 2020 10:06
3D contour plot from matlab vectors diggee Tecplot 1 June 5, 2017 12:19
[General] 3D contour plot from matlab matrices diggee ParaView 0 June 2, 2017 10:41
Viewing the 3D plot in matlab KaranG Main CFD Forum 2 April 10, 2017 07:55
Matlab PP: Generating X-vel Contour Error Plot Bennp2000 FLUENT 5 March 4, 2011 15:58


All times are GMT -4. The time now is 20:03.