Comsol scripting error

Topics: no topics

Thread index  |  Previous thread  |  Next thread  |  Start a new discussion

RSS FeedRSS feed   |   Email notificationsTurn on email notifications   |   2 Replies   Last post: February 2, 2011 8:19am UTC
Andrea Mazzalai

Andrea Mazzalai

February 1, 2011 6:27pm UTC

Comsol scripting error

Good evening

I am trying to script my model. It's basically a piezoelectric cantilever with connected an external load resistor through the SPICE circuit component. I want to see what happens as a function of the load resistor value.

What I did was tweaking the history m-file adding a for loop changing the resistor value.

When I try to run it I get the following error:

--- quote ---
Error in ==> resistorscantest at 44
g400=flbinary('g400','draw',flbinaryfile);
--- end quote ----

Indeed once the history file is saved, on top of it it's written:

--- quote ---
% Some geometry objects are stored in a separate file.
% The name of this file is given by the variable 'flbinaryfile'.
--- end quote ----

But the flbinaryfile is not defined:

--- quote ---
flbinaryfile='';
--- end quote ----

And indeed no other files than the original model file and its history file are present in the folder. I tried to modify manually that line inserting the model mph file name but it doesn't work.


Am I doing some mistake?

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

February 1, 2011 8:43pm UTC in response to Andrea Mazzalai

Re: Comsol scripting error

Hi

it might be tat COMSOL has put the mphbin in its "default" directory the COMSOL installation root folder. Otherwise my workaround in such situations is to save the geoemtry from te COMSOL GUI, and correct the matlab file to point to the correct filename

--
Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Andrea Mazzalai

Andrea Mazzalai

February 2, 2011 8:19am UTC in response to Ivar Kjelberg

Re: Comsol scripting error

Hello,

I manually exported the geometry and edit the .m file accordingly and it worked. Now I can continue debugging...


Many thanks

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse


Rules and guidelines