<<

Geosci. Model Dev., 10, 3591–3608, 2017 https://doi.org/10.5194/gmd-10-3591-2017 © Author(s) 2017. This work is distributed under the Creative Commons Attribution 3.0 License.

Ellipsoids (v1.0): 3-D magnetic modelling of ellipsoidal bodies

Diego Takahashi and Vanderlei C. Oliveira Jr. Department of Geophysics, Observatório Nacional, Rio de Janeiro, Brazil

Correspondence to: Vanderlei C. Oliveira Jr. ([email protected])

Received: 24 February 2017 – Discussion started: 21 April 2017 Revised: 10 August 2017 – Accepted: 22 August 2017 – Published: 28 September 2017

Abstract. A considerable amount of literature has been pub- 1 Introduction lished on the magnetic modelling of uniformly magnetized ellipsoids since the second half of the nineteenth century. Ellipsoids have flexibility to represent a wide range of ge- Based on the mathematical theory of the magnetic induction ometrical forms, are the only known bodies which can be developed by Poisson(1824), Maxwell(1873) affirmed that, uniformly magnetized in the presence of a uniform induc- if U is the gravitational potential produced by any body with ing field and are the only finite bodies for which the self- uniform density ρ and arbitrary at a point (x,y,z), − ∂U demagnetization can be treated analytically. This property then ∂x is the magnetic scalar potential produced at the makes ellipsoids particularly useful for modelling compact same point by the same body if it has a uniform magne- orebodies having high susceptibility. In this case, neglecting tization oriented along x with intensity ρ. Maxwell(1873) the self-demagnetization may strongly mislead the interpre- generalized this idea as a way of determining the magnetic tation of these bodies by using magnetic methods. A num- scalar potential produced by any uniformly magnetized body ber of previous studies consider that the self-demagnetization in a given direction. By presuming that this uniform mag- can be neglected for the case in which the geological body netization is due to induction and that it is proportional to has an isotropic susceptibility lower than or equal to 0.1 SI. the resulting magnetic field (intensity) inside the body, he This limiting value, however, seems to be determined empir- postulated that the resulting field must also be uniform and ically and there has been no discussion about how this value parallel to the magnetization. This uniformity is due to the was determined. In addition, the geoscientific community fact that the resulting field is defined as the negative gradi- lacks an easy-to-use tool to simulate the magnetic field pro- ent of the magnetic scalar potential. As a consequence of this duced by uniformly magnetized ellipsoids. Here, we present uniformity, the gravitational potential U at points within the an integrated review of the magnetic modelling of arbitrar- body must be a quadratic function of the spatial coordinates. ily oriented triaxial, prolate and oblate ellipsoids. Our review Apparently, Maxwell(1873) was the first one to postulate includes ellipsoids with both induced and remanent magne- that ellipsoids are the only finite bodies having a gravita- tization, as well as with isotropic or anisotropic susceptibil- tional potential which satisfies this property and hence can be ity. We also discuss the ambiguity between confocal ellip- uniformly magnetized in the presence of a uniform inducing soids with the same magnetic moment and propose a way magnetic field. This property can be extended to other bodies of determining the isotropic susceptibility above which the defined as limiting cases of an ellipsoid (e.g. , elliptic self-demagnetization must be taken into consideration. Tests ). However, all the remaining non-ellipsoidal bodies with synthetic data validate our approach. Finally, we pro- cannot be uniformly magnetized in the presence of a uniform vide a set of routines to model the magnetic field produced inducing field. by ellipsoids. The routines are written in Python language as Another particularity of ellipsoids is that they are the part of the Fatiando a Terra, which is an open-source library only bodies which enable an analytical computation of their for modelling and inversion in geophysics. self-demagnetization. The self-demagnetization contributes to a decrease in the magnitude of the magnetization along the shortest axes of a body. This is a function of the body shape and gives rise to shape anisotropy (Uyeda et al., 1963;

Published by Copernicus Publications on behalf of the European Geosciences Union. 3592 D. Takahashi and V. C. Oliveira Jr.: Magnetic modelling of ellipsoids

Thompson and Oldfield, 1986; Dunlop and Özdemir, 1997; Clark and Emerson, 1999; Tauxe, 2003). It is well estab- lished in the literature that the self-demagnetization can be neglected if the body has a susceptibility lower than 0.1 SI (Emerson et al., 1985; Clark et al., 1986; Eskola and Tervo, 1980; Guo et al., 1998, 2001; Purss and Cull, 2005; Hillan and Foss, 2012; Austin et al., 2014; Clark, 2014). On the other hand, neglecting the self-demagnetization in geologi- cal bodies with high susceptibilities (> 0.1 SI) may strongly mislead the interpretation obtained from magnetic methods. This limiting value, however, seems to be determined empir- ically and, so far, there has been little discussion about how it was determined. Farrar(1979) demonstrated the importance of the ellip- soidal model in taking into account the self-demagnetization and determining reliable drilling directions on the Tennant Creek field, Australia. Later, Hoschke(1991) also showed how the ellipsoidal model proved to be highly successful in locating and defining ironstone bodies in the Tennant Creek field. Clark(2000) provides a good discussion about the in- fluence of the self-demagnetization in magnetic interpreta- Figure 1. Schematic representation of the coordinate systems used tion of the Osborne copper–gold deposit, Australia. This de- to represent an ellipsoidal body. (a) Main coordinate system with posit is hosted by ironstone bodies that have very high sus- axes x, y, and z pointing to north, east, and down, respectively. ceptibility. According to Clark(2000), neglecting the effects The dark grey plane contains the centre (xc,yc,zc; white circle) and of self-demagnetization led to errors of ≈ 55◦ in the inter- two unit vectors, u and w, defining two semi-axes of the ellipsoidal body. For triaxial and prolate ellipsoids, u and w define, respec- preted dip. Recently, Austin et al.(2014) used magnetic mod- tively, the semi-axes a and b. For oblate ellipsoids, u and w define elling and rock property measurements to show that, contrary the semi-axes b and c, respectively. The strike direction is defined to previous interpretations, the magnetization of the Can- by the intersection of the dark grey plane and the horizontal plane delaria iron oxide copper–gold deposit, Chile, is not domi- (represented in light grey), which contains the x axis and y axis. The nated by the induced component. Rather, the deposit has a angle ε between the x axis and the strike direction is called strike. relatively weak remanent magnetization and is strongly af- The angle ζ between the horizontal plane and the dark grey plane fected by self-demagnetization. These examples show the is called dip. The angle η between the strike direction and the line importance of the self-demagnetization and the ellipsoidal containing the unit vector u is called rake. The projection of this line model in producing trustworthy geological models of high- on the horizontal plane (not shown) is called dip direction (Pollard susceptibility orebodies, which may save significant cost as- and Fletcher, 2005; Allmendinger et al., 2012). (b) Local coordinate sociated with drilling. system with origin at the ellipsoid centre (xc,yc,zc) (black dot) and axes defined by unit vectors v , v and v . These unit vectors define A vast literature about the magnetic modelling of ellip- 1 2 3 the semi-axes a, b and c of triaxial, prolate and oblate ellipsoids in soidal bodies was developed in which are to be found the the same way. For triaxial and prolate ellipsoids, the unit vectors u names of many researchers. Nevertheless, interest in this sub- and w shown in (a) coincide with v1 and v2, respectively. For oblate ject has not yet died out, as is evidenced by a list of modern ellipsoids, the unit vectors u and w shown in (a) coincide with v2 papers in this field. Furthermore, the geoscientific commu- and v3, respectively. nity lacks a free easy-to-use tool to simulate the magnetic field produced by uniformly magnetized ellipsoids. Such a tool could prove useful both for teaching and researching soids. The routines are written in Python language as part of geophysics. the Fatiando a Terra (Uieda et al., 2013), which is an open- In this work, we present a review of the vast literature source library for modelling and inversion in geophysics. We about the magnetic modelling of ellipsoidal bodies and a the- attempt to use the best practices of continuous integration, oretical discussion about the determination of the isotropic documentation, unit-testing and version control for the pur- susceptibility value above which the self-demagnetization pose of providing a reliable and easy-to-use code. must be taken into consideration. We propose an alternative way of determining this value based on the body shape and the maximum relative error allowed in the resultant magne- tization. This alternative approach is validated by the results obtained with numerical simulations. We also provide a set of routines to model the magnetic field produced by ellip-

Geosci. Model Dev., 10, 3591–3608, 2017 www.geosci-model-dev.net/10/3591/2017/ D. Takahashi and V. C. Oliveira Jr.: Magnetic modelling of ellipsoids 3593

2 Methodology The magnetic modelling of an ellipsoidal body is com- monly performed in a particular Cartesian coordinate system 2.1 Geometrical parameters and coordinate systems that is aligned with the body semi-axes and has the origin coincident with the body centre (Fig.1b). For convenience, Let (x,y,z) be a point referred to a Cartesian coordinate sys- we denominate this particular coordinate system as the local tem with axes x, y and z pointing to, respectively, north, east coordinate system. The relationship between the Cartesian and down. For convenience, we denominate this coordinate coordinates (ex,ey,ez) of a point in a local coordinate system system as the main coordinate system (Fig.1a). Let us con- and the Cartesian coordinates (x,y,z) of the same point in sider an ellipsoidal body with centre at the point (xc,yc,zc), the main system is given by orientation defined by the angles strike ε, dip ζ and rake η > (Fig.1a), and semi-axes defined by positive constants a, b, er = V (r − rc) , (8) c (Fig.1b). The orientation angles strike, dip and rake are > commonly used to define the orientation of lines in structural where er = [ ex ey ez] , r and rc are defined in Eq. (1) and geology (Pollard and Fletcher, 2005; Allmendinger et al., the matrix V (Eqs. 6 and 7) is defined according to the el- 2012). The points (x,y,z) located on the of this el- lipsoid type. In what follows, quantities referred to the local lipsoidal body satisfy the following equation: coordinate system (Fig.1b) are indicated with the symbol “∼”. T (r − rc) A(r − rc) = 1 , (1) > > 2.2 Theoretical background where r = [ x y z] , rc = [ xc yc zc] , A is a posi- tive definite matrix given by Consider a magnetized ellipsoid immersed in a uniform in- −1 ducing magnetic field H0 (in Am ) given by  a−2 0 0  − > A = V 0 b 2 0 V , (2)  cosI cosD −2 0 0 c H0 = kH0k cosI sinD , (9) sinI and V is an orthogonal matrix whose first, second and third columns are defined by unit vectors v1, v2 and v3 (Fig.1b), where k·k denotes the Euclidean norm (or 2-norm) and D and respectively. The matrix V can be defined in terms of three I are respectively the declination and inclination of the local matrices: geomagnetic field in the main coordinate system (Fig.1a).  1 0 0  This field represents the main component of the ’s mag- netic field, which is usually assumed to be generated by the R1(θ) =  0 cosθ sinθ  , (3) 0 −sinθ cosθ Earth’s liquid core. In the absence of conduction currents, the total magnetic field H(r) at the position r (Eq.1) of a point referred to the main coordinate system is defined as follows  cosθ 0 −sinθ (Sharma, 1966; Eskola and Tervo, 1980; Reitz et al., 1992; R2(θ) =  0 1 0  (4) Stratton, 2007): sinθ 0 cosθ H(r) = H0 − ∇V(r), (10) and   where the second term is the negative gradient of the mag- cosθ sinθ 0 netic scalar potential V(r) given by R3(θ) =  −sinθ cosθ 0 . (5) 0 0 1 1 ZZZ  1  V(r) = − M(r0)>∇ dx0dy0dz0 . (11) 4π kr − r0k For triaxial ellipsoids (i.e. a > b > c) and prolate ellipsoids ϑ (i.e. a > b = c), we define the orthogonal matrix V as fol- 0 0 0 0 > lows: In this equation, r = [ x y z ] is the position vector of a point located within the ϑ, the integral is conducted π  π  0 0 0 0 V = R1 R2 (ε) R1 − ζ R3 (η) . (6) over the variables x , y and, z and M(r ) is the magnetiza- 2 2 tion vector (in Am−1). Equation (11) is valid anywhere, inde- For oblate ellipsoids (i.e. a < b = c), we define V as follows: pendently if the position vector r represents a point located  π  π  inside or outside the magnetized body (DuBois, 1896; Reitz V = R − R (π) R (ε) R − ζ R (η) . (7) 3 2 1 3 2 2 1 et al., 1992; Stratton, 2007). Based on Maxwell’s postulate, let us assume that the body The orthogonal matrices V used here for triaxial, prolate and has a uniform magnetization given by oblate ellipsoids (Eqs.6 and7) are different from those used by Emerson et al.(1985) and Clark et al.(1986). M = KH† , (12) www.geosci-model-dev.net/10/3591/2017/ Geosci. Model Dev., 10, 3591–3608, 2017 3594 D. Takahashi and V. C. Oliveira Jr.: Magnetic modelling of ellipsoids where H† is the resultant uniform magnetic field at any point Notice that the scalar function f (r) (Eq. 17) is proportional within the body and K is a constant and symmetrical second- to the gravitational potential that would be produced by the order representing the magnetic susceptibility of the ellipsoidal body with volume ϑ if it had a uniform den- body. This is a good approximation for bodies at room tem- sity equal to the inverse of the gravitational constant. It can perature, subjected to an inducing field H0 with strength be shown that the elements nij (r) are finite whether r is a ≤ −3 −1 −1 10 µ0 Am (Rochette et al., 1992), where µ0 repre- point within or without the volume ϑ (Peirce, 1902; Webster, sents the magnetic constant (in Hm−1). In this case, the sus- 1904). The matrix N(r) (Eq. 15) is called the depolarization ceptibility tensor K is commonly represented, in the main tensor (Solivérez, 1981, 2008, 2016). coordinate system (Fig.1a), as follows: The following part of this paper moves on to describe the   magnetic field H(r) (Eq. 15) at points located both within k1 0 0 and without the volume ϑ of the ellipsoidal body. However, = > K U 0 k2 0 U , (13) the mathematical developments are conveniently performed 0 0 k3 in the local coordinate system (Fig.1b) related to the respec- tive ellipsoidal body. where k1 > k2 > k3 are the principal susceptibilities and U is an orthogonal matrix whose columns ui, i = 1,2,3, are unit vectors called principal directions. Similarly to the matrix V 2.3 Coordinate transformation (Eqs.1,6 and7), we define the matrix U as a function of given orientation angles ε, ζ and η depending on the ellipsoid To continue our description of the magnetic modelling of type. For triaxial and prolate ellipsoids, we define U by using ellipsoidal bodies, it is convenient to perform two impor- Eq. (6), whereas for oblate ellipsoids we use Eq. (7). Notice tant coordinate transformations. The first one transforms the that the orientation angles ε, ζ and η defining the orthogonal scalar function f (r) (Eq. 17) from the main coordinate sys- matrix U may be different from the angles ε, ζ and η defining tem (Fig.1a) into a new scalar function fe (er) referred to the the ellipsoid orientation (Fig.1). local coordinate system (Fig.1b). The function fe (er) was first If the principal susceptibilities are different from each presented by Dirichlet(1839) to describe the gravitational other, we say that the body has an anisotropy of magnetic potential produced by homogeneous ellipsoids. Later, sev- susceptibility (AMS). The AMS is generally associated with eral authors also deduced and used this function for describ- the preferred orientation of the grains of magnetic minerals ing the magnetic and gravitational fields produced by triaxial, forming the rock (Fuller, 1963; Uyeda et al., 1963; Janák, prolate and oblate ellipsoids (Maxwell, 1873; Thomson and 1972; Hrouda, 1982; Thompson and Oldfield, 1986; Mac- Tait, 1879; DuBois, 1896; Peirce, 1902; Webster, 1904; Kel- Donald and Ellwood, 1987; Rochette et al., 1992; Dunlop logg, 1929; Stoner, 1945; Osborn, 1945; Peake and Davy, and Özdemir, 1997; Tauxe, 2003). For the particular case 1953; Macmillan, 1958; Chang, 1961; Lowes, 1974; Clark in which the principal directions coincide with the ellipsoid et al., 1986; Tejedor et al., 1995; Stratton, 2007). † ‡ axes, the matrix U is equal to the matrix V (Eq. 2). Another It is convenient to use fe (er) and fe (er) to define the func- important particular case is that in which the susceptibility is tion fe (er) evaluated, respectively, at points er inside and out- side the volume ϑ of the ellipsoidal body. The scalar function isotropic and, consequently, the principal susceptibilities k1, f †(r) is given by k2 and k3 (Eq. 13) are equal to a constant χ. In this case, the e e susceptibility tensor K (Eq. 13) assumes the particular form ∞ Z  2 2 2  = † x y z K χ I , (14) fe (r) = π abc 1 − e − e − e e a2 + u b2 + u c2 + u where I represents the identity matrix. 0 By using the magnetization M defined by Eq. (12), the to- 1 du r ∈ ϑ, (18) tal magnetic field H(r) (Eq. 10) can be rewritten as follows: R(u) e = + † H(r) H0 N(r)KH , (15) where where N(r) is a symmetrical matrix whose ij-element nij (r) q is given by R(u) = a2 + ub2 + uc2 + u . (19) 1 ∂2 f (r) nij (r) = , i = 1,2,3 , j = 1,2,3 , (16) This function represents the gravitational potential that 4π ∂r ∂r i j would be produced by the ellipsoidal body at points located where r1 = x, r2 = y, r3 = z are the elements of the position within its volume ϑ if it had a uniform density equal to vector r (Eq.1), and the inverse of the gravitational constant. Notice that, in this case, the gravitational potential is a quadratic function of the ZZZ 1 f (r) = dx0dy0dz0 . (17) spatial coordinates x, y and z, which supported Maxwell’s kr − r0k e e e ϑ (1873) postulate about uniformly magnetized ellipsoids. In a

Geosci. Model Dev., 10, 3591–3608, 2017 www.geosci-model-dev.net/10/3591/2017/ D. Takahashi and V. C. Oliveira Jr.: Magnetic modelling of ellipsoids 3595

‡ similar way, the function fe (er) is given by the diagonal elements are given by (Stoner, 1945)

∞ ∞ 2 2 2 Z Z  x y z  † abc 1 f ‡(r) = π abc 1 − e − e − e n = du , i = 1,2,3 , (23) e e 2 2 2 eii 2 +  a + u b + u c + u 2 ei u R(u) λ 0 1 du , r 6∈ ϑ , (20) where R(u) is defined by Eq. (19) and e1 = a, e2 = b and R(u) e e3 = c. These elements are commonly known as demagne- tizing factors and are defined according to the ellipsoid type. where R(u) is defined by Eq. (19) and the parameter λ is Here, we calculate the demagnetizing factors in the SI sys- defined according to the ellipsoid type as a function of the tem. Consequently, they satisfy the condition n† + n† + spatial coordinates x, y and z (see Appendix B). For read- e11 e22 e e e † = ers interested in additional information about the parameter en33 1, independently of the ellipsoid type. It is worth λ, we recommend Webster(1904, p. 234), Kellogg(1929, stressing that, according to Eq. (23), the demagnetizing fac- † p. 184) and Clark et al.(1986). tors enii are constants defined by the ellipsoid semi-axes a, b The second important coordinate transformation is defined and c. with respect to Eq. (15). By properly using the orthogonality Note that, according to Eqs. (21) and (A7), of matrix V (Eq. 2), the magnetic field H(r) (Eq. 15) can be = † > transformed from the main coordinate system (Fig.1a) to the N(r) VeN V , (24) local coordinate system (Fig.1b) as follows: where eN† is a diagonal matrix and V (Eq. 2) is an orthogo- > > > > > † nal matrix. This equation shows that, for the particular case V H(r) = V H0 + V N(r)V V KV V H , (21) | {z } | {z } | {z } | {z } | {z } in which r and consequently er represent a point inside the † † He(r) He0 eN(r) Ke He † e e volume ϑ of the ellipsoid, the elements enii of eN represent the eigenvalues while the columns of V represent the eigen- where the superscript “∼” denotes quantities referred to the vectors of the original depolarization tensor N(r). respective local coordinate system. In Eq. (21), the transformed depolarization tensor eN(er) is Triaxial ellipsoids calculated as a function of the original depolarization tensor N(r) (Eq. 15). In this case, the elements of eN(er) are calcu- For triaxial ellipsoids (e.g. a > b > c), the demagnetizing lated as a function of the second derivatives of the function factors obtained by solving Eq. (23) are given by f (r) (Eq. 17), which is defined in the main coordinate sys- abc tem (Fig.1a). It can be shown (Appendix A), however, that n† = [F (κ,φ) − E(κ,φ)] , (25) e11  1  the elementsenij (er) of eN(er) can also be calculated as follows: a2 − c2 2 a2 − b2 abc 2 n† = − [F (κ,φ) − E(κ,φ)] 1 ∂ fe (er) e22 1 enij (er) = , i = 1,2,3 , j = 1,2,3 , (22) a2 − c2 2 a2 − b2 4π ∂eri ∂erj abc c2 + E(κ,φ) − (26) where r1 = x, r2 = y and r3 = z are the elements of the trans- 1 2 − 2 e e e e e e a2 − c2 2 b2 − c2 b c formed vectorer (Eq.8) and fe (er) is given by Eq. (18) or (20), depending if r represents a point located within or without e and the volume ϑ of the ellipsoidal body. abc b2 n† = − E(κ,φ) + , (27) 2.4 Transformed depolarization Ne(r) e33 1 2 − 2 e a2 − c2 2 b2 − c2 b c 2.4.1 Depolarization tensor N† e where

Let eN† be the transformed depolarization tensor calculated φ Z 1 for the case in which er (Eq.8) represents a point located in- F (κ,φ) = dψ † 1 (28) side the ellipsoidal body. In this case, the elements of eN are − 2 2  2 † 0 1 κ sin ψ calculated according to Eq. (22), with fe (er) given by fe (er) † (Eq. 18). As we have already pointed out, the fe (er) (Eq. 18) and is a quadratic function of the spatial coordinates ex, ey and ez. † † φ Consequently, the elements n , i = 1,2,3, j = 1,2,3, of N 1 eij e Z   do not depend on the elements of the transformed position E(κ,φ) = 1 − κ2sin2ψ 2 dψ , (29) vectorer (Eq.8). Also, the off-diagonal elements are zero and 0 www.geosci-model-dev.net/10/3591/2017/ Geosci. Model Dev., 10, 3591–3608, 2017 3596 D. Takahashi and V. C. Oliveira Jr.: Magnetic modelling of ellipsoids

1  2 2 2 2 ‡ with κ = a − b / a − c 2 and cosφ = c/a. The to Eq. (22), with fe (er) given by fe (er) (Eq. 20). By following ‡ functions F (κ,φ) (Eq. 28) and E(κ,φ) (Eq. 29) are called Clark et al.(1986), the diagonal elements enii(er) and the off- Legendre’s normal elliptic integrals of the first and second ‡ = = diagonal elementsenij (er), i 1,2,3, j 1,2,3, are given by kind, respectively. Stoner(1945) presented a detailed deduc- tion of the demagnetizing factors n† (Eq. 25), n† (Eq. 26) abc  ∂λ  e11 e22 n‡ (r) = − h r + g (34) † eii e ∂r i ei i and en33 (Eq. 27). Clark et al.(1986) presented similar formu- 2 ei las. It can be shown that these demagnetizing factors satisfy and † + † + † = † † † the conditions en11 en22 en33 1 and en11 < en22 < en33. abc  ∂λ  ‡ = − Prolate ellipsoids enij (er) hj erj , (35) 2 ∂eri For prolate ellipsoids (e.g. a > b = c), the demagnetizing where factors obtained by solving Eq. (23) are given by 1 h = − , (36)   i 2 +   1  ei λ R(λ) † 1  m  2  2  n = ln m + m − 1 − 1 (30) ∞ e11 2 − 1 m 1  2 −  2  Z 1 m 1 g = du , (37) i 2 +  ei u R(u) and λ

† 1  †  ∂λ n = 1 − n , (31) where e1 = a, e2 = b, e3 = c and is defined in Appendix e22 e11 ∂eri 2 B (Eq. B22). The functions gi (Eq. 37) are defined according ‡ † = † † = to the ellipsoid type. Notice that the elements n (r) (Eq. 34) where en33 en22, with en11 defined in Eq. (30) and m a/b. eii e † and n‡ (r) (Eq. 35) are proportional to the second derivatives The detailed deduction of the demagnetizing factors en11 eij e † ‡ (Eq. 30) and n (Eq. 31) can be found, for example, in of the function fe (er) (Eq. 20), which is harmonic. Conse- e22 ‡ Stoner(1945). These formulas were later presented by Emer- quently, the diagonal elements enii(er) satisfy the condition son et al.(1985). It can be shown that these demagnetizing ‡ + ‡ + ‡ = en11(er) en22(er) en33(er) 0 for any point er outside the el- † + † = † † factors satisfy the conditions en11 2 en22 1 and en11 < en22. lipsoid, independently of the ellipsoid type. Oblate ellipsoids Triaxial ellipsoids

For oblate ellipsoids (e.g. a < b = c), the demagnetizing fac- For triaxial ellipsoids (e.g. a > b > c), the functions gi tors obtained by solving Eq. (23) are given by (Eq. 37) are defined as follows:   2 † 1 m − g = [F (κ,φ) − E(κ,φ)] , (38) n = 1 − cos 1m (32) 1 1 e11 − 2  1  a2 − b2a2 − c2 2 1 m 1 − m2 2 1 2a2 − c2 2   b2 − c2  and g = E (κ,φ) − 2 2 − 2 2 − 2 a2 − c2 1   a b b c † = − † en22 1 en11 , (33) " # 1  2 a2 − b2 c2 + λ 2  F (κ,φ) − (39) † = † † =  1 a2 + λb2 + λ where en33 en22, with en11 defined in Eq. (32) and m a/b. a2 − c2 2  The detailed deduction of these demagnetizing factors can be found, for example, in Stoner(1945). These formulas and can also be found in Emerson et al.(1985). The only dif- 2 = ference, however, is that Emerson et al.(1985) replaced the g3 1 E (κ,φ) −1 −1 2 2 2 2 2 term cos by a term tan , according√ to the trigonomet- b − c a − c −1 −1 2 ric identity tan x = cos (1/ x + 1), x > 0. It can be " # 1 2 b2 + λ 2 shown that these demagnetizing factors satisfy the conditions + , (40) † + † = † † b2 − c2 a2 + λc2 + λ en11 2 en22 1 and en11 > en22.

‡ where F (κ,φ) and E(κ,φ) are defined by Eqs. (29) and (28), 2.4.2 Depolarization tensor Ne (er) q but with sinφ = a2 − c2/a2 + λ. A detailed deduction ‡ = = The elements enij (er), i 1,2,3, j 1,2,3, of the trans- of these formulas was presented by Tejedor et al.(1995). ‡ formed depolarization tensor eN (er) are calculated according Similar formulas can also be found in Clark et al.(1986).

Geosci. Model Dev., 10, 3591–3608, 2017 www.geosci-model-dev.net/10/3591/2017/ D. Takahashi and V. C. Oliveira Jr.: Magnetic modelling of ellipsoids 3597

Prolate ellipsoids Let us pre-multiply the uniform internal field He† (Eq. 45) by the transformed susceptibility tensor Ke (Eq. 21) to obtain For prolate (e.g. a > b = c) ellipsoids, the functions gi −1  †  (Eq. 37) are given by Me = Ke I + eN Ke He0   1 1   −1 2  a2 − b2 2 + a2 + λ 2 † = = I + Ke eN Ke He0 , (46) g1 3 ln 1  a2 − b2 2  b2 + λ 2 where M represents the transformed magnetization, as can 1  e a2 − b2  2  be easily verified by using Eqs. (12) and (21). The matrix − (41) a2 + λ identity used for obtaining the second line of Eq. (46) is given  by Searle(1982, p. 151). and Equation (46) can be easily generalized for the case in which the ellipsoid has also a uniform remanent magneti-  1 1 a2 − b2a2 + λ 2 zation Me R. Let us first consider that the uniform remanent g = = −1 2 3 2 magnetization satisfies the condition HeA Ke Me R, where 2 2 2 b + λ a − b  HeA represents a hypothetical uniform ancient field. Then, if  1 1  we assume that He0, in Eqs. (45) and (46), is in fact the sum of a2 − b2 2 + a2 + λ 2  − the inducing magnetic field He0 and the hypothetical ancient ln 1  , (42) b2 + λ 2  field HeA, we obtain the following generalized equation: M = 3(KH + M ) , (47) where g3 = g2. These formulas can be obtained by properly 0 R manipulating those presented by Emerson et al.(1985). where − Oblate ellipsoids   1 > 3 = V I + Ke eN† V . (48) = For oblate (e.g. a < b c) ellipsoids, the functions gi Despite the coordinate system transformation represented by (Eq. 37) are given by the matrix V (Eq. 2), Eq. (47) is consistent with that given  1  1  by Clark et al.(1986, Eq. 38). It shows the combined effect  2 2  2  2 2  2 2  b − a −1 b − a  g1 = − tan   (43) of the anisotropy of magnetic susceptibility (AMS) and the 3 a2 + λ a2 + λ b2 − a2 2   shape anisotropy. The AMS is represented by the suscepti- bility tensor K (Eq. 13) and reflects the preferred orientation and of the magnetic minerals forming the body. The susceptibil-   1  ity tensor appears in Eq. (47), defined in the main coordi- 1  b2 − a2  2 g = tan−1 nate system (Fig.1a), and (48), defined in the local coordi- 2 3  2 +  b2 − a2 2  a λ nate system (Fig.1b). The shape anisotropy is represented, in † 1  Eq. (47), by the depolarization tensor eN and reflects the self- b2 − a2a2 + λ 2  − , demagnetization associated to the body shape. Notice that the 2 (44) b + λ  resultant magnetization M (Eq. 47) does not necessarily have the same direction as the inducing field H0 (Eq.9). The angu- where g3 = g2. Similarly to the case of prolate ellipsoid lar difference between the resultant magnetization and the in- shown previously, these formulas can be obtained by prop- ducing field depends on the combined effect of the anisotropy erly manipulating those presented by Emerson et al.(1985). of magnetic susceptibility and the shape anisotropy. For the particular case in which the susceptibility is 2.5 Internal magnetic field and magnetization isotropic, the susceptibility tensor is defined according to Eq. (14). In this case, the magnetization M (Eqs. 12 and 47) By consideringer as a point within the volume ϑ of the ellip- is referred to the main coordinate system (Fig.1a), and the soid and using the Maxwell postulate about the uniformity of matrix 3 (Eq. 48) can be rewritten as follows: the magnetic field H(r) inside ellipsoidal bodies, we can use † Eq. (21) for defining the resultant uniform magnetic field He M = 3(χ H0 + MR) , (49) inside the ellipsoidal body as follows: and  −1 − † = + †   1 > He I eN Ke He0 , (45) 3 = V I + χ eN† V . (50) where I is the identity matrix and eN† is as defined in the Despite the coordinate transformation represented by matrix previous section. V (Eq. 2), this equation is in perfect agreement with those www.geosci-model-dev.net/10/3591/2017/ Geosci. Model Dev., 10, 3591–3608, 2017 3598 D. Takahashi and V. C. Oliveira Jr.: Magnetic modelling of ellipsoids presented by Guo et al.(2001, Eqs. 13–15). The first term, By using the concept of vector norm and its corresponding depending on the inducing field H0 (Eq.9), represents the operator norm (Demmel, 1997; Golub and Loan, 2013), we induced magnetization whereas the term depending on MR may use Eq. (57) to write the following inequality: is the remanent magnetization. Equation (49) reveals that, as kδMk pointed out by many authors (e.g. Maxwell, 1873; DuBois, ≤ kδ3−1k . (58) k k 1896; Stoner, 1945; Clark et al., 1986; Stratton, 2007), the M induced magnetization opposes the inducing field if it is par- where kδMk and kMk denote Euclidean norms (or 2-norms) allel to an ellipsoid axis, independently of the ellipsoid type. and the term kδ3−1k denotes the matrix 2-norm of δ3−1. Otherwise, the magnetization is not necessarily parallel to By using Eqs. (53) and (54) and the orthogonal invariance of the inducing field. If we additionally consider that χ  1, the the matrix 2-norm (Demmel, 1997; Golub and Loan, 2013), matrix 3 (Eq. 50) approaches to the identity and the magne- we define kδ3−1k as follows: tization M (Eq. 49) can be approximated by kδ3−1k = χ n† , (59) ˘ emax M = χ H0 + MR , (51) where n† is the demagnetization factor associated with the which is the classical equation describing the resultant mag- emax shortest ellipsoid semi-axis. For a triaxial ellipsoid, n† ≡ netization in applied geophysics (Blakely, 1996, p. 89). No- emax n† n† ≡ n† tice that, in this particular case, the induced magnetization is e33 (Eq. 27), for a prolate ellipsoid, emax e22 (Eq. 31), † ≡ † parallel to the inducing field H0 (Eq.9), whether it is parallel and, for an oblate ellipsoid, enmax en11 (Eq. 32). It is worth † to an ellipsoid axis or not. Usually, Eq. (51) is considered a stressing that, independently of the ellipsoid type, enmax is a good approximation for χ ≤ 0.1 SI. Although this value has scalar function of the ellipsoid semi-axes. In Eq. (58), the ra- been largely used in the literature, there have been few em- tio kδMkkMk−1 represents the relative error in the approx- pirical and/or theoretical investigations about it. imated magnetization M˘ (Eq. 51) with respect to the true magnetization M (Eqs. 49 and 52). Given a target relative 2.5.1 Relationship between χ and the relative error in error  and an ellipsoid with given semi-axes, we may use M˘ the inequality represented by Eq. (59) to define  In the case of isotropic susceptibility, the resultant magneti- χ = , max † (60) zation M (Eq. 49) may be determined by solving the follow- enmax ing linear system: which represents the maximum isotropic susceptibility that −1 the ellipsoidal body can assume in order to guarantee a rel- 3 M = χ H0 + MR , (52) ative error lower than or equal to . For isotropic suscepti- where, according to Eq. (50), bilities greater than χmax, there is no guarantee that the rel-   ative error in the approximated magnetization M˘ (Eq. 51) −1 = + † > 3 V I χ eN V . (53) with respect to the true magnetization M (Eqs. 49 and 52) As we have already pointed out, the approximated magne- is lower than or equal to . The geoscientific community has = tization M˘ (Eq. 51) represents the particular case in which been using χmax 0.1 SI as a limit value for neglecting the −1 self-demagnetization and, consequently, use magnetization the matrix 3 (Eq. 50), and consequently the matrix 3 ˘ (Eq. 53), are close to the identity. M (Eq. 51) as a good approximation of the true magneti- Consider a perturbed matrix δ3−1 given by zation M (Eqs. 49 and 52). Equation (60), on the other hand, defines χmax as a function of the ellipsoid semi-axes, accord- δ3−1 = 3−1 − I (54) ing to a user-specified relative error . and, similarly, a perturbed magnetization vector δM given by 2.5.2 Ambiguity between confocal ellipsoids with the δM = M − M˘ . (55) same magnetic moment By using these two equations, we may rewrite that of the There is a fundamental non-uniqueness of ellipsoidal bodies, approximated magnetization M˘ (Eq. 51) as follows: analogous to the equivalence of concentric spheres with the same magnetic moment. To show this ambiguity, let us first  −1 −1 3 − δ3 (M − δM) = χ H0 + MR . (56) consider a which is immersed in a uni- form inducing field and has semi-axes a, b and c, isotropic Now, by subtracting the true magnetization M (Eq. 52) from susceptibility χ and no remanence. The magnetization of this this linear system (Eq. 56) and rearranging the terms, we ob- ellipsoid, defined in the local coordinate system, can be ob- tain the following linear system for the perturbed magnetiza- tained by using Eqs. (14), (21) and (46) as follows: tion δM (Eq. 55):  −1 −1 † δM = −δ3 M . (57) Me = χ I + χ eN He0 . (61)

Geosci. Model Dev., 10, 3591–3608, 2017 www.geosci-model-dev.net/10/3591/2017/ D. Takahashi and V. C. Oliveira Jr.: Magnetic modelling of ellipsoids 3599

9 In this case, the magnetic moment eP, defined in the local co- km = 10 µ0, where µ0 represents the magnetic constant ordinate system, is given by (in Hm−1). For geophysical applications, it is preferable to calculate the total-field anomaly produced by the magnetic eP = ϑMe , (62) sources. This scalar quantity is given by (Blakely, 1996) = 4 where ϑ 3 πabc is the ellipsoid volume. From Eqs. (61) 1T (r) = kB0 + 1B(r)k − kB0k , (66) and (62), we can easily show that, if the inducing field He0 is where B0 = km H0 and 1B(r) = km 1H(r), with H0 and parallel to a semi-axis ei, where i = 1,2,3, e1 = a, e2 = b, 1H(r) defined, respectively, by Eqs. (9) and (65). In e3 = c, only the ith component Pi of the magnetic moment practical situations, however, kB k>>k1B(r)k and, con- eP is non-null, and is given by 0 sequently, the following approximation is valid (Blakely, χ H 1996): P = ϑ 0 , i † (63) + χ n > 1 eii B 1B(r) 1T (r) ≈ 0 . (67) kB k where H0 is the intensity of the inducing field He0 and the 0 † demagnetizing factor enii is defined by Eq. (25), (30) or (32), according to the ellipsoid type. 3 Computational implementation and reproducibility 0 √ Now, consider√ a confocal ellipsoid√ with semi-axes a = a2 + u, b0 = b2 + u and c0 = c2 + u, where u is a pos- The code is implemented in the Python language, by using itive . From Eq. (63), we can define the isotropic the NumPy and SciPy libraries (van der Walt et al., 2011), as susceptibility χ 0 that is necessary to this confocal ellipsoid part of the open-source library Fatiando a Terra (Uieda et al., produce the same magnetic moment eP (Eq. 62) as follows: 2013). Our code is very modular and has a test suite formed by a considerable number of assertions, unit tests, doc tests P χ 0 = i , (64) and integration tests. We refer the readers interested in best 0 − † ϑ H0 enii Pi practices for scientific computing to Wilson et al.(2014). The numerical simulations presented here were gener- 0 = 4 0 0 0 † where ϑ 3 πa b c andenii is the new demagnetizing factor ated with the Jupyter Notebook (http://jupyter.org), which computed for the confocal ellipsoid by using Eq. (25), (30) is a web application that allows the creation and sharing of or (32), according to the ellipsoid type. It can be shown that documents that contain live code, equations, visualizations this confocal ellipsoid produces the same magnetic field as and explanatory text. Besides using Fatiando a Terra (Uieda the reference ellipsoid. et al., 2013), the numerical simulations use the NumPy li- This ambiguity between confocal ellipsoids with the brary (van der Walt et al., 2011) to perform numerical com- same magnetic moment has already been pointed out by putations and the Matplotlib library (Hunter, 2007) to plot Clark (2014). It occurs for the particular case in which the the results and generate figures. The Jupyter Notebooks uniform inducing field is parallel to an ellipsoid axis and used to produce all the results presented here are avail- there is no remanence. Otherwise, the magnetic field pro- able in a repository on GitHub (https://github.com/pinga-lab/ duced by the confocal ellipsoids will be different due to the magnetic-ellipsoid). shape anisotropy.

2.6 External magnetic field and total-field anomaly 4 Numerical simulations

The magnetic field 1H(r) produced by an ellipsoid at exter- All the code developed for generating the results presented nal points is calculated from Eqs. (21) and (47) as the differ- in the following sections, as well as the code developed for ence between the resultant field H(r) and the inducing field generating additional numerical simulations, can be found at H0: the folder code of the online repository https://github.com/ pinga-lab/magnetic-ellipsoid. ‡ > 1H(r) = VeN (er)V M , (65) 4.1 Demagnetizing factors ‡ where eN (er) is the transformed depolarization tensor whose ‡ ‡ We simulated a triaxial ellipsoid with semi-axes a0 = elements enii(er) and enij (er) are defined, respectively, by Eqs. (34) and (35). 1H(r) represents the magnetic field pro- 1000 m, b0 = 700 m and c0 = 200 m. Then we used this el- duced by a uniformly magnetized body located in the crust. lipsoid as a reference to generate 100 different triaxial ellip- −1 † † Equation (65) gives the magnetic field (in Am ) produced soids and calculate their demagnetizing factors en11, en22 and † by an ellipsoid. However, in geophysics, the most widely en33 by using Eqs. (25), (26) and (27). The semi-axes of these used field is the magnetic induction (in nT). Fortunately, this 100 ellipsoids are given by a = a0 + u b0, b = b0 + u b0 and conversion can be easily done by multiplying Eq. (65) by c = c0 + u b0, where 0 ≤ u ≤ 10. Notice that, for u = 0, the www.geosci-model-dev.net/10/3591/2017/ Geosci. Model Dev., 10, 3591–3608, 2017 3600 D. Takahashi and V. C. Oliveira Jr.: Magnetic modelling of ellipsoids resulting semi-axes are equal to those of the reference ellip- soid. The larger the variable u, the larger the resulting semi- axes a, b and c, but the smaller the relative difference be- 1.0 tween them. Consequently, the resulting ellipsoids obtained (a) a b c u from the semi-axes , and become more spherical as in- 0.8 † creases. In this case, the demagnetizing factors en11 (Eq. 25), † † 0.6 en22 (Eq. 26) and en33 (Eq. 27) tend to 1/3 (e.g. Stoner, 1945). † Figure2a shows the calculated demagnetizing factors en11 † † 0.4 (in red), en22 (in green) and en33 (in blue) for the 100 triaxial ellipsoids. The result shows that the relative difference be- 0.2 tween the demagnetizing factors is large for small values of Demagnetizing factor u and decreases as u increases. In this case, all demagnetizing 0.0 factors tend to 1/3, according to what we know from theory. 0 2 4 6 8 10 Also, Fig.2a confirms that the demagnetizing factors satisfy u † † † 1.0 the condition en11 < en22 < en33 independently of the value of u. (b) We have also simulated 100 different prolate ellipsoids 0.8 with semi-axes a = m b0 and b = b0, where 1.02 ≤ m ≤ 10 0.6 and b0 = 1000 m, and calculate their demagnetizing factors † † en11 and en22 by using Eqs. (30) and (31), respectively. Simi- 0.4 larly, we simulated 100 different oblate ellipsoids with semi- axes a = m b0 and b = b0, where 0.02 ≤ m ≤ 0.98 and b0 = 0.2 † Demagnetizing factor 1000 m, and calculate their demagnetizing factors en11 and † 0.0 en22 by using Eqs. (32) and (33), respectively. 1 2 3 4 5 6 7 8 9 10 Figure2b and c show the results obtained for the 100 m prolate and the 100 oblate ellipsoids, respectively. As ex- † 1.0 pected from theory, the demagnetizing factors en11 (red line (c) † in Fig.2b) and en22 (green line in Fig.2b) calculated for the 0.8 prolate ellipsoids are close to 1/3 for m close to 1. Also, † † 0.6 these demagnetizing factors satisfy the condition en11 < en22 for all values of m. The result obtained for the oblate ellip- soids (Fig.2c) are also in perfect agreement with theory. The 0.4 demagnetizing factors n† (in red) and n† (in green), which e11 e22 0.2 were calculated by using Eqs. (32) and (33), respectively, Demagnetizing factor are close to 1/3 for m close to 0 and satisfy the condition 0.0 † † 0.2 0.4 0.6 0.8 en11 > en22 for all values of m. m 4.2 Confocal ellipsoids † Figure 2. (a) Comparison between the demagnetizing factors en11 † † (in red), en22 (in green) and en33 (in blue) produced by 100 triaxial We simulated two confocal ellipsoids by using the param- ellipsoids with semi-axes a = a0 +u b0, b = b0 +u b0 and c = c0 + eters shown√ in Table√1. The semi-axes√ of Ellipsoid 2 were u b0, where 0 ≤ u ≤ 10 and b0 = 700 m. The demagnetizing factors defined as a2 + u, b2 + u and c2 + u, where a, b, and were calculated by using Eqs. (25), (26) and (27). (b) Comparison 6 † † c are the semi-axes of Ellipsoid 1 and u = 2 × 10 m. between the demagnetizing factors en11 (in red) and en22 (in green) We have computed the total-field anomalies produced by produced by 100 prolate ellipsoids with semi-axes a = m b0 and Ellipsoid 1 and Ellipsoid 2 at the same regular grid of 200 × b = b0, where 1.02 ≤ m ≤ 10 and b0 = 1000 m. The demagnetizing 200 points located on a horizontal plane at z = 0 m by using factors were calculated by using Eqs. (30) and (31). (c) Comparison between the demagnetizing factors n† (in red) and n† (in green) two different inducing fields H0. e11 e22 a = m b b = In the first case, we used a uniform inducing field H produced by 100 oblate ellipsoids with semi-axes 0 and 0 b , where 0.02 ≤ m ≤ 0.98 and b = 1000 m. The demagnetizing which is parallel to the semi-axis a of the confocal ellip- 0 0 factors were calculated by using Eqs. (32) and (33). The horizontal ≈ − ◦ ≈ ◦ soids and has inclination 4.98 , declination 15.38 black line represents the value 1/3. −1 and intensity H0 ≈ 18.7 Am . The total-field anomaly pro- duced by Ellipsoid 1 by using this inducing field is shown in Fig.3. In this case, Ellipsoid 2 produces the same total-field

Geosci. Model Dev., 10, 3591–3608, 2017 www.geosci-model-dev.net/10/3591/2017/ D. Takahashi and V. C. Oliveira Jr.: Magnetic modelling of ellipsoids 3601

Table 1. Parameters defining two confocal ellipsoids. (a) 64 4 Parameter Ellipsoid 1 Ellipsoid 2 Unit 48 32 Semi-axis a 900 ≈ 1676.31 m 2 Semi-axis b 500 1500 m 16

Semi-axis c 100 ≈ 1417.74 m 0 0

Coordinate of the centre xc 0 0 m x (km) 16 Coordinate of the centre yc 0 0 m 2 Coordinate of the centre zc 1500 1500 m 32 ∗ ◦ Orientation angle ε 45 45 48 ∗ ◦ Orientation angle ζ 10 10 4 64 Orientation angle η∗ −30 −30 ◦ Isotropic susceptibility χ 1.2 ≈ 0.014 SI 4 2 0 2 4

∗ (b) 72 Defined in Fig.1a. 4

48

2 80 24 4 60 0 0

40 x (km) 2 24 20 2

0 0 48

x (km) 4 20 72 2 40 4 2 0 2 4

60 (c) 27 4 4 80 18 4 2 0 2 4 2 9 Figure 3. Total-field anomaly (in nT) produced by the synthetic bodies Ellipsoid 1 and Ellipsoid 2, both defined in Table1. The syn- 0 0

thetic data produced by these confocal ellipsoids were calculated on x (km) a regular grid of 200 × 200 points at the constant vertical coordinate 9 z = 0 m. These data were calculated with a uniform inducing field 2 parallel to the semi-axis a of the confocal ellipsoids. 18 4 27

4 2 0 2 4 anomaly as Ellipsoid 1. The isotropic susceptibility of El- y (km) lipsoid 2 was calculated with Eq. (64) and consequently its magnetic moment is equal to that of Ellipsoid 1. Notice that Figure 4. Total-field anomalies (in nT) produced by (a) Ellipsoid the volume of Ellipsoid 2 is approximately 79 times greater 1 and (b) Ellipsoid 2, both defined in Table1. The synthetic data than that of Ellipsoid 1, whereas the isotropic susceptibility produced by these confocal ellipsoids were calculated on a regular of Ellipsoid 1 is approximately 85 times greater than that of grid of 200×200 points at the constant vertical coordinate z = 0 m. Ellipsoid 2. This result illustrates the ambiguity between the These data were calculated with a uniform inducing field which is field produced by confocal ellipsoids with the same magnetic oblique to the semi-axes of the confocal ellipsoids. (c) Difference between the total-field anomalies shown in (b) and (a). moment. The second inducing field H0 used is oblique to the semi- axes of the confocal ellipsoids, has the same intensity as the anisotropy. The differences are shown in Fig.4c. These re- other one, but a different direction. In this case, the inclina- sults confirm numerically what was pointed out by Clark − ◦ tion and declination of H0 are, respectively, 30 and 60 . (2014): confocal ellipsoids with properly scaled isotropic Figure4a and b show the total-field anomalies produced, re- susceptibilities, no remanence and the same magnetic mo- spectively, by Ellipsoid 1 and Ellipsoid 2 by using this new ment produce different magnetic fields at the same external inducing field H0. Notice that by using this oblique induc- points, unless the inducing field happens to lie along one of ing field, the total-field anomalies produced by the confo- their axes. cal ellipsoids are different from each other due to the shape www.geosci-model-dev.net/10/3591/2017/ Geosci. Model Dev., 10, 3591–3608, 2017 3602 D. Takahashi and V. C. Oliveira Jr.: Magnetic modelling of ellipsoids

Table 2. Parameters defining a synthetic orebody. This model is 2.0 450 based on that presented by Farrar(1979) to simulate the Warrego 1.5 orebody, Tennant Creek field, Australia. 300 1.0

150 Parameter Value Unit 0.5

Semi-axis a 490.7 m 0.0 0

Semi-axis b 69.7 m x (km) 0.5 Semi-axis c 30.0 m 150 Coordinate of the centre xc 0 m 1.0 Coordinate of the centre yc 0 m 300 1.5 Coordinate of the centre zc 500 m 1 ◦ 450 Orientation angle ε −34.0 2.0 Orientation angle ζ 1 66.1 ◦ 2.0 1.5 1.0 0.5 0.0 0.5 1.0 1.5 2.0 Orientation angle η1 45.0 ◦ y (km) Isotropic susceptibility χ 1.69 SI 2 Figure 5. Total-field anomaly (in nT) produced by the synthetic ore- x component of the inducing field B0 32610 nT body defined in Table2. The synthetic data are calculated on a reg- 2 y component of the inducing field B0 0 nT ular grid of 100 × 100 points at the constant vertical coordinate 2 z component of the inducing field B0 39450 nT z = 0 m.

1 Defined in Fig.1a. 2 Defined in Eq. (66). As expected, the differences calculated by using the higher isotropic susceptibility (Fig.6a) are very large. The peak-to- 4.3 Simulation of a geological body peak amplitude is ≈ 40 nT and represents ≈ 8% of the peak- We simulated an ellipsoidal body similar to the Warrego to-peak amplitude of the total-field anomaly shown in Fig.5. = orebody, which was the resource on which the well-known Figure6b shows the differences calculated by using χ1 Warrego mine developed in Tennant Creek, Australia. Af- 0.1 SI. It is commonly accepted that, for bodies having ter nearly a decade as one of the most important gold and isotropic susceptibilities lower than or equal to 0.1 SI, the self-demagnetization can be neglected and, consequently, the copper mines in Australia, the Warrego mine was closed in ˘ late 1989. According to Wedekind(1990), the Warrego ore- magnetization M (Eq. 51) is a good approximation of the body is a combination of two major and several small iron- true magnetization M (Eqs. 49 and 52). In our test, the use = k kk k−1 ≈ stone lodes, which are discrete bodies comprised predomi- of χ1 0.1 SI leads to a relative error δM M 0.7% nantly of magnetite or hematite above the base of oxidation. (Eq. 58) in the magnetization. The peak-to-peak amplitude Farrar(1979) represented the Warrego orebody as a triaxial of the differences in the total-field anomaly (Fig.6b) is ≈ ≈ ellipsoid having a high isotropic susceptibility. In this case, 0.2 nT, which represents 0.6% of the peak-to-peak am- the self-demagnetization strongly impacts the magnetic mod- plitude of the total-field anomaly calculated by using the true elling of this body. magnetization M (Eqs. 49 and 52). Table2 shows the parameters defining a synthetic orebody Finally, Fig.6c shows the differences calculated by using χ2 = 0.116 SI. This value was calculated by using Eq. (60) which is based on that presented by Farrar(1979) to rep- † resent the Warrego orebody. Figure5 shows the total-field with a target relative error  = 8% and the enmax defined by anomaly 1T (r) (Eq. 67) produced by the synthetic body Eq. (27). By using this isotropic susceptibility, it is expected −1 on a regular grid of 100 × 100 points at a constant verti- that the calculated relative error kδMkkMk (Eq. 58) in the cal coordinate z = 0 m. The total-field anomaly varies from magnetization be lower than or equal to the target relative ≈ −71 nT to ≈ 482 nT, resulting in a peak-to-peak ampli- error  = 8%. In this test, the use of χ2 = 0.116 SI leads to −1 tude of ≈ 553 nT, and was calculated by using the true mag- a relative error kδMkkMk ≈ 0.8% (Eq. 58) in the mag- netization M defined in Eqs. (49) and (52). netization. The peak-to-peak amplitude of the differences We have calculated the difference between the total-field in the total-field anomaly (Fig.6c) is ≈ 0.3 nT, which rep- anomaly 1T (r) (Eq. 67) calculated with the true magneti- resents ≈ 0.7% of the peak-to-peak amplitude of the total- zation M (Eqs. 49 and 52) and that calculated with the ap- field anomaly calculated by using the true magnetization M proximated magnetization M˘ (Eq. 51). The differences were (Eqs. 49 and 52). In this case, the use of an isotropic suscepti- calculated by using the synthetic body defined in Table2, bility greater than the usual limit 0.1 SI does not mislead the but with three different isotropic susceptibilities. Figure6a, b magnetic modelling dramatically. On the contrary, it shows and c show the differences calculated by using, respectively, small discrepancies in the magnetic modelling and validates Eq. (60). isotropic susceptibilities χ = 1.69 SI (Table2), χ1 = 0.1 SI and χ2 = 0.116 SI.

Geosci. Model Dev., 10, 3591–3608, 2017 www.geosci-model-dev.net/10/3591/2017/ D. Takahashi and V. C. Oliveira Jr.: Magnetic modelling of ellipsoids 3603

2.0 ing the ambiguity between confocal ellipsoids with the same (a) 40 1.5 magnetic moment and present a theoretical discussion about 30 the determination of the isotropic susceptibility value above 1.0 20 which the self-demagnetization must be taken into consid-

0.5 10 eration. We propose an alternative way of determining this value based on the body shape and the maximum relative er- 0.0 0

x (km) ror allowed in the resultant magnetization. Our approach is 0.5 10 an alternative to the constant value which seems to be de- 20 1.0 termined empirically and has been used by the geoscientific 30 community. Our alternative approach is validated by the re- 1.5 40 sults obtained with numerical simulations. In a future work, 2.0 it would be interesting to use a similar approach to determine 2.0 1.5 1.0 0.5 0.0 0.5 1.0 1.5 2.0 bounds for the maximum relative error in the magnetic field 2.0 (b) 0.18 calculated by neglecting the self-demagnetization. 1.5 This work also provides a set of routines to model the mag- 0.12 1.0 netic field produced by ellipsoids. The routines are written in

0.06 the Python language as part of the Fatiando a Terra (Uieda 0.5 et al., 2013) open-source library for modelling and inversion 0.0 0.00 in geophysics. The current version of our code is freely dis- x (km) 0.5 tributed in a repository hosted on the GitHub website. We are 0.06 working to integrate our routines in the next stable release of 1.0 0.12 Fatiando a Terra. We hope that these routines will be useful 1.5 to the wide geoscientific community, either for research or 0.18 2.0 for teaching. 2.0 1.5 1.0 0.5 0.0 0.5 1.0 1.5 2.0

2.0 (c) 0.24 1.5 Code availability. The current version of our code is freely dis- 0.18 tributed under the BSD 3-clause licence and it is available for down- 1.0 0.12 load at Zenodo: http://doi.org/10.5281/zenodo.996479(Takahashi and Oliveira Jr., 2017). The latest development version of our code 0.5 0.06 can be freely downloaded from a repository on GitHub (https:// 0.0 0.00 github.com/pinga-lab/magnetic-ellipsoid). Instructions for running x (km) 0.5 0.06 the current version of our code are also provided on the repository.

0.12 The code is still being improved and we encourage the user to work 1.0 with the latest development version. The code was developed as 0.18 1.5 part of the Fatiando a Terra (Uieda et al., 2013) open-source Python 0.24 library for modelling and inversion in geophysics. Documentation 2.0 2.0 1.5 1.0 0.5 0.0 0.5 1.0 1.5 2.0 and installation instructions for the 0.5 release version of Fatiando y (km) a Terra are provided at http://www.fatiando.org/v0.5.

Figure 6. Difference between the total-field anomaly calculated with the approximated magnetization M˘ (Eq. 51) and with the true magnetization M (Eqs. 49 and 52). The total-field anomalies are in nT and were calculated with Eq. (67), on a regular grid of 100×100 points, at the constant vertical coordinate z = 0 m. The differences are produced by the synthetic orebody defined in Table2, but with different isotropic susceptibilities: (a) the isotropic susceptibility defined in Table2, (b) an isotropic susceptibility χ = 0.1 SI and (c) an isotropic susceptibility χ = 0.116 SI. This last value was cal- culated with Eq. (60), by using  = 8%.

5 Conclusions

We present an integrated review of the vast literature about the magnetic modelling of triaxial, prolate and oblate el- lipsoids. We also present a numerical simulation confirm- www.geosci-model-dev.net/10/3591/2017/ Geosci. Model Dev., 10, 3591–3608, 2017 3604 D. Takahashi and V. C. Oliveira Jr.: Magnetic modelling of ellipsoids

Appendix A: Derivatives of the functions f (r) and fe (er) of the functions f (r) (Eq. 17) and fe (er), respectively. Also, the depolarization tensor N(r) (Eq. 15) can be rewritten by Let fe (er) be the scalar function obtained by transforming using the matrix F(r) as follows: f (r) (Eq. 17) from the main coordinate system (Fig.1a) to the local coordinate system (Fig.1b). For convenience, let us 1 N(r) = F(r). (A5) rewrite Eq. (8) as follows: 4π = + + + erk v1k r1 v2k r2 v3k r3 ck , (A1) By properly using the orthogonality of the matrix V (Eq. 2), we may rewrite Eq. (A4) as follows: whereerk, k = 1,2,3, are the elements of the transformed po- sition vector r (Eq.8), rj , j = 1,2,3, are the elements of the e = > position vector r (Eq.1), vjk, j = 1,2,3, are the elements of eF(er) V F(r)V . (A6) the matrix V (Eq. 2) and ck is a constant defined by the coor- 1 dinates xc, yc, and zc of the centre of the ellipsoidal body. Finally, by multiplying both sides of Eq. (A6) by 4π and us- ing Eq. (A5), we conclude that By considering the functions f (r) (Eq. 17) and fe (er) eval- uated at the same point, but on different coordinate systems, > we have eN(er) = V N(r)V . (A7)

∂f (r) ∂fe (r) ∂r1 ∂fe (r) ∂r2 ∂fe (r) ∂r3 = e e + e e + e e , ∂r ∂r ∂r ∂r ∂r ∂r ∂r j e1 j e2 j e3 j Appendix B: Parameter λ and its spatial derivatives j = 1,2,3 , Here, we follow the reasoning presented by Webster(1904) which, from Eq. (A1), can be given by for analysing the parameter λ which defines triaxial, prolate and oblate ellipsoids. ∂f (r) ∂fe (er) ∂fe (er) ∂fe (er) = vj1 + vj2 + vj3 , ∂rj ∂r1 ∂r2 ∂r3 e e e B1 Parameter λ defining triaxial ellipsoids j = 1,2,3 . (A2)

∂f (r) Let us consider an ellipsoid with semi-axes a, b, c oriented Now, by deriving ∂r (Eq. A2) with respect to the ith j along the ex, ey and ez axis, respectively, of its local coordi- element ri of the position vector r (Eq.1), we obtain nate system (Fig.1b), where a > b > c > 0. This ellipsoid is ! ! defined by the following equation: ∂2f (r) ∂ ∂fe (r) ∂ ∂fe (r) = v e + v e ∂r ∂r j1 ∂r ∂r j2 ∂r ∂r i j i e1 i e2 x2 y2 z2 ! e + e + e = 1 . (B1) ∂ ∂fe (r) a2 b2 c2 + v e j3 ∂r ∂r i e3 A surface (e.g. ellipsoid, of one sheet or 2 2 2 ! hyperboloid of two sheets) which is confocal with the ellip- ∂ fe (er) ∂ fe (er) ∂ fe (er) = vj1 vi1 + vi2 + vi3 soid defined in Eq. (B1) can be described as follows: ∂er1 ∂er1 ∂er2 ∂er1 ∂er3 ∂er1 2 2 2 ! 2 2 2 ∂ fe (er) ∂ fe (er) ∂ fe (er) x y z + vj2 vi1 + vi2 + vi3 e + e + e = 1 , (B2) ∂er1 ∂er2 ∂er2 ∂er2 ∂er3 ∂er2 a2 + u b2 + u c2 + u 2 2 2 ! ∂ fe (er) ∂ fe (er) ∂ fe (er) where u is a real number. Equation (B2) represents an ellip- + vj3 vi1 + vi2 + vi3 ∂er1 ∂er3 ∂er2 ∂er3 ∂er3 ∂er3 soid for u satisfying the condition   vi1   u + c2 > 0 . (B3) = vj1 vj2 vj3 eF(er) vi2, (A3) vi3 Given a, b, c, and a u satisfying Eq. (B3), we may use ∂2f (r) where eF(r) is a 3 × 3 matrix whose ijth element is ee . Eq. (B2) for determining a set of points (x,y,z) lying on the e ∂eri ∂erj surface of an ellipsoid which is confocal with that one de- From Eq. (A3), we obtain fined in Eq. (B1). Now, consider the problem of determining > F(r) = VeF(er)V , (A4) the ellipsoid which is confocal with that defined in Eq. (B1) 2 and pass through a particular point (ex,ey,ez). This problem where F(r) is a 3 × 3 matrix whose ijth element is ∂ f (r) ∂ri ∂rj consists in determining the real number u that, given a, b, c, and V (Eq. 2) is defined according to the ellipsoid type. No- ex, ey and ez, satisfies Eq. (B2) and the condition expressed by tice that the matrices F(r) and eF(er) represent the Hessians Eq. (B3). By rearranging Eq. (B2), we obtain the following

Geosci. Model Dev., 10, 3591–3608, 2017 www.geosci-model-dev.net/10/3591/2017/ D. Takahashi and V. C. Oliveira Jr.: Magnetic modelling of ellipsoids 3605 cubic equation for u: case, the equation defining the surface of the ellipsoid is ob- tained by substituting c = b in Eq. (B1). Consequently, the 2 2 2 2 2 2 p(u) = (a + u)(b + u)(c + u) − (b + u)(c + u)ex equation defining the respective confocal quadric surface is 2 2 2 2 2 2 given by − (a + u)(c + u)ey − (a + u)(b + u)ez . (B4) x2 y2 + z2 This cubic equation shows that e + e e = 1 (B14) a2 + u b2 + u  d → ∞ , p(u) > 0 and the new condition that must be fulfilled by the variable u  −c2 , p(u) < 0 for Eq. (B14) to represent an ellipsoid is u = (B5) 2 −b , p(u) > 0 u + b2 > 0 . (B15)  −a2 , p(u) < 0 . Similarly to the case of a triaxial ellipsoid presented in the Notice that, according to Eq. (B5), the smaller, intermediate previous section, we are interested in determining the real and largest roots of the cubic equation p(u) (Eq. B4) are lo- number u that, given a, b, ex, ey andez, satisfies Eq. (B14) and cated, respectively, in the intervals [−a2 ,−b2], [−b2 ,−c2] the condition expressed by Eq. (B15). From Eq. (B14), we and [−c2 ,∞[. Remember that we are interested in a u sat- obtain the following quadratic equation for u: isfying the condition expressed by Eq. (B3). Consequently, 2 2 2 2 p(u) = (a + u)(b + u) − (b + u)ex according to the signal analysis shown in Eq. (B5), we are − 2 + 2 + 2 interested in the largest root λ of the cubic equation p(u) (a u)(ey ez ). (B16) (Eq. B4). This equation shows that From Eq. (B4), we obtain a simpler one given by  → ∞ d , f (ρ) > 0 = 3 + 2 + +  p(u) u p2 u p1 u p0 , (B6) u = −b2 , f (ρ) < 0 (B17)  2 where −a , f (ρ) > 0 and, consequently, that its two roots lie in the intervals p = a2 + b2 + c2 − x2 − y2 − z2 , (B7) 2 e e e [−a2 ,−b2] and [−b2 ,∞[. Therefore, according to the con- 2 2 2 2 2 2 2 2 2 p1 = b c + a c + a b − (b + c )ex dition established by Eq. (B15) and the signal analysis shown − (a2 + c2)y2 − (a2 + b2)z2 (B8) in Eq. (B17), we are interested in the largest root λ of the e e quadratic equation p(u) (Eq. B16). and By properly manipulating Eq. (B16), we obtain a simpler one given by p = a2 b2 c2 − b2 c2 x2 − a2 c2 y2 − a2 b2 z2 . 0 e e e (B9) 2 p(u) = u + p1 u + p0 , (B18) Finally, from Eqs. (B7), (B8) and (B9), the largest root λ of where p(u) (Eq. B6) can be calculated as follows (Weisstein, 2017): 2 2 2 2 2 p1 = a + b − x − y − z (B19) p ϕ  p2 e e e λ = 2 −Q cos − , (B10) 3 3 and 2 2 2 2 2  2 2 where p0 = a b − b ex − a ey +ez . (B20) ! R Finally, by using Eqs. (B19) and (B20), the largest root λ of = −1 ϕ cos p , (B11) −Q3 p(u) (Eq. B18) can be easily calculated as follows: q 3p − p2 − + 2 − = 1 2 p1 p1 4p0 Q (B12) λ = . (B21) 9 2 and In the case of oblate ellipsoids, the procedure for deter- 3 mining the parameter λ is very similar to this one for prolate 9p1 p2 − 27p0 − 2p R = 2 . (B13) ellipsoids. The semi-axes a, b, c of oblate ellipsoids are de- 54 fined so that b = c > a > 0 and the condition that must be B2 Parameter λ defining prolate and oblate ellipsoids fulfilled by the variable u is u + a2 > 0. In this case, the two roots of the resulting quadratic equation lie in the intervals Let us now consider a prolate ellipsoid with semi-axes a, b, [−b2 ,−a2] and [−a2 ,∞[. Consequently, we are still inter- c oriented along the ex, ey and ez axis, respectively, of its lo- ested in the largest root of the quadratic equation for the vari- cal coordinate system (Fig.1b), where a > b = c > 0. In this able u, which is also calculated by using Eq. (B21). www.geosci-model-dev.net/10/3591/2017/ Geosci. Model Dev., 10, 3591–3608, 2017 3606 D. Takahashi and V. C. Oliveira Jr.: Magnetic modelling of ellipsoids

B3 Spatial derivative of the parameter λ

The magnetic modelling of triaxial, prolate or oblate ellip- soids requires not only the parameter lambda defined by Eqs. (B10) and (B21) but also its derivatives with respect to the spatial coordinates ex, ey and ez. Fortunately, the spa- tial derivatives of the parameter λ can be calculated in a very similar way for all ellipsoid types. Let us first consider a triaxial ellipsoid. In this case, the spatial derivatives of λ are given by

2erj   2+ ∂λ ej λ = , ∂r  2  2  2 ej ex + ey + ez a2+λ b2+λ c2+λ j = 1,2,3, (B22) whereer1 = ex,er2 = ey,er3 =ez, e1 = a, e2 = b and e3 = c. This equation can be determined directly from Eq. (B2). The spa- tial derivatives of λ in the case of prolate or oblate ellipsoids can also be calculated by using Eq. (B22) for the particular case in with b = c.

Geosci. Model Dev., 10, 3591–3608, 2017 www.geosci-model-dev.net/10/3591/2017/ D. Takahashi and V. C. Oliveira Jr.: Magnetic modelling of ellipsoids 3607

Competing interests. The authors declare that they have no conflict tions, Geoexploration, 18, 79–95, https://doi.org/10.1016/0016- of interest. 7142(80)90022-8, 1980. Farrar, L.: Some comments on detailed magnetic investigations of ellipsoidal bodies at Tennant Creek, Explor. Geophys., 10, 26– Acknowledgements. Diego Takahashi thanks the Brazilian research 33, 1979. funding agency Conselho Nacional de Desenvolvimento Científico Fuller, M. D.: Magnetic anisotropy and paleo- e Tecnológico (CNPq) for providing financial support in the form magnetism, J. Geophys. Res., 68, 293–309, of a scholarship. Vanderlei C. Oliveira Jr. thanks the Brazilian https://doi.org/10.1029/JZ068i001p00293, 1963. research funding agency Conselho Nacional de Desenvolvimento Golub, G. H. and Loan, C. F. V.: Matrix Computations (Johns Hop- Científico e Tecnológico (CNPq) for providing financial support in kins Studies in the Mathematical Sciences), Johns Hopkins Uni- the form of a grant (445752/2014-9). versity Press, 4 Edn., 2013. Guo, W., Dentith, M. C., Li, Z., and Powell, C. M.: Self demagneti- Edited by: Lutz Gross sation corrections in magnetic modelling: some examples, Ex- Reviewed by: David Clark and Ralf Schaa plor. Geophys., 29, 396–401, 1998. Guo, W., Dentith, M. C., Bird, R. T., and Clark, D. A.: Systematic error analysis of demagnetization and implications for magnetic interpretation, Geophysics, 66, 562–570, 2001. Hillan, D. and Foss, C.: Correction schemes for self- References demagnetisation, ASEG Extended Abstracts 2012, 1–4, https://doi.org/10.1071/ASEG2012ab402, 2012. Allmendinger, R., Cardozo, N., and Fisher, D. M.: Structural Ge- Hoschke, T.: Geophysical discovery and evaluation of the West ology Algorithms: Vectors and Tensors, Cambridge University Peko copper-gold deposit, Tennant Creek, Explor. Geophys., 22, Press, 2012. 485–495, 1991. Austin, J., Geuna, S., Clark, D., and Hillan, D.: Rema- Hrouda, F.: Magnetic anisotropy of rocks and its application in ge- nence, self-demagnetization and their ramifications for mag- ology and geophysics, Geophysical surveys, 5, 37–82, 1982. netic modelling of iron oxide copper-gold deposits: An exam- Hunter, J. D.: Matplotlib: A 2D Graphics Environment, Com- ple from Candelaria, Chile, J. Appl. Geophys., 109, 242–255, put. Sci. Eng., 9, 90–95, https://doi.org/10.1109/MCSE.2007.55, https://doi.org/10.1016/j.jappgeo.2014.08.002, 2014. 2007. Blakely, R. J.: Potential theory in gravity and magnetic applications, Janák, F.: Magnetic susceptibility anisotropy of various rock Cambridge University Press, 1996. types and its significance for geophysics and geology, Geo- Chang, H.: Fields external to open-structure magnetic de- phys. Prospect., 20, 375–384, https://doi.org/10.1111/j.1365- vices represented by ellipsoid or , British Journal of 2478.1972.tb00640.x, 1972. Applied Physics, 12, 160–163, https://doi.org/10.1088/0508- Kellogg, O. D.: Foundations of Potential Theory, Frederick Ungar 3443/12/4/308, 1961. Publishing Company, 1929. Clark, D.: Self-Demagnetisation in Practice: the Osborne Cu-Au Lowes, F. J.: The Torque on a Magnet, P. Roy. Soc. Lond., 337, Deposit, Preview (Magazine of the Australian Society of Explo- 555–567, 1974. ration Geophysicists), 31–36, 2000. MacDonald, W. D. and Ellwood, B. B.: Anisotropy of Clark, D. and Emerson, D.: Self-Demagnetisation, Preview, Maga- magnetic susceptibility: Sedimentological, igneous, and zine of the Australian Society of Exploration Geophysicists, 22– structural-tectonic applications, Rev. Geophys., 25, 905–909, 25, 1999. https://doi.org/10.1029/RG025i005p00905, 1987. Clark, D., Saul, S., and Emerson, D.: Magnetic and gravity anoma- Macmillan, W.: Theory of the Potential, Dover Publications Inc., lies of a triaxial ellipsoid, Explor. Geophys., 17, 189–200, 1986. 1958. Clark, D. A.: Methods for determining remanent and total mag- Maxwell, J. C.: A treatise on electricity and magnetism, vol. 2, netisations of magnetic sources–a review, Explor. Geophys., 45, Clarendon press, 1873. 271–304, 2014. Osborn, J.: Demagnetizing factors of the general ellipsoid, Phys. Demmel, J. W.: Applied Numerical Linear Algebra, SIAM, 1997. Rev., 67, 351, 1945. Dirichlet, L. P. G.: Sur un nouvelle methode pour la determination Peake, H. J. and Davy, N.: The magnetic fields produced by des integrales multiples, Journal de mathématiques pures et ap- uniformly magnetized ellipsoids of revolution, British Journal pliquées, 1, 164–168, 1839. of Applied Physics, 4, 207–209, https://doi.org/10.1088/0508- DuBois, H.: The Magnetic Circuit in Theory and Practice, Long- 3443/4/7/304, 1953. mans, Green, and Co., 1896. Peirce, B.: Elements of the Theory of the Newtonian Potential Func- Dunlop, D. and Özdemir, Ö.: Rock Magnetism: Fundamentals and tion, Cornell University Library historical math monographs, Frontiers, Cambridge Studies in Magnetism, Cambridge Univer- Ginn, 1902. sity Press, 1997. Poisson, S. D.: Second mémoire sur ta théorie du magnétism, Mé- Emerson, D. W., Clark, D., and Saul, S.: Magnetic exploration mod- moires de l’Académie des sciences de l’Institut de France, 488– els incorporating remanence, demagnetization and anisotropy: 533, 1824. HP 41C handheld computer algorithms, Explor. Geophys., 16, Pollard, D. D. and Fletcher, R. C.: Fundamentals of Structural Ge- 1–122, 1985. ology, Cambridge University Press, 2005. Eskola, L. and Tervo, T.: Solving the magnetostatic field problem (a case of high susceptibility) by means of the method of subsec- www.geosci-model-dev.net/10/3591/2017/ Geosci. Model Dev., 10, 3591–3608, 2017 3608 D. Takahashi and V. C. Oliveira Jr.: Magnetic modelling of ellipsoids

Purss, M. B. J. and Cull, J. P.: A new iterative method for computing Tauxe, L.: Paleomagnetic principles and practice, Kluwer Academic the magnetic field at high magnetic susceptibilities, Geophysics, Publishers, 2003. 70, L53–L62, https://doi.org/10.1190/1.2052469, 2005. Tejedor, M., Rubio, H., Elbaile, L., and Iglesias, R.: External fields Reitz, J. R., Milford, F. J., and Christy, R. W.: Foundations of Elec- created by uniformly magnetized ellipsoids and , IEEE tromagnetic Theory, Addison Wesley, 4 Edn., 1992. T. Magn., 31, 830–836, 1995. Rochette, P., Jackson, M., and Aubourg, C.: Rock magnetism and Thompson, R. and Oldfield, F.: Environmental Magnetism, Springer the interpretation of anisotropy of magnetic susceptibility, Rev. Netherlands, 1986. Geophys., 30, 209–226, https://doi.org/10.1029/92RG00733, Thomson, W. and Tait, P.: Treatise on Natural Philosophy, Part II, 1992. Cambridge University Press, Cambridge, 1879. Searle, S. R.: Matrix Algebra Useful for Statistics, Wiley- Uieda, L., Oliveira Jr., V. C., and Barbosa, V. C. F.: Modeling the Interscience, 1982. Earth with Fatiando a Terra, in: Proceedings of the 12th Python Sharma, P. V.: Rapid computation of magnetic anoma- in Science Conference, edited by: van der Walt, S., Millman, J., lies and demagnetization effects caused by bodies of and Huff, K., 96–103, 2013. arbitrary shape, Pure Appl. Geophys., 64, 89–109, Uyeda, S., Fuller, M. D., Belshé, J. C., and Girdler, https://doi.org/10.1007/BF00875535, 1966. R. W.: Anisotropy of magnetic susceptibility of Solivérez, C. E.: Magnetostatics of anisotropic el- rocks and minerals, J. Geophys. Res., 68, 279–291, lipsoidal bodies, IEEE T. Magn., 17, 1363–1364, https://doi.org/10.1029/JZ068i001p00279, 1963. https://doi.org/10.1109/TMAG.1981.1061200, 1981. van der Walt, S., Colbert, S. C., and Varoquaux, G.: The NumPy Ar- Solivérez, C. E.: Campos eléctricos generados por elipsoides uni- ray: A Structure for Efficient Numerical Computation, Comput. formemente polarizados, Revista mexicana de física E, 54, 203– Sci. Eng., 13, 22–30, https://doi.org/10.1109/MCSE.2011.37, 207, 2008. 2011. Solivérez, C. E.: Electrostatics and magnetostatics of polarized Webster, A.: The Dynamics of Particles and of Rigid, Elastic, ellipsoidal bodies: the depolarization tensor method, Free Sci- and Fluid Bodies: Being Lectures on Mathematical Physics, B. entific Information, 1 Edn., the book is freely distributed under G. Teubners Sammlung von Lehrbüchern auf dem Gebiete der an Attribution-NonCommercial-ShareAlike 3.0 Unported (CC mathematischen Wissenschaften, B.G. Teubner, 1904. BY-NC-SA 3.0) license, available at: https://www.academia.edu/ Wedekind, M. R.: Geology and geochemistry of the Warrego Au- 27019747/Electrostatics_and_Magnetostatics_of_Polarized_ Cu-Bi mine, Tennant Creek, northern territory, Australia, PhD Ellipsoidal_Bodies_The_Depolarization_Tensor_Method (last thesis, University of Tasmania, Hobart, 1990. access: 20 September 2017), 2016. Weisstein, E. W.: Cubic Formula: From MathWorld – A Wolfram Stoner, E. C.: The demagnetizing factors for ellipsoids, The Lon- Web Resource, http://mathworld.wolfram.com/CubicFormula. don, Edinburgh, and Dublin Philosophical Magazine and Journal html, last access: 23 January 2017. of Science, 36, 803–821, 1945. Wilson, G., Aruliah, D. A., Brown, C. T., Chue Hong, N. P., Davis, Stratton, J. A.: Electromagnetic Theory, Wiley-IEEE Press, reissue M., Guy, R. T., Haddock, S. H. D., Huff, K. D., Mitchell, I. M., Edn., 2007. Plumbley, M. D., Waugh, B., White, E. P., and Wilson, P.: Best Takahashi, D. and Oliveira Jr., V. C.: Ellipsoids Practices for Scientific Computing, PLoS Biol., 12, e1001745, (v1.0): 3D Magnetic modelling of ellipsoidal bodies, https://doi.org/10.1371/journal.pbio.1001745, 2014. https://doi.org/10.5281/zenodo.996479, The latest development version of our code can be freely downloaded from a repository on GitHub (https://github.com/pinga-lab/magnetic-ellipsoid), 2017.

Geosci. Model Dev., 10, 3591–3608, 2017 www.geosci-model-dev.net/10/3591/2017/