You are on page 1of 10

# Solved with COMSOL Multiphysics 4.

1

P e r m a ne nt M a g net
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

∇×H = 0

it is possible to define the scalar magnetic potential, Vm, from the relation

H = – ∇V m

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

B = µ0 ( H + M )

PERMANENT MAGNET | 1

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.( H ⋅ B )n 1 + ( n 1 ⋅ H )B 2 where n1 is the boundary normal pointing out from the rod and T2 the stress tensor of air. This condition is represented by a constant magnetic scalar potential. which corresponds to one quarter of the rod.1 together with the equation ∇⋅B = 0 you can derive an equation for Vm.53 N. These planes therefore serve as exterior boundaries to the geometry. – ∇ ⋅ ( µ 0 ∇V m – µ 0 M 0 ) = 0 The model uses this equation by selecting the Magnetic Fields. 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 (see “Infinite Elements” on page 29 in the AC/ DC Module User’s Guide) would give the very best results. No Currents physics interface from the AC/DC Module. On the symmetry plane. The actual force on the rod is therefore four times this value. Boundary Conditions The magnetic field is symmetric with respect to the xy-plane and antisymmetric with respect to the xz-plane. the magnetic field is perpendicular to the boundary. this model uses the magnetic insulation condition for convenience. If the air box is sufficiently large. This is described by the Magnetic Insulation condition: n ⋅ ( µ 0 ∇V m – µ 0 M 0 ) = n ⋅ B = 0 On the antisymmetry plane. The integration gives 1.11 N. 2 | PERMANENT MAGNET . Solved with COMSOL Multiphysics 4. The expression for the stress tensor reads 1 T n 1 T 2 = – --. the magnetic field is tangential to the boundary. The model uses the Zero Magnetic Scalar Potential condition. or 6.

1 Model Library path: ACDC_Module/Tutorial_Models/permanent_magnet Modeling Instructions MODEL WIZARD 1 Go to the Model Wizard window. 3 In the Add Physics tree. GEOMETRY 1 Import 1 1 In the Model Builder window. 3 Locate the Import section. 6 Click Finish.mphbin. select Preset Studies>Stationary. 4 Browse to the model’s Model Library folder and double-click the file permanent_magnet. Solved with COMSOL Multiphysics 4. Click the Browse button. 2 Go to the Settings window for Import. 4 Click Next. 2 Click Next. PERMANENT MAGNET | 3 . 5 In the Studies tree. No Currents (mfnc). right-click Model 1>Geometry 1 and choose Import. select AC/DC>Magnetic Fields.

Perform a Boolean geometry operation to get rid of the superfluous parts. type -0.25. 3 Locate the Size and Shape section. 4 In the Depth edit field. Block 1 1 In the Model Builder window. 5 In the Height edit field. In the Width edit field.1. In the x edit field.1 5 Click the Import button. The air box now covers only the parts of the magnet and the rod that you want to include in the model. type 0. type 0. type 0. 4 | PERMANENT MAGNET .1. The imported geometry contains the permanent magnet and the rod that it is acting on. 2 Go to the Settings window for Block. Solved with COMSOL Multiphysics 4. right-click Geometry 1 and choose Block. right-click Geometry 1 and choose Compose.1. Compose 1 1 In the Model Builder window. 7 Click the Build All button. 6 Locate the Position section. 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.

2 Right-click Material 1 and choose Rename. MATERIALS Material 1 1 In the Model Builder window. 3 Go to the Settings window for Compose. 5 Select Domains 2 and 4 only. PERMANENT MAGNET | 5 . The geometry now contains the air volume and one fourth of the imported objects. 5 Click the Build All button. 6 Click the Zoom Extents button on the Graphics toolbar.1 2 Select the objects imp1 and blk1 only. Solved with COMSOL Multiphysics 4. 4 Locate the Compose section. 6 Go to the Settings window for Material. type blk1+imp1*blk1. 3 Go to the Rename Material dialog box and type Iron in the New name edit field. 4 Click OK. In the Set formula edit field. right-click Model 1>Materials and choose Material.

2 Right-click Material 2 and choose Rename. From the Constitutive relation list. 6 Go to the Settings window for Material. 3 Go to the Rename Material dialog box and type Air in the New name edit field. enter the following settings: PROPERTY NAME VALUE Relative permeability mur 1 MAGNETIC FIELDS. 7 Locate the Material Contents section.1 7 Locate the Material Contents section. 3 Go to the Settings window for Magnetic Flux Conservation. 5 Select Domain 1 only. 5 Specify the M vector as 750[kA/m] x 0 y 0 z All exterior boundaries are magnetically insulated by default. NO CURRENTS Magnetic Flux Conservation 2 1 In the Model Builder window. select Magnetization. right-click Model 1>Magnetic Fields. In the Material Contents table. enter the following settings: PROPERTY NAME VALUE Relative permeability mur 4000 Material 2 1 In the Model Builder window. right-click Materials and choose Material. 4 Locate the Magnetic Field section. Use the Zero potential condition on those boundaries where antisymmetry holds. 6 | PERMANENT MAGNET . No Currents and choose Magnetic Flux Conservation. In the Material Contents table. 4 Click OK. Solved with COMSOL Multiphysics 4. 2 Select Domain 3 only.

Click the Custom button. click Size. type 0. Solved with COMSOL Multiphysics 4. 2 Go to the Settings window for Size. 5 Locate the Element Size section. you need a particularly fine mesh on the rod. 6 Locate the Element Size Parameters section. MESH 1 To get an accurate force computation. In the Force name edit field. It also makes sense to use a fine mesh in the magnet and its iron core. From the Predefined list. Size 1 In the Model Builder window. as this is where the magnetic field will be the highest. Size 1 1 In the Model Builder window. select Domain. 7 In the associated edit field.0025. 1 In the Model Builder window.1 Zero Magnetic Scalar Potential 1 1 In the Model Builder window. Force Calculation 1 1 In the Model Builder window. PERMANENT MAGNET | 7 . 8 In the Model Builder window. right-click Free Tetrahedral 1 and choose Size. 4 Locate the Force Calculation section. 3 Locate the Element Size section. From the Geometric entity level list. and 24 only. 2 Select Domain 2 only. No Currents and choose Force Calculation. 8. No Currents and choose Zero Magnetic Scalar Potential. right-click Model 1>Mesh 1 and choose Free Tetrahedral. type rod. add a force computation on the rod. Select the Maximum element size check box. 2 Go to the Settings window for Size. select Fine. right-click Magnetic Fields. Next. 2 Select Boundaries 2. right-click Magnetic Fields. 3 Locate the Geometric Scope section. right-click Mesh 1 and choose Build All. 4 Select Domains 2–4 only. 3 Go to the Settings window for Force Calculation.

type 100. RESULTS 3D Plot Group 1 The default plot shows the magnetic scale potential on the surface of the air box. It looks very uniform from the front. you can see the direction too. 8 Locate the Coloring and Style section. From the Entry method list. 14 Locate the Arrow Positioning section. right-click 3D Plot Group 2 and choose Arrow Volume. 3D Plot Group 2 1 In the Model Builder window. No Currents>Magnetic flux density (mfnc. With an arrow plot. select xy-planes. right-click Study 1 and choose Compute. 2 Go to the Settings window for Slice. select Coordinates. 10 In the Model Builder window. type 0. click Replace Expression. 15 Find the y grid points subsection.Bz). 17 In the Coordinates edit field. 16 Find the z grid points subsection. In the Points edit field. choose Magnetic Fields. select Thermal.0051. 9 Click the Plot button.. Solved with COMSOL Multiphysics 4.. mfnc. 7 In the z-coordinate edit field. 5 Locate the Plane Data section. Find the x grid points subsection.. select Coordinates. You are now looking at the magnitude of the flux density just above the symmetry plane.. click Replace Expression. From the Plane list. type 0. 13 From the menu. From the Color table list. but if you rotate the box you can see a distribution. type 50. 6 From the Entry method list.Bx. choose Magnetic Fields.normB). 8 | PERMANENT MAGNET .005. 12 In the upper-right corner of the Expression section. No Currents>Magnetic flux density norm (mfnc. 4 From the menu. click Slice 1. In the Points edit field. 3 In the upper-right corner of the Expression section. 11 Go to the Settings window for Arrow Volume.1 STUDY 1 In the Model Builder window.

The force on a quarter of the rod evaluates to 1. 4 From the menu. click Replace Expression.1 18 Click the Plot button.Forcex_rod). choose Magnetic Fields. 2 Go to the Settings window for Global Evaluation. Finally. No Currents>Electromagnetic force>Electromagnetic force. use Global Evaluation to evaluate the force on the rod. 5 Click the Evaluate button. x component (mfnc. 3 In the upper-right corner of the Expression section. Derived Values 1 In the Model Builder window. right-click Results>Derived Values and choose Global Evaluation. PERMANENT MAGNET | 9 . Solved with COMSOL Multiphysics 4.53 N.

Solved with COMSOL Multiphysics 4.1 10 | PERMANENT MAGNET .