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.
unit syntax error,and the expression is in orange.
Posted 7 ott 2010, 00:39 GMT-4 7 Replies
Please login with a confirmed email address before reporting spam
The expression of " 2*x^0.5 " is in orange and cued with "unit syntax error". However, " 2*x^2 " is correct. what's wrong with the expression?
thanks!
youf.
Please login with a confirmed email address before reporting spam
At a guess i'd say its to do with the power...instead of x^0.5, try sqrt(x). If not, what expression are you trying to enter it as because It could be to do with the units becoming messed up.
Let me know how you get on.
Regards,
Chris
Please login with a confirmed email address before reporting spam
The problem is that the unit syntax in COMSOL Multiphysics only accepts integer exponents, so there is no unit for "square root of meter," but if this is not what you want, you can de-dimensionalize x using COMSOL unit syntax:
2*(x[1/m])^0.5
does not produce an error.
Magnus Ringh, COMSOL
Please login with a confirmed email address before reporting spam
Thanks for your answer!
The problem still occur when "x^0.5" is instead by "sqrt(x)". However, it disappears when instead by "(x[1/m])^0.5". So Magnus' method is valid. The units is important sometimes in Comsol.
I guess it is only a warning message of unstandard when a expression is in orange. Because the result is not changed when "x^0.5" is instead by "sqrt(x)" or "(x[1/m])^0.5".
youf.
Please login with a confirmed email address before reporting spam
Thanks for your help very much!
Your method is valid. The units is important sometimes in Comsol.I guess it is only a warning message of unstandard when a expression is in orange. Because the result is not changed when "x^0.5" is instead by "sqrt(x)" or "(x[1/m])^0.5".
youf.
Please login with a confirmed email address before reporting spam
orange is a warning, it seems that V4.0a has an issue with sqrt and fractional power and how to handle units, probably repaired in V4.1, that I suspect will come out today, isnt it the Boston conf day today ?
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Thanks for your answer!
I could not found the help issue in Comsol V4.0a documentation. However, it is not important. At least it has be proved that Comsol can handle these the kinds of trouble automatically now.
Yeah, it is "COMSOL Conference 2010 Boston" today! (www.comsol.com/conference2010/usa/)
I wish Comsol get better and strongger!
youf.
Please login with a confirmed email address before reporting spam
Am not being able to do it following above comments..
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.
Suggested Content
- FORUM COMSOL error: Cannot evaluate expression. Undefined variable.
- KNOWLEDGE BASE Failed to Evaluate Variable
- KNOWLEDGE BASE Undefined Function Call
- KNOWLEDGE BASE Initial guess leads to undefined function value
- BLOG The Strength of the Weak Form