|
[Sponsors] |
June 8, 2004, 02:52 |
Is Matlab an appropriate option?
|
#1 |
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++. |
|
June 8, 2004, 03:00 |
Re: Is Matlab an appropriate option?
|
#2 |
Guest
Posts: n/a
|
Is matlab an appropriate option for writing cfd codes.
|
|
June 8, 2004, 14:07 |
Re: Is Matlab an appropriate option?
|
#3 |
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? |
|
June 8, 2004, 14:53 |
Re: Is Matlab an appropriate option?
|
#4 |
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.
|
|
June 8, 2004, 16:56 |
Re: Is Matlab an appropriate option?
|
#5 |
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" |
|
June 19, 2004, 15:38 |
Re: Is Matlab an appropriate option?
|
#6 |
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 |
|
|
|
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 |