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.

eddy current

Please login with a confirmed email address before reporting spam

how to get the imaginary component (phase) in the inductor in the high-frequency alternating magnetic field?
Comsol 4.2a
Help me please

9 Replies Last Post 2013年2月24日 GMT-5 00:04
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 2013年2月21日 GMT-5 01:49
Hi

if you are running a frequency sweep normally COMSOL calculates the full complex solution, but all plots by default are only showing the "real" part, you need to use the operators imag() and real() intensively in your formulas, there are examples in the model library

--
Good luck
Ivar
Hi if you are running a frequency sweep normally COMSOL calculates the full complex solution, but all plots by default are only showing the "real" part, you need to use the operators imag() and real() intensively in your formulas, there are examples in the model library -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年2月22日 GMT-5 07:58
Thank you!
I Really all plots by default are only showing the "real" part and I get this solve! Where is displays the operators imag() or phase() in Comsol interface? Ewerywhere displays the "real" part, it plays very important role in the result!
Explain to me please!!!
Thank you! I Really all plots by default are only showing the "real" part and I get this solve! Where is displays the operators imag() or phase() in Comsol interface? Ewerywhere displays the "real" part, it plays very important role in the result! Explain to me please!!!

Sergei Yushanov Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年2月22日 GMT-5 10:35
Vasiliy,

Just type in expression imag(mf.Hx) if you need to access or plot imaginary part of field variable Hx, for example.

Regards,
Sergei
Vasiliy, Just type in expression imag(mf.Hx) if you need to access or plot imaginary part of field variable Hx, for example. Regards, Sergei

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 2013年2月22日 GMT-5 13:21
Hi

and for the phase you can use

phi = atan2(imag(...),real(...))

--
Good luck
Ivar
Hi and for the phase you can use phi = atan2(imag(...),real(...)) -- Good luck Ivar

Sergei Yushanov Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年2月22日 GMT-5 14:34
or, you can use arg(mf.Hz) to calculate phase angle of the field variable Hx, for example


Regards,
Sergei
or, you can use arg(mf.Hz) to calculate phase angle of the field variable Hx, for example Regards, Sergei

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年2月23日 GMT-5 11:16
Thank you! It's very good!
But why "!!!arg(mf.Hz)!!!! to calculate phase angle of the field variable !!!Hx!!!"???
May be !!!arg(mf.Hz)!!!!! to calculate phase angle of the field variable !!!!!Hz!!!!!!"???
_____
WBR,
Vasiliy
Thank you! It's very good! But why "!!!arg(mf.Hz)!!!! to calculate phase angle of the field variable !!!Hx!!!"??? May be !!!arg(mf.Hz)!!!!! to calculate phase angle of the field variable !!!!!Hz!!!!!!"??? _____ WBR, Vasiliy

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年2月23日 GMT-5 11:21
I'm sorry for questions!
where it is: " use phi = atan2(imag(...),real(...))"
Which defines the phase in Сomsol 4.2 interface??
Thank you
I'm sorry for questions! where it is: " use phi = atan2(imag(...),real(...))" Which defines the phase in Сomsol 4.2 interface?? Thank you

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 2013年2月23日 GMT-5 14:37
Hi

I agree it takes time to read the doc, but there are many things that become clearer thereafter ;)

atan2(), arg(), imag(), rael() ... are the internal and "special operators" check the doc search for special operators (and there are many more, note that some applies ONLY to postprocessing)

then when you plot your values as line plots the horizontal "x" axis is set by default from the context of the plot call, but you can override the horizontal default expression and put your own (i.e. polar plots that I mostly plot with atan2(image(),real()) etc

COMSOL solves normally for complex values that are stored in the Data set, but for postprocessing in plots and displayed values it takes by default the real() part of the variable to show (some exception in the derived values). So you must explicitly write out "imag(your_variable)" to get a plot of the imaginary part, etc.

finally you can define variables and fields, but for these to be added to the Data Set, they must be defined in the Model Definitions node all on top of the model tree, and then they will be added to the Data set (there you can define a phase value or anything else useful for the later processing. BUT if you add a variable after having solved, the Data Set is not updated, you must select each top study node and select "right-click - Update Study" then you can refer to these variables in the postprocessing

--
Good luck
Ivar
Hi I agree it takes time to read the doc, but there are many things that become clearer thereafter ;) atan2(), arg(), imag(), rael() ... are the internal and "special operators" check the doc search for special operators (and there are many more, note that some applies ONLY to postprocessing) then when you plot your values as line plots the horizontal "x" axis is set by default from the context of the plot call, but you can override the horizontal default expression and put your own (i.e. polar plots that I mostly plot with atan2(image(),real()) etc COMSOL solves normally for complex values that are stored in the Data set, but for postprocessing in plots and displayed values it takes by default the real() part of the variable to show (some exception in the derived values). So you must explicitly write out "imag(your_variable)" to get a plot of the imaginary part, etc. finally you can define variables and fields, but for these to be added to the Data Set, they must be defined in the Model Definitions node all on top of the model tree, and then they will be added to the Data set (there you can define a phase value or anything else useful for the later processing. BUT if you add a variable after having solved, the Data Set is not updated, you must select each top study node and select "right-click - Update Study" then you can refer to these variables in the postprocessing -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年2月24日 GMT-5 00:04
Thank you, it helped me!

---
WBR,
Vasiliy
Thank you, it helped me! --- WBR, Vasiliy

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.