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.

global variable definitions in Ver4.0

Please login with a confirmed email address before reporting spam

I built a electrostatics model in comsol Ver3.5. It works well. Then I open it in Ver4.0, and I found it has a error when computing a pre-defined global variables. I notice the definition is different from Ver3.5, so I change the expression to "mod1.emes.epsilon0*(mod1.emes.normE)^2*(mod1.emes.epsilonr-1)*(mod1.emes.epsilonr+2)/6",as shown in the following, but it still seems has a problem.

Can anybody know how to fix it?

global definitions variables 1
electrostatics (emes)
P=mod1.emes.epsilon0*(mod1.emes.normE)^2*(mod1.emes.epsilonr-1)*(mod1.emes.epsilonr+2)/6

3 Replies Last Post Aug 3, 2010, 3:34 a.m. EDT
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 Aug 1, 2010, 7:52 a.m. EDT
Hi

thenaming has changes quite a lot between the two COMSOL versions, so I'm not astonished that one get translation errors (Comsol is also improving their translators, so this issue might be solved with newer releases).
I can only suggest to you to turn on the equations in V4 (options preferences) and analyse deeper into the formulas, the naming convention o the id tags (1,2,3) might have changed or been wrongly asserted

--
Good luck
Ivar
Hi thenaming has changes quite a lot between the two COMSOL versions, so I'm not astonished that one get translation errors (Comsol is also improving their translators, so this issue might be solved with newer releases). I can only suggest to you to turn on the equations in V4 (options preferences) and analyse deeper into the formulas, the naming convention o the id tags (1,2,3) might have changed or been wrongly asserted -- Good luck Ivar

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Aug 3, 2010, 2:32 a.m. EDT
Hi,

The correct expression in 4.0, for a global variable, with the default identifiers mod1 for Model 1 and es for Electrostatics is

epsilon0_const*(mod1.es.normE)^2*(mod1.es.epsilonr-1)*(mod1.es.epsilonr+2)/6

Notice that epsilon0 is a predefined physical constant and is always available using the _const suffix.

If you define the variable inside Model 1, the "mod1." part is not needed.

Best regards,

Magnus RIngh
COMSOL
Hi, The correct expression in 4.0, for a global variable, with the default identifiers mod1 for Model 1 and es for Electrostatics is epsilon0_const*(mod1.es.normE)^2*(mod1.es.epsilonr-1)*(mod1.es.epsilonr+2)/6 Notice that epsilon0 is a predefined physical constant and is always available using the _const suffix. If you define the variable inside Model 1, the "mod1." part is not needed. Best regards, Magnus RIngh COMSOL

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 Aug 3, 2010, 3:34 a.m. EDT
Hei Magnus

In fact you could add a column in the table in the doc with the constants, giving their correct complete name (with the "_const" suffix). I find the table slighly confusing since "epsilon0" is the physicsl name but "epsilon0_const" is the COMSOL name to use. Only the wording in the sentence above is somewhat misleading. But once you have understood its all obvious, but it took me some ime to "understand" ;)

--
Have a nice day
Ivar
Hei Magnus In fact you could add a column in the table in the doc with the constants, giving their correct complete name (with the "_const" suffix). I find the table slighly confusing since "epsilon0" is the physicsl name but "epsilon0_const" is the COMSOL name to use. Only the wording in the sentence above is somewhat misleading. But once you have understood its all obvious, but it took me some ime to "understand" ;) -- Have a nice day 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.