PDF

Permanent Magnet
Introduction
This example shows how to model the magnetic field surrounding a permanent magnet. It also computes the force with which it acts on a nearby iron rod. Thanks to the symmetry of the geometry and the antisymmetry of the magnetic field, only one fourth of the geometry needs to be modeled.
Figure 1: A full 3D view of the geometry. Left-right and top-down symmetry is used to minimize the problem size.
Model Definition
In a current free region, where
it is possible to define the scalar magnetic potential, Vm, from the relation
This is analogous to the definition of the electric potential for static electric fields.
Using the constitutive relation between the magnetic flux density and magnetic field
together with the equation
you can derive an equation for Vm,
The model uses this equation by selecting the Magnetic Fields, No Currents interface from the AC/DC Module.
Boundary Conditions
The magnetic field is symmetric with respect to the xy-plane and antisymmetric with respect to the xz-plane. These planes therefore serve as exterior boundaries to the geometry.
On the symmetry plane, the magnetic field is tangential to the boundary. This is described by the Magnetic Insulation condition:
On the antisymmetry plane, the magnetic field is perpendicular to the boundary. This condition is represented by a constant magnetic scalar potential. The model uses the Zero Magnetic Scalar Potential condition.
If the air box is sufficiently large, the boundary condition used on its remaining exterior boundaries has little influence on the field in the vicinity of the magnet. Although an infinite element domain would give the very best results, this model uses the magnetic insulation condition for convenience.
Results and Discussion
The force on the rod is calculated internally as an integral of the surface stress tensor over all boundaries of the rod. The expression for the stress tensor reads
where n1 is the boundary normal pointing out from the rod and T2 the stress tensor of air. The integration gives 1.52 N, which corresponds to one quarter of the rod. The actual force on the rod is therefore four times this value, or 6.1 N.
Application Library path: ACDC_Module/Magnetostatics/permanent_magnet
Modeling Instructions
From the File menu, choose New.
New
In the New window, click  Model Wizard.
Model Wizard
1
In the Model Wizard window, click  3D.
2
In the Select Physics tree, select AC/DC>Magnetic Fields, No Currents>Magnetic Fields, No Currents (mfnc).
3
Click Add.
4
Click  Study.
5
In the Select Study tree, select General Studies>Stationary.
6
Geometry 1
Import 1 (imp1)
1
In the Home toolbar, click  Import.
2
In the Settings window for Import, locate the Import section.
3
Click Browse.
4
5
Click Import.
The imported geometry contains the permanent magnet and the rod that it is acting on. The following instructions show you how to create the air box and delete the part of the geometry that you do not want to include in the model.
Block 1 (blk1)
1
In the Geometry toolbar, click  Block.
2
In the Settings window for Block, locate the Size and Shape section.
3
In the Width text field, type 0.25.
4
In the Depth text field, type 0.1.
5
In the Height text field, type 0.1.
6
Locate the Position section. In the x text field, type -0.1.
7
Right-click Block 1 (blk1) and choose Build Selected.
The air box now covers only the parts of the magnet and the rod that you want to include in the model. Perform a Boolean geometry operation to get rid of the superfluous parts.
Compose 1 (co1)
1
In the Geometry toolbar, click  Booleans and Partitions and choose Compose.
2
Click in the Graphics window and then press Ctrl+A to select both objects.
3
In the Settings window for Compose, locate the Compose section.
4
In the Set formula text field, type blk1+imp1*blk1.
5
Click  Build All Objects.
6
Click the  Zoom Extents button in the Graphics toolbar.
The geometry now contains the air volume and one fourth of the imported objects.
Materials
Iron
1
In the Model Builder window, under Component 1 (comp1) right-click Materials and choose Blank Material.
2
Right-click Material 1 (mat1) and choose Rename.
3
In the Rename Material dialog box, type Iron in the New label text field.
4
5
6
In the Settings window for Material, locate the Material Contents section.
7
Air
1
In the Model Builder window, right-click Materials and choose Blank Material.
2
Right-click Material 2 (mat2) and choose Rename.
3
In the Rename Material dialog box, type Air in the New label text field.
4
5
6
In the Settings window for Material, locate the Material Contents section.
7
Magnetic Fields, No Currents (mfnc)
Magnetic Flux Conservation 2
1
In the Model Builder window, under Component 1 (comp1) right-click Magnetic Fields, No Currents (mfnc) and choose Magnetic Flux Conservation.
2
3
In the Settings window for Magnetic Flux Conservation, locate the Constitutive Relation B-H section.
4
From the Magnetization model list, choose Magnetization.
5
Specify the M vector as
All exterior boundaries are magnetically insulated by default. Use the Zero Magnetic Scalar Potential condition on those boundaries where antisymmetry holds.
Zero Magnetic Scalar Potential 1
1
In the Physics toolbar, click  Boundaries and choose Zero Magnetic Scalar Potential.
2
Next, add a force computation on the rod.
Force Calculation 1
1
In the Physics toolbar, click  Domains and choose Force Calculation.
2
3
In the Settings window for Force Calculation, locate the Force Calculation section.
4
In the Force name text field, type rod.
Mesh 1
Free Tetrahedral 1
To get an accurate force computation, you need a particularly fine mesh on the rod. It also makes sense to use a fine mesh in the magnet and its iron core, as this is where the magnetic field will be the strongest.
In the Mesh toolbar, click  Free Tetrahedral.
Size
1
In the Model Builder window, click Size.
2
In the Settings window for Size, locate the Element Size section.
3
From the Predefined list, choose Fine.
Size 1
1
In the Model Builder window, right-click Free Tetrahedral 1 and choose Size.
2
In the Settings window for Size, locate the Geometric Entity Selection section.
3
From the Geometric entity level list, choose Domain.
4
5
Locate the Element Size section. Click the Custom button.
6
Locate the Element Size Parameters section. Select the Maximum element size check box.
7
8
Click  Build All.
Study 1
1
In the Model Builder window, click Study 1.
2
In the Settings window for Study, locate the Study Settings section.
3
Clear the Generate default plots check box.
4
In the Home toolbar, click  Compute.
Results
3D Plot Group 1
In the Home toolbar, click  Add Plot Group and choose 3D Plot Group.
Slice 1
1
Right-click 3D Plot Group 1 and choose Slice.
2
In the Settings window for Slice, click Replace Expression in the upper-right corner of the Expression section. From the menu, choose Component 1 (comp1)>Magnetic Fields, No Currents>Magnetic>mfnc.normB - Magnetic flux density norm - T.
3
Locate the Plane Data section. From the Plane list, choose xy-planes.
4
From the Entry method list, choose Coordinates.
5
In the z-coordinates text field, type 0.005.
6
Locate the Coloring and Style section. From the Color table list, choose Thermal.
7
In the 3D Plot Group 1 toolbar, click  Plot.
The plot shows the magnitude of the flux density just above the symmetry plane. Add an arrow plot to see its direction.
Arrow Volume 1
1
In the Model Builder window, right-click 3D Plot Group 1 and choose Arrow Volume.
2
In the Settings window for Arrow Volume, click Replace Expression in the upper-right corner of the Expression section. From the menu, choose Component 1 (comp1)>Magnetic Fields, No Currents>Magnetic>mfnc.Bx,...,mfnc.Bz - Magnetic flux density.
3
Locate the Arrow Positioning section. Find the x grid points subsection. In the Points text field, type 100.
4
Find the y grid points subsection. In the Points text field, type 50.
5
Find the z grid points subsection. From the Entry method list, choose Coordinates.
6
In the Coordinates text field, type 0.0051.
7
In the 3D Plot Group 1 toolbar, click  Plot.
The plot shows only the quarter of the geometry used for the computation.
Introduce additional mirror datasets to plot the solution in the complete geometry.
Symmetry Condition
1
In the Results toolbar, click  More Datasets and choose Mirror 3D.
2
In the Settings window for Mirror 3D, type Symmetry Condition in the Label text field.
3
Locate the Plane Data section. From the Plane list, choose xy-planes.
Antisymmetry Condition
1
In the Results toolbar, click  More Datasets and choose Mirror 3D.
2
In the Settings window for Mirror 3D, type Antisymmetry Condition in the Label text field.
3
Locate the Data section. From the Dataset list, choose Symmetry Condition.
4
Locate the Plane Data section. From the Plane list, choose zx-planes.
5
Click to expand the Advanced section. From the Vector transformation list, choose Antisymmetric.
3D Plot Group 1
1
In the Model Builder window, click 3D Plot Group 1.
2
In the Settings window for 3D Plot Group, locate the Data section.
3
From the Dataset list, choose Antisymmetry Condition.
4
In the 3D Plot Group 1 toolbar, click  Plot.
Arrow Volume 1
1
In the Model Builder window, click Arrow Volume 1.
2
In the Settings window for Arrow Volume, click Replace Expression in the upper-right corner of the Expression section. From the menu, choose Component 1 (comp1)>Magnetic Fields, No Currents>Magnetic>mfnc.Bx,...,mfnc.Bz - Magnetic flux density.
3
In the 3D Plot Group 1 toolbar, click  Plot.
3D Plot Group 1
Finally, use Global Evaluation to evaluate the force on the rod.
Global Evaluation 1
1
In the Results toolbar, click  Global Evaluation.
2
In the Settings window for Global Evaluation, click Replace Expression in the upper-right corner of the Expressions section. From the menu, choose Component 1 (comp1)>Magnetic Fields, No Currents>Mechanical>Electromagnetic force - N>mfnc.Forcex_rod - Electromagnetic force, x component.
The variable containing the force on a quarter of the rod will be added to the Expressions table. Multiply this value by 4 to compute the total force on the rod.
3
In the Expression column, change the expression to mfnc.Forcex_rod*4.
4
In the Description column, write Total force on the rod.
5
Click  Evaluate.
The total force on the rod evaluates to 6.1 N.