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.

Inconsistent Units

Please login with a confirmed email address before reporting spam


Hi,


I´m trying to incorporate the following expression on Subdomain expressions:

D=0.926*T^2.5/(T*245)

the result should be in mm^2/s, but It shows me "Inconsistent Units"

even when I try the following expression:

T^2.5/T^2.5

It stills to show the same message (inconsistent units)


Best Regards,
Orlando


8 Replies Last Post 19 août 2012, 12:02 UTC−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 22 déc. 2010, 08:10 UTC−5
Hi

the units in comsol has problems with non-integer powers, in the last versio I belive ^0.5 is accepted so try to rewrite your formula as:

D=0.926*T^2*sqrt(T)/(T*245)

In 3.5a this trick should not work as non-integere powers are not treated correctly for the units.

In any case if you do not put any other units your results is in K^1.5 and not mm^2/s

--
Good luck
Ivar
Hi the units in comsol has problems with non-integer powers, in the last versio I belive ^0.5 is accepted so try to rewrite your formula as: D=0.926*T^2*sqrt(T)/(T*245) In 3.5a this trick should not work as non-integere powers are not treated correctly for the units. In any case if you do not put any other units your results is in K^1.5 and not mm^2/s -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 9 juin 2012, 12:24 UTC−4
Hello,


I am facing the same problem with non-integer units. Can you please tell how you were able to work out with this.

Thanks.

Regards,
Aseem
Hello, I am facing the same problem with non-integer units. Can you please tell how you were able to work out with this. Thanks. Regards, Aseem

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 9 juin 2012, 15:08 UTC−4
Hi

Units errors in orange are only warnings, so they do not block your clculations.

With fractional power, the easiest is to remove the units from the power expression by a [1/over_the_units], and set them back on the final results with an approprate [new_units]

--
Good luck
Ivar
Hi Units errors in orange are only warnings, so they do not block your clculations. With fractional power, the easiest is to remove the units from the power expression by a [1/over_the_units], and set them back on the final results with an approprate [new_units] -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13 août 2012, 18:20 UTC−4
Hi,

Please help me to understand about my issue with Units:

I get an Inconsistent Units warning (in orange colour) when I input an expression into my equation : u=BOD*theta^(T-20)
with units are defined: u [mg/L]; BOD [mg/L]; theta [1/s]; and T [K].

Do I input correctly (about UNITS) the expression into Comsol , please show me to know?

Best regards.



Hi

Units errors in orange are only warnings, so they do not block your clculations.

With fractional power, the easiest is to remove the units from the power expression by a [1/over_the_units], and set them back on the final results with an approprate [new_units]

--
Good luck
Ivar
Hi, Please help me to understand about my issue with Units: I get an Inconsistent Units warning (in orange colour) when I input an expression into my equation : u=BOD*theta^(T-20) with units are defined: u [mg/L]; BOD [mg/L]; theta [1/s]; and T [K]. Do I input correctly (about UNITS) the expression into Comsol , please show me to know? Best regards. [QUOTE] Hi Units errors in orange are only warnings, so they do not block your clculations. With fractional power, the easiest is to remove the units from the power expression by a [1/over_the_units], and set them back on the final results with an approprate [new_units] -- Good luck Ivar [/QUOTE]

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 14 août 2012, 01:20 UTC−4
Hi

try a (T-20[K]) as the "20" is without units and T is probably flagged as [K], as you suggest

--
Good luck
Ivar
Hi try a (T-20[K]) as the "20" is without units and T is probably flagged as [K], as you suggest -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 14 août 2012, 15:42 UTC−4

Hi

try a (T-20[K]) as the "20" is without units and T is probably flagged as [K], as you suggest

--
Good luck
Ivar


Thank you for your help, but I have tried with your trick, the warning is still happening.

I will try another way to check where in the expression makes this error, and let you know if I find out a solution
[QUOTE] Hi try a (T-20[K]) as the "20" is without units and T is probably flagged as [K], as you suggest -- Good luck Ivar [/QUOTE] Thank you for your help, but I have tried with your trick, the warning is still happening. I will try another way to check where in the expression makes this error, and let you know if I find out a solution

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 14 août 2012, 16:35 UTC−4
Hi

now I see that you have a power "^" in there I'm not sure you should have units on a power indice, that should be unitless, (I first read wrongly * and not ^ ;)

--
Good luck
Ivar
Hi now I see that you have a power "^" in there I'm not sure you should have units on a power indice, that should be unitless, (I first read wrongly * and not ^ ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 19 août 2012, 12:02 UTC−4
Hi,

A good way to make COMSOL Multiphysics interpret T in Celsius degree, and disappear Inconsistent Units warning, is that:

u=BOD*((theta^(T-20))

with units are defined: u [mg/L]; BOD [mg/L]; theta [1/s]; and T [degC/K] with T value is input in Celsius (in Parameters Table).

But I find out another strange situation, that is when I input

u=BOD*(theta^(T-20)) with T is defined in [degC/K] or T [degC] --> get Unit Syntax Error, even I check it seems correct in math, and Comsol still calculate ok.

u=BOD*((theta^(T-20)) or: u=BOD*((theta^(T-20) with T is defined in [degC/K] or T [degC] --> no more warning, even the expression misses one close bracket ")", and when Comsol start to compute, it finds out the error.

u=BOD*(theta[s]^(T[1/degC]-20)) with T is defined in [degC] in Parameters Table, disappear the warning but when Comsol start to compute, it finds out the error.

Why is that? Please help me.

Best regards.
Hi, A good way to make COMSOL Multiphysics interpret T in Celsius degree, and disappear Inconsistent Units warning, is that: u=BOD*((theta^(T-20)) with units are defined: u [mg/L]; BOD [mg/L]; theta [1/s]; and T [degC/K] with T value is input in Celsius (in Parameters Table). But I find out another strange situation, that is when I input u=BOD*(theta^(T-20)) with T is defined in [degC/K] or T [degC] --> get Unit Syntax Error, even I check it seems correct in math, and Comsol still calculate ok. u=BOD*((theta^(T-20)) or: u=BOD*((theta^(T-20) with T is defined in [degC/K] or T [degC] --> no more warning, even the expression misses one close bracket ")", and when Comsol start to compute, it finds out the error. u=BOD*(theta[s]^(T[1/degC]-20)) with T is defined in [degC] in Parameters Table, disappear the warning but when Comsol start to compute, it finds out the error. Why is that? Please help me. Best regards.

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.