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.

Complex unit i in Comsol

Please login with a confirmed email address before reporting spam

Hi

I'd like to simulate a variable containing the complex unit i.

I'd like to calculate the voltage V = i*2*pi*f*S*B with i the complex unit.I read the docs and found that i and j are supported as complex units. So, I entered "i*2*pi*0.8540*mf.normB" as an expression in the simulation result. The problem is, I get 0 as a solution ( and I get a right value when I delete the "i"). So it seems there 's a problem with the complex unit i.

What is the right way to do so, please ?

Thanks

2 Replies Last Post 2012年12月20日 GMT-5 13:47

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年12月20日 GMT-5 09:09
Hi,

I recently learned that many post processing function only display the real part of a complex quantity. This would be zero in your case because your expression is purely imaginary.
Try the abs() or imag() function on your expression and see what comes out.

Cheers,
Edgar
Hi, I recently learned that many post processing function only display the real part of a complex quantity. This would be zero in your case because your expression is purely imaginary. Try the abs() or imag() function on your expression and see what comes out. Cheers, Edgar

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 2012年12月20日 GMT-5 13:47
Hi

the plots show the real part (by default), but table values are complex if required (automatically by default) at least that is my impression ;)

--
Good luck
Ivar
Hi the plots show the real part (by default), but table values are complex if required (automatically by default) at least that is my impression ;) -- 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.