You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.
In order to reproduce the test data of this article, I am trying to compute the B-field of a uniformly magnetized sphere. I'm expecting something like the following:
Here's the code I'm using, a slightly modified version of one of the example:
radius=1model= [
mesher.Sphere(x=0, y=0, z=0, radius=radius,
props={'magnetization': utils.ang2vec(1, inc=0, dec=90)})
]
# Create a regular grid at a constant heightshape= (20, 20)
area= [-2, 2, -2, 2]
x, y, z=gridder.regular(area, shape, z=0)
field=np.array([sphere.bx(x, y, z, model),
sphere.by(x, y, z, model),
sphere.bz(x, y, z, model)])
I am getting the following vector field (after a non-linear normalization for aesthetic purpose):
Hi @notsimon thanks for reporting this and taking the time to write such a detailed issue! We really appreciate it.
I've never tested that part of the code inside the sphere (as you can see from the tests). It's good to know that it doesn't currently work.
The equations we use are the same as those for a single dipole because outside of the sphere their fields are equivalent. But inside we would have to change the equations appropriately. I don't know exactly where to find the equations.
Hi @leouieda, thanks for your explanation !
I guess that's more an enhancement than a bug to fix then, as the field inside the magnetized object may not be used very often.
Hi @leouieda, sorry for the late reply.
Turns out I can manage to do what I need without what's happening inside the sphere.
If I find some time to contribute, I will probably use it to add Cuda support instead ! :)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
In order to reproduce the test data of this article, I am trying to compute the B-field of a uniformly magnetized sphere. I'm expecting something like the following:
Here's the code I'm using, a slightly modified version of one of the example:
I am getting the following vector field (after a non-linear normalization for aesthetic purpose):
Disclaimer: I'm a programmer, not a physicist ;)
Is my understanding of what "uniformly magnetized" means inaccurate ? Any idea how the first plot could be reproduced using Fatiando ?
Thanks in advance !
The text was updated successfully, but these errors were encountered: