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

Is Matlab an appropriate option?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 8, 2004, 02:52
Default Is Matlab an appropriate option?
  #1
Leo
Guest
 
Posts: n/a
Is Matlab an appropriate option for writing CFD code?

I know its capable of producing fancy graphics. I am not sure whether it can handle data like Fortran or C/C++.
  Reply With Quote

Old   June 8, 2004, 03:00
Default Re: Is Matlab an appropriate option?
  #2
tejas
Guest
 
Posts: n/a
Is matlab an appropriate option for writing cfd codes.
  Reply With Quote

Old   June 8, 2004, 14:07
Default Re: Is Matlab an appropriate option?
  #3
Jim_Park
Guest
 
Posts: n/a
I have no personal experience, but have talked to several people who use it.

Their story is:

Matlab's great for developing algorithms and running small problems (as in 2-d or very coarse meshes), but is too slow to run quantitative simulations. For that, they have a graduate student redo the algorithm in Fortran or C++.

Sounds like a 'yes and no', doesn't it?
  Reply With Quote

Old   June 8, 2004, 14:53
Default Re: Is Matlab an appropriate option?
  #4
alex
Guest
 
Posts: n/a
Great point. In my experience matlab/maple/mathematica and such are great tools in doing graduate research in new cfd algorithm development because of the build-in functions, matrix operations, symbolic manipulations and such. As mentioned above, you are confined to 2d and rather coarse meshes. Efficient algorithm implementation on finer meshes both 2d and 3d would require writing your own code or using some 3rd party stuff, you could still do the data post processing part using matlab though.
  Reply With Quote

Old   June 8, 2004, 16:56
Default Re: Is Matlab an appropriate option?
  #5
noName
Guest
 
Posts: n/a
I have written several CFD codes over the past few years, and I always found it useful to write the exact same code in MATLAB first and test it on a small case. Matlab offers functions capability, global variables, structures, complex arrays, ease with strings, and whole bunch of built in functions. Once your code is running in MATLAB, it is easy to migrate it to fortran (of course, re-writing it); It surely helps you develop a strong intuition of what's going on, it's easy and fast to visualize data and conduct dynamic tests while the code is running (e.g. divergence free, etc).

There is an old saying in engineering: "If it's possible, MATLAB can do it"
  Reply With Quote

Old   June 19, 2004, 15:38
Default Re: Is Matlab an appropriate option?
  #6
Scott
Guest
 
Posts: n/a
I agree that MATLAB is great for code development, and has good visualization tools, but has too much overhead for large (3-D) problems.

You may be able to get around this limitation by utilizing FORTRAN subroutines for the numerically intersive parts of your code. If you are using the finite volume method, this will probably be the pressure correction.

MATLAB will let you call FORTRAN subroutines as if they were built-in functions using MEX files. You will require a FORTRAN compiler that is compatible with MATLAB.

Good Luck
  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
Wind turbine simulation Saturn CFX 60 July 17, 2024 06:45
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 06:21
Simulation of a single bubble with a VOF-method Suzzn CFX 21 January 29, 2018 01:58
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05


All times are GMT -4. The time now is 23:24.