Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Error - Invalid function name. How to fix

Please login with a confirmed email address before reporting spam

Hi,

I cannot run my simulation because of the following error:

Invalid function name.
- Function: extm1
- Name
(looks a bit vague...)

I cannot find any info on what exactly is wrong neither in help nor by seraching for keywords on this forum... Can someone please advice on how to fix it (probably something simple... once you know it).

I can only guess it refers to the external Matlab functions I am using, but the names only consist of upper and lower case letters (always starting with a letter), cannot posibly overlap with the build-in functions' names and only in one case also have _ in the name, but as far as I know there is nothing wrong in using it. Besides problem remains even after I deleted this particular one.

Thank you in advance,
Mike

7 Replies Last Post 9 giu 2011, 14:07 CEST
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21 apr 2011, 22:59 CEST
Hi

Its not evident to tell, that "function" name does ring a bell for me.

Have you checked that there is not a Global or a Model function node that remains ?
and have you tried to reset the model, save it and open a fresh COMSOL session ?
Sometimes it solves the case

--
Good luck
Ivar
Hi Its not evident to tell, that "function" name does ring a bell for me. Have you checked that there is not a Global or a Model function node that remains ? and have you tried to reset the model, save it and open a fresh COMSOL session ? Sometimes it solves the case -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 22 apr 2011, 00:08 CEST
Thanks Ivar, appreciate the usual, quick answer.

I haven't thought about resetting, will give it a try first thing tomorrow.

I am not sure what you mean by 'Global or a Model function node that remains'. I mean - most likely there aren't such things because I tried to make sure after the many alterations I did that only the necessaray things remained, yet to make sure I need to understand precisely what you mean. Can you please explain?

Cheers,
Mike
Thanks Ivar, appreciate the usual, quick answer. I haven't thought about resetting, will give it a try first thing tomorrow. I am not sure what you mean by 'Global or a Model function node that remains'. I mean - most likely there aren't such things because I tried to make sure after the many alterations I did that only the necessaray things remained, yet to make sure I need to understand precisely what you mean. Can you please explain? Cheers, Mike

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 22 apr 2011, 00:56 CEST
Hi

In V4 you can define functions in the Model - Definitions node, but also in the upper Global Definitions node

--
Good luck
Ivar
Hi In V4 you can define functions in the Model - Definitions node, but also in the upper Global Definitions node -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 22 apr 2011, 01:47 CEST
OK. I only have functions defined in the global definitions node (the ones I referred to before), plus a few variables in the model definitions node. So no luck hear, I also restarted the model but it did not change the outcome (still the same error).

Thanks for the tips anyway, I realize without looking at the model it is hard to pinpoint the problem.


Thanks.
OK. I only have functions defined in the global definitions node (the ones I referred to before), plus a few variables in the model definitions node. So no luck hear, I also restarted the model but it did not change the outcome (still the same error). Thanks for the tips anyway, I realize without looking at the model it is hard to pinpoint the problem. Thanks.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 9 giu 2011, 10:57 CEST
extm1 appears to be a Matlab function call...

I am having the same problem, I was wondering if you found a solution?
extm1 appears to be a Matlab function call... I am having the same problem, I was wondering if you found a solution?

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 9 giu 2011, 13:08 CEST
Hi

often its easier to turn on "tag" names to follow the debug messages, as the references for java and matlab are the "tag" names extm1 could be tranlated to "EXTernal Matlab 1" operator/function, indeed

--
Good luck
Ivar
Hi often its easier to turn on "tag" names to follow the debug messages, as the references for java and matlab are the "tag" names extm1 could be tranlated to "EXTernal Matlab 1" operator/function, indeed -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 9 giu 2011, 14:07 CEST
Thanks,

I found the root of the problem (at least for this error).. I had installed a new version of Matlab, and after updating the .ini files (www.comsol.com/support/knowledgebase/1113/), Comsol was still not properly referencing the Matlab functions from the GUI (perhaps a problem with the path to the Matlab scripts). I solved the problem by deleting the Matlab function node, and then adding a new one back calling the same functions.
Thanks, I found the root of the problem (at least for this error).. I had installed a new version of Matlab, and after updating the .ini files (http://www.comsol.com/support/knowledgebase/1113/), Comsol was still not properly referencing the Matlab functions from the GUI (perhaps a problem with the path to the Matlab scripts). I solved the problem by deleting the Matlab function node, and then adding a new one back calling the same functions.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.