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.

a very basic question

Please login with a confirmed email address before reporting spam

Hi

I am moving from COMSOL 3.5a to 4.1. I was using PDE (General form) in which "h" and "p" are two variables. One of the parameter say "gamma" is dependent on "h". When I define "gamma" as a function of "h" in "variables", it becomes red and the solution says cannot evaluate "h".

Before in COMSOL, I was easily defining "h" in scalar or global expressions and had never faced any problems. But in 4.1, this does not accept in "variables".

There must be another way to define "gamma" as a function of "h", elsewhere. Does anybody know?

Thanks

8 Replies Last Post 5 mai 2011, 09:19 UTC−4
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 4 mai 2011, 08:15 UTC−4
In COMSOL, "h" is the mesh element size.It's a bad idea to try and use the same name for one of your variables. Try some other, less common, name for your variables.
In COMSOL, "h" is the mesh element size.It's a bad idea to try and use the same name for one of your variables. Try some other, less common, name for your variables.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 4 mai 2011, 08:37 UTC−4
Hi,

I used "hh" instead, but the problem remains. In comsol 3.5a, it is working fine. Any idea?

regards
Hi, I used "hh" instead, but the problem remains. In comsol 3.5a, it is working fine. Any idea? regards

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 4 mai 2011, 08:47 UTC−4
Hard to say much of any value without seeing your file. One possibility is that your hh is defined for one Model but that you are trying to use it in a definition at the global level (i.e. in your Global Definitions), which of course won't work. If that's the case, try using Definitions inside the model where the independent variables are defined instead.
Hard to say much of any value without seeing your file. One possibility is that your hh is defined for one Model but that you are trying to use it in a definition at the global level (i.e. in your Global Definitions), which of course won't work. If that's the case, try using Definitions inside the model where the independent variables are defined instead.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 4 mai 2011, 09:06 UTC−4
Hi

I attached the file. Perhaps you have an idea by looking at variables and PDE eqn.

Regards
Hi I attached the file. Perhaps you have an idea by looking at variables and PDE eqn. Regards


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 4 mai 2011, 09:10 UTC−4
Salut Naveed

If you have defined your variable or your parameter under Global Definitions, you have to type the Model Identifier before h (mod1.h).

If you have defined h under Model 1, then I don't know what to tell you.

look at the attached jpg.
Salut Naveed If you have defined your variable or your parameter under Global Definitions, you have to type the Model Identifier before h (mod1.h). If you have defined h under Model 1, then I don't know what to tell you. look at the attached jpg.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 4 mai 2011, 09:12 UTC−4

If you have defined h under Model 1, then I don't know what to tell you.


If you have defined GAMMA under Model 1...
[QUOTE] If you have defined h under Model 1, then I don't know what to tell you. [/QUOTE] If you have defined GAMMA under Model 1...

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 4 mai 2011, 09:16 UTC−4
Thank you very much! Yes, it was missing "mod1". I have never done this in COMSOL 3.5a, so a new thing to learn.

Thank you very much, indeed.

Regards
Naveed
Thank you very much! Yes, it was missing "mod1". I have never done this in COMSOL 3.5a, so a new thing to learn. Thank you very much, indeed. Regards Naveed

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 5 mai 2011, 09:19 UTC−4
Hi

also a little warning, use names with more than 1 lettre, as most of the single letter are already used by COMSOL,and it's quickly done to mix and change internal variables, this is allowed though, when you know what you are doing ;)

--
Good luck
Ivar
Hi also a little warning, use names with more than 1 lettre, as most of the single letter are already used by COMSOL,and it's quickly done to mix and change internal variables, this is allowed though, when you know what you are doing ;) -- Good luck Ivar

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.