fatiando / choclo

Kernel functions for your geophysical models
https://www.fatiando.org/choclo
BSD 3-Clause "New" or "Revised" License
13 stars 1 forks source link

Magnetic field between two poles #59

Open Xonxt opened 1 year ago

Xonxt commented 1 year ago

Description of the desired feature: The library already contains the function dipole.magnetic_field() to calculate the magnetic field of a single dipole, where both the positive and negative poles are at the same point q.

I would very much like to see a function to calculate the same for the case where there's a distance between the positive and negative poles. That is to say, some kind of rod/cylinder/wire, described as two end-points q1=(x1, y1, z1) and q2=(x2, y2, z2).

Otherwise, maybe point me in the right direction, where I can find the equations to implement this myself.

santisoler commented 1 year ago

Hi @Xonxt. Thanks for opening this issue. I'm curious to hear what type of application you have in mind for the function you describe.

Conceiving a magnetic dipole as two fictitious magnetic poles separated by a finite distance is a little bit tricky: in some regions of that space the magnetic field $\mathbf{B}$ can have not-null divergence (due to the presence of the fictitious magnetic poles).

Nevertheless, the magnetic field of a finite cylinder with homogeneous magnetization has analytical solutions. Check Caciagli (2017).

The easiest solution is when the magnetization is aligned with the symmetry axis of the cylinder. But there are also solutions for magnetizations perpendicular to that axis, and therefore solutions to magnetizations on any direction.

Is this something you would like to see in Choclo?

Xonxt commented 1 year ago

The easiest solution is when the magnetization is aligned with the symmetry axis of the cylinder. But there are also solutions for magnetizations perpendicular to that axis, and therefore solutions to magnetizations on any direction.

Actually, modelling it as a cylinder was my first thought, because that's exactly what I need - to simulate small/medium cylindrical objects buried in the ground (namely, unexploded ordinance). But I assumed that a straight line between two points would've been easier.

Thank you for the paper, I will check it out.