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 29 giu 2016, 23:54 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 20 mar 2013, 02:48 GMT-4
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 22 mar 2013, 05:02 GMT-4
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 27 dic 2013, 08:51 GMT-5

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 3 mar 2014, 15:26 GMT-5
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 3 mar 2014, 20:16 GMT-5
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 4 mar 2014, 01:07 GMT-5
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 4 mar 2014, 02:55 GMT-5
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 7 mar 2014, 06:04 GMT-5
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 20 mag 2014, 11:16 GMT-4
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 29 giu 2016, 23:54 GMT-4
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.