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.

Help for Inconsistent units, thanks

Please login with a confirmed email address before reporting spam

Hi, excuse me,

I am trying to define a repeating laser scanning mechanism (or multiple passes scan) in COMSOL 4.2a, and just met a problem of "Inconsistent units" when defining an effective laser intensity q_eff as if(t[1/s]<8,q_laser1[(m^2)/W],if(t[1/s]<16,q_laser2[(m^2)/W],0)).

q_laser1 and q_laser2 are laser intensity with top hat beam shape for scanning pass 1 and 2, respectively. The scanning mechanism is suggested as repeating the scan with a constant traverse speed, and each scanning time is defined as 8 seconds.

It seems like the dimensionless problem, could anyone please offer any suggestions? Really thanks!


Best regards,

Liwei

2 Replies Last Post May 30, 2012, 9:26 a.m. EDT
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 May 29, 2012, 9:54 a.m. EDT
Hi

if your variables "q_laser1 and q_laser2" already are defined with units they will "double" the units in the way you write it
But if these are defined as [W/m^2] they will arrive dimensionless, which is probably better for the "if(,,)" but then probably you need to multiply your full expression the results by 1*[W/m^2] to get back coherent units

Personally I prefer using step/rectangle functions but I do not see why your way should work

--
Good luck
Ivar
Hi if your variables "q_laser1 and q_laser2" already are defined with units they will "double" the units in the way you write it But if these are defined as [W/m^2] they will arrive dimensionless, which is probably better for the "if(,,)" but then probably you need to multiply your full expression the results by 1*[W/m^2] to get back coherent units Personally I prefer using step/rectangle functions but I do not see why your way should work -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 30, 2012, 9:26 a.m. EDT
Hi Ivar,

Thank you very much for you reply, and I think building a step function would be a great idea, and I will try that shortly, thanks again!
Hi Ivar, Thank you very much for you reply, and I think building a step function would be a great idea, and I will try that shortly, thanks again!

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.