Article: JMAG A to Z
Issue 7 Understanding Conditions from A to Z
JMAG continues to evolve with each passing day. There may be functions in JMAG that even those who have already been using it will learn for the first time. There are also some useful procedures that are not well known yet. Why don't we aim at making operations more efficient by becoming familiar with new functions that we don't know about?
In this series, I would like to introduce "Things that we should know" in JMAG, as well as some advantageous applications.
Setting conditions is one job that needs particular attention when doing simulations. Often, when a simulation turns out different from real-world phenomena, or a calculation is run with improper physical conditions set, errors in conditions settings are not found until the calculation results are checked. In order to run accurate simulations efficiently, it is important to know what the conditions mean, and to set physically correct parameters.
In this and the next "A to Z," we will look at conditions that are frequently used in magnetic field analysis, their particular characteristics, and how they are used.
Conditions in JMAG-Designer can be selected from the treeview in the toolbox on the right side of the screen. Fig. 1 shows the treeview with only the boundary conditions expanded. By clicking the "Show Descriptions" checkbox at the bottom of the toolbox, you can see a short description of what each condition means. If you would like to learn more, click the "Help..." button at the lower right to open the Online Help.
Fig. 1 Conditions treeview
Boundary conditions must be set for simulations based on the Finite Element Method. If boundary conditions are not set correctly, convergence calculations can diverge, and simulation results become physically unnatural. On the other hand, by setting appropriate boundary conditions, the calculation region can be limited, making the scale of the calculation (calculation time and results file size) smaller. We will now look at the boundary conditions handled by JMAG.
Periodic Boundary (Rotation / Translation)
For cases of a geometry such as a motor, where a physical quantity's distribution is repeated periodically in the direction of rotation or translation, the Periodic Boundary conditions can be used to reduce the calculation region. Periodic Boundary conditions apply not only to geometries but also to physical quantities, so it is necessary to estimate what sort of distribution of the physical quantity will be obtained from the calculation results.
When periodic boundaries are used, simulation is carried out on only a partial region. The phenomena of the partial region under simulation are treated as repeating in the periodic direction within the phenomena of the overall region. The Rotation Periodic Boundary condition is used in cases such as a rotating machine where there is periodicity in the direction of rotation, and the Translation Periodic Boundary condition is used where there is periodicity in the direction of translation, such as in a linear motor.
There are two types of Periodic Boundary condition, called a "Periodic" Boundary condition for phenomena that are repeated the same way, and an "Antiperiodic" Boundary condition for those repeated in the reverse direction. For the 24-pole, 18-slot motor shown in Fig. 2, a reduced calculation on a 1/6 model can be done using a Periodic Boundary condition. An Antiperiodic Boundary condition can be used for a reduced calculation on a 1/4 model for the 4-pole, 12-slot motor in Fig. 3.
Fig. 2 Periodic Boundary condition in a 24-pole, 18-slot motor
Fig. 3 Periodic Boundary condition in a 4-pole, 12 slot motor
Symmetry Boundary / Natural Boundary
If a physical quantity is distributed symmetrically, such as in electromagnets and transformers, a Natural Boundary condition or a Symmetry Boundary condition can be set at the plane of symmetry, and only one side used as the calculation region. For example, looking at the geometry and magnetic field flow in an electromagnet like the one in Fig. 4, a calculation on only an upper 1/4 of the region could be done, and the results for the remaining 3/4 gotten by translating the calculation results from the first 1/4. A Symmetry Boundary condition at the plane of symmetry, or Natural Boundary condition, must be set in order to do a calculation on only a partial model like the one in Fig. 5.
Fig. 4 Electromagnet model
Fig. 5 Partial electromagnet model and Boundary conditions
In numerical analysis, a symmetry boundary condition is properly called a Dirichelt boundary condition, and a natural boundary condition a Neumann boundary condition, but they are called Symmetrical and Natural boundary conditions in JMAG to make it easier to see what they mean.
The Symmetry Boundary condition is set when the magnetic flux distribution is symmetrical on both sides of a specified face. To consider magnetic flux continuity, the specified face must be one that the magnetic flux does not cross at all. A face that magnetic flux does not cross at all can be seen as an inflow and outflow face for perpendicular electric current. Because a face with a perpendicular electric current inflow must be selected as an inflow plane in the Current condition discussed below, an inflow plane must necessarily be selected for the Symmetry Boundary condition.
The Natural Boundary condition is set when magnetic flux distribution is symmetrical on both sides of a selected face, and magnetic flux density vectors are reversed. To consider magnetic flux continuity, the face must be one that magnetic flux flows across perpendicularly.
Symmetry Boundary conditions have one more application. For example, because the magnetic field of an electromagnet set in empty space theoretically reaches to infinity, an infinitely large calculation region must be set to run a magnetic field distribution analysis. But calculations on such an enormous region would not be realistic in terms of calculation costs (calculation time, results file size, etc.) Since the magnetic field is increasingly dampened with distance from the model, it is more realistic to posit that magnetic flux is not leaking outside of a certain range, and set the calculation region as small as possible. The Symmetry Boundary condition is set as the outer limit of the calculation region as a way of defining the place outside of which magnetic flux does not leak. This is a calculation technique that is frequently used to reduce the calculation region and at the same time improve the convergence of iterative calculations. In concrete terms, even when magnetic flux spreads into space - as in an electromagnet model - if a symmetry boundary condition is set to cover space around 5 times the length of the model as in Fig. 6, there is almost no difference between the calculation and the real phenomena.
Fig. 6 Breadth of space needed for magnetic field analysis
Gap Flux Boundary
The Gap Flux Boundary condition is a specialized condition, used when the rotor inside or outside the gap in a rotating machine is modeled separately and the amount of magnetic flux flowing into the gap is applied from a different analysis - as in an analysis of 3D eddy currents generated inside magnets - and thus has limited applications.
For example, when running magnet eddy current analysis in an IPM motor like the one in Fig. 7, simply running a 3D transient response analysis will result in high calculation costs. However, in an eddy current analysis using The Gap Flux Boundary condition, with only 2D analysis results from the IPM model in Fig. 7 and by creating a 3D model of the rotor as seen in Fig. 8, a magnet eddy current calculation as seen in Fig. 9 can be done in a few minutes or a few hours.
However, there are several points to keep in mind when using the Gap Flux Boundary condition, such as that the other analysis referred to must be 2D, the rotor must be made as a solid model, etc.
Fig. 7 IPM motor model
Fig. 8 3D partial model needed for a magnet eddy current analysis using the Gap Flux Boundary condition
Fig. 9 Reduction in magnet eddy currents from division of magnets
In cases where a mover changes from moment to moment, such as a running electric motor, it is necessary to prepare a mesh model with separate mover and stator. The Slide condition connects the area of contact between mover and stator. Users of JMAG's automatic mesh generation function do not need to pay attention to the Slide condition because it is automatically added when generating a mesh. However, when a variety of rotor and stator mesh models have been created in advance and their various combinations are being evaluated, after merging each mesh model, the Slide condition must be set for the contact area between rotor and stator.
The Slide condition can only be used on models in which the mover--either a cylindrical face or a flat face--and the stator can be completely separated. For spindle motors in which the rotation axis and the magnets of the outer rotor are bound together in the case, since the mover and the stator cannot be completely separated at a cylindrical face, the Slide condition cannot be used. In these cases, the motion can be handled using the Patch Mesh Option, as discussed later.
If the Slide condition is not set, the model will be treated as if the stator and mover are completely separate, and calculation results will be as though magnetic flux were blocked in the gap. For the Slide condition, the mesh must be uniform on the specified face in the rotational or translational direction as shown in Fig. 10. If the mesh is not uniform, as in Fig. 11, there will not be a facing element on the stator side when the rotor turns, and calculation errors will occur.
Fig. 10 The slide face is uniform in the rotation direction
Fig. 11 The slide face is not uniform in the rotation direction
JMAG provides a variety of ways of defining current depending on its use. Below are descriptions of the different ways of defining current and their particular characteristics.
This is the most intuitive way of defining current in JMAG. It can be used by simply setting the current value flowing in the coil, the number of coil turns, and the direction of current flow. The number of coil turns is entered because the coil is treated together as one bundle, rather than each wire in the coil as a separate object. When an inflow and outflow face appears on a model's sectional face (the specified face for a Symmetry Boundary condition), as in a partial model, the current direction is determined by setting the inflow face; otherwise current direction in the coil part is set automatically by JMAG. When a current inflow face cannot be set, as in a complete model, if the current direction is set for a point inside the coil, JMAG will automatically set the current direction for the entire coil.
One particular characteristic to keep in mind when using the Current condition is that a bias can arise in the current inside the specified part (the coil). In reality, because the current in a coil flows in individual wires, this bias does not occur when looking at a section of the coil, but because the coil is treated as one block, or one big wire, the current tends toward the side where it flows more easily. Where the magnetic flux distribution near the coil does not have a particular effect on analysis results for the whole model, the current's bias under the Current condition does not cause problems, and so the Current condition can be used in most cases for magnetic field analysis.
When looking at magnetic flux distribution around the coils, particularly when the coil current has to flow uniformly, the Current Density condition can be used instead of the Current condition. To set the current density value [A/m^2] in the Current Density condition when using it for a coil, the current density value must first be converted from the current value and coil bundle cross sectional area. Also, to set the direction of current flow as a vector, in cases where the direction of current flow is likely to change, separate Current Density conditions must be set for each.
FEM Coil / FEM Conductor
The Current and Current Density conditions can be used when the current flowing in the coil is known, but FEM Coil and FEM Conductor are used in situations where the current changes from moment to moment with responses inside a circuit. FEM Coil and FEM Conductor, like the Current and Current Density conditions, are linked to circuit components in JMAG's Circuit Editor when set for an analysis model. In magnetic field analysis, the magnetic field effects felt by FEM coils and FEM conductors are reflected in the circuit components as inductance. In other words, coupled magnetic field and circuit analysis is run with FEM Coil and FEM Conductor as shown in Fig. 12.
Fig. 12 Coupling of magnetic field and circuit analysis
The difference between FEM Coil and FEM Conductor lies in whether the direction or distribution of current in a coil is influenced by the magnetic field acting on the coil. For FEM Coil, the same bias in distribution as in the Current condition occurs, but the current direction itself is not affected by an external magnetic field. In contrast, current direction and distribution are determined with influence from the external magnetic field in FEM Conductor. When carrying out an analysis of the inclination of current distribution generated inside the wires of a coil or the wires' proximity effects on each other, the calculation can be done by modeling each wire separately and setting FEM Conductor for each wire.
Motion must be dealt with in most magnetic field analyses, and JMAG provides many different ways of defining motion. I will now look at the different types of motion handled by JMAG.
Motion (Rotation) / Motion (Translation)
In JMAG, simple Rotation and Translation Motion can be used without any particular restrictions. As well as motion type, in addition to constant speed, a point sequence can be set and the number of rotations, speed, etc. can be changed for each interval. Also, through Equation of Motion, it is possible to define motion that changes position moment to moment from the electromagnetic force calculated in magnetic field analysis. In such cases, external loads such as load torque and friction torque can be set at the same time.
User subroutines can be used to handle more complicated forms of motion. By customizing a part of the source code released by JMAG and rebuilding JMAG's solver module, a user can create a custom solver module to define a unique motion. However, please be aware that a programming environment is needed for this.
As an example of motion other than the simple rotation or translation movement of a single mover, in the case of analysis of a rotating machine, the eccentric motion when a rotor's center deviates from the center of rotation (as shown in Fig. 13) can be handled.
Fig. 13 Motion including eccentricity
For Motion in multiple movers, 2D analysis can be done using FEM + BEM as analysis methods. 3D analysis is possible using a method of remeshing at each analysis step, called the Patch Mesh Option.
Cases in which a mover and a stator make momentary surface contact due to motion can only be handled in 3D analysis.
In magnetic field analysis, electromagnetic force and loss from the magnetic field distribution obtained at each analysis step are needed for post-processing. We will now look at the characteristics of physical quantities obtained as Output.
Electromagnetic Force / Torque
There are three methods of calculating electromagnetic force: Nodal Force, Surface Force, and Lorentz Force. Nodal Force and Surface Force are obtained from magnetic flux density, and Lorentz Force from current density. The calculation precision of Nodal Force and Surface Force are in correlation to the square of the calculation precision of the magnetic flux density value. However, the calculation precision of Lorentz Force correlates with the calculation precision of the current density itself. Therefore, Nodal Force and Surface Force require a higher level of calculation precision than Lorentz Force, and errors can occur more easily. When seeking the force working on a coil, it is generally easier to calculate with higher precision by selecting Lorentz Force.
Nodal Force is the most commonly used method of calculating electromagnetic force. It is limited by being unable to obtain the attraction force of contacting objects. In such cases, Surface Force is used.
Surface Force can be used in the same way as Nodal Force, and the attraction force of contacting objects can be calculated by setting the calculation region as shown in Fig. 14.
Fig. 14 Setting the calculation region for Surface Force when seeking
the attraction force of contacting magnetic materials.
However, when Surface Force calculation is set for surfaces in which the magnetic flux distribution changes drastically, calculation accuracy can become noticeably worse. Because of this, we recommend that an air region be laid over the electromagnetic force calculation region, and the Surface Force calculation be set for the air region's surface.
This is set when the heating in magnetic field analysis is transferred to thermal analysis. This condition is only used in coupled magnetic field and thermal analysis.
As mentioned earlier, the current distribution can become biased when using the FEM Coil condition. If this biased current distribution is used as the basis for finding joule loss and transferred as a heat source to a thermal analysis, the temperature of individual wires in the coil--which actually generate heat uniformly--can be far off. In the Heat Source condition, a trick to avoid this problem is, taking into account the different characteristics of magnetic field analysis and thermal analysis, to use the average of the joule loss obtained from magnetic field analysis inside the coil to transfer as a heat source in thermal analysis.
Iron loss Calculation
Iron loss is calculated in post-processing based on the magnetic flux density distribution obtained in magnetic field analysis. Because of this, the effects of iron loss on torque are not accounted for, and strictly energy balance is not achieved. However, hysteresis loss, which is normally extremely hard to calculate in magnetic field analysis, can be estimated with a high degree of precision. Iron loss is calculated by separating hysteresis loss and joule loss, so it is useful for comparing the proportion of each of these. Also, because it can be verified as a distribution in JMAG, it is possible to see in which areas a large amount of iron loss is generated.
Iron Loss is calculated in reference to highly precise iron loss data provided by materials manufacturers. Further, users can add and create their own data for their calculations. The calculation method can be chosen from a number of options, and a suitable method found for the analysis target.
This calculates the amount of magnetic flux passing through a face. When the Current condition or FEM Coil condition is set, the magnetic flux linked to them is automatically calculated in JMAG. If you forget to apply the Magnetic Flux condition in advance, JMAG-Designer v12.0 allows later recalculation using Results Calculation, as shown in Fig. 15.
Fig. 15 Addition of magnetic flux calculation
Here, I have discussed the meaning and usage of some of the more important and commonly used conditions in magnetic flux analysis. There are still many conditions that I would like to explain, and I will talk about them next time. Be sure not to miss it.