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.

Remove [rad] unit in variables section?

Please login with a confirmed email address before reporting spam

Howdy!

I have a variable set up for the Drude dielectric function: eps=1-(f0*omega^2)/((2*pi*freq)^2-i*(gamma*2*pi*freq)), with "freq" being another variable with units 1/s, "f0" as unitless, and the omega/gamma terms defined in rad/s. Why is the unit showing as "rad"?

I cannot change it to unitless by factoring by 1[1/rad], but if I factor by 1[s/rad], it turns the unit to "s"!

With [rad] being dimensionless, it does not affect the model--I just thought it was odd that you cannot make it dimensionless...

-ado

2 Replies Last Post 24.10.2013, 09:57 GMT-4
Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24.10.2013, 07:48 GMT-4
Hi,

Thanks for bringing this to our attention. The unit machinery thinks that rad is the most probable unit because rad occurs in the expression, but as you say, it does not affect the model. We will look at how we can improve this behavior for future versions.

As a side note, it is good practice to avoid using "eps" as a name of a user-defined parameter or variable because "eps" is a built-in constant in COMSOL, representing the machine precision (machine epsilon), which is about 2.22e-16 for double precision floating-point numbers.

Best regards,
Magnus Ringh, COMSOL
Hi, Thanks for bringing this to our attention. The unit machinery thinks that rad is the most probable unit because rad occurs in the expression, but as you say, it does not affect the model. We will look at how we can improve this behavior for future versions. As a side note, it is good practice to avoid using "eps" as a name of a user-defined parameter or variable because "eps" is a built-in constant in COMSOL, representing the machine precision (machine epsilon), which is about 2.22e-16 for double precision floating-point numbers. Best regards, Magnus Ringh, COMSOL

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24.10.2013, 09:57 GMT-4
Thanks for the response, Magnus!

I did not really use eps--for the sake of this post, the entire equation is simplified from my long-winded parameter names ;-)
Thanks for the response, Magnus! I did not really use eps--for the sake of this post, the entire equation is simplified from my long-winded parameter names ;-)

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.