Abstract
There are currently two main trends in solving magnetic field problems, numerical methods, of which the Finite Element Method (FEM) is undoubtedly the most popular, and analytical methods, of which there is a great diversity of approaches. The main advantage of numerical methods is their flexibility in modeling complicated geometries; however, its calculation times are generally considerable. Analytical methods attain very short calculation times by sacrificing flexibility. This paper presents the mathematical formulation of a new linear surface element for the semi-analytical solution of axisymmetric magnetic field problems. The importance of this formulation is that it is capable of dealing with arbitrary geometries while retaining the flexibility of numerical methods with considerably shorter calculation times. The results of the application of the proposed formulation to a case study are presented in the validation section. The results obtained are compared with those calculated with FEM showing an excellent agreement between them.
Introduction
The precision, speed and flexibility in the calculation of magnetic fields are undoubtedly issues of great relevance in the field of computational electromagnetics [1]. In the last decades an unprecedented improvement has been seen in the calculation capacity of computers; however, the complexity of the problems to be addressed grows with the available computational resources. Therefore, the solution of magnetic field problems involves dealing with a trade-off between these three variables [2].
Despite the great advances in the field of numerical methods in recent years, FEM being the most representative method, it is indisputable that a numerical method capable of solving problems of arbitrarily complicated geometries, with high precision and very short calculation times (on the order of a few seconds) is not yet available. This situation is even worse in the case of 3D transient problems with non-linearities or anisotropies [3–5].
As a consequence, great efforts continue to be made to formulate analytical methods for solving specific magnetic field problems, so that the proposed model is suitable to represent the case of interest with reasonable precision and in relatively short times.
The disadvantage of analytical methods is that their applicability is restricted only to the specific problem for which they were intended. If there is a significant variation in the geometry or the topology of the problem, the calculation methodology must be reformulated. Applications of analytical methods for the solution of the magnetic field in electrical machines are presented in [6–8]. It is important to note that in these works the analytical method is only applicable to the type of device and under the conditions for which it has been formulated.
In a previous paper, the present authors proposed a methodology which can be considered a trade-off between numerical and analytical methods called Semianalytic Integral Method (SAIM) [9]. The main characteristic of this method is that it discretizes the geometry of the problem using elements whose analytical solution is known, and a linear system of equations is proposed to determine the values of the excitations of each element accounting for the boundary conditions [10]. The magnetic axisymmetric problem has been solved using cylindrical [11] and disk-shaped elements [12].
Despite the good performance of SAIM in terms of precision and calculation time in a particular case study, the authors identified that the cylindrical and disk-shaped elements significantly restrict the applicability of SAIM to more general problems, especially those with curved surfaces or surfaces which are not parallel to the axes. This limitation motivated the authors to present the mathematical formulation of a new element with conical geometry in this paper, which allows the modeling of geometries much more complicated than those which can be represented by cylindrical and disk-shaped elements.
The most important contribution of this work is that the mathematical formulation of the new conical element makes it possible to model and solve axisymmetric magnetic field problems with arbitrarily complicated geometries.
A second notable contribution of this work is that a method of integration based on matrices has been proposed to evaluate the interactions between an arbitrary number of elements and evaluation points in a computationally efficient and structured way.
In the final part of the work the proposed conical element is applied along with SAIM to a case study which requires the use of conical elements. In this case study, the magnetic field distribution in the vicinity of a ferrite core under the effect of an external magnetic field generated by a Helmholtz coil is determined. An excellent agreement has been found between the results calculated using the conical element together with SAIM and those calculated by FEM.
Problem statement
The authors’ research has been focused on the determination of a computationally efficient method to determine the vector potential A 𝜙 and the magnetic field strength in the radial and axial directions H r and H z produced by a conical surface current distribution at an arbitrary point in space.
The geometry of the current distribution is shown in Fig. 1. As can be seen, the distribution starts from a ring of radius r
1 on the axial coordinate z
1. This ring has a current density K
𝜙1. The current density varies linearly along the surface of the cone until it reaches the value of K
𝜙2 at the coordinates z
2 and r
2. The coordinate of the evaluation point P (r, z) is also shown. The coordinates that define the cone are totally arbitrary as long as
Basic mathematical expressions
This section presents the mathematical expressions to be solved to determine the magnetic field produced by the current distribution. The expression for the magnetic vector potential is presented first, and then the expressions for the radial and axial fields are derived from it.

Schematic diagram of the finite cone.
A filamentary circular loop whose axis is the z-axis and located at a distance z
′
from the x-y plane is examined as first step. The radius of the loop is r
′
and a current I
𝜙 flows through it. According to the Biot-Savart law the magnetic vector potential produced by the loop at an arbitrary field point P (r, z) can be written as follows [13]
To obtain the total magnetic vector potential due to the conical current distribution, the differential current contributions I
𝜙 from r
1 to r
2 must be superimposed, which is achieved by integrating (1) between r
1 and r
2.
It should be noted that in (6) only the differential d𝜙
′
appears. This is because the differential dr
′
is within I
𝜙 as defined in (5). For the sake of simplicity, the integrand of (6) is defined using the variable f
A
(𝜙
′
, r
′
) as follows
Note that in (8) the order of integration has been changed because the integral is first evaluated analytically with respect to r ′ . The method to perform the integration with respect to 𝜙 ′ will be presented later.
The magnetic flux density
Since the problem is axisymmetric, the vector potential only has an azimuthal component 𝜙 (
By assuming that the current distribution is placed in a homogeneous medium having the permeability of vacuum, the following constitutive relation is valid
In this case, (9) gives the magnetic flux density in axial direction B
z
Analytical integration with respect to r ′
Magnetic vector potential
It can be shown that the magnetic vector potential can be expressed as the sum of the current densities at the ends of the cone weighed by two geometric constants. These two constants k
𝜙1 and k
𝜙2 are referred to as geometric factors, which only depend on the dimensions of the cone and the coordinates of the field point. According to the above mentioned, the magnetic vector potential can be written as follows
It is important to note that the form of (17) is very convenient, since in many problems the values of the current densities at the ends of the elements are unknown, so the form of (17) together with the corresponding boundary conditions makes it possible to set up a system of equations to determine the current distribution of the conical elements. The geometric factors can be calculated using the following expressions
The analytical integration with respect to r
′
and a subsequent simplification yields
The procedure followed is the same as in the case of the magnetic vector potential.
Similarly, the following set of expressions for the magnetic field strength in the axial direction can be written.
It can be seen in (18), (19), (22), (23), (26) and (27) that the geometric factors are expressed in terms of an integral between 0 to π. This is because the conic configuration produces mathematical expressions that have not known analytic antiderivatives with respect to 𝜙 ′ .
At this point, we could resort to the use of special functions such as Jacobi, Hankel functions and elliptical integrals. Although these functions can be evaluated using efficient iterative algorithms such as the Arithmetic Geometric Mean (AGM) [11], the fact that they must be evaluated for thousands or millions of interactions compromises the computational performance. That is why a matrix based integration method (MBIM) is proposed in this work, which allows the efficient evaluation of all interactions in a single matrix product. See Appendix A.1 for more details.
Results and validation
In order to compare the computational time and the precision of the proposed formulas, a ferrite core has been used as a case study, which is under the influence of the external homogeneous magnetic field produced by a Helmholtz coil [15]. The objective of this section is to show the results of the calculation of the magnetic field distribution in the vicinity of the core by using the proposed formulation combined with SAIM and compare them with those obtained with a commercial tool based on FEM.
Description of the case study
The case study consists of two ferrite pieces which are separated by a distance g (see Fig. 2). This type of ferrite core configurations can be very useful to shield the cavity from external magnetic fields [16].
Several characteristics of this case study are most suitable to be modeled using conical elements: a. The geometry of the problem is axisymmetric, which is very convenient to represent using conical elements. b. The local field close to the ferrite core is of great interest, especially inside the cavity. The field close to external sources is not of interest. c. It is an open boundary problem, which implies that the boundaries of the problem extend to infinity.
The case study has been depicted in Fig. 2. The relative magnetic permeability of both ferrites has been assumed to be 𝜇 r = 100 and they form a spherical cavity in their interior. Although the magnetic permeability of the core is assumed to be linear and isotropic in this work, the effect of saturation will be introduced in the model in the future.

Cutaway drawing of the core of the case study.
Both ferrites are separated by a gap of g = 2 mm, the internal radius of the cavity is 10 mm, the external radius of the core is 20 mm and the total height is 60 mm. The core has a chamfer at 45 degrees at the top and bottom. The core is excited by a Helmholtz coil composed of filamentary conductors located at the coordinates r − z (100, −50) mm and (100, 50) mm respectively. The Helmholtz coil has been modeled by two 10 kA filamentary azimuthal currents.
Figure 3 shows the final mesh generated by Ansys Maxwell, version 17.2.0. This figure shows only the part of the mesh on a rectangular region near the upper core of ferrite, however it should be noted that the mesh extends beyond the conductors of the Helmholtz coil. Ansys Maxwell needed a total of 8 057 triangular elements to cover the entire solution region creating a system of equations of 16 177 degrees of freedom.

Discretization of the problem using Ansys Maxwell (FEM based program).

Discretization of the problem using conical elements.
Figure 4 shows the discretization using conical elements. There is a conical element between each pair of consecutive nodes. Note that conical elements are only necessary to be located on the border of the ferrite core and an amount of 57 × 2 elements has been used. The evaluation points associated with a conical element have been represented with x labels in red. The following boundary condition is defined on these field points [9]
On the other hand, the field points where the field is to be evaluated have been represented with x labels in blue. These points form a rectangular grid of 20 × 20 evaluation points.
A linear system of equations of the form
The procedure to set up the system of equations is described in greater detail in section III.B. of [9]. Once the system of equations is solved, the value of the magnetic vector potential in each evaluation point is determined in order to calculate the magnetic flux. Further details about the field matrix calculation from the current density solution values are given in section 3.1 of [10].
Figure 5 shows the magnetic flux distribution in the vicinity of the ferrite calculated with Ansys Maxwell. It can be seen from the field distribution the shielding effect provided by the ferrite, so that the net flux is less than 50 μWb in the central part of the cavity in the region defined by 0 < r < 5 mm and −5 mm < z < 5 mm. The distortion in the flux lines due to the gap is also visible.
Figure 6 shows the distribution of magnetic flux lines calculated from the superposition of the field of conical elements. The distribution reproduces the result obtained with Ansys Maxwell very closely. It should also be noted that the same number of contour lines (60) have been plotted with both methods so that the result is visually comparable.

Distribution of magnetic flux lines calculated using Ansys Maxwell (FEM based).

Distribution of magnetic flux lines calculated by superimposing the field produced by conical elements.
Table 1 also shows a numerical comparison between the magnetic flux density calculated with FEM and conical elements in a 5 × 5 grid. Absolute flux density errors in the radial and axial directions are also shown. As can be seen in the table, the absolute value never exceeds 10 mT.
Comparison between magnetic flux density calculated with FEM and using conical elements in a 5 × 5 grid
The small differences between one method and another can be attributed to the fact that the value of the magnetic flux density calculated with FEM is obtained by interpolation of nodal values, while the value calculated with conical elements corresponds to the magnetic density evaluated at the given field point coordinates.
A mathematical formulation of a new conical surface element for the modeling of axisymmetric magnetic field problems has been presented. The corresponding geometric factors due to a linear surface element with conical geometry has been derived. The proposed formulation is used in conjunction with SAIM to determine the field distribution due to a Helmholtz coil in the vicinity of a conical ferrite. The results found with the proposed formulation for this case study have been compared with the results calculated by a commercial program based on FEM and excellent agreement has been found. Additionally, the calculation time using the proposed formulation is about 4 times less than using FEM. The most important contribution of this work is that the proposed formulation allows for the modeling of magnetic field axisymmetric problems with curved geometries. The most important advantage offered by modeling with surface elements is that only the object surface must be discretized, which considerably reduces the size of the problem and computation time compared to that of traditional methods such as FEM. Finally, the Matrix Based Integration Method has been introduced, allowing the determination of all integrals associated with multiple field sources on multiple evaluation points in a structured way by a single matrix product.
Footnotes
Acknowledgements
Special thanks to the Research and Transfer Vice-Rectory of the La Salle University - Bogota Colombia, who supported the publication of this work within the framework of the call for international visibility.
Acknowledgments to the engineers Diego Celis and Nelson Caicedo, who supported the simplification of mathematical expressions during their undergraduate studies.
Appendix
1
vec(
2
mat(
3
The
