|
[Sponsors] |
March 27, 2008, 10:53 |
Femlab: why isn't this code working?
|
#1 |
Guest
Posts: n/a
|
Hey people,
I'm new to Femlab but I used to do a few things in Matlab. I found sth. interesting in a publication on the net and would like to get it to work. It's just some sphere in a Navier Stokes fluid. http://www2.mic.dtu.dk/research/MIFT...FlowSphere.pdf Now when I save those 2 m files from the appendix and try to open the main file Femlab doesn't understand a bunch of functions as tic;,toc; or even num2str();. It also seems to be unable to include the second m-file even though it's in the same directory and it has the right filename. Anyways I just included (copy paste) the code from the second file (http://www.xammm.com/setappmode.m) twice into the main file and I also made comments out of any tic;,toc;,num2str(); functions since afaik they aren't really necessary for the code to run. So I end up using this m-file: http://www.xammm.com/calcdrag.m Now when I try to run it in Femlab there are no errors but nothing happens (cpu usage goes to 100% and computer almost freezes). Can anyone try the last m-file? Maybe it's just not working because of the Femlab version I'm using here. Thanks, Max Max |
|
April 9, 2008, 03:17 |
Re: Femlab: why isn't this code working?
|
#2 |
Guest
Posts: n/a
|
Hi,
Some general advice: - Upgrade to the latest version of the software: COMSOL Multiphysics 3.4 (formerly FEMLAB) - Scripts can use any scriping functions when you run them as scripts. Model M-files, which you can save and load into the COMSOL Multiphysics user interface, have stricter rules about the syntax if you want to be able to load them into the GUI, and commands such as tic and toc are not allowed. - Contact the COMSOL support desk at support@comsol.com or www.comsol.com/support. Hope this helps, Magnus Ringh COMSOL AB |
|
April 9, 2008, 10:35 |
Re: Femlab: why isn't this code working?
|
#3 |
Guest
Posts: n/a
|
Hey Magnus,
thanks for your reply! I already fixed the problem by designing my own model from scratch in Femlab. It was easier than I thought it would be. Max |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Original OpenFOAM author(s)? | roenby | OpenFOAM | 21 | July 14, 2021 13:08 |
Fortran->Assembly : How to remove redundant non-vectorized code? | aerosayan | Main CFD Forum | 6 | November 20, 2020 06:37 |
COBRAS code | novan tofany | Main CFD Forum | 0 | October 8, 2012 05:40 |
Design Integration with CFD? | John C. Chien | Main CFD Forum | 19 | May 17, 2001 16:56 |
What is the Better Way to Do CFD? | John C. Chien | Main CFD Forum | 54 | April 23, 2001 09:10 |