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
24 déc. 2012, 02:21 UTC−5
Hi
what do you mean by "works"?
First of all most operators expect unitless variables (but not all check the doc and or help). I'm not sure how it is for the" test()" operator I would have to "test" that my self ;)
If you get an orange color there is a chance the units are not accepted, an orange color means WARNING but no error (error is red, erors do not solve, warnings solve as is but the result might be scaled wrongly) that the units are inconsistent. Normally to make V in volts unitless one would write "V[1/V]" but your way is also possible, appart that you are adding a scaling factor of 1000 from your unit choice.
--
Good luck
Ivar
Hi
what do you mean by "works"?
First of all most operators expect unitless variables (but not all check the doc and or help). I'm not sure how it is for the" test()" operator I would have to "test" that my self ;)
If you get an orange color there is a chance the units are not accepted, an orange color means WARNING but no error (error is red, erors do not solve, warnings solve as is but the result might be scaled wrongly) that the units are inconsistent. Normally to make V in volts unitless one would write "V[1/V]" but your way is also possible, appart that you are adding a scaling factor of 1000 from your unit choice.
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
24 déc. 2012, 07:12 UTC−5
Dear Ivar
Thank you for your reply. I will try to make it more clear.
What I want to do is the following.
test(pzd.EX)
and I was expecting the unit to be in [V/m] but it shows me orange color.Then I tried the following
test(pzd.EX*1[m]/V) to make the pzd.EX unit less
finally I multiplied it by '1[V/m]' to have the unit of electric field back as,
test(pzd.EX*1[m/V]) *1[V/m]
I multiplied it by '1[V/m] ' b/c I want to have the unit of electric field so that I can multiply it latter by coupling matrix element to have the final unit in Pascal and insert it as weak form contribution.
So to solve the problem I used such a way but I am not sure if my way is correct or not. I also saw the Doc and help but they both dont talk about units.
Thank you
A.
Dear Ivar
Thank you for your reply. I will try to make it more clear.
What I want to do is the following.
test(pzd.EX)
and I was expecting the unit to be in [V/m] but it shows me orange color.Then I tried the following
test(pzd.EX*1[m]/V) to make the pzd.EX unit less
finally I multiplied it by '1[V/m]' to have the unit of electric field back as,
test(pzd.EX*1[m/V]) *1[V/m]
I multiplied it by '1[V/m] ' b/c I want to have the unit of electric field so that I can multiply it latter by coupling matrix element to have the final unit in Pascal and insert it as weak form contribution.
So to solve the problem I used such a way but I am not sure if my way is correct or not. I also saw the Doc and help but they both dont talk about units.
Thank you
A.
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
3 janv. 2013, 09:07 UTC−5
Hi
If you open a simple "solid" model and add a local variable atest = test(u) you will notice it gets units of "m" just as "u" and btest = test(u[1/m]) gives no units (blank and not "1")
while ctest=test(ut) gives unit of [m/s]
so the test() operator accepts units (at least in 4.3a ! for me) but does not alter the variable unit
--
Good luck
Ivar
Hi
If you open a simple "solid" model and add a local variable atest = test(u) you will notice it gets units of "m" just as "u" and btest = test(u[1/m]) gives no units (blank and not "1")
while ctest=test(ut) gives unit of [m/s]
so the test() operator accepts units (at least in 4.3a ! for me) but does not alter the variable unit
--
Good luck
Ivar