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.

Subdomain Settings - Equation system

Leendert van der Tempel

Please login with a confirmed email address before reporting spam

When I double Telegraph Equation Model Gallery #28 for voltage and for current,
I notice TWO ways to input Coefficients of the equations that do not necessarily match but may be contradictory:

1 F8 Via Physics - Subdomain settings - Coefficients
2 CTRL+F8 Via Physics - Equation system - Subdomain settings

What is the right or prevalent place?
What is the risk of contradictions between both Coefficient sets?


20 Replies Last Post 18 mar 2017, 19:38 GMT-4
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 1 set 2010, 08:19 GMT-4
Hi

For me I understand this that they are the same but you are at two different levels of COMSOL interiours:

Normal user entry is your:
1 F8 Via Physics - Subdomain settings - Coefficients
Because her you input your values and COMSOL has strict rules (physics/application mode rules) how to handle them and how to adapt the equations when you change physics settings

One level deeper is your:
2 CTRL+F8 Via Physics - Equation system - Subdomain settings
COMSOl will "lock" the equations you touch because your are "below" its "physics /application mode interpreter and you can do things that COMSOL cannot link to the physics, so it cannot adapt or change it. You are at the raw equation level.
You can always reset the equations to the COMSOL default (this level is also awailable in V4, turn on "lower node level" by "options preferences equations")
I use this level typically in structural to disable some DoFs in the default weak equations for special load cases, but this can apply to any physics/application mode.

Conclusion: use 1) for normal work, use 2) to understand the deeper functioning, to search for internal variable names (unfortunately the sort column does not work, neither the cut/copy names, would be nice ;), or to really tweak the physics equations

Comsol is really applying physics fully out, that's why I'm having so fun Comsoling, hope you too
--
Good luck
Ivar


--
Good luck
Ivar
Hi For me I understand this that they are the same but you are at two different levels of COMSOL interiours: Normal user entry is your: 1 F8 Via Physics - Subdomain settings - Coefficients Because her you input your values and COMSOL has strict rules (physics/application mode rules) how to handle them and how to adapt the equations when you change physics settings One level deeper is your: 2 CTRL+F8 Via Physics - Equation system - Subdomain settings COMSOl will "lock" the equations you touch because your are "below" its "physics /application mode interpreter and you can do things that COMSOL cannot link to the physics, so it cannot adapt or change it. You are at the raw equation level. You can always reset the equations to the COMSOL default (this level is also awailable in V4, turn on "lower node level" by "options preferences equations") I use this level typically in structural to disable some DoFs in the default weak equations for special load cases, but this can apply to any physics/application mode. Conclusion: use 1) for normal work, use 2) to understand the deeper functioning, to search for internal variable names (unfortunately the sort column does not work, neither the cut/copy names, would be nice ;), or to really tweak the physics equations Comsol is really applying physics fully out, that's why I'm having so fun Comsoling, hope you too -- Good luck Ivar -- Good luck Ivar

Leendert van der Tempel

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 1 set 2010, 09:59 GMT-4
Thank you Ivar for your explanation.
I now find out that option 1 fills most of what you see in option 2, and that I can overwrite or complete it using option 2.
Fine.
My next question then is:
How to impose correctly a resistor boundary condition V=I*R ?

1 The paper of Shmelev 2005 suggests to put -V+R*I as r-coefficient without mentioning the h-coefficient. If h =1 this seems wrong, or should h=0?
2 Using option 1 : Put for the voltage h=1 and r=I*R and for the current h=1 and r=V/R
3 Using option 2 : Put a h-matrix [0 0] [-1/R 1] and a r-vector [0] [0] ??
Thank you Ivar for your explanation. I now find out that option 1 fills most of what you see in option 2, and that I can overwrite or complete it using option 2. Fine. My next question then is: How to impose correctly a resistor boundary condition V=I*R ? 1 The paper of Shmelev 2005 suggests to put -V+R*I as r-coefficient without mentioning the h-coefficient. If h =1 this seems wrong, or should h=0? 2 Using option 1 : Put for the voltage h=1 and r=I*R and for the current h=1 and r=V/R 3 Using option 2 : Put a h-matrix [0 0] [-1/R 1] and a r-vector [0] [0] ??

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 1 set 2010, 18:03 GMT-4
Hi

as I do not have access to COMSOL from where I'm just now, I cannot check, but from memory: 2 and 3 should be the same, the easiest is to fill in your case 2, and "apply" then go to the "physics equation settings ..." and check what COMSOL has defined as h&r

From my earlier reply what you fill in under "F8" (higher normal user level) will analyse and fill in the values under "CNTRL-F8" (lower level) while the opposite is not true

Now imposing relations on boundaries can be done in different ways, and which depends aso on the dependent variables you have and what equation(s) you want. You can also define your own variables and impose combination of these. (i.e. see the example of applying a moment on an axis on the structural v3.5a doc)

--
Good luck
Ivar
Hi as I do not have access to COMSOL from where I'm just now, I cannot check, but from memory: 2 and 3 should be the same, the easiest is to fill in your case 2, and "apply" then go to the "physics equation settings ..." and check what COMSOL has defined as h&r From my earlier reply what you fill in under "F8" (higher normal user level) will analyse and fill in the values under "CNTRL-F8" (lower level) while the opposite is not true Now imposing relations on boundaries can be done in different ways, and which depends aso on the dependent variables you have and what equation(s) you want. You can also define your own variables and impose combination of these. (i.e. see the example of applying a moment on an axis on the structural v3.5a doc) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 3 gen 2011, 19:40 GMT-5
Hi,

Actually, i treat a structural problem where the equation of mouvement is general. The components of tensor of stiffness depend on spacials variables. So the physic of material is changed (properties of material depend on coordinates).

I add these equations in Physics - Equation system - Subdomain settings but i see that it don't work. I must always define the material like in library. So how i can active my equations?
Hi, Actually, i treat a structural problem where the equation of mouvement is general. The components of tensor of stiffness depend on spacials variables. So the physic of material is changed (properties of material depend on coordinates). I add these equations in Physics - Equation system - Subdomain settings but i see that it don't work. I must always define the material like in library. So how i can active my equations?

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 4 gen 2011, 05:04 GMT-5
Hi

in which version, 3.5 ?

in v4.1 I can easily write for the Young modulus

E = (0.1+Param*1*(Len-y[1/m]))*1E9[Pa]

and do a param sweep from 0 to 1 and see that by Len long solid beam deflects differently, so my E is E(y) jsut by writing out he equation

--
Good luck
Ivar
Hi in which version, 3.5 ? in v4.1 I can easily write for the Young modulus E = (0.1+Param*1*(Len-y[1/m]))*1E9[Pa] and do a param sweep from 0 to 1 and see that by Len long solid beam deflects differently, so my E is E(y) jsut by writing out he equation -- Good luck Ivar


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 4 gen 2011, 08:51 GMT-5
hi,

thank u for your fast answer.
Your material is always elastic isotropic where properties of material is characteristic by E and v. If it is anisotropic, how can i define it?

In fact, my equation of movement is written as:

nabla x (-c nabla x u) + beta nabla x u = 0

where u is vector of displacement, c and beta depend on z.

I can write it in subdomain setting but i d'ont understand why it isn't actived in computing?

-------
Toan
hi, thank u for your fast answer. Your material is always elastic isotropic where properties of material is characteristic by E and v. If it is anisotropic, how can i define it? In fact, my equation of movement is written as: nabla x (-c nabla x u) + beta nabla x u = 0 where u is vector of displacement, c and beta depend on z. I can write it in subdomain setting but i d'ont understand why it isn't actived in computing? ------- Toan

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 4 gen 2011, 15:06 GMT-5
Hi

Indeed I did no switch on the anisotropic elastic material proerties in the linear elastic node, because then I need to define the full tensor.
But there is a line in the GUI node to select "isotropic", "orthotropic" or fully "anisotropic" material, and then if you select "user defined" you can set up the full tensor, with equations at your will. Note it's limited to the default cartesian coordinate, so you must take care of any coordinate transforms yourself

--
Good luck
Ivar
Hi Indeed I did no switch on the anisotropic elastic material proerties in the linear elastic node, because then I need to define the full tensor. But there is a line in the GUI node to select "isotropic", "orthotropic" or fully "anisotropic" material, and then if you select "user defined" you can set up the full tensor, with equations at your will. Note it's limited to the default cartesian coordinate, so you must take care of any coordinate transforms yourself -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 5 gen 2011, 04:54 GMT-5
thank u very much

Toan
thank u very much Toan

Leendert van der Tempel

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 6 gen 2011, 03:28 GMT-5
BOUNDARY CONDITION IMPLEMENTATION
Ivar's two suggestions to implement the resistance boundary condition are indeed equivalent; the easiest is to fill in the first:
• Via Physics - Subdomain settings -Coefficients (F8) put
for the voltage h=1 and r=I*Rs
for the current h=1 and r=V/Rs where Rs is the closing spark resistance
• Via Physics - Equation system - Subdomain settings (Ctrl+F8) put
h=[[1 -Rs] [-1/Rs 1]] and r=[[0] [0]]

PROBLEM WITH TELEGRAPHER'S EQUATION AND SOLUTION
However no boundary condition imposes the telegrapher’s equations there, hence the telegrapher equations are violated if the closing spark resistance is time dependent.
Impose similarly the telegrapher’s equation 2pi ri·dV/dr = µl·dI/dt+R#·I at the inner boundary
via Physics - Equation system - Boundary settings (Ctrl+F8) put:
q=[[0 -R#/2pi ri] [0 0]] and g=[[µlIt#/2pi ri] [0]] and h=[[1 -Rs] [-1/Rs 1]] and r=[[0] [0]]

REMAINING PROBLEM
The other telegrapher's equation is not imposed there, hence violated if the closing spark resistance is time dependent.
It may be imposed similarly, but how to impose it while imposing I=V/Rs when only 2 bc are available in ComSol??
BOUNDARY CONDITION IMPLEMENTATION Ivar's two suggestions to implement the resistance boundary condition are indeed equivalent; the easiest is to fill in the first: • Via Physics - Subdomain settings -Coefficients (F8) put for the voltage h=1 and r=I*Rs for the current h=1 and r=V/Rs where Rs is the closing spark resistance • Via Physics - Equation system - Subdomain settings (Ctrl+F8) put h=[[1 -Rs] [-1/Rs 1]] and r=[[0] [0]] PROBLEM WITH TELEGRAPHER'S EQUATION AND SOLUTION However no boundary condition imposes the telegrapher’s equations there, hence the telegrapher equations are violated if the closing spark resistance is time dependent. Impose similarly the telegrapher’s equation 2pi ri·dV/dr = µl·dI/dt+R#·I at the inner boundary via Physics - Equation system - Boundary settings (Ctrl+F8) put: q=[[0 -R#/2pi ri] [0 0]] and g=[[µlIt#/2pi ri] [0]] and h=[[1 -Rs] [-1/Rs 1]] and r=[[0] [0]] REMAINING PROBLEM The other telegrapher's equation is not imposed there, hence violated if the closing spark resistance is time dependent. It may be imposed similarly, but how to impose it while imposing I=V/Rs when only 2 bc are available in ComSol??

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 9 gen 2011, 10:01 GMT-5
Hi,

Can i define a component of tensor stiffness like: E = int(u,dy) (1)
where u is the displacement on Ox.

And what is the correct expression of (1) which i can add in comsole?

Toan
Hi, Can i define a component of tensor stiffness like: E = int(u,dy) (1) where u is the displacement on Ox. And what is the correct expression of (1) which i can add in comsole? Toan

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 10 gen 2011, 03:42 GMT-5
Hi

you can add in complex equations based on integration etc, so long you are not making circular references. But, youoften make the solution highly non-linear, sometimes you must specify it in the solver settings, and take care of scaling manually, but try first with the COMSOl default values, often it detects things Okby itself ;)

For the integration, use the coupling operatos, or create a global expression

--
Good luck
Ivar
Hi you can add in complex equations based on integration etc, so long you are not making circular references. But, youoften make the solution highly non-linear, sometimes you must specify it in the solver settings, and take care of scaling manually, but try first with the COMSOl default values, often it detects things Okby itself ;) For the integration, use the coupling operatos, or create a global expression -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 10 gen 2011, 04:11 GMT-5
Hi,


I don't understand why the function int or integration is always "unknown function" when i define the antiderivative of u.

What is the correct syntax?

Best regard

Toan
Hi, I don't understand why the function int or integration is always "unknown function" when i define the antiderivative of u. What is the correct syntax? Best regard Toan

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 10 gen 2011, 04:46 GMT-5
Hi

I'm not sure I understand what you are doing, often its easier to upload a simple model to allow us to better understand

--
Good luck
Ivar
Hi I'm not sure I understand what you are doing, often its easier to upload a simple model to allow us to better understand -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 31 ott 2016, 07:41 GMT-4
Hello

I can't access the subdomain settings window in Comsol 5.2a. Does anybody know if it is still available since if it is not i have to go back to the previous versions :(.

Thanks
Arash
Hello I can't access the subdomain settings window in Comsol 5.2a. Does anybody know if it is still available since if it is not i have to go back to the previous versions :(. Thanks Arash

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 31 ott 2016, 08:34 GMT-4
Hello Arash,
If your reason for looking for the Subdomain Settings window is to see the equation system, then you can do that by activating "Equation View". To do so, click on the Show icon at the top of the Model Builder window (It's the one with a drawing of an eye on it) and from the drop-down menu check "Equation View". This will add nodes in the model tree in which you can see the equation system.
If you are looking for some other information, please post a clarification.
Best,
Jeff
Hello Arash, If your reason for looking for the Subdomain Settings window is to see the equation system, then you can do that by activating "Equation View". To do so, click on the Show icon at the top of the Model Builder window (It's the one with a drawing of an eye on it) and from the drop-down menu check "Equation View". This will add nodes in the model tree in which you can see the equation system. If you are looking for some other information, please post a clarification. Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 31 ott 2016, 08:58 GMT-4
Hello Jeff

Thanks for the fast reply.

Well under equation view one sees the variables used in the model. I would like to see the differential equations with the coefficients and so on. These differential equations with their coefficients were available in subdomains and equation systems for example in Comsol 3.5 but i can't find it in 5.2a. The shortcut key Ctrl+F8 opens a blank pop-up window.

Thanks
Arash
Hello Jeff Thanks for the fast reply. Well under equation view one sees the variables used in the model. I would like to see the differential equations with the coefficients and so on. These differential equations with their coefficients were available in subdomains and equation systems for example in Comsol 3.5 but i can't find it in 5.2a. The shortcut key Ctrl+F8 opens a blank pop-up window. Thanks Arash

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 31 ott 2016, 13:00 GMT-4
It's not just the variables you can see there. You can also see (and edit, if needed) there the weak contributions to the equations, once you've assigned the nodes to a domain. You may need to scroll down in that Settings window for the Equation View node to see them.
If you're only interested in seeing the partial differential equations in Latex-like format, you can see them under the Equation Tab on the Settings window for the node in question.
Best,
Jeff
It's not just the variables you can see there. You can also see (and edit, if needed) there the weak contributions to the equations, once you've assigned the nodes to a domain. You may need to scroll down in that Settings window for the Equation View node to see them. If you're only interested in seeing the partial differential equations in Latex-like format, you can see them under the Equation Tab on the Settings window for the node in question. Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 31 ott 2016, 15:52 GMT-4
In Comsol 3,5 i see the partial differential for the boundary (See attached- PDE-BC-Coeff-3,5). Under equation view for Comsol 5,2a on the boundary node there is (See attached- Variable-BC-5,2) which i would say corresponds to what you see in Comsol 3,5 at (See attached- Variable-BC-3,5).

Thanks
Arash
In Comsol 3,5 i see the partial differential for the boundary (See attached- PDE-BC-Coeff-3,5). Under equation view for Comsol 5,2a on the boundary node there is (See attached- Variable-BC-5,2) which i would say corresponds to what you see in Comsol 3,5 at (See attached- Variable-BC-3,5). Thanks Arash


Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 31 ott 2016, 16:31 GMT-4
In 5.2a, the Equation View window shows you the definition of variables but also any weak contributions as well as the constraints (i.e. the equation that's imposed on the boundary, expressed in the weak form) towards the bottom.
I hope this clarifies things. If doubts persist, please contact support.
Best,
Jeff
In 5.2a, the Equation View window shows you the definition of variables but also any weak contributions as well as the constraints (i.e. the equation that's imposed on the boundary, expressed in the weak form) towards the bottom. I hope this clarifies things. If doubts persist, please contact support. Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 18 mar 2017, 19:38 GMT-4
Dear Mr. Hiller,

Sorry for bothering you! I was wondering is there any documentation (e.g pdf) with more detailed description of these Variables in the Equation View?
Dear Mr. Hiller, Sorry for bothering you! I was wondering is there any documentation (e.g pdf) with more detailed description of these Variables in the Equation View?

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.