⬇ Download Markdown  ·  ⬇ Download LaTeX  ·  ⬇ original  ·  view original

IEEE TRANSACTIONS ON MAGNETICS, VOL. 62, NO. 1, JANUARY 2026 7000206

The Magnetic Scalar Potential for a Rectangular Prism

Berian James 1 , Stefan Pollok 1 , Jes Frellsen 2 , and Rasmus Bjørk 1 1

2 Department of Energy Conversion and Storage, Technical University of Denmark, 2800 Lyngby, Denmark Department of Applied Mathematics and Computer Science, Technical University of Denmark, 2800 Lyngby, Denmark We analytically solve Poisson’s equation for the magnetic scalar potential generated by a uniformly magnetized rectangular prism and determine a closed-form solution for the magnetic scalar potential given only in terms of arctan and natural logarithmic functions. We show that the magnetic scalar potential can be written as a demagnetization vector, containing all the geometric information, multiplied with the magnetization, analogous to demagnetization tensors. We validate the derived analytical expression for the magnetic scalar potential by comparing it with a finite element simulation and show that these agree perfectly. We finally extend the concept of the demagnetization vector and tensor, which contains the geometric information for the source generating the potential, to gravitational objects.

Index Terms— Analytical solution, electromagnetics, magnetic scalar potential, magnetostatics, rectangular prism.

I. I NTRODUCTION

AGNETIC fields are a key part in numerous scientific and technological areas, from fusion reactors to electric motors in cars. The magnetic field from a dipole has been known since the days of Maxwell, but the magnetic field generated by more geometrically complicated objects can be difficult to determine analytically. Knowing these would be advantageous both experimentally and numerically, as the field can then be evaluated to arbitrarily high spatial precision, which is crucial in a range of scientific fields. For example, in micromagnetism, the magnetic field has to be evaluated on a highly resolved grid of small magnetic domains to allow for the assumption of uniform magnetization in each of these elements [1], [2]. In magnetohydrodynamics, a high enough spatial resolution in the magnetic field is needed to predict charged fluid particle trajectories [3], likewise for particle physics experiments [4]. In robotics, navigation by magnetic field benefits vastly from high spatial resolution [5], [6], and finally, this is also the case for nuclear magnetic resonance applications, where a highly homogeneous magnetic field is required around the sample [7], [8].

However, calculating the magnetic field can be both analytically and numerically hard. Instead, an approach is to consider the magnetic scalar potential, which is defined such that the gradient of this scalar potential is the magnetic field. The scalar potential can be defined if there are no free currents in a magnetic system. An additional benefit of knowing the magnetic scalar potential is that within physics-informed machine learning, there are multiple advantages to utilizing scalar potentials to build physical properties directly into the neural networks [9]. First, the field obtained from the gradient of a scalar potential is conservative. Second, for a neural M Received 27 February 2025; revised 4 September 2025; accepted 10 November 2025. Date of publication 13 November 2025; date of current version 30 December 2025. Corresponding author: R. Bjørk (e-mail: [email protected]).

Color versions of one or more figures in this article are available at https://doi.org/10.1109/TMAG.2025.3632626.

Digital Object Identifier 10.1109/TMAG.2025.3632626 network to learn the potential only a single loss function is needed [6], which means that balancing multiple losses, e.g., different field components or conservation properties, is not needed [10].

The magnetic scalar potential is known for a magnetic dipole and a uniformly magnetized sphere, but interestingly not for a uniformly magnetized rectangular prism. The magnetic field generated by a rectangular prism was first considered extensive in [11], where the demagnetization interaction energy, which is the spatial integral of the magnetic scalar potential over a rectangular prism, is derived [12]. However, [11] only reports the final calculated interaction energy and not the scalar potential, which the authors must have considered as only an intermediate result. This is also the case in [13], who also calculates an exact analytic formula for the magnetostatic interaction energy of a 3-D array of cubes. Again, the starting point is the magnetic scalar potential; again, this is never explicitly derived and only its volume average over another rectangular region is reported.

The magnetic scalar potential is also used to obtain the magnetic field, which is the gradient of the potential. For a homogeneously magnetized rectangular prism, the magnetic field was first obtained in [14], who calculated the magnetic field (expressed as the demagnetization tensor) exactly by taking the gradient of the magnetic scalar potential. However, in analytically calculating the field, one can interchange the gradient operator and the integral operator as these are with respect to the coordinates of the evaluation point and the magnetized source, respectively. This trick was utilized in [14], a trend followed in later demagnetization tensor calculations for other geometries [15], [16], [17], and thus, these calculations do not analytically calculate the magnetic scalar potential, even though they determine its gradient, the magnetic field.

It is also worth noting that demagnetization factors for rectangular prisms have also been considered extensively in the literature. In [18], the fluxmetric (or ballistic) demagnetizing factor for a rectangular prism is calculated, which is defined as the ratio of the average demagnetizing field to the average 0018-9464 © 2025 IEEE. All rights reserved, including rights for text and data mining, and training of artificial intelligence

and similar technologies. Personal use is permitted, but republication/redistribution requires IEEE permission.

See https://www.ieee.org/publications/rights/index.html for more information. Authorized licensed use limited to: Rajshahi University Of Engineering and Technology. Downloaded on May 22,2026 at 03:01:21 UTC from IEEE Xplore. Restrictions apply.

7000206 IEEE TRANSACTIONS ON MAGNETICS, VOL. 62, NO. 1, JANUARY 2026 magnetization at the midplane perpendicular to a chosen axis. In [19], the magnetometric demagnetization factor, which is defined as the average demagnetizing field within the body to the average magnetization, is calculated, and in [20], the average field generated over another rectangular prism is calculated. All of these calculations, however, start with the already known magnetic field of a rectangular prism [14], [15] and thus do not derive the magnetic scalar potential either.

In this work, we explicitly calculate the magnetic scalar potential for a uniformly magnetized rectangular prism and compare this to a numerical model to validate the derived analytical expressions. It remains an interesting observation that this is not known even though the integral of the potential [11], [13] as well as its gradient [14], [15] and the integral of this gradient [18], [19], [20] are already known. We also show that the magnetic scalar potential can be written as the product of the demagnetization vector, containing the geometric information, and the magnetization, similar to the demagnetization tensor known for calculating the magnetic field.

II. T HEORY

If there are no free currents in a magnetic system, as is, e.g., the case for permanent magnets, the magnetic field vector, H, is irrotational. For a single magnetized body  in the whole space, the magnetic field can therefore be expressed as the gradient of a scalar field, termed the magnetic scalar potential,

gradient of a scalar field, termed the magnetic scalar potential, φM , as H = −∇φM . (1)

The relation between the magnetic field, H, the magnetic flux density, B, and the magnetization, M, is defined as

B = µ0 ( H + M) (2)

where µ 0 is the vacuum permeability.

Using this relation in the definition for the scalar potential, taking the divergence, and remembering Gauss’s law for magnetism, ∇ · B = 0, results in a Poisson-like equation

−∇ · (µ0 ∇ φM ) = −∇ · (µ0 M ). (3)

We remark that M is assumed to be nonzero only within the region . Thus, the latter equation must satisfy the following condition on the boundary of , termed the surface S ′ :

ˆn · [−∇φM ]S ′ = ˆn · M (4)

where we have denoted with n̂ the outward normal on the surface S ′ and with [−∇φ M ] S ′ the jump of the vector field H = −∇φ M across S ′ . The above equations have the same form as those for the electrostatic field produced by assigned (volume and surface) charge densities and lead to identify the volume and surface equivalent magnetic charge densities ρ M = −∇ · M and σ M = n̂ · M, respectively [11].

The solution of (3) and (4) for a homogeneously magnetized body, i.e., such that M is constant in  (and, consequently, ρ M = 0), is the scalar potential produced only by the surface charge density σ M = n̂ · M and is given by [21]

charge density σM = ˆn · M and is given by [21] φM (r) = 1 4π S ′ ˆn r′ · M r′ ∥r − r′ ∥ dS′ . (5) φx -faces = 1 4π Mx · F(x − a, y ∓ b, z ∓ c) − F(x + a, y ∓ b, z ∓ c) Authorized licensed use limited to: Rajshahi University Of Engineering and Technology. Downloaded on May 22,2026 at 03:01:21 UTC from IEEE Xplore. Restrictions apply.

The above equation has two sets of coordinates. The coordinates marked with a ′ are the coordinates of the face that creates the magnetic field, whereas the non-marked coordinates are to the point at which the field is evaluated. Once the magnetic scalar potential has been determined, the magnetic field can be determined from (1).

III. M AGNETIC S CALAR P OTENTIAL OF

A R ECTANGULAR P RISM We consider a uniformly magnetized rectangular prism with side lengths [2a, 2b, 2c], as is tradition [14], [15], which is centered at the origin. To derive the magnetic scalar potential, we first consider the magnetic scalar potential at a point r = (x, y, z) due to an element on the x ′ -face of the rectangular prism. This is given by the following integral across the differential area element on the face d A ′ = dy ′ dz ′ . On an x ′ -face, the dot product of the normal vector and the magnetization is n̂(r ′ ) · M(r ′ ) = M x . The distance vector is simply

r = r − r′ = (x − x ′ )2 + (y − y′ )2 + (z − z′ )2 . (6)

Setting x ′ = a, the magnetic scalar potential from the face according to (5) is then given as (7), shown at the bottom of the next page, where the last step follows from the fact that the first two terms in the expression, z ′ + (x − a) arctan((z − z ′ )/(x − a)), do not depend on y ′ , and so when the limits of integration for y ′ = ±b are evaluated, these will be removed as constants of integration. This leaves a function symmetric in the two coordinates we have integrated over, as it should be. In the above integral, there is no constant of integration corresponding to a gauge of zero, equivalent to φ M −−−→ 0. r

→∞ The integral expressions for the y ′ - and z ′ -faces are obtained by permuting the coordinates. This can be structured in terms of a function F, which encapsulates these contributions in a form that can be directly applied to calculate the potential, with i, j, and k being equal to x − x ′ , y − y ′ , and z − z ′ in a specified order. The function is

F(i, j, k) = −i arctan jk i r + j ln(k + r) + k ln( j + r)

r where, as above in (6), the function (i, j, k) is given by

r( i, j, k) = ∥r − r∥ = i 2 + j 2 + k 2 .

With this function defined, the potential generated by a single x ′ -face located at x ′ = a is given by

φx -face = 1 4π Mx F(x − a, y ∓ b, z ∓ c) (8) = 1 4π Mx F(x − a, y − b, z − c) − F(x − a, y − b, z + c) − F(x − a, y + b, z − c) − F(x − a, y + b, z + c) . (9)

The contribution from both x ′ -faces is given by

φx -faces = 1 4π Mx · F(x − a, y ∓ b, z ∓ c) − F(x + a, y ∓ b, z ∓ c)

JAMES et al.: MAGNETIC SCALAR POTENTIAL FOR A RECTANGULAR PRISM 7000206 as the surface normal is negative for the x ′ -face located at

as the surface normal is negative for the x -face l x ′ = −a, corresponding to F(x + a, y ∓ b, z ∓ c).

The contributions from the y ′ - and z ′ -faces can be calculated by permuting the coordinates in the argument to the F function, reflecting the cube’s symmetry and the orientation of the magnetization vector. The result is that for the y ′ -faces The demagnetization vector plays an identical role to the demagnetization tensor, which is a familiar topic from magnetostatics and is defined for the magnetic field as H (r) = −N(r) · M. This 3 × 3 tensor is known analytically for several geometrical objects or tiles, such as a rectangular prism [15], cylinder [16], [17], elliptic cylinder [24], tetrahedron [25], ellipsoid [26], [27], cylindrical shell [28], and hollow sphere [29] as well as several more. The average demagnetizing factor is also known for a range of geometries such as prisms and ellipsoids [18], [19], [30], [31].

The expression for the demagnetization tensor for the prism is the gradient of the scalar potential demagnetization vector derived in this work. We have omitted the minus sign in the definition of the demagnetization vector in (13), as the magnetic field is defined as the negative gradient of the magnetic scalar potential.

We also note that it is possible to write down the demagnetization vector for the magnetic scalar potential for a range of other geometries for which the scalar potential is known. For a dipole, the magnetic scalar potential is given by

φy ′ -faces = 1 4π My · F(y − b, z ∓ c, x ∓ a) − F(y + b, z ∓ c, x ∓ a) (10)

and for the z ′ -faces

φz ′ -faces = 1 4π Mz · F(z − c, x ∓ a, y ∓ b) − F(z + c, x ∓ a, y ∓ b) . (11)

It follows that the complete magnetic scalar potential of a prism is given as:

φM (r) = φx ′ -faces + φy ′ -faces + φz ′ -faces. (12)

We note that this expression is valid both inside and outside the prism. The derived analytical expressions are available through the MagTense framework [22], available at www.magtense.org

φM ,dipole = 1 4π r · m r 3

where m is the magnetic moment. Therefore, the demagnetization vector is simply

A. Tensor Notation and Other Geometries It is possible to formulate the magnetic scalar potential in vector notation as [23] φM (r) = Nφ (r) · M (13) where we introduce Nφ (r) as the demagnetization vector for the magnetic scalar potential. This contains all the geometric information necessary for calculating the scalar potential. Examining (12), it can be seen that we can write the demagnetization vector for the magnetic scalar potential as Nφ = 1 4π F(x − a, y ∓ b, z ∓ c) − F(x + a, y ∓ b, z ∓ c) F(y − b, z ∓ c, x ∓ a) − F(y + b, z ∓ c, x ∓ a) F(z − c, x ∓ a, y ∓ b) − F(z + c, x ∓ a, y ∓ b) . Nφ ,dipole( r) = 1 4π r r 3 . (14) For a sphere, the magnetic scalar potential is given by φM ,sphere = 1 3 2R r + R + |r − R| 3 r · m so the demagnetization vector is Nφ ,sphere( r) = 1 3 2R r + R + |r − R| 3 r. (15) This expression is valid both inside and outside the sphere, as is also the case for the rectangular prism.

φM ,x ′ (r) = 1 4π Mx b −b c −c dy′ dz′ (x − a)2 + (y − y′ )2 + (z − z′ )2 = 1 4π Mx c −c − ln y − y′ + (x − a)2 + (y − y′ )2 + (z − z′ )2 y′ =b y′ =−b dz′ = 1 4π Mx z′ + (x − a) arctan z − z′ x − a − (x − a) arctan y − y′ z − z′ (x − a)r + y − y′ ln z − z′ + r + z − z′ ln y − y′ + r y′ =b y′ =−b z′ =c z′ =−c

+ y − y ln z − z + r + z − z ln y − y + r y′ =−b z′ =−c = 1 4π Mx −(x − a) arctan y − y′ z − z′ (x − a)r + y − y′ ln z − z′ + r + z − z′ ln y − y′ + r y′ =b y′ =−b z′ =c z′ =−c (7)

Authorized licensed use limited to: Rajshahi University Of Engineering and Technology. Downloaded on May 22,2026 at 03:01:21 UTC from IEEE Xplore. Restrictions apply.

7000206 IEEE TRANSACTIONS ON MAGNETICS, VOL. 62, NO. 1, JANUARY 2026 TABLE I

L IMITING V ALUES FOR THE M AGNETIC S CALAR P OTENTIAL

B. Singular Values The expression for the magnetic scalar potential for a face of a rectangular prism, (7), has a number of singularities that must be considered. We consider a prism face at x ′ = +a. The singularities are described in the following. 1) First Term in (7): For x = a, the first term in the expression for the scalar potential [see (7)] cannot be eval- uated. However, taking the limit of x → a for the first term, we get −(x − a) arctan (y − y′ )(z − z′ ) (x − a)r −−→ x→a 0 Fig. 1. Magnetic scalar potential, φM , and the magnetic field lines generated by a prism with side lengths [2, 4, 6] m and magnetization of M = [2, 3, −4] A/m in the x y plane at z = 0 m. The magnetization direction is indicated by the red arrow in the center of the prism, and the sides of the prism are shown with red lines.

as limx →∞ arctan(x) = π/2.

There is a special case when y = y ′ or z = z ′ , i.e., when we consider the boundaries of the face. Besides the corner points, this limit is easily resolved as, e.g., (x − a) → 0 as fast as y − y ′ → 0, resulting in a finite value of the arctan factor, and as this is multiplied with (x − a), again the first term goes to zero.

The case of x − a = 0, y − y ′ = 0, and z − z ′ = 0, i.e., → 0, must also be considered. However, again, we end up with the arctan factor approaching a constant value, leaving the first term going to zero because of the x − a prefactor.

  1. Second and Third Terms in (7): The second and third terms in (7) must also be considered, as these can also become singular.

For x = a, y = y ′ , and z = z ′ , i.e., → 0, the limit is

(y − y′ ) ln (z − z′ ) + r −−→ r→ 0 0

rr as lim x→0 xln(x) = 0. The same applies to the third term.

Using the i jk nomenclature introduced earlier, the limits for the singular values are given in Table I, where it is seen that for all singular values, the considered term in (7) simply goes to zero.

IV. V ALIDATION

We consider a prism with side lengths [2, 4, 6] m, i.e., a = 1 m, b = 2 m, and c = 3 m, centered at the origin. We consider a magnetization of M = [2, 3, −4] A/m. In Fig. 1, we show the magnetic scalar potential and the magnetic field lines computed from the rectangular prism in a slice in the x y plane at z = 0 m.

To validate the analytical expression for the magnetic scalar potential, we compare the scalar potential with that calculated using the finite element framework COMSOL [32]. We evaluate the scalar potential from the origin to a point located

uate the scalar potential from the origin to a point located at P = [x, y, z] = [8, −6, −9] m. In Fig. 2, we show

the magnetic scalar potential evaluated on a line ranging from the origin to the point P specified above as computed Fig. 2. Magnetic scalar potential, φ M , generated by a prism with side lengths [2, 4, 6] m and magnetization of M = [2, 3, −4] A/m along the line [0, 0, 0] → [8, −6, −9] m as given by (13) and as computed using finite element modeling (FEM). The difference between these, in percent, is shown on the right axis.

using COMSOL and as computed using (13), as well as the difference between these. As can be seen, there is a perfect agreement between the analytical expression and the finite element calculations, and the small error can be attributed to the numerical precision of the finite element model.

V. D ISCUSSION

As stated previously, in magnetostatics, the demagnetization tensor for the magnetic field is well known and has been computed for a number of geometries.

However, outside magnetism, the gravitational potential can also be defined as the gradient of the gravitational force. Chappell [33] derived the expression for the gravitational potential around a prism of uniform density. Poisson’s equation Authorized licensed use limited to: Rajshahi University Of Engineering and Technology. Downloaded on May 22,2026 at 03:01:21 UTC from IEEE Xplore. Restrictions apply.

JAMES et al.: MAGNETIC SCALAR POTENTIAL FOR A RECTANGULAR PRISM for the gravitational field is

−∇ · (∇φG ) = 4π Gρ

7000206 A CKNOWLEDGMENT

(16)

i.e., of the same type as (3), but unlike this equation with no gradient on the right-hand side of the equation.

The expression found by Chappell et al. [33] is quite similar to the expression determined for the magnetic prism above, in the sense that it is cyclic permutable and contains only arctan and natural logarithmic functions. Additionally, the gravitational potential for a polyhedron is given by [34]. We note that the expression for the gravitational potential can be split into a vector depending only on the geometry of the object, which could be termed the “degravitation” vector, multiplied with the density. This has already been explored in the case of computing the field in Fourier space [23], where the analogy between magnetism and gravity was cleanly explored, as well as in [35].

We note here that additionally, since the gravitational field, g, can be defined from the potential as g = −∇φ G , one can derive a “degravitation” tensor. In Newtonian gravity, a field is generated by any object with a mass. The gravitational field g at point r from an extended body located at position r ′ with a mass distribution, ρ, is given by

g = Gρ r′ r − r′ |r − r′ |3 dV ′

where the volume integral of the density, ρ, is equal to the mass of the object.

If the density of the object is uniform, we can write

g = Gρ r − r′ |r − r′ |3 dV ′ = Gρ K r, r′

where the field then only depends on the geometrical function, K, which is the degravitation tensor and the density of the object, similar to the calculation of the magnetic field.

VI. C ONCLUSION

Through integration, we analytically solve Poisson’s equation for the magnetic scalar potential generated by a uniformly magnetized rectangular prism to determine a closedform solution. We show that the solution, which is given in terms of arctan and natural logarithmic functions, can be written as a demagnetization vector, containing all the geometric information, multiplied with the magnetization. We validate the analytical expression by comparing with a finite element simulation and show that these agree perfectly. Finally, we show that the concept of demagnetization tensors can be extended to gravitational objects, which also obey Poisson’s equation.

D ATA S TATEMENT The derived analytical expressions for the magnetic scalar potential for a prism are available through the MagTense framework [22], available at www.magtense.org. Furthermore, the data are also available at the data repository at [36].

This work was supported in part by the Villum Foundation Synergy titled “Physics-Aware Machine Learning” under Project 50 091 and in part by the Independent Research Fund Denmark, “Magnetic Enhancements through Nanoscale Orientation (METEOR),” under Grant 1032-00251B.

R EFERENCES

[1] L. Exl, D. Suess, and T. Schrefl, “Micromagnetism,” in Handbook

of Magnetism and Magnetic Materials. Switzerland: Springer, 2020, pp. 1–44. [2] R. Bjørk and A. R. Insinga, “Explaining Browns paradox in

NdFeB magnets from micromagnetic simulations,” J. Magn. Magn. Mater., vol. 571, Apr. 2023, Art. no. 170510. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0304885323001592 [3] F. Mackay, R. Marchand, and K. Kabin, “Divergence-free magnetic field

interpolation and charged particle trajectory integration,” J. Geophys. Res., Space Phys., vol. 111, no. A6, Jun. 2006, Art. no. A06208. [4] J. C. Bernauer et al., “Measurement and tricubic interpolation of the

magnetic field for the OLYMPUS experiment,” Nucl. Instrum. Methods Phys. Res. A, Accel. Spectrom. Detect. Assoc. Equip., vol. 823, pp. 9–14, Jul. 2016. [5] E. Le Grand and S. Thrun, “3-axis magnetic field mapping and fusion

for indoor localization,” in Proc. IEEE Int. Conf. Multisensor Fusion Integr. Intell. Syst. (MFI), Sep. 2012, pp. 358–364. [6] A. Solin, M. Kok, N. Wahlström, T. B. Schön, and S. Särkkä, “Modeling

and interpolation of the ambient magnetic field by Gaussian processes,” IEEE Trans. Robot., vol. 34, no. 4, pp. 1112–1127, Aug. 2018. [7] G. Moresi and R. Magin, “Miniature permanent magnet for table-top

NMR,” Concepts Magn. Reson. B, Magn. Reson. Eng., vol. 19B, no. 1, pp. 35–43, Jan. 2003. [8] H. Raich and P. Blümler, “Design and construction of a dipolar Halbach

array with a homogeneous field from identical bar magnets: NMR mandhalas,” Concepts Magn. Reson. B, Magn. Reson. Eng., vol. 23B, no. 1, pp. 16–25, Oct. 2004. [9] S. Pollok, N. Olden-Jørgensen, P. S. Jørgensen, and R. Bjørk, “Magnetic

field prediction using generative adversarial networks,” J. Magn. Magn. Mater., vol. 571, Apr. 2023, Art. no. 170556. [10] R. Bischof and M. A. Kraus, “Multi-objective loss balancing for physics-

informed deep learning,” Comput. Methods Appl. Mech. Eng., vol. 439, May 2025, Art. no. 117914. [11] P. Rhodes, “Demagnetising energies of uniformly magnetised rect-

angular blocks,” Proc. Leeds Phil. Liter. Soc., vol. 6, pp. 191–210, Jan. 1954. [12] A. Hubert and R. Schäfer, Magnetic Domains: The Analysis of Magnetic

Microstructures. Cham, Switzerland: Springer, 2008. [13] M. Schabes and A. Aharoni, “Magnetostatic interaction fields for a

three-dimensional array of ferromagnetic cubes,” IEEE Trans. Magn., vol. MAG-23, no. 6, pp. 3882–3888, Nov. 1987. [14] R. I. Joseph and E. Schlömann, “Demagnetizing field in nonellipsoidal

bodies,” J. Appl. Phys., vol. 36, no. 5, pp. 1579–1593, May 1965, doi: 10.1063/1.1703091. [15] A. Smith, K. K. Nielsen, D. V. Christensen, C. R. H. Bahl, R. Bjørk, and

J. Hattel, “The demagnetizing field of a nonuniform rectangular prism,” J. Appl. Phys., vol. 107, no. 10, May 2010, Art. no. 103910. [16] K. K. Nielsen and R. Bjørk, “The magnetic field from a homogeneously

magnetized cylindrical tile,” J. Magn. Magn. Mater., vol. 507, Aug. 2020, Art. no. 166799. [17] F. Slanovc, M. Ortner, M. Moridi, C. Abert, and D. Suess, “Full

analytical solution for the magnetic field of uniformly magnetized cylinder tiles,” J. Magn. Magn. Mater., vol. 559, Oct. 2022, Art. no. 169482. [18] R. I. Joseph, “Ballistic demagnetizing factor in uniformly magnetized

rectangular prisms,” J. Appl. Phys., vol. 38, no. 5, pp. 2405–2406, Apr. 1967. [19] A. Aharoni, “Demagnetizing factors for rectangular ferromagnetic

prisms,” J. Appl. Phys., vol. 83, no. 6, pp. 3432–3434, Mar. 1998. [20] H. Fukushima, Y. Nakatani, and N. Hayashi, “Volume average demagne-

tizing tensor of rectangular prisms,” IEEE Trans. Magn., vol. 34, no. 1, pp. 193–198, Jan. 1998. [21] J. D. Jackson, Classical Electrodynamics, 3rd ed., Hoboken, NJ, USA:

Wiley, 1999.

Authorized licensed use limited to: Rajshahi University Of Engineering and Technology. Downloaded on May 22,2026 at 03:01:21 UTC from IEEE Xplore. Restrictions apply.

7000206 [22] R. Bjørk and K. K. Nielsen, “Magtense—A micromagnetism and mag-

netostatic framework,” Tech. Rep., 2019, doi: 10.11581/DTU:00000071. [Online]. Available: https://www.magtense.org [23] O. Boulanger, “2D fast Fourier transform analytical solutions in all space

for all gravity and magnetic components,” Geophys. Prospecting, vol. 72, no. 2, pp. 809–832, Feb. 2024. [24] M. Beleggia, M. D. Graef, Y. T. Millev, D. A. Goode, and

G. Rowlands, “Demagnetization factors for elliptic cylinders,” J. Phys. D, Appl. Phys., vol. 38, no. 18, pp. 3333–3342, Sep. 2005. [25] K. K. Nielsen, A. R. Insinga, and R. Bjørk, “The stray and demagne-

tizing field of a homogeneously magnetized tetrahedron,” IEEE Magn. Lett., vol. 10, pp. 1–5, 2019. [26] J. A. Osborn, “Demagnetizing factors of the general ellipsoid,” Phys.

Rev., vol. 67, nos. 11–12, pp. 351–357, Jun. 1945. [27] M. Tejedor, H. Rubio, L. Elbaile, and R. Iglesias, “External fields created

by uniformly magnetized ellipsoids and spheroids,” IEEE Trans. Magn., vol. 31, no. 1, pp. 830–836, Jan. 1995. [28] M. Beleggia, D. Vokoun, and M. De Graef, “Demagnetization factors for

cylindrical shells and related shapes,” J. Magn. Magn. Mater., vol. 321, no. 9, pp. 1306–1315, May 2009.

IEEE TRANSACTIONS ON MAGNETICS, VOL. 62, NO. 1, JANUARY 2026 [29] J. Prat-Camps, C. Navau, A. Sanchez, and D.-X. Chen, “Demagnetizing

factors for a hollow sphere,” IEEE Magn. Lett., vol. 7, pp. 1–4, 2016. [30] D.-X. Chen, E. Pardo, and A. Sanchez, “Demagnetizing factors of

rectangular prisms and ellipsoids,” IEEE Trans. Magn., vol. 38, no. 4, pp. 1742–1752, Jul. 2002. [31] D.-X. Chen, E. Pardo, and A. Sanchez, “Demagnetizing factors for

rectangular prisms,” IEEE Trans. Magn., vol. 41, no. 6, pp. 2077–2088, Jun. 2005. [32] S. COMSOL AB, Stockholm. (2023). Comsol Multiphysics V. 6.2.

[Online]. Available: www.comsol.com [33] Chappell, “The gravity field of a cube,” Phys. Int., vol. 3, no. 2,

pp. 50–57, Feb. 2012. [34] J. Schuhmacher, E. Blazquez, F. Gratl, D. Izzo, and P. Gómez, “Efficient

polyhedral gravity modeling in modern C++ and Python,” J. Open Source Softw., vol. 9, no. 98, p. 6384, Jun. 2024. [35] D. Byzov, P. Martyshko, and A. Chernoskutov, “Computationally effec-

tive modeling of self-demagnetization and magnetic field for bodies of arbitrary shape using polyhedron discretization,” Mathematics, vol. 10, no. 10, p. 1656, May 2022. [36] R. Bjørk, Data set for “The magnetic scalar potential and demagnetiza-

tion vector for a prism” 2025, doi: 10.11583/DTU.27879888.

Authorized licensed use limited to: Rajshahi University Of Engineering and Technology. Downloaded on May 22,2026 at 03:01:21 UTC from IEEE Xplore. Restrictions apply.