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

Problem with Matlab

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 26, 2005, 00:31
Default Problem with Matlab
  #1
havana
Guest
 
Posts: n/a
I have written several codes using Matlab. I written a code in explicit form, and I found that the results seems to deviate from the code written in other languages, but the accuracy is still acceptable. However, when I modify the codes to implicit form for shock capturing, the code just blown out. And in some other cases, it spent more iterations compare to other languages.

May I know what is the problem? Should I use Matlab to write my CFD code? Please help to clear my great doubt. Thanks a lot.

Havana
  Reply With Quote

Old   March 26, 2005, 05:51
Default Re: Problem with Matlab
  #2
Willpin
Guest
 
Posts: n/a
I think Fortran is more suitalbe for Engineering calculation. But if the accuracy is in the range of tolerance, it should be ok with matlab.
  Reply With Quote

Old   March 27, 2005, 16:28
Default Re: Problem with Matlab
  #3
khairy
Guest
 
Posts: n/a
Hi i already write CFD codes using Qbasic,Fortran77,Matlab6,Fortran90,and Visual basic 6,from my little experience in CFD fortran 90 is the most effective and rapid one. if you need any help contact at omrkhairy75@yahoo.com have a good luck khairy-Egypt
  Reply With Quote

Old   March 28, 2005, 05:19
Default Re: Problem with Matlab
  #4
havana
Guest
 
Posts: n/a
So did you face the same problem as I do when using Matlab?
  Reply With Quote

Old   March 28, 2005, 15:43
Default Re: Problem with Matlab
  #5
Steve
Guest
 
Posts: n/a
My advice (been there, done that):

Use MATLAB to prototype your code. Then rewrite your solver in C/C++/FORTRAN/Fortran. Connect to it via Matlab's excellent MEX interface, so you can pre- and post-process in MATLAB. Finally, divorce yourself from MATLAB entirely.

I wrote C++ classes to emulate the MATLAB data structures, using well known (and fast) FORTRAN underneath to do the matrix manipulation. Converting from MATLAB to C++ was quite simple.
  Reply With Quote

Old   March 28, 2005, 21:20
Default Re: Problem with Matlab
  #6
debs
Guest
 
Posts: n/a
Matlab code should work fine like anyother code as long as you do not have problems of memory. Check for memory problems and also check your code
  Reply With Quote

Old   March 29, 2005, 00:19
Default Re: Problem with Matlab
  #7
Peter Attar
Guest
 
Posts: n/a
I know this may be hard to believe...but perhaps you have a bug.....
  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
Problem with interFoam; Wave/wiggle alpha1 behavior JonW OpenFOAM 10 February 4, 2023 08:27
Gambit - meshing over airfoil wrapping (?) problem JFDC FLUENT 1 July 11, 2011 06:59
Problem in implementing cht tilek CFX 3 May 8, 2011 09:39
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 20:13
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 15:52


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