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

CFD with Matlab

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 17, 2012, 23:00
Default CFD with Matlab
  #1
New Member
 
Erdem
Join Date: Dec 2012
Posts: 1
Rep Power: 0
mjerdem is on a distinguished road
I am planning to use Matlab for a CFD calculation; however, I have my doubts about the plotting capabilities of Matlab. IN my first program I am going to model a pipe filling a pool. I will solve for the flow in the pipe and flow in the pool in 3D with time. Is it possible to make a movie of it using Matlab or I need to get more professional plotting tools such as paraview?
mjerdem is offline   Reply With Quote

Old   December 18, 2012, 08:27
Default
  #2
Senior Member
 
cdegroot's Avatar
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 414
Rep Power: 18
cdegroot is on a distinguished road
Matlab can do animation for sure. No fancy CFD visualizations but you can animate a contour plot for example.
cdegroot is offline   Reply With Quote

Old   December 18, 2012, 10:44
Default
  #3
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
I would more seriously think about the computational issues of a computation in Matlab, instead of the post-processing ones. However, for 3D and/or unstructured postprocessing i usually export everything in Paraview; indeed, even if you can do something in Matlab, even plotting an unstructured mesh is a computational resources' nightmare.
sbaffini is offline   Reply With Quote

Old   December 18, 2012, 10:51
Default
  #4
Senior Member
 
cdegroot's Avatar
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 414
Rep Power: 18
cdegroot is on a distinguished road
Good points. I sort of assumed he was talking about a structured code; if it is unstructured you will definitely run into difficulties doing any post processing in Matlab.

And it is good to point out too that Matlab is definitely not going to be the most efficient platform for computation. It is good for testing things out but it will be much slower and use much more memory than writing the code in C, C++, or Fortran for example.
cdegroot is offline   Reply With Quote

Old   December 18, 2012, 11:03
Default
  #5
Senior Member
 
cdegroot's Avatar
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 414
Rep Power: 18
cdegroot is on a distinguished road
I should mention I wrote a little 2D CFD code in Matlab (just as a demonstration "toy") and did some animations of Rayleigh-Benard convection. It was fine for that purpose but 3D CFD may be too demanding.
cdegroot is offline   Reply With Quote

Old   December 18, 2012, 14:33
Thumbs up
  #6
New Member
 
RZA
Join Date: Nov 2012
Posts: 25
Rep Power: 14
Engr.RZA is on a distinguished road
Yes you can write CFD code using matlab with ease of direct functions to solve equations. But for 3D contour plotting in matlab you need to put extra effort, however you can easily plot 2D contour plots in it..
Engr.RZA is offline   Reply With Quote

Old   December 18, 2012, 14:39
Default
  #7
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
I guess i also assumed he was working within an unstructured framework (which for Matlab might not be well suited). However, for a structured approach (even if computationally demanding) the post-processing stage can be much more easier and cheap as you can manage the plane and line extractions by index.

I also have my demonstration toy in Matlab (i guess we all have it ), but more than a full CFD code it is just a 3D unstructured FV framework to test gradients, filters, interpolations etc. And i found myself in real troubles when trying to plot even simple things... actually, it needed more time to plot a full 3D grid than reading it. That's why i suggest paraview, it's easy, quick, runs under windows, supports a lot of formats (you may want to use an output format different from VTK). You can't ask for a better thing
sbaffini is offline   Reply With Quote

Reply

Tags
3-d, matlab, plots


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
CFD in matlab Dougal MCQueen Main CFD Forum 1 December 5, 2003 07:45
Where do we go from here? CFD in 2001 John C. Chien Main CFD Forum 36 January 24, 2001 22:10
ASME CFD Symposium, Atlanta, July 2001 Chris R. Kleijn Main CFD Forum 0 September 13, 2000 05:48
ASME CFD Symposium, Atlanta, July 2001 Chris R. Kleijn Main CFD Forum 0 August 21, 2000 05:49
Which is better to develop in-house CFD code or to buy a available CFD package. Tareq Al-shaalan Main CFD Forum 10 June 13, 1999 00:27


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