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.

Confusion with units

Please login with a confirmed email address before reporting spam

I have looked at some other threads on this and it's still not intuitively obvious to me how units operate. The following is an equation I use under the Variables node of a model using SI units where the dependent variable is T:

0.000922[kJ/(kg*degC^2)]*T+3.54

T is in Kelvin but the equation was developed for degC. I know it's a simple fix to just rewrite the first equation above with constants in terms of K not degC, but to make sure I don't incur unit errors in other ways, I need to understand how Comsol processes units.

So, when I rewrite this equation as:

0.000922[kJ/(kg*degC^2)]*T[degC]+3.54

the units become kJ/kg, not the expected kJ/(kg*degC). I read in another thread that functions take arguments that are dimensionless, so when I use:

0.000922[kJ/(kg*degC^2)]*T[1/degC]+3.54

I get units of m^2/(s^2*K^2) when it should be kJ/(kg*degC) or m^2/(s^3*K).

What seems to work, at least from a units standpoint, is:

0.000922[kJ/(kg*degC)]*T[1/degC]+3.54

This is counter-intuitive as the first constant doesn't seem to have the correct units.

What is difficult to understand is what exactly dimensionless means. Dimensionless to me means normalized. But in Comsol it seems to mean simply that there are no dimensions, when in fact, for example in my model, temperature is in K. By this reasoning, if I use T in any function evaluation that has different units, say degC, then by writing the units as [1/degC], T will be entered into the function as degC, not K. Is this correct?

Also does that last constant in the equation assume the same units automatically because none are specified?

Thank you in advance for any help on this.

1 Reply Last Post 28 févr. 2012, 11:14 UTC−5
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 28 févr. 2012, 11:14 UTC−5
Hi

indeed with temperature there is a trick to learn. I suppose the main reason for your confusion is that you are using the °C as reference while SI states to use K as reference. So you should not count on COMSOL to convert any equation to something else than SI (except if you tell COSMOL to use another unit base). BUT then you can force COMSOL to transfor the results into another unit value (without units such as T[1/degC] whichis unitless but has the dimension of degC.

read carefully the doc or help "About Temperature Units"

Kow temperature is used as absolute and differential values, absolute are in K (for SI), differential too, but as 1°C = 1°C (as temperature DIFFERENCE) we always use one for the other, that is not strictly correct.

When you write

MyCoverT = 0.000922[kJ/(kg*degC^2)]*T+3.54

COMSOL has by default T (absolute) in K, but you need it in °C so you should write T[1/degC] to get a numerical value in °C to multiply by the coefficient you have.

You probably mean
MyCoverT = 0.000922[kJ/(kg*degC^2)]*(T[1/degC])+3.54[kJ/kg/degC]

but to be sure you should rather work in K and SI for all values
MyCoverT = 0.922[J/kg/K^2]*(T-293.15[K])+3540[J/kg/K]

The easiest is to open a new blank COMSOL session and play with the GLOBAL Parameters

cut out and save the txt below in a txt file, then load it into your Param list (result in the png)
=======================
TC 20[degC]
TK TC
A1C 0.000922[kJ/kg/degC^2]
A1K 0.000922[kJ/kg/K^2]
A2C 0.000922[kJ/kg/degC]
A2K 0.000922[kJ/kg/K]
A1C_TC A1C*TC
A1C_TK A1C*TK
A2C_TC A2C*TC
A2C_TK A2C*TK
A1C_TCC A1C*TC[1/degC]
A1C_TCC1 A1C*TC[1/degC]*1[K]
A2C_TCC A2C*TC[1/degC]
A2C_TCC1 A2C*TC[1/degC]*1[K]
=================================

Hope I didnt miss anything, one gets easily confused I agree ;)
--
Good luck
Ivar
Hi indeed with temperature there is a trick to learn. I suppose the main reason for your confusion is that you are using the °C as reference while SI states to use K as reference. So you should not count on COMSOL to convert any equation to something else than SI (except if you tell COSMOL to use another unit base). BUT then you can force COMSOL to transfor the results into another unit value (without units such as T[1/degC] whichis unitless but has the dimension of degC. read carefully the doc or help "About Temperature Units" Kow temperature is used as absolute and differential values, absolute are in K (for SI), differential too, but as 1°C = 1°C (as temperature DIFFERENCE) we always use one for the other, that is not strictly correct. When you write MyCoverT = 0.000922[kJ/(kg*degC^2)]*T+3.54 COMSOL has by default T (absolute) in K, but you need it in °C so you should write T[1/degC] to get a numerical value in °C to multiply by the coefficient you have. You probably mean MyCoverT = 0.000922[kJ/(kg*degC^2)]*(T[1/degC])+3.54[kJ/kg/degC] but to be sure you should rather work in K and SI for all values MyCoverT = 0.922[J/kg/K^2]*(T-293.15[K])+3540[J/kg/K] The easiest is to open a new blank COMSOL session and play with the GLOBAL Parameters cut out and save the txt below in a txt file, then load it into your Param list (result in the png) ======================= TC 20[degC] TK TC A1C 0.000922[kJ/kg/degC^2] A1K 0.000922[kJ/kg/K^2] A2C 0.000922[kJ/kg/degC] A2K 0.000922[kJ/kg/K] A1C_TC A1C*TC A1C_TK A1C*TK A2C_TC A2C*TC A2C_TK A2C*TK A1C_TCC A1C*TC[1/degC] A1C_TCC1 A1C*TC[1/degC]*1[K] A2C_TCC A2C*TC[1/degC] A2C_TCC1 A2C*TC[1/degC]*1[K] ================================= Hope I didnt miss anything, one gets easily confused I agree ;) -- Good luck Ivar

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.