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.

How to make a plot of magnetic field gradient along a line

Please login with a confirmed email address before reporting spam

I have a 2D model of a magnetic field we are working with and am trying to plot values of it along an internal boundary. I am able to make a 1D plot along that boundary of the B field (mf.By) but what I really need is a plot of the gradient of the field d(mf.By,x) or d(mf.By,y).

I can make a 2D heat map for the magnetic flux gradient, but it shows a uniform value of 0 whenever I try to do it on a 1D plot along a line that definitely should have non zero value. Am I missing something or is it not possible to plot the value of a gradient along a line in Comsol?

Thanks

2 Replies Last Post 2 giu 2011, 15:13 GMT-4
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 5 apr 2011, 11:12 GMT-4
Hi

as mf.Bx = -Azy you should try to plot "Azyx" but as this is a 2nd order derivative d(dAz/dy)/dx it's a series of steps (if you have a 2nd order shape function)

Try a cubic discretisation for the MF and you will get some smoother derivatives


attached file is a 4.1.0.185 version

--
Good luck
Ivar
Hi as mf.Bx = -Azy you should try to plot "Azyx" but as this is a 2nd order derivative d(dAz/dy)/dx it's a series of steps (if you have a 2nd order shape function) Try a cubic discretisation for the MF and you will get some smoother derivatives attached file is a 4.1.0.185 version -- Good luck Ivar


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2 giu 2011, 15:13 GMT-4
Hi,

I am fairly new to COMSOL, and would like to calculate force exerted on a magnetic bead from some magnetic coils. Thus, I would like to plot magnetic field gradients also, or at least obtain these values.

Ivar's model has been most helpful. However, my model is 2D axisymmetric, and there does not seem to be an equivalent for Azyy. I have tried various combinations of Azrr, Azrphi, for example, but none of these variables seem to be defined.

Any ideas are very much appreciated! I am working in COMSOL 4.1, using AC/DC module, mef model.

Thank you.

PJ
Hi, I am fairly new to COMSOL, and would like to calculate force exerted on a magnetic bead from some magnetic coils. Thus, I would like to plot magnetic field gradients also, or at least obtain these values. Ivar's model has been most helpful. However, my model is 2D axisymmetric, and there does not seem to be an equivalent for Azyy. I have tried various combinations of Azrr, Azrphi, for example, but none of these variables seem to be defined. Any ideas are very much appreciated! I am working in COMSOL 4.1, using AC/DC module, mef model. Thank you. PJ

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.