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.
Use of global parameters in expressions
Posted 14.05.2016, 07:16 GMT-4 Parameters, Variables, & Functions Version 4.2 0 Replies
Please login with a confirmed email address before reporting spam
I am using Comsol 4.2.
I have defined global parameters, such as L, H, W etc. And i have the global parameters ax = 5[m] and x0 = L/2-(N-1)/2*ax.
Also I have defined an analytical solution: V_ref = 1[A]*rho0/(2*pi)*(1/abs(x-x1)-1/abs(x-x2))
Arguments are x, x1 and x2
Then under Data sets i defined that the 1D function's argument x goes from 100 to 600.
Now I want to plat the function in a line Graph. The Expression is: abs(V_ref(x,x0+15*ax,x0+25*ax))
This expression can not be evaluated.
Error message:
Failed to evaluate variable.
- Variable x0
- Global scope:
Failed to evaluate expression.
- Expression: abs(V_ref(x,(x0+(15*ax)),(x0+(25*ax))))
Failed to evaluate expression.
- Expression: abs(V_ref(x,x0+15*ax,x0+25*ax))
- Plot: lngr1 (Line graph)
Can anyone help me? I do not see the problem that COMSOL has
Hello Sina
Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.
If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.