Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
14.03.2011, 11:53 GMT-4
Hi,
Define F(x,y)=a(x^2-y^2)/R^2 where a=1[m/s] is defined as a parameter.
Regards,
Andrzej
Hi,
Define F(x,y)=a(x^2-y^2)/R^2 where a=1[m/s] is defined as a parameter.
Regards,
Andrzej
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
14.03.2011, 12:07 GMT-4
No, this does not help (have tried it already). The text remains orange.
No, this does not help (have tried it already). The text remains orange.
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
14.03.2011, 15:13 GMT-4
Hi,
Define F=a(x^2-y^2)/R^2 as a parameter. It works.
Regards,
Andrzej
Hi,
Define F=a(x^2-y^2)/R^2 as a parameter. It works.
Regards,
Andrzej
Magnus Ringh
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
15.03.2011, 04:01 GMT-4
Hi,
The expression a*(x^2+y^2)/R^2 works fine if you type it directly into a text box for a velocity.
Functions in COMSOL expect dimensionless inputs and outputs, so you need to "de-dimensionalize" the inputs:
F(x[1/m],y[1/m])
to remove the orange unit inconsistency indication.
Best regards,
Magnus Ringh, COMSOL
Hi,
The expression a*(x^2+y^2)/R^2 works fine if you type it directly into a text box for a velocity.
Functions in COMSOL expect dimensionless inputs and outputs, so you need to "de-dimensionalize" the inputs:
F(x[1/m],y[1/m])
to remove the orange unit inconsistency indication.
Best regards,
Magnus Ringh, COMSOL
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
15.03.2011, 04:52 GMT-4
Hi Magnus
Indeed this works for the function call variables, but the function itself is returning without units, so one need to multiply the function by *1[my_function_units] (or just F(x[1/m],y[1/m])[my_function_units] )
One can also define "F" as a variable, then the units are ported correctly. But, then the "F(x,y)" (one only uses "F") is "implicit" (this implicit notation is mostly not understood by the users, and it took me quite some time to catch the concept, and to understand where it really applies)
One also have to take care with Parametric or Continuation sweeps, the parameter used is supposed to be dimensionless, but this is not always nice in the tables or the plots, where one would prefer to see the full units not just a normalised value running from 0 to 1.
Therefore many users set up a parameter that runs over their variable range, there too one must add the units in the BC references.
Final case where I notice we often remain with orange color, even if everything is OK: when referring to other physics dependent variables. Sometimes we need to load the initial conditions to get all oranges returning to black.
Once you know about it, its easily to check, I highly appreciate these units checks, as it regularly corrects small typos and formula mismatches
--
Good luck
Ivar
Hi Magnus
Indeed this works for the function call variables, but the function itself is returning without units, so one need to multiply the function by *1[my_function_units] (or just F(x[1/m],y[1/m])[my_function_units] )
One can also define "F" as a variable, then the units are ported correctly. But, then the "F(x,y)" (one only uses "F") is "implicit" (this implicit notation is mostly not understood by the users, and it took me quite some time to catch the concept, and to understand where it really applies)
One also have to take care with Parametric or Continuation sweeps, the parameter used is supposed to be dimensionless, but this is not always nice in the tables or the plots, where one would prefer to see the full units not just a normalised value running from 0 to 1.
Therefore many users set up a parameter that runs over their variable range, there too one must add the units in the BC references.
Final case where I notice we often remain with orange color, even if everything is OK: when referring to other physics dependent variables. Sometimes we need to load the initial conditions to get all oranges returning to black.
Once you know about it, its easily to check, I highly appreciate these units checks, as it regularly corrects small typos and formula mismatches
--
Good luck
Ivar