Hi, I'm trying to define an equation in global equations and it is corresponded with the coordinates x and y (or certain global variable), e.g.:
States
Name (u) Equation f(u,ut,utt,t) Init (u)
u u-rho 0
where rho is defined as sqrt(x^2+y^2) in Global Expressions. However, I get an error as follows:
Error: 6170
Failed to evaluate variable.
- Variable: x
- Global scope
Failed to evaluate variable.
- Variable: rho
- Defined as: sqrt(((x)^2+(y)^2))
Failed to evaluate expression.
- Expression: u-rho
I would like to ask if there is a way to define the global equation such that it accepts a global variable like rho? If not, how can I use coupling variable or some other ways to get the coordinates in the whole domain. By the way, how can I obtain the Jacobian numerically in Comsol? Thank you very much for your advice and help!
States
Name (u) Equation f(u,ut,utt,t) Init (u)
u u-rho 0
where rho is defined as sqrt(x^2+y^2) in Global Expressions. However, I get an error as follows:
Error: 6170
Failed to evaluate variable.
- Variable: x
- Global scope
Failed to evaluate variable.
- Variable: rho
- Defined as: sqrt(((x)^2+(y)^2))
Failed to evaluate expression.
- Expression: u-rho
I would like to ask if there is a way to define the global equation such that it accepts a global variable like rho? If not, how can I use coupling variable or some other ways to get the coordinates in the whole domain. By the way, how can I obtain the Jacobian numerically in Comsol? Thank you very much for your advice and help!