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.

What is equivalent to "Global Expression" and "Subdomain Expression" in COMSOL v4.2?

Please login with a confirmed email address before reporting spam

Hi,

I am a student working on FEA modeling of smart materials. A previous student in my lab set up a COMSOL model in v3.5, but now I'm trying to update it to v4.2.

1) In my PDEs, uX, uY, and uZ which are the displacements in each direction are defined as dependent variables. But I want to define another variable SXX = uXx, which is the strain along x direction. In v3.5, SXX = uXx is defined in "Global Expression", but where to define it in v4.2?
I tried the "variable" in v4.2, but it said uXx is unknown...

2) In my PDEs, the expression of my weak form is the same for each subdomain, for example: "-HX*test(uX)". However, the values of HX are different in every subdomain. For example, in subdomain 1, HX = 1; in subdomain 2, HX = 2; in subdomain 3, HX is calculated from a matlab function...
In COMSOL v3.5, I just defined different HX for each subdomain in "subdomain expression", but how to do it in v4.2.

I am just a beginner in COMSOL, Thank you very much for your help.

Dan

2 Replies Last Post Feb 29, 2012, 9:03 p.m. EST
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 Feb 29, 2012, 4:16 p.m. EST
Hi

it's much the same, a few things has changed place ;)

You can add a global expresion to your physics by adding a "node" right click on the main physics and scroll down in the menu. Note to see everything you might need to add Options Preference Show "select all" (with the danger it will add many tabs, more to look after) You wil lfind a "global" in the right click list with sub-items. You can also add a Global ODE physics node

You define local variables under the Definitions node (right click - everywhere in the beginning) add a variables node, then define where it is applicable: domain or boundary ... (by default it applies everywhere) . You might add several variables sub-nodes and define them for different domains or boundaries.

One warning though, if you are using SOLID there is a major change between 3.5 and 4.2 it's about the spatial frame that is now on by default, so check carefully the differences in x (spatial frame) and X (material frame) as ux and uX are not the same thing and I wounder if this has not changed (crossing x and X between 3.5 and 4.2). I had some trouble with that in the beginning.
As most variables names has changed be sure you are using the new ones, the easiest is to look under the lowest level sub-nodes appearing when Options Preferences Show "equation view" is turned on

--
Good luck
Ivar
Hi it's much the same, a few things has changed place ;) You can add a global expresion to your physics by adding a "node" right click on the main physics and scroll down in the menu. Note to see everything you might need to add Options Preference Show "select all" (with the danger it will add many tabs, more to look after) You wil lfind a "global" in the right click list with sub-items. You can also add a Global ODE physics node You define local variables under the Definitions node (right click - everywhere in the beginning) add a variables node, then define where it is applicable: domain or boundary ... (by default it applies everywhere) . You might add several variables sub-nodes and define them for different domains or boundaries. One warning though, if you are using SOLID there is a major change between 3.5 and 4.2 it's about the spatial frame that is now on by default, so check carefully the differences in x (spatial frame) and X (material frame) as ux and uX are not the same thing and I wounder if this has not changed (crossing x and X between 3.5 and 4.2). I had some trouble with that in the beginning. As most variables names has changed be sure you are using the new ones, the easiest is to look under the lowest level sub-nodes appearing when Options Preferences Show "equation view" is turned on -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 29, 2012, 9:03 p.m. EST
Thanks a lot.
Thanks a lot.

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.