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 simulation of a Quadrupole

Please login with a confirmed email address before reporting spam

Hello, I am using the MagnetFields module to simulate the magnetic field of a permanent magnet quadrupole arrangement. 1) I am now wondering why the result of my 3D plot (streamline) ist not symmetrically. So, the streamlines are different for each magnet. Could you help me or tell me where this comes from? 2) I want to plot the axial magnetic profile along the y-axes, because it is important for me to know where the maximum of the magnetic field is (with respect to the y-direction). But when I use a 2D plot, the plot is empty....it seems like there is now input values. Does anyone know how to plot the axial magnet profile?

I attached a few screenshots of my simulation.

Thanks, John



5 Replies Last Post Jan 6, 2020, 4:49 p.m. EST
Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Nov 25, 2019, 12:48 p.m. EST

John,

my experience with streamlines is that the start points in most cases need to be defined manually. Otherwise Comsol chooses them in a way that is not compatible with the model's symmetry and this will result in such a messy picture. For plotting a profile I would recommend to use slices or multislices in a 3D plot.

Cheers Edgar

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
John, my experience with streamlines is that the start points in most cases need to be defined manually. Otherwise Comsol chooses them in a way that is not compatible with the model's symmetry and this will result in such a messy picture. For plotting a profile I would recommend to use slices or multislices in a 3D plot. Cheers Edgar

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Nov 26, 2019, 6:44 a.m. EST

Thanks for the quick response. How can I define more than one starting point? Or can I only define one starting point per streamline plot. I used the uniform density and the streamline plot is now more like it should be, but still not very symmetrically. The multislice feature is nice, but it is not what I want. I want to get a plot of the magnetic field gradient along the y-axis like it is done for the Helmholtz Coil here https://www.comsol.com/blogs/plotting-spatial-derivatives-magnetic-field/. I followed all the steps but my plot still remains empty.

Kind regards, John

Thanks for the quick response. How can I define more than one starting point? Or can I only define one starting point per streamline plot. I used the uniform density and the streamline plot is now more like it should be, but still not very symmetrically. The multislice feature is nice, but it is not what I want. I want to get a plot of the magnetic field gradient along the y-axis like it is done for the Helmholtz Coil here https://www.comsol.com/blogs/plotting-spatial-derivatives-magnetic-field/. I followed all the steps but my plot still remains empty. Kind regards, John

Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Nov 26, 2019, 7:53 a.m. EST

Check the interface. You can define an array of start point coordinates. Difficult to help with the plot without the model.

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Check the interface. You can define an array of start point coordinates. Difficult to help with the plot without the model.

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Jan 6, 2020, 5:30 a.m. EST

After the holidays I am back doing my simulation. I attached the file, because I still have questions to the plot. I defined 3D Cut Lines and plotted the Bz component of the magnetic field for them. Are there any options to get a smoother (more accurate) plot? I also expected the peak of the Bz component for each cut line much higher than it is shown in the plot. I am not sure yet, if I forgot something in my simlation or my calculations are wrong. I am gonna re-check this with another software.

Kind regards, And a happy new year everybody! John

After the holidays I am back doing my simulation. I attached the file, because I still have questions to the plot. I defined 3D Cut Lines and plotted the Bz component of the magnetic field for them. Are there any options to get a smoother (more accurate) plot? I also expected the peak of the Bz component for each cut line much higher than it is shown in the plot. I am not sure yet, if I forgot something in my simlation or my calculations are wrong. I am gonna re-check this with another software. Kind regards, And a happy new year everybody! John


Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Jan 6, 2020, 4:49 p.m. EST

John,

you probably need a better resolved mesh between the magnets. Your model isn't comprising current, so you can use mfnc instead of mf. You can also get your air ball much smaller if you use an infinite domain around the quadrupole.

Cheers Edgar

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
John, you probably need a better resolved mesh between the magnets. Your model isn't comprising current, so you can use mfnc instead of mf. You can also get your air ball much smaller if you use an infinite domain around the quadrupole. Cheers Edgar

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.