Abstract
The solution to electromagnetic problems relies on complex numerical differential equations that are difficult to understand. Therefore, it is crucial to analyze them step by step and visualize them in a computer environment, even by developing a program. This approach enhances understanding of the subject and facilitates further research. In this study, an electromagnetic phenomenon is examined on a ferromagnetic structure using the Maxwell 2D static-elliptical partial differential equation within a developed software environment. The paper covers all aspects, ranging from the mathematical model and analysis solution to the fundamental operating parameters and characteristics, with a focus on educational purposes. The modeling and software development have been executed in a user-friendly manner, enabling students to apply various numerical techniques to practical problems while maintaining control over the entire modeling process. Through this study, it is anticipated that the transition from theory to practice can be facilitated more smoothly and directly. The theoretical analysis has been conducted using Mathematica software, and a comparison with finite element magnetic method simulation on a typical magnetic structure has been presented to illustrate the analogy. A comprehensive analysis of the Maxwell static-elliptical electromagnetic equation, based on a 2D numerical solution within a specific domain, has been performed in a detailed and unambiguous manner, utilizing different equation forms, boundary conditions, and ferromagnetic materials, all for educational purposes.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 The Intention of the Study
The main objective of the paper is to develop a program to solve electromagnetic problems with numerical solutions using the link between mathematical/geometrical operations and physical phenomena. The importance of writing and developing a program is emphasized to understand the structure of these complex equations, learn the properties of the solution method, and conduct research on the method. The study is realized on a specific ferromagnetic domain with different scenarios for educational purposes.
2 Introduction
The solution of real magnetic circuits using the 2D analytical solution is time-consuming and very complex for electrical engineering, researchers, students, and even for today's powerful computers because most magnetic circuits are solved with material nonlinearity. Therefore, numerical methods, such as the finite element method (FEM) or the finite difference method (FDM), which transform a continuous domain into a finite partition, are used to create a simplified and understandable model to solve magnetic circuits or Maxwell equations [1, 2]. Since numerical modeling in electromagnetism is a tool to solve rigor and complex problems, the use of software packages for modeling and simulation is extremely necessary. Magnetic field analyses have been studied for various problem types with different methodologies, which deal with electromagnetic field techniques in detail with their strengths and weaknesses. To overcome complex and nonlinear numerical equations in electromagnetic problems, some studies have preferred simulation programs with simplified models using 2D axisymmetry [3,4,5]. An electromagnetic actuator is studied to analyze heating electromagnetic field distribution and decrease the power losses using the FEMM simulation program [6]. In [7], some discretization techniques based on two (or more) FEM subspaces for solving partial differential equations were presented. It proposed a new technique to solve a large class of nonlinear elliptic boundary value problems. FEM and FDM have been compared in [8, 9], and the advantages of FDM over FEM in some cases are discussed. Electromagnetic numerical problems indeed have complex, strongly nonlinear, and multimodal solution algorithms, and thus, the lecturer motivates the students to recognize that basic electromagnetic knowledge is an open field for research using powerful mathematical software and coding. The software or coding is characterized by the proximity between the way to define discrete problems and their symbolic mathematical expressions written in a mathematical form that is adapted to a chosen numerical method, directly constituting data through structured computational objects. This allows the theory and mathematical bases of numerical methods to be directly followed by their practical applications [10, 11]. The vector computation of electromagnetic fields presents a mathematical stumbling set to many students, which discourages their understanding of physical concepts. The present courses are mainly based on the behavior of electromagnetic fields upon differential and integral vector calculus. Because the visualization of vector fields in the students' minds is challenging, the fundamentals of electromagnetics courses often become exercises where students only memorize a set of formulas, making minimal connections between the physical phenomena and mathematics. If the formulation of electromagnetic laws in numeric form should be given to beginning students directly with computer-based solutions, the attractiveness of the subject can be achieved in real-time, and scalar calculations displayed with color graphics can provide a powerful learning environment [12, 13]. However, except for a few education coding programs, most research is now conducted using sophisticated simulation programs.
In this study, Maxwell's equations, which are the basic equations of electromagnetic fields, are solved with simplified 2D static-elliptical electromagnetic problem analysis coding and software tools for the numerical solution of a physical problem. To accomplish this, the problem domain is first created and visualized, and then the vector and scalar potential formulations are applied to the specified domain with boundary conditions. Finally, the finite element magnetic method (FEMM) simulation is investigated in the same region to give an analogy and compare the developed model results. The coding for building region and related formulations are given in the text and Appendix. The coding method meets an educational need by incorporating the complex Maxwell equations platform for teaching electromagnetic engineering. Vector potential formulation can combine all the conditions that must be satisfied into a single equation. If the vector potential is discovered in this type of equation, differentiating \(A\)(vector potential) yields \({\text{\rm B}}\)(magnetic field density) and \(H\)(magnetic field intensity). Many tools and software have been developed over the years to solve this problem [9,10,11]. Mathematica software was chosen for coding because of its powerful symbolic language, intelligent automation from algorithm selection to plot layout, programming capabilities, and intuitive user interface design [12, 15]. The approach used is suitable for an undergraduate and a graduate student, or even for a senior engineer, depending on the level of depth and rigor.
3 Computational Tools to Solve Electromagnetic Problem
3.1 Physical Structure of the Magnetic Device
The physical structure, developed in Mathematica, of the problem in dimensions being studied is depicted in Fig. 1. The magnetomotive force (mmf) is an ampere multiplied by the number of turns in the coil \((N\,x\,\,I)\); hence, the required mmf can be easily determined. The ferromagnetic material properties and the coil current are the main characteristics used to determine the magnetic field of a ferromagnetic device. The numerical solution of the Maxwell equation is performed using the mmf, the magnetic structure dimensions, and the boundary conditions. There are two permeability effects shown in blue and red in Fig. 1. Additionally, they are analyzed in vector and scalar potential formulations using Eqs. (1) and (2). The appropriate boundary conditions for the structure are determined using Eqs. (3) and (4). The results are evaluated by matching Eqs. (1) and (2) with Eqs. (3) and (4) in different ways, and the results of the matching options remained consistent in all cases. The problem solution is realized in two regions: one is the entire region, including the gray part in Fig. 1 known as the “domain,” and the other is the only mmf-produced region, which is depicted by blue and red parts together and is dubbed the “solid.” Another region, known as the “coil” region, produces mmf and is colored black.
The parameter values of the studied ferromagnetic structure with different materials are shown in Table 1. In the table, the relative permeability is symbolized by \(\mu_{ij}\), i in the subscript denotes the region, and j denotes the material to be analyzed.
3.2 Evaluation, Numerical Solution, and Visualizing of the Magnetic Structure
From the Maxwell equations, a magnetostatic problem is expressed as both vector and scalar magnetic potential “\(A\)” in 2D (\(\left\{ {x,y} \right\} \in Domain\)), noting that \(\nabla .B = 0\). Because the vector potential \(A\) has only one component in 2D, which is in the \(z\) direction \(A_z\) perpendicular to the cross section being studied, the equation is obtained [12, 13] as follows:
The current density value \((J_z )\) is calculated from coil current (I), and the cross section of the coil (S), according to the relation between the current, turns of the coil, and the cross section of the coil \((J_z = N\,I/S)\). A uniform current density is perpendicular to the 2D cross section and the vector direction is the same with \(A_z\). Because coding is implemented here, one can adjust the desired number of turns, current, geometry, and ferromagnetic material properties of the system to see how they affect the magnetic vector potential, the magnetic field density, and the magnetic field.
We frequently base our analysis on the magnetic scalar potential, which is related to the mathematical properties of the Laplace equation in 2D (x–y plane). The following scalar equation expresses the solution to the electromagnetic potential problem in the entire region. It is a very convenient equation, particularly studying both the temperature and magnetic effects of the system [14,15,−16] as follows:
Two Dirichlet boundary conditions can be of the following types [11]. We impose conditions (3) and (4) on the air boundary around the solid (just fix potential at one location), as shown in the program scripts, with bc1 and bc2.
Applying boundary conditions to Maxwell Eqs. (1) and (2) yields identical solutions, as depicted in Fig. 2. The results shown in Fig. 2a and b are produced by executing the "sol1" command, while the outcomes in Fig. 2c and d are generated using the "sol2" command. In Fig. 2a and c, the solution pertains to the solid (magnetic material), while Fig. 2b and d represents the entire domain (whole region). The formulation of a 2D static Maxwell magnetic field is defined through the coding of Pde1, Pde2, sol1, and sol2. Pde1 and Pde2 establish the fundamental structure of the numerical equations, while sol1 and sol2 encapsulate the principal equations along with the corresponding boundary conditions in the x–y planes. The codes required to construct the physical region shown in Fig. 1, a challenging and central aspect of the coding, are included in Appendix. The coding intentionally encompasses two types of materials and their domain behaviors, aiming to encourage students to tackle more intricate problems. The provided codes are ready for execution, allowing one to either utilize them as is or modify them to explore various scenarios. Moreover, even for dynamic nonlinear problems, students can evaluate the impacts of different structural configurations by modifying the codes within the domain.
![figure a](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs40010-023-00864-6/MediaObjects/40010_2023_864_Figa_HTML.png)
In the scripts provided above, various combinations and mathematical expressions have been utilized, such as the use of "curl" and derivatives, to define the magnetic field B (both B and B1). This enables a comparison of the results obtained. The term “mu \((\mu = \mu_0 \,\mu_r )\)” and “mu0 \((\mu_0 )\)” are defined in Appendix.
The code snippets are presented here in their original Mathematica forms, aiming to facilitate the implementation of formulas for users. Furthermore, as shown in Table 2, the computational time for both FEM and FDM solutions, under different boundary conditions, indicates only marginal differences. Notably, the Pde1 solution with bc2 yields the shortest computation time.
In this study, as illustrated in the code provided above, both FEM and FDM have been employed and are visualized in Fig. 2 (labeled as "sol1" and "sol2," respectively). If the method is not explicitly specified, Mathematica will default to solving the problem using the FDM algorithm. The plotting tools available in Mathematica are just as powerful as the solution methods themselves. Some mathematical requests can be seamlessly integrated into plotting activities. For instance, to calculate vector values on a grid, one can create the grid using the "CoordinateBoundingBoxArray" function, utilizing the following syntax [17]:
![figure b](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs40010-023-00864-6/MediaObjects/40010_2023_864_Figb_HTML.png)
In the analysis above, the values of \(\mu_{r11}\) and \(\mu_{r21}\) have been used for presentation in detail (see Table 1), and the other permeability values are presented in Appendix Fig. 6a, b, and c. In Appendix, Fig. 6a, vector potential is visualized in 3D to show that knowing plotting specialties creates more detail in a numerical solution presentation. The solutions also include some theoretical knowledge. The solutions are identical in either case (sol1 or sol2) inside the solid and the domain. Moreover, the application of boundary conditions (3) and (4) to the solution region satisfies the same solution, and the functions (e.g., vector potential, magnetic field density, and magnetic field intensity), constraints (e.g., boundary conditions), and geometrical entities (e.g., regions, surface) are associated with the mesh of the region geometry.
3.3 Discussion and Results from Comparing Finite Elements Magnetic Method Simulations Solutions
In this section, the results of the values are compared with the FEMM simulation on the ferromagnetic structure. The same dimensions in centimeters shown in Fig. 1 and the same materials shown in Table 1 have been entered into the FEMM magnetic problem analysis, simulation program. The FEMM simulation analysis results in Fig. 3a and b give an analogy with the Mathematica coding program shown in Fig. 4a and b. The relative error of B and H has been defined as approximately 3.1 and 7.2%, respectively, at the same \(\,\,x\,and\,y\) points. Although the values appear to be the same as values, the visualization result, which particularly changes in \(H\) values on the ferromagnetic material structure in Mathematica outputs, is more precise (Fig. 4b).
In this study, FEM is used in script sol1, and FDM is used in script sol2 to solve the numerical equations. However, using Mathematica tools, the solution method could be easily changed and vice versa or to any other available equivalent numerical or even analytical methods. In addition, visualization of equations gives some advantages to grasping the subject easier. The Mathematica problem statement is given as follows:
-
1.
Initialization: constructing the codes for the physical structure (Fig. 1) to set in the \(x\,,y\) plane (see Appendix).
-
\((\left\{ {x,y} \right\} \in \,\,Domain\,,\,\left\{ {x,y} \right\} \in \,\,solid\,,\,\left\{ {x,y} \right\} \in Coil)\)
-
-
2.
Solution of Maxwell Eqs. (1) and (2) for the physical structure with the help of Mathematica solver tools (Pde1 and Pd2) to evaluate \(A_z\)(vector potential). In this step, different Maxwell equations may be matched with different boundaries to see the effect of the equations and boundary conditions. Sol1 and sol2 scripts are the solution of the physical problem with boundary conditions (3) and (4). Additionally, H(magnetic field intensity) and B(magnetic field density) can be performed easily in this step, by using the script of B and H in the text.
-
3.
To visualize the problem statement Mathematica has rich tools. A special script is shown in the text. The plotting activities and specialties are shown in the text emphasizing “CoordinateBoundingBoxArray.” The ordinary tool for visualization is shown in Appendix named “StreamDensityPlot.”
The whole numerical analysis processes of the physical problem are illustrated in Figs. 2 and 4. The B and H directions also indicate the current flow direction in the winding (right-hand rule).
Figures 3a, b and 4a, b show the results for \(\mu_{r11} \,,\mu_{r21} \,\) defined in Table 1. The other ferromagnetic materials, such as \(\mu_{r12} \,,\mu_{r22} \,\) and \(\mu_{r13} \,,\mu_{r23} \,\) , are considered with maximum values in Fig. 5a and b with Mathematica outputs and also \(\mu_{r13} ,\mu_{r23}\), as shown in Appendix, Fig. 6a, b, and c. Although the results show high verification, as shown in Fig. 4b, the differentiating ferromagnetic material is more precise in Mathematica for \(H\) values within the region circled as \(\mu_{r21} \,\).
In (a, b), and (c),\(A_z ,B\,,\,and\,\,H\) are figured out for second permeability values defined in Table 1
Future research must consider extending models to offer additional features in numerical equations regarding complex geometry structures, such as the following: (1) coupling of potentials and fields, (2) nonlinear formulations involving physical functions with any number of arguments, and (3) application of mixed boundary elements and integral formulations to sophisticated material structures. Additionally, various extensions of the computational tools can be coupled together, which leads to numerous couplings of physical problems and numerical methods (e.g., electric circuit coupling, magnetic circuit coupling, finite element, and boundary element coupling, and time analyses coupling) [12].
4 Conclusion
This educational study provides a detailed and unambiguous solution to the 2D static Maxwell elliptic numerical equation for a specific ferromagnetic material, utilizing a developed program. The study explains the step-by-step solution methods for the Maxwell equations, emphasizing the importance of coding in electromagnetic theory rather than relying solely on simulation programs. The explanation emphasizes the significance of coding, boundary conditions, and numerical solutions in the context of static magnetic Maxwell equations.
Furthermore, the study highlights the following analysis results:
-
The developed program effectively demonstrates the use of two different forms of numerical equations.
-
The solutions within the domain and the solid regions yield similar results, indicating that the outer region of the solid has minimal impact on the solution.
-
Different Dirichlet boundary conditions, represented as A and B, have similar effects on the solution region.
-
The solution time remains consistent across different combinations of equation solutions.
The study is presented in a step-by-step manner to motivate students and researchers to tackle more complex structures and problems. The provided coding is open for further improvement.
References
Virjoghe EO, Enescu D, Stan M, and Ionel M (2012) Finite element analysis of stationary magnetic field. In: (ed), Finite element analysis-new trends and developments. IntechOpen. https://doi.org/10.5772/50846
Sadiku M ( 2018) Introduction to electromagnetic field theory,7 th Eition Oxford University Press
Roupec J, Kubik M, Mazůrek I, Strecker Z (2014) Problems of FEM Analysis of Magnetic Circuit. In: Březina T, Jabloński R (eds) Mechatronics 2013. Springer, Cham. https://doi.org/10.1007/978-3-319-02294-9_38
Alisoy H, Akdeniz R, Ozbey N (2021) The visualization of solutions to electromagnetic field problems by using Matlab. Eur J Eng App Sci 4(2):61–65
Xu J (1996) Two-grid discretization techniques for linear and nonlinear PDEs. SIAM J Numer Anal 33(5):1759–1777
Chiarello E, Malagoli JA (2020) Optimal coil design of an electromagnetic actuator using particle swarm optimization. J Européen des Systèmes Automatisés 53(6):755–761
Qiu L et al (2020) Construction and analysis of two-dimensional axisymmetric model of electromagnetic tube bulging with field shaper. IEEE Access 8:113713–113719
Oyman Serteller NF (2019) Electromagnetic wave propagation equations in 2D by finite difference method: mathematical case. In: 3rd International Symposium on Multidisciplinary Studies and Innovative Technologies (ISMSIT), IEEE proceeding, pp 1–5
Chen T, Yong Wang L, Yuhai Gu, Tang CL (2019) Review on numerical analysis of electromagnetic characteristics for ferromagnetic wear debris. IET J 23:8715–8719
Buret F, Muller D, Nicolas L (1999) Computer-aided education for magnetostatics. IEEE Trans Educ 42(1):45–49
Dular P, Geuzaine C, Genon A, Legros W (1999) An evolutive software environment for teaching the finite element method in electromagnetism. IEEE Trans Magn. https://doi.org/10.1109/20.767340
Oyman Serteller NF, Kari G (2019) Understanding the foundations of electromagnetic field theory with computer software. In: IEEE Global Engineering Education Conference (EDUCON), pp 755–760
Voltmer D, Garner D (1998) A new direction for undergraduate electromagnetics. In: Proceedings Frontiers in Education Conference, pp 535 539
Osaci M, Daniela CC, Baciu I (2022) Solution for using FEMM in electrostatic problems with discrete distribution electric charge. Mod Educ Comput Sci 4:57–66
Serteller F, Atalay MA (2006) “Thermal analysis of ferromagnet actuator by finite element method. Physica B 37:366–368
Cheng Z, Takahashi N, Forghani B (2021) Modeling and application of electromagnetic and thermal field in electrical engineering, Springer, 1st ed. 2020 edition (Jan 21, 2021)
Wolfram Mathematica Software Version 12.0 (2021)
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendix
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Oyman Serteller, N.F. An Educational Study of Electromagnetic Phenomena on Ferromagnetic Structure Using a Software Environment. Proc. Natl. Acad. Sci., India, Sect. A Phys. Sci. 94, 37–45 (2024). https://doi.org/10.1007/s40010-023-00864-6
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s40010-023-00864-6