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.

Non-selected node affects end-results

Machiel Kolstein
Hi,

I have various physics nodes in one single project. (Both are Transport of Diluted Species nodes.) One of them works with a variable "n" and another "h". I also have a Study, with a Step which is Time Dependent. Here, in "Physics and Variables Selection", I only select one of the two nodes (let's say, with output "n"). However, when I plot out the results (i.e variable "n"), these seem to be influenced by both nodes. When I only plot "h", I get 0, as it should be.
When I disable the second node (the one with "h"), and redo the study, then the result, plotting "n" is as expected.
In other words: the "n" result depends on whether or not the "h"-node is enabled, even though the "h-node" is not included in the time-dependent Study Step (nor in any other Study Step)! How is this possible?
Why does a node influence my result, even when the node it is not selected in the Study section?

Best regards,

Machiel

P.D. (I have COMSOL multiphysics 4.3a)

4 Replies Last Post Oct 29, 2013, 7:45 AM EDT
Machiel Kolstein
Posted: 4 years ago Oct 28, 2013, 1:22 PM EDT

Hi again,

After investigating some more, I found that this problem only occurs, when the "non-selected" node has a variable "h". Whenever I change the name of the variable, the problem is solved.
Actually, when I switch on the node, with variable "h", the program gets stuck. However, changing the variable name, the program gives a good result.
From this I deduced that "h" was some kind of proteced variable (Planck's constant). Fair enough. However, when I use "c" instead of "h", the problem does not occur.
In any case, shouldn't COMSOL give me a warning when I accidently use a constant as a variable name?

Best regards,

Machiel
Hi again, After investigating some more, I found that this problem only occurs, when the "non-selected" node has a variable "h". Whenever I change the name of the variable, the problem is solved. Actually, when I switch on the node, with variable "h", the program gets stuck. However, changing the variable name, the program gives a good result. From this I deduced that "h" was some kind of proteced variable (Planck's constant). Fair enough. However, when I use "c" instead of "h", the problem does not occur. In any case, shouldn't COMSOL give me a warning when I accidently use a constant as a variable name? Best regards, Machiel

Jeff Hiller COMSOL Employee
Posted: 4 years ago Oct 28, 2013, 2:55 PM EDT
h is the element size, per Reference Manual, version 4.3b, page 244.
h_const is the Planck constant, per Reference Manual, version 4.3b, page 257.
c_const is the speed of light, per Reference Manual, version 4.3b, page 257.
c is the default name for concentration if you have a mass transfer equation in your file, per Reference Manual, version 4.3b, page 714.
Best,
Jeff
h is the element size, per Reference Manual, version 4.3b, page 244. h_const is the Planck constant, per Reference Manual, version 4.3b, page 257. c_const is the speed of light, per Reference Manual, version 4.3b, page 257. c is the default name for concentration if you have a mass transfer equation in your file, per Reference Manual, version 4.3b, page 714. Best, Jeff

Machiel Kolstein
Posted: 4 years ago Oct 29, 2013, 6:27 AM EDT

Hi,

Thank you very much for your reply and confirm this issue. I don't have version 4.3b, but 4.3a, but in the User Guide, on pages 153 and 166, I found the information as you stated. I use two Transport of Diluted Species nodes, so I can't just stick to the default "c". Anyway, I will be more careful in selecting variable names in future.
Still, I think it might not be a bad idea if COMSOL would provide some warning when a user tries to use certain reserved variables (like h or t or x) in the inappropiate place.
Best regards,

Machiel
Hi, Thank you very much for your reply and confirm this issue. I don't have version 4.3b, but 4.3a, but in the User Guide, on pages 153 and 166, I found the information as you stated. I use two Transport of Diluted Species nodes, so I can't just stick to the default "c". Anyway, I will be more careful in selecting variable names in future. Still, I think it might not be a bad idea if COMSOL would provide some warning when a user tries to use certain reserved variables (like h or t or x) in the inappropiate place. Best regards, Machiel

Jeff Hiller COMSOL Employee
Posted: 4 years ago Oct 29, 2013, 7:45 AM EDT
Hi Machiel,
Thank you for your feedback.
Best regards,
Jeff
Hi Machiel, Thank you for your feedback. Best regards, Jeff

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.