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.

Problem with units

Please login with a confirmed email address before reporting spam

Hi,
I want to use a density variation with concentration of the form:

rho=A*sqrt(C)+B*C^2

where C is in mol/m^3.

To supply the value of A i need to put units of m^1.5/mol^0.5

However, I am unable to do so as it gives errors.

Please help.

Thanks


2 Replies Last Post Nov 9, 2011, 4:02 a.m. EST
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 Nov 8, 2011, 4:08 p.m. EST
Hi

there is a few threads about that, there was an issue with fractional units in v4.0 (I belive its solved in later releases)
But the orange unit waring is only a warning, so long you put consistent values it will calculate and if you respect values correctly the results would even be correct. you do just not get the COMSOL verification of your units

--
Good luck
Ivar
Hi there is a few threads about that, there was an issue with fractional units in v4.0 (I belive its solved in later releases) But the orange unit waring is only a warning, so long you put consistent values it will calculate and if you respect values correctly the results would even be correct. you do just not get the COMSOL verification of your units -- Good luck Ivar

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 9, 2011, 4:02 a.m. EST
Hi,

COMSOL does not yet support non-integer unit exponents, so attempting an operation or declaration that results in such unit exponents gives a unit syntax error. One way to work around this in this case would be to define A^2 rather than A.

A_squared = <value of A>^2[m^3/mol]

then the expression A*sqrt(C) = sqrt(A_squared*C) gets a valid unit (dimensionless in this case).

But if you want A*sqrt(C) to be a density with the unit of kg/m^3, use

A_squared = <value of A>^2[kg^2/(mol*m^3)]

instead.

Best regards,

Magnus Ringh, COMSOL

Hi, COMSOL does not yet support non-integer unit exponents, so attempting an operation or declaration that results in such unit exponents gives a unit syntax error. One way to work around this in this case would be to define A^2 rather than A. A_squared = ^2[m^3/mol] then the expression A*sqrt(C) = sqrt(A_squared*C) gets a valid unit (dimensionless in this case). But if you want A*sqrt(C) to be a density with the unit of kg/m^3, use A_squared = ^2[kg^2/(mol*m^3)] instead. Best regards, Magnus Ringh, COMSOL

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.