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.

Magnetic field components undefined in RF eigenfrequency solutions

Please login with a confirmed email address before reporting spam

Hello,
I am simulating a microwave resonant cavity using the RF module (Electromagnetic Waves, Frequency Domain with Eigenfrequency study). The solver gives correct results (eigenmodes look like expected from analytical modeling), but I cannot see the values for the magnetic field components (emw.Hx, emw.Hy, emw.Hz).

I can plot the norm of the magnetic field (emw.normH), but if I try to plot the individual components I get a value of zero everywhere in the domain. Same thing if I try to plot the norm using the expression sqrt(emw.Hx^2 + emw.Hy^2 + emw.Hz^2) which should be equivalent to emw.normH. This problem does not happen with the electric field components (emw.Ex, emw.Ey, emw.Ez)

I suspect that this is due to the fact that the solver uses only the electric field as dependent variables.

How can I set up the simulation to get usable values of the magnetic field components? Is it possible to change the solver's dependent variables to solve for H?

Regards,
Louis Haeberle
MSc Student (Physics)
Sherbrooke University

2 Replies Last Post 21.11.2016, 09:59 GMT-5
Ulf Olin COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 21.11.2016, 09:26 GMT-5
Hi Louis,

When you make a plot, COMSOL by default plots the real part of complex fields. My guess is that the magnetic field, in your case, only has non-zero imaginary parts for the field components. Thus, try plotting for instance imag(emw.Hz) or any of the other components to see if that doesn't produce the plot you expect.

Again, as the field is complex and the magnetic field components are probably imaginary, an expression like sqrt(emw.Hx^2 + emw.Hy^2 + emw.Hz^2) also produce a field with only imaginary values. The equivalent expression to emw.normH is sqrt(abs(emw.Hx)^2 + abs(emw.Hy)^2 + abs(emw.Hz)^2).

Best of luck with your modeling project.

Ulf
Hi Louis, When you make a plot, COMSOL by default plots the real part of complex fields. My guess is that the magnetic field, in your case, only has non-zero imaginary parts for the field components. Thus, try plotting for instance imag(emw.Hz) or any of the other components to see if that doesn't produce the plot you expect. Again, as the field is complex and the magnetic field components are probably imaginary, an expression like sqrt(emw.Hx^2 + emw.Hy^2 + emw.Hz^2) also produce a field with only imaginary values. The equivalent expression to emw.normH is sqrt(abs(emw.Hx)^2 + abs(emw.Hy)^2 + abs(emw.Hz)^2). Best of luck with your modeling project. Ulf

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 21.11.2016, 09:59 GMT-5
Hello Ulf,
you are right, changing the expression to imag(emw.Hx) etc. works and displays the field vectors, and the shape of the vector field agrees with analytical models.

Regarding the physical interpretation of having a purely imaginary magnetic field, am I correct in assuming this simply means that the magnetic field phase is offset by a half-cycle with respect to the electric field?

Thanks and regards,

Louis Haeberle
MSc Student (Physics)
Sherbrooke University
Hello Ulf, you are right, changing the expression to imag(emw.Hx) etc. works and displays the field vectors, and the shape of the vector field agrees with analytical models. Regarding the physical interpretation of having a purely imaginary magnetic field, am I correct in assuming this simply means that the magnetic field phase is offset by a half-cycle with respect to the electric field? Thanks and regards, Louis Haeberle MSc Student (Physics) Sherbrooke University

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.