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.

magnetic field gradient in 3D return zero!

Please login with a confirmed email address before reporting spam

Hi everybody

If anybody knows that why the gradient of magnetic field in 3D models is always zero? I checked the different methods. for example I wrote d(Bx,x) or different component of B and H. Even d(d(Ax,x),x) is always zero! I am using the quadratic discretization. It is OK when I simulating in 2D or 2D axisymmetric, However the similar geometry in 3D give the zero for gradient of magnetic field.

could somebody help me?

10 Replies Last Post 2016年6月29日 GMT-4 23:54
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年3月20日 GMT-4 02:48
Hi

First of all you must tell us in which direction your field is aligned, 3D magnetic vector potential transforms to magnetic field via a curl and you are in 3D space, so look rather at the cross derivatives, by the way the magnetic field x vector component Bx is equal to the curl(Ax) = Azy-Ayz = d(Az,y)-d(Ay,z) so its easier too use the Axy (y derivative of vector component Ax of A (I find it slightly confusion to have both vector components and derivatives tagged as the same letter, it would have been easier with a 1233 index for vector components and x,y,z for the derivative but OK COMSOl decided once the other way, and now its difficult to change ;)

Then as you have by default quadratic discretization, if you derive once more Bx you will get a rather discontinuous line, you need to increase the discretization to get a continuous result


---------------
Good luck
Ivar
Hi First of all you must tell us in which direction your field is aligned, 3D magnetic vector potential transforms to magnetic field via a curl and you are in 3D space, so look rather at the cross derivatives, by the way the magnetic field x vector component Bx is equal to the curl(Ax) = Azy-Ayz = d(Az,y)-d(Ay,z) so its easier too use the Axy (y derivative of vector component Ax of A (I find it slightly confusion to have both vector components and derivatives tagged as the same letter, it would have been easier with a 1233 index for vector components and x,y,z for the derivative but OK COMSOl decided once the other way, and now its difficult to change ;) Then as you have by default quadratic discretization, if you derive once more Bx you will get a rather discontinuous line, you need to increase the discretization to get a continuous result --------------- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年3月22日 GMT-4 05:02
Thank you ivar,

However I think I could find the solution. It is in attached pdf file.
Thank you ivar, However I think I could find the solution. It is in attached pdf file.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年12月27日 GMT-5 08:51

Thank you ivar,

However I think I could find the solution. It is in attached pdf file.


Thanks for your sharing file.
[QUOTE] Thank you ivar, However I think I could find the solution. It is in attached pdf file. [/QUOTE] Thanks for your sharing file.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2014年3月3日 GMT-5 15:26
Hi,
How can the gradient of magnetic field generated be used for the force equation of particle tracing. When I am using the terms generated according to the pdf given, the particles are not responding to it. Please help me regarding this.
Hi, How can the gradient of magnetic field generated be used for the force equation of particle tracing. When I am using the terms generated according to the pdf given, the particles are not responding to it. Please help me regarding this.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2014年3月3日 GMT-5 20:16
The u1, u2 and u3 in Pdf are not gradient. they are magnetic field component. You have to put these components in magnetophoretic force section. Chenge the magnetic field to user defined and then put these component in the table.
The u1, u2 and u3 in Pdf are not gradient. they are magnetic field component. You have to put these components in magnetophoretic force section. Chenge the magnetic field to user defined and then put these component in the table.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2014年3月4日 GMT-5 01:07
Hi
Thanks for your response. My force is not a Magnetophoretic force, but let me manipulate the equation for my purpose. Let me see the result.
Thanks again.
Hi Thanks for your response. My force is not a Magnetophoretic force, but let me manipulate the equation for my purpose. Let me see the result. Thanks again.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2014年3月4日 GMT-5 02:55
Hi,
I am trying to simulate atom trajectory, hence the equation of magnetophoretic force is not suitable, as it having gradient of H^2. Any help regarding this is highly appreciable.
Hi, I am trying to simulate atom trajectory, hence the equation of magnetophoretic force is not suitable, as it having gradient of H^2. Any help regarding this is highly appreciable.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2014年3月7日 GMT-5 06:04
Hi all..

I'm experiencing the same zero gradient problem as defined in the title. I tried the pdf attached. It seems it works fine but the results are nosier than 3.5a(i think if i use finer mesh, results will be better). But i couldnt implement the model via livelink Matlab. I'm trying to solve an optimization problem so matlab and comsol interface is important. When i use the code which i saved from comsol "save as menu", i get magnetic field results okay but the values of dependent variables (u,u1,u2) are always zero.

Any suggestions for coordinating matlab and comsol for this magnetic field gradient problem?
Hi all.. I'm experiencing the same zero gradient problem as defined in the title. I tried the pdf attached. It seems it works fine but the results are nosier than 3.5a(i think if i use finer mesh, results will be better). But i couldnt implement the model via livelink Matlab. I'm trying to solve an optimization problem so matlab and comsol interface is important. When i use the code which i saved from comsol "save as menu", i get magnetic field results okay but the values of dependent variables (u,u1,u2) are always zero. Any suggestions for coordinating matlab and comsol for this magnetic field gradient problem?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2014年5月20日 GMT-4 11:16
Hi, I have tried lots of method for making a particle trajectory in a gradient of magnetic field produced by multi turn coil. But particles are not responding the force. Please help me regarding this.
Hi, I have tried lots of method for making a particle trajectory in a gradient of magnetic field produced by multi turn coil. But particles are not responding the force. Please help me regarding this.

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2016年6月29日 GMT-4 23:54
Hi Mohamad, you can help me how to put these components in magnetophoretic force section when simulation with particle tracing for Fluid Flow?
Thanks
Hi Mohamad, you can help me how to put these components in magnetophoretic force section when simulation with particle tracing for Fluid Flow? Thanks

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.