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.

Please login with a confirmed email address before reporting spam

Hi, everyone

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.


7 Replies Last Post Nov 24, 2014, 11:01 a.m. EST

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 7, 2010, 3:38 a.m. EDT
Hi,

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
Hi, 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

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 7, 2010, 3:56 a.m. EDT
No, sqrt(x) is the same as x^0.5.

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
No, sqrt(x) is the same as x^0.5. 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

Posted: 1 decade ago Oct 7, 2010, 5:22 a.m. EDT
Hi,Chris

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.
Hi,Chris 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

Posted: 1 decade ago Oct 7, 2010, 5:26 a.m. EDT
Hi, Magnus

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.
Hi, Magnus 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.

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 Oct 7, 2010, 5:39 a.m. EDT
Hi

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
Hi 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

Posted: 1 decade ago Oct 7, 2010, 6:56 a.m. EDT
Hi, Ivar

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.
Hi, Ivar 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! (http://www.comsol.com/conference2010/usa/) I wish Comsol get better and strongger! youf.

Please login with a confirmed email address before reporting spam

Posted: 9 years ago Nov 24, 2014, 11:01 a.m. EST
In continuation with this, how would someone enter, x^0.7.
Am not being able to do it following above comments..
In continuation with this, how would someone enter, x^0.7. 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.