Transcription

Finite Element Method MagneticsVersion 4.2User’s ManualOctober 25, David

Contents1 Introduction1.1 Overview . . . . . . . . . . . . . . . . . .1.2 Relevant Partial Differential Equations . . .1.2.1 Magnetostatic Problems . . . . . .1.2.2 Time-Harmonic Magnetic Problems1.2.3 Electrostatic Problems . . . . . . .1.2.4 Heat Flow Problems . . . . . . . .1.2.5 Current Flow Problems . . . . . . .1.3 Boundary Conditions . . . . . . . . . . . .1.3.1 Magnetic and Electrostatic BCs . .1.3.2 Heat Flow BCs . . . . . . . . . . .1.4 Finite Element Analysis . . . . . . . . . . .2 Interactive Shell2.1 DXF Import/Export . . . . . . . . . . . . . . .2.2 Magnetics Preprocessor . . . . . . . . . . . . .2.2.1 Preprocessor Drawing Modes . . . . .2.2.2 Keyboard and Mouse Commands . . .2.2.3 View Manipulation . . . . . . . . . . .2.2.4 Grid Manipulation . . . . . . . . . . .2.2.5 Edit . . . . . . . . . . . . . . . . . . .2.2.6 Problem Definition . . . . . . . . . . .2.2.7 Definition of Properties . . . . . . . . .2.2.8 Exterior Region . . . . . . . . . . . . .2.2.9 Analysis Tasks . . . . . . . . . . . . .2.3 Magnetics Postprocessor . . . . . . . . . . . .2.3.1 Postprocessor modes . . . . . . . . . .2.3.2 View and Grid Manipulation . . . . . .2.3.3 Keyboard Commands . . . . . . . . . .2.3.4 Mouse Actions . . . . . . . . . . . . .2.3.5 Miscellaneous Useful View Commands2.3.6 Contour Plot . . . . . . . . . . . . . .2.3.7 Density Plot . . . . . . . . . . . . . . .2.3.8 Vector Plots . . . . . . . . . . . . . . .2.3.9 Line Plots . . . . . . . . . . . . . . . 3636363737383838

2.3.10 Line Integrals . . . . . . .2.3.11 Block Integrals . . . . . .2.3.12 Force/Torque Calculation .2.3.13 Circuit Results . . . . . .2.4 Electrostatics Preprocessor . . . .2.4.1 Problem Definition . . . .2.4.2 Definition of Properties . .2.4.3 Analysis Tasks . . . . . .2.5 Electrostatics Postprocessor . . . .2.5.1 Contour Plot . . . . . . .2.5.2 Density Plot . . . . . . . .2.5.3 Vector Plots . . . . . . . .2.5.4 Line Plots . . . . . . . . .2.5.5 Line Integrals . . . . . . .2.5.6 Block Integrals . . . . . .2.5.7 Force/Torque Calculation .2.5.8 Conductor Results . . . .2.6 Heat Flow Preprocessor . . . . . .2.6.1 Problem Definition . . . .2.6.2 Definition of Properties . .2.6.3 Analysis Tasks . . . . . .2.7 Heat Flow Postprocessor . . . . .2.7.1 Contour Plot . . . . . . .2.7.2 Density Plot . . . . . . . .2.7.3 Vector Plots . . . . . . . .2.7.4 Line Plots . . . . . . . . .2.7.5 Line Integrals . . . . . . .2.7.6 Block Integrals . . . . . .2.7.7 Conductor Results . . . .2.8 Current Flow Preprocessor . . . .2.8.1 Problem Definition . . . .2.8.2 Definition of Properties . .2.8.3 Analysis Tasks . . . . . .2.9 Current Flow Postprocessor . . . .2.9.1 Contour Plot . . . . . . .2.9.2 Density Plot . . . . . . . .2.9.3 Vector Plots . . . . . . . .2.9.4 Line Plots . . . . . . . . .2.9.5 Line Integrals . . . . . . .2.9.6 Block Integrals . . . . . .2.9.7 Conductor Results . . . .2.10 Exporting of Graphics . . . . . . 7676869707070717276777778787879808081

3 Lua Scripting3.1 What Lua Scripting? . . . . . . . . . . . . .3.2 Common Lua Command Set . . . . . . . . .3.3 Magnetics Preprocessor Lua Command Set .3.3.1 Object Add/Remove Commands . . .3.3.2 Geometry Selection Commands . . .3.3.3 Object Labeling Commands . . . . .3.3.4 Problem Commands . . . . . . . . .3.3.5 Mesh Commands . . . . . . . . . . .3.3.6 Editing Commands . . . . . . . . . .3.3.7 Zoom Commands . . . . . . . . . . .3.3.8 View Commands . . . . . . . . . . .3.3.9 Object Properties . . . . . . . . . . .3.3.10 Miscellaneous . . . . . . . . . . . .3.4 Magnetics Post Processor Command Set . . .3.4.1 Data Extraction Commands . . . . .3.4.2 Selection Commands . . . . . . . . .3.4.3 Zoom Commands . . . . . . . . . . .3.4.4 View Commands . . . . . . . . . . .3.4.5 Miscellaneous . . . . . . . . . . . .3.5 Electrostatics Preprocessor Lua Command Set3.5.1 Object Add/Remove Commands . . .3.5.2 Geometry Selection Commands . . .3.5.3 Object Labeling Commands . . . . .3.5.4 Problem Commands . . . . . . . . .3.5.5 Mesh Commands . . . . . . . . . . .3.5.6 Editing Commands . . . . . . . . . .3.5.7 Zoom Commands . . . . . . . . . . .3.5.8 View Commands . . . . . . . . . . .3.5.9 Object Properties . . . . . . . . . . .3.5.10 Miscellaneous . . . . . . . . . . . .3.6 Electrostatics Post Processor Command Set .3.6.1 Data Extraction Commands . . . . .3.6.2 Selection Commands . . . . . . . . .3.6.3 Zoom Commands . . . . . . . . . . .3.6.4 View Commands . . . . . . . . . . .3.6.5 Miscellaneous . . . . . . . . . . . .3.7 Heat Flow Preprocessor Lua Command Set .3.7.1 Object Add/Remove Commands . . .3.7.2 Geometry Selection Commands . . .3.7.3 Object Labeling Commands . . . . .3.7.4 Problem Commands . . . . . . . . .3.7.5 Mesh Commands . . . . . . . . . . .3.7.6 Editing Commands . . . . . . . . . .3.7.7 Zoom Commands . . . . . . . . . . 13114115115115116

3.7.8 View Commands . . . . . . . . . . .3.7.9 Object Properties . . . . . . . . . . .3.7.10 Miscellaneous . . . . . . . . . . . .3.8 Heat Flow Post Processor Command Set . . .3.8.1 Data Extraction Commands . . . . .3.8.2 Selection Commands . . . . . . . . .3.8.3 Zoom Commands . . . . . . . . . . .3.8.4 View Commands . . . . . . . . . . .3.8.5 Miscellaneous . . . . . . . . . . . .3.9 Current Flow Preprocessor Lua Command Set3.9.1 Object Add/Remove Commands . . .3.9.2 Geometry Selection Commands . . .3.9.3 Object Labeling Commands . . . . .3.9.4 Problem Commands . . . . . . . . .3.9.5 Mesh Commands . . . . . . . . . . .3.9.6 Editing Commands . . . . . . . . . .3.9.7 Zoom Commands . . . . . . . . . . .3.9.8 View Commands . . . . . . . . . . .3.9.9 Object Properties . . . . . . . . . . .3.9.10 Miscellaneous . . . . . . . . . . . .3.10 Current Flow Post Processor Command Set .3.10.1 Data Extraction Commands . . . . .3.10.2 Selection Commands . . . . . . . . .3.10.3 Zoom Commands . . . . . . . . . . .3.10.4 View Commands . . . . . . . . . . .3.10.5 Miscellaneous . . . . . . . . . . . 301301301321331341361371371394 Mathematica Interface1415 ActiveX Interface1436 Numerical Methods6.1 Finite Element Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.2 Linear Solvers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.3 Field Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144144144145A AppendixA.1 Modeling Permanent Magnets . . . . . .A.2 Bulk Lamination Modeling . . . . . . . .A.3 Open Boundary Problems . . . . . . . . .A.3.1 Truncation of Outer Boundaries .A.3.2 Asymptotic Boundary ConditionsA.3.3 Kelvin Transformation . . . . . .A.4 Nonlinear Time Harmonic Formulation .1491491521551551551581605.

Chapter 1IntroductionFEMM is a suite of programs for solving low frequency electromagnetic problems on two-dimensionalplanar and axisymmetric domains. The program currently addresses linear/nonlinear magnetostatic problems, linear/nonlinear time harmonic magnetic problems, linear electrostatic problems,and steady-state heat flow problems.FEMM is divided into three parts: Interactive shell (femm.exe). This program is a Multiple Document Interface pre-processorand a post-processor for the various types of problems solved by FEMM. It contains a CADlike interface for laying out the geometry of the problem to be solved and for defining material properties and boundary conditions. Autocad DXF files can be imported to facilitatethe analysis of existing geometries. Field solutions can be displayed in the form of contourand density plots. The program also allows the user to inspect the field at arbitrary points, aswell as evaluate a number of different integrals and plot various quantities of interest alonguser-defined contours. triangle.exe. Triangle breaks down the solution region into a large number of triangles,a vital part of the finite element process. This program was written by Jonathan Shewchukand is available Solvers (fkern.exe for magnetics; belasolv for electrostatics); hsolv for heat flow problems; and csolv for current flow problems. Each solver takes a set of data files that describeproblem and solves the relevant partial differential equations to obtain values for the desiredfield throughout the solution domain.The Lua scripting language is integrated into the interactive shell. Unlike previous versions ofFEMM (i.e. v3.4 and lower), only one instance of Lua is running at any one time. This singleinstance of Lua can both build and analyze a geometry and evaluate the post-processing results,simplifying the creation of various sorts of “batch” runs.In addition, all edit boxes in the user interface are parsed by Lua, allowing equations or mathematical expressions to be entered into any edit box in lieu of a numerical value. In any edit box inFEMM, a selected piece of text can be evaluated by Lua via a selection on the right mouse buttonmenu.The purpose of this document is to give a brief explanation of the kind of problems solved byFEMM and to provide a fairly detailed documentation of the programs’ use.6

1.1 OverviewThe goal of this section is to give the user a brief description of the problems that FEMM solves.This information is not really crucial if you are not particularly interested in the approach thatFEMM takes to formulating the problems. You can skip most of Overview, but take a look atSection 1.3. This section contains some important pointers about assigning enough boundaryconditions to get a solvable problem.Some familiarity with electromagnetism and Maxwell’s equations is assumed, since a review ofthis material is beyond the scope of this manual. However, the author has found several referencesthat have proved useful in understanding the derivation and solution of Maxwell’s equations invarious situations. A very good introductory-level text for magnetic and electrostatic problems isPlonus’s Applied electromagnetics [1]. A good intermediate-level review of Maxwell’s equations,as well as a useful analogy of magnetism to similar problems in other disciplines is containedin Hoole’s Computer-aided analysis and design of electromagnetic devices [2]. For an advancedtreatment, the reader has no recourse but to refer to Jackson’s Classical electrodynamics [3]. Forthermal problems, the author has found White’s Heat and mass tranfer [4] and Haberman’s Elementary applied partial differential equations [5