Sunteți pe pagina 1din 326

ANSYS Mechanical APDL Low-Frequency

Electromagnetic Analysis Guide

ANSYS, Inc. Release 17.0


Southpointe January 2016
2600 ANSYS Drive
Canonsburg, PA 15317 ANSYS, Inc. is
ansysinfo@ansys.com certified to ISO
9001:2008.
http://www.ansys.com
(T) 724-746-3304
(F) 724-514-9494
Copyright and Trademark Information

© 2015 SAS IP, Inc. All rights reserved. Unauthorized use, distribution or duplication is prohibited.

ANSYS, ANSYS Workbench, Ansoft, AUTODYN, EKM, Engineering Knowledge Manager, CFX, FLUENT, HFSS, AIM
and any and all ANSYS, Inc. brand, product, service and feature names, logos and slogans are registered trademarks
or trademarks of ANSYS, Inc. or its subsidiaries in the United States or other countries. ICEM CFD is a trademark
used by ANSYS, Inc. under license. CFX is a trademark of Sony Corporation in Japan. All other brand, product,
service and feature names or trademarks are the property of their respective owners.

Disclaimer Notice

THIS ANSYS SOFTWARE PRODUCT AND PROGRAM DOCUMENTATION INCLUDE TRADE SECRETS AND ARE CONFID-
ENTIAL AND PROPRIETARY PRODUCTS OF ANSYS, INC., ITS SUBSIDIARIES, OR LICENSORS. The software products
and documentation are furnished by ANSYS, Inc., its subsidiaries, or affiliates under a software license agreement
that contains provisions concerning non-disclosure, copying, length and nature of use, compliance with exporting
laws, warranties, disclaimers, limitations of liability, and remedies, and other provisions. The software products
and documentation may be used, disclosed, transferred, or copied only in accordance with the terms and conditions
of that software license agreement.

ANSYS, Inc. is certified to ISO 9001:2008.

U.S. Government Rights

For U.S. Government users, except as specifically granted by the ANSYS, Inc. software license agreement, the use,
duplication, or disclosure by the United States Government is subject to restrictions stated in the ANSYS, Inc.
software license agreement and FAR 12.212 (for non-DOD licenses).

Third-Party Software

See the legal information in the product help files for the complete Legal Notice for ANSYS proprietary software
and third-party software. If you are unable to access the Legal Notice, Contact ANSYS, Inc.

Published in the U.S.A.


Table of Contents
1. Overview of Magnetic Field Analysis ...................................................................................................... 1
1.1. How Mechanical APDL Handles Magnetic Analysis ............................................................................ 2
1.2. Types of Static, Harmonic, and Transient Magnetic Analysis ................................................................ 7
1.3. Comparing Magnetic Formulations ................................................................................................... 8
1.3.1. 2-D Versus 3-D Magnetic Analysis ............................................................................................. 8
1.3.2. What Is the Magnetic Scalar Potential Formulation? .................................................................. 8
1.3.3. What Is the Magnetic Vector Potential Formulation? .................................................................. 9
1.3.4. What Is the Edge Formulation? ................................................................................................. 9
1.3.5. Comparing Formulations .......................................................................................................... 9
1.3.6. Static Analysis .......................................................................................................................... 9
1.4. Summary of Electromagnetic Elements ........................................................................................... 11
1.5. GUI Paths and Command Syntax ..................................................................................................... 12
2. 2-D Static Magnetic Analysis ................................................................................................................. 13
2.1. Elements Used in 2-D Static Magnetic Analysis ................................................................................ 13
2.2. Legacy vs. Current-Technology 2-D Magnetic Elements .................................................................... 15
2.3. Steps in a Static Magnetic Analysis .................................................................................................. 16
2.3.1. Creating the Physics Environment ........................................................................................... 16
2.3.1.1. Setting GUI Preferences ................................................................................................. 17
2.3.1.2. Defining an Analysis Title ............................................................................................... 17
2.3.1.3. Specifying Element Types and Options ........................................................................... 17
2.3.1.4. Defining the Element Coordinate System ....................................................................... 20
2.3.1.5. Defining Element Real Constants and a System of Units .................................................. 21
2.3.1.5.1. Choosing a System of Units for Your Analysis ......................................................... 21
2.3.1.6. Specifying Material Properties ....................................................................................... 21
2.3.1.6.1. Accessing Material Library Files ............................................................................. 22
2.3.1.6.2. Additional Guidelines for Defining Regional Material Properties and Real Con-
stants ................................................................................................................................. 23
2.3.1.7. Source Conductor Regions ............................................................................................. 25
2.3.1.8. Moving Conductor Regions ........................................................................................... 25
2.3.1.9. Permanent Magnet Regions ........................................................................................... 26
2.3.2. Building and Meshing the Model and Assigning Region Attributes .......................................... 28
2.3.3. Applying Boundary Conditions and Loads .............................................................................. 28
2.3.3.1. Boundary Conditions ..................................................................................................... 29
2.3.3.1.1. Magnetic Vector Potentials (AZ) ............................................................................. 29
2.3.4. Excitation Loads ..................................................................................................................... 30
2.3.4.1. Source Current Density (JS) ............................................................................................ 30
2.3.5. Flags and Other Loads ............................................................................................................ 30
2.3.5.1. Infinite Surface (INF) Flags .............................................................................................. 30
2.3.5.2. Maxwell Surface (MXWF) Flags ....................................................................................... 30
2.3.5.3. Magnetic Virtual Displacement (MVDI) Flags .................................................................. 31
2.3.5.4. Current Segments (CSGX) .............................................................................................. 31
2.3.6. Solving the Analysis ............................................................................................................... 32
2.3.6.1. Defining the Analysis Type ............................................................................................. 32
2.3.6.2. Defining Analysis Options .............................................................................................. 32
2.3.6.3. Saving a Backup Copy of the Database ........................................................................... 32
2.3.6.4. Starting the Solution ..................................................................................................... 33
2.3.6.5. Tracking Convergence Graphically ................................................................................. 33
2.3.6.6. Finishing the Solution .................................................................................................... 33
2.3.6.7. Calculating the Inductance Matrix and Flux Linkage ....................................................... 34
2.3.7. Reviewing Results .................................................................................................................. 34

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. v
Low-Frequency Electromagnetic Analysis Guide

2.3.7.1. Primary data: ................................................................................................................. 34


2.3.7.2. Derived data: ................................................................................................................. 34
2.3.8. Reading in Results Data .......................................................................................................... 34
2.3.8.1. Flux Lines ...................................................................................................................... 35
2.3.8.2. Contour Displays ........................................................................................................... 35
2.3.8.3. Vector Displays .............................................................................................................. 35
2.3.8.4. Tabular Listings .............................................................................................................. 35
2.3.8.5. Magnetic Forces ............................................................................................................ 36
2.3.8.6. Magnetic Torque ........................................................................................................... 36
2.3.8.7. Coil Resistance and Inductance ...................................................................................... 37
2.3.8.8. Calculating Other Items of Interest ................................................................................. 37
2.4. 2-D Stranded Coil Analysis .............................................................................................................. 38
2.4.1. Performing a 2-D Stranded Coil Analysis ................................................................................. 38
2.4.2. Reviewing Results from a 2-D Stranded Coil Analysis ............................................................... 39
2.5. Example 2-D Static Magnetic Analyses ............................................................................................. 39
2.5.1. Example: Basic 2-D Static Magnetic Analysis ............................................................................ 40
2.5.1.1. Description ................................................................................................................... 40
2.5.1.2. Analysis Parameters ....................................................................................................... 40
2.5.1.3. Approach and Assumptions ........................................................................................... 41
2.5.1.4. Command Method ........................................................................................................ 41
2.5.2. Example: 2-D Static Magnetic Contact Analysis ........................................................................ 43
2.5.2.1. Description ................................................................................................................... 43
2.5.2.2. Input Listing .................................................................................................................. 43
2.5.3. Example: 2-D Static Magnetic Analysis with Velocity Effects ..................................................... 45
2.5.3.1. Description ................................................................................................................... 45
2.5.3.2. Input Listing .................................................................................................................. 46
2.5.3.3. Results .......................................................................................................................... 49
2.5.4. Other Examples ...................................................................................................................... 49
3. 2-D Harmonic Magnetic (AC) Analysis .................................................................................................. 51
3.1. Linear Versus Nonlinear Harmonic Analysis ...................................................................................... 51
3.2. Elements Used in Harmonic Magnetic Analysis ................................................................................ 52
3.3. Creating a Harmonic 2-D Physics Environment ................................................................................ 53
3.3.1. Using DOFs to Manage Terminal Conditions on Conductors .................................................... 54
3.3.1.1. The AZ Option ............................................................................................................... 54
3.3.1.2. The AZ-VOLT Option ...................................................................................................... 54
3.3.2. Characteristics and Settings for Physical Regions of a Model .................................................... 54
3.3.3. Velocity Effects ....................................................................................................................... 57
3.4. Building and Meshing the Model and Assigning Region Attributes ................................................... 58
3.4.1. Skin Depth Considerations ..................................................................................................... 58
3.5. Applying Boundary Conditions Loads (Excitation) to Harmonic Problems ......................................... 58
3.5.1. Using the PERBC2D Macro ...................................................................................................... 58
3.5.2. Amplitude, Phase Angle, and Operating Frequency ................................................................. 58
3.5.2.1. Amplitude ..................................................................................................................... 59
3.5.2.2. Phase Angle .................................................................................................................. 59
3.5.2.3. Operating Frequency ..................................................................................................... 59
3.5.3. Applying Source Current Density to Stranded Conductors ....................................................... 59
3.5.4. Applying Current to Massive Conductors ................................................................................ 59
3.5.5. Flags and Other Loads ............................................................................................................ 60
3.5.5.1. Infinite Surface (INF) Flags .............................................................................................. 60
3.5.5.2. Maxwell Surface (MXWF) Flags ....................................................................................... 60
3.5.5.3. Magnetic Virtual Displacement (MVDI) Flags .................................................................. 60
3.6. Obtain a Solution ............................................................................................................................ 61

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
vi of ANSYS, Inc. and its subsidiaries and affiliates.
Low-Frequency Electromagnetic Analysis Guide

3.6.1. Defining the Harmonic Analysis Type ...................................................................................... 61


3.6.2. Defining Analysis Options ...................................................................................................... 61
3.6.3. Selecting the Equation Solver ................................................................................................. 62
3.6.4. Setting the Analysis Frequency ............................................................................................... 62
3.6.5. Setting General Options ......................................................................................................... 63
3.6.6. Setting Output Controls ......................................................................................................... 63
3.6.7. Saving a Backup Copy of the Database ................................................................................... 63
3.6.8. Starting the Solution .............................................................................................................. 63
3.6.9. Tracking Convergence Graphically .......................................................................................... 64
3.6.10. Finishing the Solution ........................................................................................................... 65
3.7. Reviewing Results ........................................................................................................................... 65
3.7.1. Commands or GUI Paths to Help You in Postprocessing ........................................................... 66
3.7.2. Reading in Results Data .......................................................................................................... 68
3.7.2.1. Contour Displays ........................................................................................................... 68
3.7.2.2. Vector Displays .............................................................................................................. 69
3.7.2.3. Tabular Listings .............................................................................................................. 69
3.7.2.4. Magnetic Forces ............................................................................................................ 69
3.7.2.5. Magnetic Torque ........................................................................................................... 70
3.7.2.6. Coil Resistance and Inductance ...................................................................................... 71
3.7.2.7. Calculating Other Items of Interest ................................................................................. 72
3.8. Example 2-D Harmonic Magnetic Analyses ...................................................................................... 72
3.8.1. Example: Harmonic Magnetic Analysis .................................................................................... 72
3.8.1.1. Command Input Stream Using PLANE233 ...................................................................... 73
3.8.2. Other Examples ...................................................................................................................... 74
4. 2-D Transient Magnetic Analysis ........................................................................................................... 75
4.1. Elements Used in Transient Magnetic Analysis ................................................................................. 75
4.2. Creating a 2-D Transient Magnetic Physics Environment .................................................................. 77
4.3. Building a Model, Assigning Region Attributes and Meshing the Model ............................................ 77
4.4. Applying Boundary Conditions and Loads (Excitation) ..................................................................... 77
4.4.1. Applying Boundary Conditions ............................................................................................... 78
4.4.2. Applying Current ................................................................................................................... 78
4.4.3. Other Loads ........................................................................................................................... 78
4.5. Obtaining a Solution ....................................................................................................................... 78
4.5.1. Entering the SOLUTION Processor ........................................................................................... 79
4.5.2. Defining the Analysis Type ...................................................................................................... 79
4.5.3. Defining Analysis Options ...................................................................................................... 79
4.5.4. Load Step Options .................................................................................................................. 79
4.5.5. Nonlinear Options .................................................................................................................. 80
4.5.6. Output Controls ..................................................................................................................... 82
4.5.7. Saving a Backup Copy of the Database ................................................................................... 82
4.5.8. Starting the Solution .............................................................................................................. 82
4.5.9. Finishing the Solution ............................................................................................................ 82
4.6. Reviewing Results ........................................................................................................................... 82
4.6.1. Reading Results in POST26 ..................................................................................................... 83
4.6.2. Reading Results in POST1 ....................................................................................................... 84
4.6.2.1. Coil Resistance and Inductance ...................................................................................... 84
4.6.2.2. Calculating Other Items of Interest ................................................................................. 85
4.7. Example Transient Magnetic Analyses ............................................................................................. 85
4.7.1. Example: Transient Magnetic Analysis ..................................................................................... 85
4.7.1.1. Example Description ...................................................................................................... 85
4.7.1.2. Analysis Parameters ....................................................................................................... 86
4.7.1.3. Approach and Assumptions ........................................................................................... 86

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. vii
Low-Frequency Electromagnetic Analysis Guide

4.7.2. Other Examples ...................................................................................................................... 88


5. 3-D Static Magnetic Analysis (Scalar Method) ...................................................................................... 89
5.1. Elements Used in 3-D Static Scalar Magnetic Analysis ....................................................................... 89
5.2. Scalar Potential Formulation ........................................................................................................... 90
5.2.1. Singly Versus Multiply Connected Domains ............................................................................. 91
5.3. Analysis Considerations .................................................................................................................. 91
5.4. Steps in a 3-D Static Scalar Analysis ................................................................................................. 92
5.4.1. Create the Physics Environment .............................................................................................. 92
5.4.1.1. Setting GUI Preferences ................................................................................................. 92
5.4.1.2. Specifying Material Properties ....................................................................................... 92
5.4.1.2.1. Accessing Material Library Files ............................................................................. 93
5.4.1.3. Additional Guidelines for Defining Regional Material Properties and Real Constants ....... 94
5.4.1.3.1. For Air Regions: ..................................................................................................... 94
5.4.1.3.2. For Free-Space Permeable Material Regions: .......................................................... 94
5.4.2. Build the Model ...................................................................................................................... 95
5.4.2.1. Modeling Current Conduction Regions .......................................................................... 97
5.4.2.2. Building a 3-D Racetrack Coil ........................................................................................ 100
5.4.3. Apply Boundary Conditions and Loads (Excitation) ............................................................... 101
5.4.3.1. Applying Loads to a 3-D Scalar Static Analysis ............................................................... 101
5.4.3.2. Boundary Conditions ................................................................................................... 102
5.4.3.2.1. Magnetic Scalar Potentials ................................................................................... 102
5.4.3.3. Excitation .................................................................................................................... 102
5.4.3.4. Flags and Other Loads ................................................................................................. 102
5.4.3.4.1. Infinite Surface (INF) Flags ................................................................................... 102
5.4.3.4.2. Maxwell Surface (MXWF) Flags ............................................................................ 102
5.4.3.4.3. Magnetic Virtual Displacement (MVDI) Flags ........................................................ 102
5.4.4. Solve the Analysis (RSP, DSP, or GSP Method) ......................................................................... 103
5.4.4.1. Solve Using the RSP Method ........................................................................................ 103
5.4.4.1.1. Entering the SOLUTION Processor ........................................................................ 103
5.4.4.1.2. Defining the Analysis Type .................................................................................. 103
5.4.4.1.3. Defining Analysis Options ................................................................................... 103
5.4.4.1.4. Saving a Backup Copy of the Database ................................................................ 103
5.4.4.1.5. Starting the Solution ........................................................................................... 104
5.4.4.1.6. Finishing the Solution ......................................................................................... 104
5.4.4.2. Solve Using DSP Method .............................................................................................. 104
5.4.4.3. Solve Using the GSP Method ........................................................................................ 105
5.4.5. Review Analysis Results (RSP, DSP, or GSP Method Analysis) .................................................... 106
5.4.5.1. Reading in Results Data ............................................................................................... 106
5.4.5.2. Flux Lines .................................................................................................................... 106
5.4.5.3. Vector Displays ............................................................................................................ 107
5.4.5.4. Contour Displays ......................................................................................................... 107
5.4.5.5. Charged Particle Trace Displays .................................................................................... 107
5.4.5.6. Tabular Listings ............................................................................................................ 107
5.4.5.7. Magnetic Forces .......................................................................................................... 107
5.4.5.8. Calculating Other Items of Interest ............................................................................... 108
5.5. Example 3-D Static Magnetic Analyses (Scalar Method) .................................................................. 108
5.5.1. Example of a 3-D Static Magnetic Analysis ............................................................................. 108
5.5.1.1. Description .................................................................................................................. 108
5.5.1.1.1. Material Properties .............................................................................................. 109
5.5.1.1.2. Approach and Assumptions ................................................................................ 110
5.5.1.1.3. Results ................................................................................................................ 110
5.5.1.2. Command Listing ........................................................................................................ 110

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
viii of ANSYS, Inc. and its subsidiaries and affiliates.
Low-Frequency Electromagnetic Analysis Guide

5.5.2. Other Examples .................................................................................................................... 112


6. 3-D Magnetostatics and Fundamentals of Edge-Based Analysis ........................................................ 113
6.1. Elements Used in Edge-Based Analysis .......................................................................................... 114
6.2. Characteristics and Settings for Physical Regions of a Model .......................................................... 115
6.3. Analysis Considerations ................................................................................................................. 117
6.4. Performing a Static Edge-Based Analysis ........................................................................................ 117
6.5. Reviewing Results from a Static Edge-Based Analysis ..................................................................... 119
6.5.1. Reading in Results Data ........................................................................................................ 120
6.5.1.1. Flux Lines .................................................................................................................... 120
6.5.1.2. Contour Displays, Vector Displays, Tabular Listings, and Magnetic Forces ....................... 120
6.5.1.3. Charged Particle Trace Displays .................................................................................... 120
6.5.1.4. Calculating Magnetic Force and Torque ........................................................................ 121
6.5.1.5. Calculating Other Items of Interest ............................................................................... 122
6.6. 3-D Stranded Coil Analysis ............................................................................................................. 122
6.6.1. Elements Used in a 3-D Edge-Based Stranded Coil Analysis .................................................... 122
6.6.2. Performing a Stranded Coil Analysis ...................................................................................... 123
6.6.3. Reviewing Results from a 3-D Stranded Coil Analysis ............................................................. 124
6.7. Example 3-D Magnetostatic and Edge-Based Analyses ................................................................... 125
6.7.1. Example: Current-Carrying Conductor ................................................................................... 125
6.7.1.1. Analysis Description .................................................................................................... 125
6.7.1.2. Analysis Parameters ..................................................................................................... 126
6.7.1.3. Target Data .................................................................................................................. 126
6.7.1.4. The Analysis Input ........................................................................................................ 127
6.7.2. Example: Force Calculation Between Two Permanent Magnets .............................................. 128
6.7.2.1. Problem Description and Results .................................................................................. 129
6.7.2.2. Command Listing ........................................................................................................ 132
6.7.3. Example: Two-Plate Hall Sensor ............................................................................................. 134
6.7.3.1. Problem Description and Results .................................................................................. 134
6.7.3.2. Command Listing ........................................................................................................ 137
6.7.4. Other Examples .................................................................................................................... 140
7. 3-D Harmonic Magnetic Analysis (Edge-Based) .................................................................................. 141
7.1. Analysis Considerations ................................................................................................................. 141
7.2. Performing a Harmonic Edge-Based Analysis ................................................................................. 141
7.3. Reviewing the Results from a Harmonic Edge-Based Analysis ......................................................... 143
7.3.1. Commands to Help You in Postprocessing ............................................................................ 144
7.3.2. Reading in Results Data ........................................................................................................ 146
7.3.2.1. Contour Displays ......................................................................................................... 146
7.3.2.2. Tabular Listings ............................................................................................................ 146
7.3.2.3. Calculating Other Items of Interest ............................................................................... 147
7.4. Example 3-D Harmonic Magnetic (Edge-Based) Analyses ............................................................... 147
7.4.1. Example: 3-D Harmonic Edge-Based Analysis ........................................................................ 147
7.4.1.1. The Analysis Described ................................................................................................ 147
7.4.1.2. Analysis Parameters ..................................................................................................... 148
7.4.1.3. Target Data .................................................................................................................. 148
7.4.2. Example: Eddy Currents Induced in a Ferromagnetic Plate .................................................... 149
7.4.2.1. Problem Description and Results .................................................................................. 150
7.4.2.2. Command Listing ........................................................................................................ 152
7.4.3. Example: Magnetic Field in a Parallel Plate Capacitor ............................................................. 154
7.4.3.1. Problem Description and Results .................................................................................. 154
7.4.3.2. Command Listing ........................................................................................................ 158
7.4.4. Example: Transformer Analysis ............................................................................................. 160
7.4.4.1. Problem Description and Results .................................................................................. 160

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. ix
Low-Frequency Electromagnetic Analysis Guide

7.4.4.2. Command Listing ........................................................................................................ 164


8. 3-D Transient Magnetic Analysis (Edge-Based) ................................................................................... 169
8.1. Analysis Considerations ................................................................................................................. 169
8.2. Performing a Transient Edge-Based Analysis .................................................................................. 169
8.2.1. Time Option ......................................................................................................................... 171
8.2.2. Number of Substeps or Time Step Size .................................................................................. 171
8.2.3. Automatic Time Stepping ..................................................................................................... 171
8.2.4. Newton-Raphson Options .................................................................................................... 172
8.2.5. Number of Equilibrium Iterations .......................................................................................... 172
8.2.6. Convergence Tolerances ....................................................................................................... 172
8.2.7. Terminate an Unconverged Solution ..................................................................................... 173
8.2.8. Control Printed Output ......................................................................................................... 173
8.2.9. Control Database and Results File Output ............................................................................. 173
8.2.10. Saving a Backup Copy of the Database ................................................................................ 173
8.2.11. Starting the Solution .......................................................................................................... 173
8.3. Reviewing Results ......................................................................................................................... 174
8.3.1. Reading Results in POST26 ................................................................................................... 175
8.3.2. Reading Results in POST1 ..................................................................................................... 176
8.3.2.1. Calculating Other Items of Interest ............................................................................... 176
8.4. Example 3-D Transient Magnetic Edge-Based Analyses ................................................................... 176
8.4.1. Example: Transient Magnetic Field in a Conducting Block ...................................................... 176
8.4.1.1. Problem Description and Results .................................................................................. 177
8.4.1.2. Command Listing ........................................................................................................ 182
8.4.2. Other Examples .................................................................................................................... 185
9. Electromagnetic Linear Perturbation Analysis ................................................................................... 187
9.1. Performing an Electromagnetic Linear Perturbation Analysis ......................................................... 187
9.2. Example: Electromagnetic Linear Perturbation Analysis ................................................................. 188
10. Electric and Magnetic Macros ........................................................................................................... 193
10.1. Using Electric and Magnetic Macros ............................................................................................ 194
10.1.1. Modeling Aids .................................................................................................................... 194
10.1.2. Solution Aids ...................................................................................................................... 196
10.1.2.1. MAGSOLV ................................................................................................................. 196
10.1.2.2. CMATRIX ................................................................................................................... 196
10.1.3. Postprocessing Calculations ................................................................................................ 197
11. Far-Field Elements ............................................................................................................................. 201
11.1. Tips for Using Far-Field Elements ................................................................................................. 203
11.2. Example Far-Field Analysis ........................................................................................................... 205
11.2.1. Problem Description ........................................................................................................... 205
11.2.2. Results ............................................................................................................................... 206
11.2.3. Command Listing ............................................................................................................... 206
12. Electric Field Analysis ........................................................................................................................ 209
12.1. Elements Used in Electric Field Analysis ....................................................................................... 210
12.2. Element Compatibility ................................................................................................................. 212
12.3. Current Densities ........................................................................................................................ 215
12.4. Steady-State Current Conduction Analysis ................................................................................... 215
12.4.1. Building the Model ............................................................................................................. 215
12.4.2. Applying Loads and Obtaining a Solution ........................................................................... 216
12.4.2.1. Entering the SOLUTION Processor .............................................................................. 216
12.4.2.2. Defining Analysis Type ............................................................................................... 217
12.4.2.3. Defining Analysis Options .......................................................................................... 217
12.4.2.4. Applying Loads .......................................................................................................... 217
12.4.2.4.1. Current ............................................................................................................. 217

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
x of ANSYS, Inc. and its subsidiaries and affiliates.
Low-Frequency Electromagnetic Analysis Guide

12.4.2.4.2. Voltage (VOLT) .................................................................................................. 217


12.4.2.5. Starting the Solution .................................................................................................. 218
12.4.2.6. Finishing the Solution ................................................................................................ 218
12.4.3. Reviewing Results .............................................................................................................. 218
12.4.3.1. Reviewing Results in POST1 ....................................................................................... 218
12.4.4. Extracting Conductance from Multi-Conductor Systems ...................................................... 220
12.4.4.1. Ground Conductances and Lumped Conductances .................................................... 220
12.4.4.2. Procedure .................................................................................................................. 221
12.5. Harmonic Quasistatic Electric Analysis ......................................................................................... 222
12.5.1. Building the Model ............................................................................................................. 223
12.5.2. Applying Loads and Obtaining a Solution ........................................................................... 224
12.5.2.1. Entering the SOLUTION Processor .............................................................................. 224
12.5.2.2. Defining the Analysis Type ......................................................................................... 224
12.5.2.3. Defining Analysis Options .......................................................................................... 224
12.5.2.4. Applying Loads .......................................................................................................... 225
12.5.2.4.1. Current ............................................................................................................. 225
12.5.2.4.2. Charge .............................................................................................................. 226
12.5.2.4.3. Voltage (VOLT) .................................................................................................. 226
12.5.2.5. Starting the Solution .................................................................................................. 226
12.5.2.6. Finishing the Solution ................................................................................................ 226
12.5.3. Reviewing Results .............................................................................................................. 226
12.5.3.1. Reviewing Results in POST1 ....................................................................................... 228
12.5.3.2. Reviewing Results in POST26 ...................................................................................... 228
12.6. Transient Quasistatic Electric Analysis .......................................................................................... 229
12.6.1. Building the Model ............................................................................................................. 230
12.6.2. Applying Loads and Obtaining a Solution ........................................................................... 230
12.6.2.1. Entering the SOLUTION Processor .............................................................................. 230
12.6.2.2. Defining the Analysis Type ......................................................................................... 231
12.6.2.3. Defining Analysis Options .......................................................................................... 231
12.6.2.4. Applying Loads .......................................................................................................... 232
12.6.2.5. Starting the Solution .................................................................................................. 232
12.6.2.6. Finishing the Solution ................................................................................................ 232
12.6.3. Reviewing Results .............................................................................................................. 232
12.6.3.1. Reviewing Results in POST1 ....................................................................................... 233
12.6.3.2. Reviewing Results in POST26 ...................................................................................... 233
12.7. Example Electric Field Analyses ................................................................................................... 233
12.7.1. Example: Steady-State Conduction Current Analysis ............................................................ 233
12.7.1.1. Results ....................................................................................................................... 234
12.7.1.2. Command Listing ...................................................................................................... 235
12.7.2. Example: Conductance Calculation ..................................................................................... 236
12.7.2.1. Command Listing ...................................................................................................... 237
12.7.3. Example: Harmonic Quasistatic Electric Analysis .................................................................. 237
12.7.3.1. Results ....................................................................................................................... 238
12.7.3.2. Command Listing ...................................................................................................... 239
12.7.4. Example: Transient Quasistatic Electric Analysis ................................................................... 240
12.7.4.1. Problem Description .................................................................................................. 240
12.7.4.2. Results ....................................................................................................................... 242
12.7.4.3. Command Listing ...................................................................................................... 242
12.7.5. Other Examples .................................................................................................................. 245
13. Electrostatic Field Analysis ............................................................................................................... 247
13.1. Elements Used in h-Method Electrostatic Analysis ........................................................................ 247
13.2. Steps in an h-Method Electrostatic Analysis ................................................................................. 248

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. xi
Low-Frequency Electromagnetic Analysis Guide

13.2.1. Building the Model ............................................................................................................. 248


13.2.2. Applying Loads and Obtaining a Solution ........................................................................... 250
13.2.2.1. Entering the SOLUTION Processor .............................................................................. 250
13.2.2.2. Defining the Analysis Type ......................................................................................... 250
13.2.2.3. Defining Analysis Options .......................................................................................... 250
13.2.2.4. Apply Boundary Conditions ....................................................................................... 250
13.2.2.5. Applying Loads .......................................................................................................... 251
13.2.2.5.1. Voltage (VOLT) .................................................................................................. 251
13.2.2.5.2. Charges (CHRG) ................................................................................................. 251
13.2.2.5.3. Surface Charge Densities (CHRGS) ..................................................................... 251
13.2.2.5.4. Infinite Surface Flags (INF) ................................................................................. 251
13.2.2.5.5. Volume Charge Densities (CHRGD) .................................................................... 252
13.2.2.6. (Optional): Specifying Load Step Options .................................................................... 252
13.2.2.7. Saving a Backup Copy of the Database ....................................................................... 252
13.2.2.8. Starting the Solution .................................................................................................. 252
13.2.2.9. Applying Additional Loads ......................................................................................... 252
13.2.2.10. Finishing the Solution .............................................................................................. 252
13.2.3. Reviewing Results .............................................................................................................. 252
13.2.3.1. Contour Displays ....................................................................................................... 253
13.2.3.2. Vector Displays .......................................................................................................... 253
13.2.3.3. Charged Particle Trace Displays .................................................................................. 254
13.2.3.4. Tabular Listings .......................................................................................................... 254
13.2.3.5. Electrostatic Forces .................................................................................................... 254
13.3. Extracting Capacitance from Multi-conductor Systems ................................................................. 255
13.3.1. Ground Capacitances and Lumped Capacitances ................................................................ 255
13.3.2. Procedure .......................................................................................................................... 256
13.4. Example Electrostatic Field Analyses (h-Method) .......................................................................... 258
13.4.1. Example: h-Method Electrostatic Analysis ............................................................................ 258
13.4.1.1. Description ................................................................................................................ 259
13.4.1.2. Assumptions and Modeling ....................................................................................... 259
13.4.1.3. Expected Results ........................................................................................................ 259
13.4.1.4. Command Method .................................................................................................... 266
13.4.2. Example: Capacitance Calculation ....................................................................................... 267
13.4.2.1. Description ................................................................................................................ 267
13.4.2.2. Modeling ................................................................................................................... 267
13.4.2.3. Results ....................................................................................................................... 268
13.4.2.4. Command Listing ...................................................................................................... 269
14. Electric Circuit Analysis ..................................................................................................................... 271
14.1. Elements Used in Circuit Analysis ................................................................................................. 272
14.2. Using the Circuit Builder .............................................................................................................. 272
14.2.1. Building a Circuit ................................................................................................................ 273
14.3. Avoiding Inconsistent Circuits ..................................................................................................... 274
14.3.1. DC and Harmonic Analyses ................................................................................................. 274
14.3.1.1. Voltage Generators Should Not Form a Loop .............................................................. 274
14.3.1.2. Current Generators Should Not Form a Cut ................................................................. 275
14.3.2. Transient Analyses .............................................................................................................. 276
14.3.2.1. Capacitors and Voltage Operators Should Not Form a Loop ........................................ 276
14.3.3. Inductors and Current Generators Should Not Form a Cut ................................................... 276
14.4. Static (DC) Electric Circuit Analysis ............................................................................................... 277
14.4.1. Building a Circuit for Static Analysis ..................................................................................... 277
14.4.2. Applying Loads and Solving the Static Analysis ................................................................... 277
14.4.2.1. Enter the SOLUTION Processor ................................................................................... 277

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
xii of ANSYS, Inc. and its subsidiaries and affiliates.
Low-Frequency Electromagnetic Analysis Guide

14.4.2.2. Define the Analysis Type ............................................................................................ 277


14.4.2.3. Apply Loads on the Model ......................................................................................... 278
14.4.2.4. Copy the Database ..................................................................................................... 278
14.4.2.5. Start the Solution ....................................................................................................... 278
14.4.2.6. Apply Additional Loads .............................................................................................. 278
14.4.2.7. Finish the Solution ..................................................................................................... 278
14.4.3. Reviewing Results from a Static Circuit Analysis ................................................................... 278
14.5. Harmonic (AC) Electric Circuit Analysis ......................................................................................... 279
14.5.1. Building a Circuit for Harmonic Analysis .............................................................................. 279
14.5.2. Applying Loads and Solving the Analysis ............................................................................ 279
14.5.2.1. Enter the SOLUTION Processor ................................................................................... 279
14.5.2.2. Define the Analysis Type ............................................................................................ 279
14.5.2.3. Specify an Equation Solver ......................................................................................... 279
14.5.2.4. Specify a Solution Listing Format ............................................................................... 280
14.5.2.5. Apply Loads on the Model ......................................................................................... 280
14.5.2.6. Specify Load Step Options ......................................................................................... 280
14.5.2.7. Copy the Database ..................................................................................................... 280
14.5.2.8. Start the Solution ....................................................................................................... 280
14.5.2.9. Apply Additional Loads .............................................................................................. 281
14.5.2.10. Finish the Solution ................................................................................................... 281
14.5.3. Reviewing Results from a Harmonic Circuit Analysis ............................................................ 281
14.6. Transient Electric Circuit Analysis ................................................................................................. 281
14.6.1. Building a Circuit for Transient Analysis ............................................................................... 281
14.6.2. Applying Loads and Solving the Static Analysis ................................................................... 282
14.6.2.1. Enter the SOLUTION Processor ................................................................................... 282
14.6.2.2. Define the Analysis Type ............................................................................................ 282
14.6.2.3. Choose an Equation Solver ......................................................................................... 282
14.6.2.4. Apply Loads on the Model ......................................................................................... 282
14.6.2.5. Specify Load Step Options ......................................................................................... 283
14.6.2.5.1. General Options ................................................................................................ 283
14.6.2.5.2. Output Controls ................................................................................................ 283
14.6.2.6. Create Load Step Files ................................................................................................ 284
14.6.2.7. Copy the Database ..................................................................................................... 284
14.6.2.8. Start the Solution ....................................................................................................... 284
14.6.2.9. Finish the Solution ..................................................................................................... 284
14.6.3. Reviewing Results from a Transient Circuit Analysis ............................................................. 284
14.6.3.1. Using POST26 ............................................................................................................ 285
14.6.3.2. Using POST1 .............................................................................................................. 285
14.7. Example Electric Circuit Analyses ................................................................................................. 286
14.7.1. Example: Harmonic Circuit Analysis ..................................................................................... 286
14.7.2. Other Examples .................................................................................................................. 287
15. Alternative Analysis Options and Solution Methods ........................................................................ 289
15.1. Loading Options for 2-D Static Magnetic Analysis ........................................................................ 290
15.1.1. On Keypoints ..................................................................................................................... 290
15.1.2. On Lines ............................................................................................................................. 290
15.1.3. On Areas ............................................................................................................................ 291
15.1.4. On Volumes ........................................................................................................................ 291
15.1.5. On Nodes ........................................................................................................................... 291
15.1.6. On Elements ....................................................................................................................... 292
15.2. Using the Alternative Solution Option for 2-D Static Magnetic Analysis ......................................... 292
15.2.1. Specify Load Step Options for the Initial Solution ................................................................ 292
15.2.1.1. General Options ........................................................................................................ 292

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. xiii
Low-Frequency Electromagnetic Analysis Guide

15.2.1.2. Nonlinear Options ..................................................................................................... 293


15.2.2. Write Load Data or Start the Solution .................................................................................. 293
15.2.3. Specify Load Step Options for the Final Solution .................................................................. 293
15.2.3.1. General Options ........................................................................................................ 293
15.2.3.2. Nonlinear Options ..................................................................................................... 293
15.2.3.3. Output Controls ......................................................................................................... 294
15.2.4. Write Load Data or Start the Solution .................................................................................. 295
15.2.5. Initiate the Solution ............................................................................................................ 295
15.3. Loading Options for 2-D Harmonic Magnetic Analysis .................................................................. 295
15.4. Load Step Options for 2-D Harmonic Magnetic Analysis ............................................................... 295
15.4.1. Dynamic Options ............................................................................................................... 295
15.4.2. General Options ................................................................................................................. 295
15.4.3. Output Controls ................................................................................................................. 296
15.5. Loading Options for 2-D Transient Magnetic Analysis ................................................................... 296
15.6. Load Step Options for 2-D Nodal-Based Transient Magnetic Analysis (MVP Method) ..................... 296
15.6.1. Dynamic Options ............................................................................................................... 296
15.6.1.1. Initial Conditions ....................................................................................................... 297
15.6.1.2. General Options ........................................................................................................ 297
15.6.1.3. Nonlinear Options ..................................................................................................... 298
15.6.1.4. Output Controls ......................................................................................................... 299
15.7. Loading Options for 3-D Static Magnetic Analysis (Scalar Method) ................................................ 299
15.8. Using the RSP Method for 3-D Static Scalar Magnetic Analysis ...................................................... 300
15.8.1. Specify Load Step Options .................................................................................................. 300
15.8.1.1. Newton-Raphson Options .......................................................................................... 300
15.8.1.2. Biot-Savart Options .................................................................................................... 300
15.8.1.3. General Options ........................................................................................................ 300
15.8.1.4. Nonlinear Options ..................................................................................................... 301
15.8.2. Start the Solution ............................................................................................................... 301
15.8.2.1. Specify Additional Loading Conditions (Optional) ....................................................... 301
15.8.2.2. Review Results ........................................................................................................... 302
15.9. Using the DSP Method for 3-D Static Scalar Magnetic Analysis ...................................................... 302
15.10. Using the GSP Method for 3-D Static Scalar Magnetic Analysis .................................................... 303
15.11. Loading Options for an Electric Field (Current Conduction) Analysis ........................................... 304
15.12. Load Step Options for an Electric Field (Current Conduction) Analysis ......................................... 304
15.13. Loading Options for an Electrostatic Field Analysis ..................................................................... 304
15.14. Load Step Options for Electrostatic Field Analysis ....................................................................... 304
Index ........................................................................................................................................................ 305

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
xiv of ANSYS, Inc. and its subsidiaries and affiliates.
List of Figures
1.1. Current-Fed Stranded Source - Current Density Known ............................................................................ 2
1.2. SOURC36 Current-fed Stranded Conductor ............................................................................................. 3
1.3. Current-Fed Solid Conductor - Current Known ......................................................................................... 3
1.4. Voltage-Fed Solid Conductor - Voltage Known ......................................................................................... 3
1.5. Circuit-Fed Solid Conductor .................................................................................................................... 4
2.1. B-H and Reluctivity vs. B Squared Curves ............................................................................................... 24
2.2. Applicable Configurations for Considering Velocity Effects of Moving Bodies ......................................... 25
2.3. Actual and ANSYS (Shifted) Demagnetization Curves ............................................................................. 26
2.4. B-H Curve for Bar Magnet Example ........................................................................................................ 27
2.5. MVDI Specifications for Virtual Work Force Calculation ........................................................................... 31
2.6. Convergence Norms Displayed by the Graphical Solution Tracking (GST) Feature ................................... 33
2.7. Diagram of a Solenoid Actuator ............................................................................................................. 40
2.8. Element Plot Showing Independent Meshes .......................................................................................... 43
2.9. Flux Line Plot ........................................................................................................................................ 45
2.10. Flux Density Plot ................................................................................................................................. 45
2.11. Finite Element Model .......................................................................................................................... 46
2.12. Current Density in the Conductive Cylinder ......................................................................................... 49
3.1. Physical Region With Optional Terminal Conditions for Conductors ........................................................ 55
3.2. Relationship Between Real / Imaginary Components and Amplitude / Phase Angle ................................ 59
3.3. MVDI Specifications for Virtual Work Force Calculation ........................................................................... 61
3.4. Convergence Norms Displayed by the Graphical Solution Tracking (GST) Feature ................................... 65
4.1. Examples of Load-Versus-Time Curves ................................................................................................... 77
4.2. Diagram of a Solenoid Actuator ............................................................................................................. 85
5.1. Connected Domains ............................................................................................................................. 91
5.2. B-H and mu-H Curves With Extrapolation ............................................................................................... 95
5.3. A Coil Source Represented by SOURC36 Elements ................................................................................. 97
5.4. Solenoid Actuator ............................................................................................................................... 109
6.1. Physical Region With Optional Terminal Conditions for Conductors ...................................................... 115
6.2. Reluctance Force ................................................................................................................................. 121
6.3. Coil Constants for 1/8 Symmetry Sector of Circular Stranded Coil ........................................................ 124
6.4. Current-Carrying Conductor in a Slot Within an Iron Region ................................................................. 125
6.5. Volume Model of the Conductor .......................................................................................................... 126
6.6. Finite Element Model of the Magnets .................................................................................................. 129
6.7. Magnetic Forces vs. Upper Magnet Displacement ................................................................................ 130
6.8. Magnetic Field Distribution in the Magnets ......................................................................................... 131
6.9. Magnetic Force Distribution in the Magnets ........................................................................................ 132
6.10. Finite Element Model of the Two-Plate Hall Sensor ............................................................................. 135
6.11. Electric Potential Distribution in the Plates ......................................................................................... 136
6.12. Vector Plot of Applied Magnetic Field on the Plates ............................................................................ 137
7.1. Volume Model of the Conductor .......................................................................................................... 147
7.2. Finite Element Model of the Ferromagnetic Plate and Coil .................................................................... 150
7.3. Eddy Currents Distribution in the Plate (Real Solution) ......................................................................... 151
7.4. Eddy Currents Distribution in the Plate (Imaginary Solution) ................................................................ 151
7.5. Temperature Distribution in the Plate ................................................................................................. 152
7.6. Finite Element Model of the Lossy Capacitor ........................................................................................ 155
7.7. Electric Field in the Capacitor .............................................................................................................. 155
7.8. Magnetic Field Induced by the Conduction Current ............................................................................. 156
7.9. Magnetic Field Induced by the Displacement Current .......................................................................... 157
7.10. Computed and Analytical Real Magnetic Fields Hr .............................................................................. 158
7.11. Computed and Analytical Imaginary Magnetic Field Hi ....................................................................... 158

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. xv
Low-Frequency Electromagnetic Analysis Guide

7.12. Finite Element Model of the Transformer (1/4 Symmetry) ................................................................... 161
7.13. Magnetic Field (Real) in the Core (μ = 100000 and NS/NP = 200) .......................................................... 162
7.14. Magnetic Field (Imaginary) in the Core (μ = 100000 and NS/NP = 200) ................................................. 162
7.15. Current Density (Real) in the Coils (μ = 100000 and NS/NP = 200) ........................................................ 163
7.16. Current Density (Imaginary) in the Coils (μ = 100000 and NS/NP = 200) ............................................... 163
8.1. Finite Element Model of the C-Magnet and the Conducting Block ........................................................ 177
8.2. Current Density in the Coil .................................................................................................................. 178
8.3. Magnetic Field in the Copper Block at Successive Time Intervals ........................................................... 179
8.4. Eddy Currents in the Conducting Block ................................................................................................ 181
8.5. Magnetic Field between the Pole-Pieces with and without the Copper Block ........................................ 182
10.1. Racetrack Current Source .................................................................................................................. 195
10.2. Periodic Symmetry at Two Planes at Constant Angles ......................................................................... 195
10.3. Periodic Symmetry at Two Planes Parallel to the Y Axis ....................................................................... 195
10.4. Periodic Symmetry at Two Planes Parallel to the X Axis ....................................................................... 196
10.5. MMF Paths ........................................................................................................................................ 197
10.6. Flux Calculations ............................................................................................................................... 198
10.7. Energy and Co-energy for Nonpermanent Magnets ........................................................................... 198
10.8. Energy and Co-energy for Permanent Magnets .................................................................................. 199
11.1. Flux Lines Without Far-Field Elements ................................................................................................ 201
11.2. Flux Lines With Far-Field Elements ..................................................................................................... 201
11.3. Interface between FE and Infinite Element Domains .......................................................................... 204
11.4. IFE Constructions for Non-Smooth FE to IFE Domain Interface ............................................................ 204
11.5. 2-D Infinite Element Structures .......................................................................................................... 204
11.6. Relative Dimensions of FE and IFE Domains ....................................................................................... 205
11.7. Grounding Plate with Current Loading .............................................................................................. 205
11.8. Electric Current Distribution .............................................................................................................. 206
12.1. Three Conductor System ................................................................................................................... 220
12.2. Lumped Conductor Equivalence of Three Conductor System .............................................................. 221
12.3. Conducting Disk with Current Loading .............................................................................................. 234
12.4. Potential Distribution ........................................................................................................................ 235
12.5. Current Distribution .......................................................................................................................... 235
12.6. Problem Geometry ............................................................................................................................ 236
12.7. Parallel Plate Capacitor with Time-Harmonic Voltage Load ................................................................. 237
12.8. Axisymmetric Model ......................................................................................................................... 238
12.9. Parallel Plate Capacitor Connected to a Voltage Source ...................................................................... 241
12.10. Computed and Target Electric Fields ................................................................................................ 242
12.11. Current Density (Conduction, Displacement, and Total) .................................................................... 242
13.1. Reluctance Force ............................................................................................................................... 255
13.2. Three Conductor System ................................................................................................................... 256
13.3. Lumped Capacitor Equivalence of Three Conductor System ............................................................... 256
13.4. Modeling Scenarios ........................................................................................................................... 258
13.5. Model Areas of Capacitance Example Problem ................................................................................... 268
13.6. Elements of Capacitance Example Problem ........................................................................................ 268
14.1. Voltage Generators Forming a Loop ................................................................................................... 274
14.2. Voltage Generators in Parallel With Resistors ...................................................................................... 274
14.3. Voltage Generators in Parallel With Other Circuit Components ........................................................... 275
14.4. Current Generators in Parallel ............................................................................................................ 275
14.5. Circuit Generators and a Supernode .................................................................................................. 275
14.6. Voltage Generator and Capacitor Equivalence .................................................................................... 276
14.7. Velocity Generators Forming a Loop .................................................................................................. 276
14.8. Current Generator and Inductor Equivalence ..................................................................................... 276
14.9. Current Generators Forming a Cut ..................................................................................................... 277

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
xvi of ANSYS, Inc. and its subsidiaries and affiliates.
List of Tables
1.1. Formulation Comparison ........................................................................................................................ 4
1.2. 3-D Edge Formulation ............................................................................................................................. 4
1.3. 2-D MVP Formulation .............................................................................................................................. 6
1.4. 3-D Nodal MSP Formulation .................................................................................................................... 7
1.5. List of Electromagnetic Elements ........................................................................................................... 11
2.1. 2-D Solid Elements ................................................................................................................................ 14
2.2. Far-Field Elements ................................................................................................................................. 14
2.3. General Circuit Elements ....................................................................................................................... 14
2.4. Contact Elements .................................................................................................................................. 14
3.1. 2-D Solid Elements ................................................................................................................................ 52
3.2. Far-Field Elements ................................................................................................................................. 53
3.3. General Circuit Elements ....................................................................................................................... 53
3.4. Contact Elements .................................................................................................................................. 53
3.5. Postprocessing GUI Paths and Commands ............................................................................................. 66
4.1. 2-D Solid Elements ................................................................................................................................ 75
4.2. Far-Field Elements ................................................................................................................................. 76
4.3. General Circuit Elements ....................................................................................................................... 76
4.4. Contact Elements .................................................................................................................................. 76
5.1. 3-D Solid Elements ................................................................................................................................ 89
5.2. 3-D Source Elements ............................................................................................................................. 90
5.3. 3-D Infinite Elements ............................................................................................................................. 90
5.4. Contact Elements .................................................................................................................................. 90
6.1. 3–D Solid Edge-Based Elements .......................................................................................................... 114
7.1. Postprocessing Commands ................................................................................................................. 144
7.2. Coil Voltage and EMF (μ = 100000 and NS/NP = 200) ............................................................................ 161
7.3. Secondary and Primary Coil Voltage Ratio as a Function of Core Permeability μ (NS/NP = 200) ............... 163
7.4. Secondary and Primary Coil Voltage Ratio as a Function of Ratio of Turns NS/NP (μ = 100000) ................ 164
10.1. Application of Electric and Magnetic Macros ...................................................................................... 193
11.1. 2-D Far-Field Elements ....................................................................................................................... 202
11.2. 3-D Far-Field Elements ....................................................................................................................... 202
12.1. Conducting Bar Elements .................................................................................................................. 210
12.2. 2-D Planar Elements .......................................................................................................................... 210
12.3. 3-D Solid Elements ............................................................................................................................ 210
12.4. Shell Elements .................................................................................................................................. 211
12.5. Specialty Elements ............................................................................................................................ 211
12.6. General Circuit Elements ................................................................................................................... 211
12.7. Reaction Solutions for Elements with VOLT DOF ................................................................................. 212
12.8. Current Densities in Low-Frequency Analyses .................................................................................... 215
12.9. Elements Used in a Steady-State Analysis ........................................................................................... 216
12.10. Reviewing Results ........................................................................................................................... 219
12.11. ETABLE Results ................................................................................................................................ 219
12.12. Elements Used in a Current-Based Harmonic Analysis [1] ................................................................. 223
12.13. Elements Used in a Charge-Based Harmonic Analysis [1] .................................................................. 223
12.14. Load Types ...................................................................................................................................... 225
12.15. Command Labels ............................................................................................................................ 227
12.16. Defining Variables ........................................................................................................................... 229
12.17. Graphing and Listing Variables ........................................................................................................ 229
12.18. Elements Used in a Transient Analysis .............................................................................................. 230
12.19. Electric Potential at Points with Coordinates r = a and ϕ ................................................................... 234
12.20. Electric Admittance (Y) .................................................................................................................... 238

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. xvii
Low-Frequency Electromagnetic Analysis Guide

13.1. 2-D Solid Elements ............................................................................................................................ 247


13.2. 3-D Solid Elements ............................................................................................................................ 247
13.3. Specialty Elements ............................................................................................................................ 248
13.4. Electrical Conversion Factors for MKS to muMKSV .............................................................................. 249
13.5. Electrical Conversion Factors for MKS to muMSVfA ............................................................................. 249
14.1. Circuit Elements ................................................................................................................................ 272

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
xviii of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 1: Overview of Magnetic Field Analysis
Magnetic analyses calculate the magnetic field in devices such as:

Power generators Magnetic tape/disk drives


Transformers Waveguides
Solenoid actuators Resonant cavities
Electric motors Connectors
Magnetic imaging systems Antenna radiation
Video display device sensors Filters
Cyclotrons

Typical quantities of interest in a magnetic analysis are:

Magnetic flux density Power loss


Magnetic field intensity Flux leakage
Magnetic forces and torques S-parameters
Impedance Quality factor
Inductance Return loss
Eddy currents Eigenfrequencies

Magnetic fields may exist as a result of an electric current, a permanent magnet, or an applied external
field.

In general, parts/components of an electromagnetic analysis can be categorized by their electric and


magnetic properties. Possible electric characteristics are:

• No current exists in a body

• Solid conductor, current, no eddy current effects (see Figure 1.3: Current-Fed Solid Conductor - Current
Known (p. 3), Figure 1.4: Voltage-Fed Solid Conductor - Voltage Known (p. 3), and Figure 1.5: Circuit-
Fed Solid Conductor (p. 4))

• Stranded conductor, no eddy current (see Figure 1.1: Current-Fed Stranded Source - Current Density
Known (p. 2) and Figure 1.2: SOURC36 Current-fed Stranded Conductor (p. 3))

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 1
Overview of Magnetic Field Analysis

• Solid conductor, eddy current present (harmonic or transient analyses only)

Magnetic characteristics include:

• Non-magnetic: typically air, copper, aluminum

• Soft magnetic: typically iron or steel

• Hard magnetic: typically samarium cobalt or Alnico

The use and combination of these electric and material properties is described in How Mechanical APDL
Handles Magnetic Analysis (p. 2).

The following low-frequency electromagnetic topics are available:


1.1. How Mechanical APDL Handles Magnetic Analysis
1.2.Types of Static, Harmonic, and Transient Magnetic Analysis
1.3. Comparing Magnetic Formulations
1.4. Summary of Electromagnetic Elements
1.5. GUI Paths and Command Syntax

1.1. How Mechanical APDL Handles Magnetic Analysis


The program uses Maxwell's equations as the basis for electromagnetic field analysis. The primary un-
knowns (degrees of freedom) that the finite element solution calculates are magnetic and electric poten-
tials. Other magnetic field quantities such as magnetic field flux density, current density, energy, forces,
loss, inductance, and capacitance are derived from these degrees of freedom. Depending on the element
type and element option you choose, the degrees of freedom may be scalar magnetic potentials, vector
magnetic potentials, or edge flux, as well as non-time integrated and time integrated electric potential.

The program offers several formulations, depending on the type of analysis, the material properties in
your analysis, and the overall physics of your analysis. Electromagnetic analyses may be coupled to circuit,
heat transfer, mechanical, or fluid dynamics analyses.

Options available for low frequency electromagnetic analyses are summarized in the following figures
and tables.

To understand which formulation may be suitable for your analysis, you need to consider how current
is introduced into the model. The following graphics show the basic current loading configurations for
3-D models. These configurations are referenced in the tables that follow.

Figure 1.1: Current-Fed Stranded Source - Current Density Known

J = ni
A

Where:

J = current density

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
2 of ANSYS, Inc. and its subsidiaries and affiliates.
How Mechanical APDL Handles Magnetic Analysis

n = number of turns
i = current in a filament
A = coil cross section area

In this case, the current density is specified on each element via body force loading (BFE,,JS).

Figure 1.2: SOURC36 Current-fed Stranded Conductor


y y

x
CUR x
J
J
I
DY z
I K
K z
DY CUR
DZ

DZ
a) Type 1 - Coil b) Type 2 - Bar
y DY
CUR
J x

K
DZ z

c) Type 3 - Arc

In this case, the current loading is fed in via SOURC36 coil primitives. The coil primitives are simple
predefined geometric shapes that you use to locate and prescribe current, without the need to physically
create a finite element model and mesh of the coil domain.

Figure 1.3: Current-Fed Solid Conductor - Current Known

J
It F,,AMPS

VOLT = 0 Couple VOLT

Figure 1.4: Voltage-Fed Solid Conductor - Voltage Known

J
D,,VOLT

VOLT = 0 VOLT Load

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 3
Overview of Magnetic Field Analysis

Figure 1.5: Circuit-Fed Solid Conductor


VOLT = 0 Couple VOLT

CIRCU124 or CIRCU125

The following tables summarize the physics regions, elements, and loading options available for each
of the various formulations (p. 8).

Table 1.1: Formulation Comparison

FormulationConductor Model Dim. Applications Element Analysis


Types Type
MSP SOURC36 current-fed 3-D Magnetostatic SOLID5, Static
stranded conductor without eddy current. SOLID96,
- coil not meshed, SOLID98
underlying region
meshed
Nodal Current, voltage, or 2-D Magnetostatic, eddy PLANE13, Static,
MVP circuit-fed solid current. PLANE233 harmonic,
conductor - Coil transient
meshed as part of
model
Edge-Based Both stranded and 3-D Magnetostatic, eddy SOLID236, Static,
solid conductors current, magnetic SOLID237 harmonic,
permitted. Supports allowed. transient
current, circuit,
voltage fed, and
direct current
specification

Table 1.2: 3-D Edge Formulation

The 3-D Edge Formulation uses SOLID236and SOLID237 elements, with KEYOPT(1) = 0 unless
otherwise noted.
Physical Region Current Magnetic Electric DOFs Current Notes
Material Material Loading
Props Props
Non-magnetic None MURX (Y,Z) AZ N/A
(air, copper, =1
aluminum)
Soft Magnetic None MURX (Y,Z) AZ N/A
(typically iron or > 1 (linear)
steel) or B-H curve
(nonlinear)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
4 of ANSYS, Inc. and its subsidiaries and affiliates.
How Mechanical APDL Handles Magnetic Analysis

The 3-D Edge Formulation uses SOLID236and SOLID237 elements, with KEYOPT(1) = 0 unless
otherwise noted.
Physical Region Current Magnetic Electric DOFs Current Notes
Material Material Loading
Props Props
Hard Magnetic None MGXX(YY,ZZ)[1], AZ N/A
(such as Alnico or MURX (Y,Z)
samarium cobalt) > 1 (linear)
or B-H curve
(nonlinear)
Stranded Current MGXX(YY,ZZ)[1],RSVX, RSVY, AZ BFE,,JS
Conductor (neglecting MURX (Y,Z) RSVZ
(typically copper) eddy > 1 (linear)
current) or B-H curve
(nonlinear)
Solid Conductor Current MGXX(YY,ZZ)[1],RSVX, RSVY, AZ, F,,AMPS, Uses
(typically copper, (neglecting MURX (Y,Z) RSVZ VOLT D,,VOLT, SOLID236 or
aluminum, etc.) eddy > 1 (linear) or circuit SOLID237
current) or B-H curve loading with
(nonlinear) KEYOPT(1) =
1 in a static
analysis and
with
KEYOPT(1) =
1 and
KEYOPT(5) =
1 in a
harmonic or
transient
analysis.
Eddy MGXX(YY,ZZ)[1],RSVX, RSVY, AZ, F,,AMPS, Uses
current MURX (Y,Z) RSVZ VOLT D,,VOLT SOLID236 or
> 1 (linear) SOLID237
or B-H curve with
(nonlinear) KEYOPT(1) =
1
Stranded Coil Current MURX (Y,Z) RSVX AZ, F,,AMPS, Uses
(neglecting > 1 (linear) VOLT, D,,VOLT, SOLID236 or
eddy or B-H curve EMF or circuit SOLID237
current) (nonlinear) loading with

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 5
Overview of Magnetic Field Analysis

The 3-D Edge Formulation uses SOLID236and SOLID237 elements, with KEYOPT(1) = 0 unless
otherwise noted.
Physical Region Current Magnetic Electric DOFs Current Notes
Material Material Loading
Props Props
KEYOPT(1) =
1

Table 1.3: 2-D MVP Formulation

The 2-D MVP Formulation uses PLANE13, and PLANE233 elements with KEYOPT(1) = 0 unless
otherwise noted.
Physical Region Current Magnetic Electric DOFs Current Notes
Material Material Loading
Props Props
Non-magnetic None MURX (Y,Z) AZ N/A
(air, copper, =1
aluminum)
Soft Magnetic None MURX (Y,Z) AZ N/A
(typically iron or > 1 (linear)
steel) or B-H curve
(nonlinear)
Hard Magnetic None MGXX(YY,ZZ)[1], AZ N/A
(such as Alnico or MURX (Y,Z)
samarium cobalt) > 1 (linear)
or B-H curve
(nonlinear)
Stranded Current MGXX(YY,ZZ)[1], AZ BFE,,JS
Conductor (neglecting MURX (Y,Z)
(typically copper) eddy > 1 (linear)
current) or B-H curve
(nonlinear)
Solid Conductor Eddy MGXX(YY,ZZ)[1],RSVX, RSVY, AZ, F,,AMPS Uses
(typically copper, current MURX (Y,Z) RSVZ VOLT or circuit PLANE13
aluminum, etc.) > 1 (linear) loading with
or B-H curve KEYOPT(1) =
(nonlinear) 6 or
PLANE233
with
KEYOPT(1) =
1
Stranded Coil Current MURX (Y,Z) RSVX AZ, F,,AMPS, Uses
(neglecting > 1 (linear) VOLT, D,,VOLT, PLANE233
eddy or B-H curve EMF or circuit with
current) (nonlinear) loading KEYOPT(1) =
2

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
6 of ANSYS, Inc. and its subsidiaries and affiliates.
Types of Static, Harmonic, and Transient Magnetic Analysis

The Nodal MVP formulation is not recommended for soft magnetic or hard magnetic regions due to
inaccuracies in permeable domains. It is acceptable for non-magnetic regions.

Table 1.4: 3-D Nodal MSP Formulation

The 3-D Nodal MSP Formulation uses SOLID5 with KEYOPT(1) = 10, SOLID96, and SOLID98
with KEYOPT(1) = 10 elements, unless otherwise noted.
Physical Region Current Magnetic Electric DOFs Current Notes
Material Material Loading
Props Props
Non-magnetic None MURX (Y,Z) MAG N/A
(air, copper, =1
aluminum)
Soft Magnetic None MURX (Y,Z) MAG N/A
(typically iron or > 1 (linear)
steel) or B-H curve
(nonlinear)
Hard Magnetic None MGXX(YY,ZZ)[1], MAG N/A
(such as Alnico or MURX (Y, Z)
samarium cobalt) > 1 (linear)
or B-H curve
(nonlinear)
Stranded Current Any of N/A MAG SOURC36
Conductor (neglecting above
(typically copper) eddy
current)
Solid Conductor Current Any of N/A MAG SOURC36 Uses
(typically copper, (neglecting above KEYOPT(1) =
aluminum, etc.) eddy 1 or 9 on
current) SOLID5 or
SOLID98
only

1. Coercive force in terms of vector components, MGXX, MGYY, MGZZ. Polarization direction is determined
by coercion force (magnetization) terms MGXX, MGYY and MGZZ in conjunction with the element coordinate
system.

1.2. Types of Static, Harmonic, and Transient Magnetic Analysis


You can do the following types of static, harmonic, and transient magnetic analysis:

• 2-D static magnetic analysis, analyzing magnetic fields caused by direct current (DC) or permanent
magnets. A 2-D static analyses use a magnetic vector potential (MVP) formulation. See 2-D Static Mag-
netic Analysis (p. 13) in this manual for more information.

• 2-D harmonic magnetic analysis, analyzing magnetic fields caused by low frequency alternating current
(AC) or voltage. Permanent magnets are not permitted. This type of analysis uses an MVP formulation.
For details about this analysis type, see 2-D Harmonic Magnetic (AC) Analysis (p. 51).

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 7
Overview of Magnetic Field Analysis

• 2-D transient magnetic analysis, analyzing magnetic fields caused by arbitrary electric current or external
field that varies over time. Permanent magnet effects also can be included. This analysis type uses an
MVP formulation. 2-D Transient Magnetic Analysis (p. 75) describes this analysis type in detail.

• 3-D static magnetic analysis, analyzing magnetic fields caused by direct current (DC) or permanent
magnets using a magnetic scalar potential (MSP) formulation. See 3-D Static Magnetic Analysis (Scalar
Method) (p. 89) for more information.

• 3-D static magnetic analysis, analyzing magnetic fields caused by direct current (DC) or permanent
magnets using an edge-based formulation. 3-D Magnetostatics and Fundamentals of Edge-Based
Analysis (p. 113) describes this type of analysis in detail.

• 3-D harmonic magnetic analysis, analyzing magnetic fields caused by low frequency alternating current
(AC), using an edge-based formulation. Permanent magnets are not permitted. The edge-based formu-
lation is recommended for most harmonic magnetic applications. See 3-D Harmonic Magnetic Analysis
(Edge-Based) (p. 141) for a description of this analysis type.

• 3-D transient magnetic analysis, analyzing magnetic fields caused by arbitrary electric current or external
field that varies over time, using an edge-based formulation. Permanent magnet effects also can be
included. The edge-based formulation is recommended for most transient magnetic applications. 3-D
Transient Magnetic Analysis (Edge-Based) (p. 169) discusses edge-based transient analysis.

1.3. Comparing Magnetic Formulations


When should you use a 2-D model or a 3-D model? What are the differences between the scalar and
vector potential formulations? How do the edge-based and nodal-based formulations for 3-D magnetic
analyses differ? The next few topics provide some answers.

1.3.1. 2-D Versus 3-D Magnetic Analysis


A 3-D analysis uses a 3-D model to represent the geometry of the structure being analyzed. A 3-D
model is the most natural way to represent a structure. However, 3-D models usually are more difficult
to generate than 2-D models and usually require more computer time to solve. Therefore, if the geometry
and loading can be simplified to 2-D, you should first consider using a 2-D model for your analysis.

1.3.2. What Is the Magnetic Scalar Potential Formulation?


The magnetic scalar potential (MSP) formulation, considered a node-based method, is recommended
for most 3-D static analysis applications. The scalar approach allows you to model current sources as
primitives rather than elements; therefore, the current sources do not need to be part of the finite element
mesh. The scalar method offers the following:

• Brick, wedge, pyramid, and tetrahedral element geometries

• Current sources defined by primitives (coils, bars, and arcs)

• Permanent magnets

• Linear and nonlinear permeability

• Node coupling and constraint equations

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
8 of ANSYS, Inc. and its subsidiaries and affiliates.
Comparing Magnetic Formulations

In addition, modeling of current sources (current conducting regions) is simpler with the scalar formu-
lation. This is so because you can simply specify current source primitives (coils, bars, and so forth) in
the proper locations to account for their magnetic field contribution.

1.3.3. What Is the Magnetic Vector Potential Formulation?


The magnetic vector potential (MVP) formulation is another node-based method, but for 2-D analyses.
It has a single magnetic vector potential degree of freedom, AZ, at each node. With the MVP formulation,
you model current sources (current conducting regions) as an integral part of the finite element model.

1.3.4. What Is the Edge Formulation?


The edge formulation is similar to the MVP formulation, but it associates degrees of freedom (DOFs)
with element edges rather than element nodes. The method offers 3-D static and dynamic solution
capability for low frequency electromagnetics. You perform 3-D edge-based analyses using essentially
the same procedures you use for 3-D MSP analyses. The edge-based analysis is not available for 2-D
models.

The Mechanical APDL Theory Reference discusses the edge formulation in more detail.

1.3.5. Comparing Formulations


In analyses where either can be used, the edge formulation is more accurate than the MSP formulation,
particularly when models contain iron regions. It can also be more efficient because there are typically
fewer degrees of freedom on the model.

The edge formulation is the recommended over the MSP method for most 3-D harmonic and transient
electromagnetic analyses. However, the MSP method provides some additional capabilities, so you
should use it when your analysis requires:

• motion effects and circuit coupling

• circuit and velocity effects

You should also consider using the MSP method when you are analyzing a model that does not contain
iron regions.

1.3.6. Static Analysis


You can solve most 3-D static problems using the MSP formulation or edge formulation. In accuracy-
critical applications, it is a good idea to solve your problem using both MSP and edge formulations.
The difference between the MSP and edge solutions is your best indicator of accuracy.

Except for coil regions, you can generally apply the same mesh for MSP and edge formulations. To
switch from one formulation to another, you switch element type. You must also invert boundary con-
ditions (flux-normal to flux-parallel, and flux-parallel to flux-normal).

Consider these points about accuracy:

• Energy is the most accurate quantity.

The finite element method is a variational procedure minimizing or maximizing the energy stored in
the studied domain. Thus, energy is the most accurate single number characterizing a solution.
Monitoring the convergence of energy is a prudent way to check accuracy.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 9
Overview of Magnetic Field Analysis

The MSP and edge formulations converge monotonously to the exact energy from above and below,
respectively. Therefore, without knowing the exact energy, you can obtain a good accuracy measure
by checking the energy difference between MSP and edge solutions. If you refine the mesh, this energy
difference must theoretically decrease.

• In accuracy-critical applications, rely on centroidal field values.

Field quantities are less accurate than nodal quantities because they are obtained from derivatives
of the solved potentials. Those derivatives are first evaluated at the element integration points then
extrapolated to corner nodes. Consequently, integration point field values are even more reliable
than corner data. Centroidal field values are averaged integration point values.

The finite element variational procedure converges in the energy space. In most situations, the energy
convergence implies convergence of local field values. However, field values at special locations, like
corners and edges, may not converge.

• Continuity conditions are a reasonable measure of solution accuracy.

The satisfaction of continuity conditions is a reasonable measure of solution accuracy. The MSP and
edge formulations must satisfy continuity of the tangential magnetic field, Ht, and the normal flux
density, Bn, respectively. Therefore, the difference in Ht and Bn continuity is a good measure of MSP
and edge convergence, respectively.

• MMF and flux are better accuracy measures than continuity conditions.

Although the difference in Ht and Bn is a reasonable measure of the accuracy of a magnetic finite
element solution, these values contain differentiation and extrapolation errors, especially when eval-
uated at element nodes. Integration can smooth these fluctuations.

MMF (magnetomotive force) is the closed loop integral of Ht. When MMF is evaluated over various
loops enclosing the same current, according to Ampere's law, the loop integral should theoretically
be equal to the enclosed current. Therefore, the difference in MMF values over different loops enclosing
identical current is a good measure of edge solution accuracy. See the MMF macro for a convenient
way to evaluate magnetomotive force.

The flux is the surface integral of Bn over a closed loop. Since there are no magnetic poles, the flux
crossing the surfaces of a flux tube is constant. In general, it is impractical to predict a flux tube.
However, as a check on accuracy, you can select elements on opposite sides of a surface to obtain
two faces of a flux tube. The flux difference crossing the same surface is a good measure of MSP
solution accuracy.

• In accuracy-critical applications, tighten the Biot Savart tolerance for MSP solutions.

In MSP solutions, the program applies the Biot Savart integration procedure to evaluate source
magnetic field values excited by SOURC36 current source elements. The accuracy of the Biot Savart
calculations is most critical at corners and edges. The default tolerance value is satisfactory for most
applications. However, in accuracy-critical applications, you may need to tighten the tolerance
(SOURC36 element real constant EPS).

• For MSP solutions, apply a pseudo iron material around iron domains.

To avoid cancellation errors, the MSP formulation applies certain physical assumptions in the iron
region. These assumptions may not prove to be good approximations where iron regions are heavily

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
10 of ANSYS, Inc. and its subsidiaries and affiliates.
Summary of Electromagnetic Elements

saturated (for example, near corners and edges). Sometimes air regions may behave similar to iron.
Violated assumptions may degrade accuracy.

The program differentiates air and iron regions by the relative permeability. A material with a relative
permeability larger than one is considered to be iron. To avoid a violation of the air-iron behavior
assumptions, apply a couple layers of pseudo iron material around iron domains. Set the relative
permeability to slightly above one (for example 1.0001).

Elements occupying the air space of coils must be "real" air elements, not pseudo iron elements (that
is, the relative permeability must be exactly one).

1.4. Summary of Electromagnetic Elements


The program includes a variety of elements you can use to model electromagnetic phenomena.
Table 1.5: List of Electromagnetic Elements (p. 11) summarizes them briefly. For detailed descriptions
of the elements and their characteristics (DOFs, KEYOPT options, inputs and outputs, etc.), see the Element
Reference.

Not all elements listed in the table below apply to every type of electromagnetic analysis described in
this manual. To see which elements apply to a particular analysis type, read the chapter(s) discussing
that analysis type.

All 3-D electrical circuit elements require that you specify the solenoidal current density to obtain a
solution, or to perform any postprocessing operations.

Table 1.5: List of Electromagnetic Elements

Element Dim. Element Type No. Shape DOFs[1] and Other Features
of
Nodes
SOURC36 3-D Current source 3 n/a No DOF; coil, bar, and arc shape
primitives
SOLID96 3-D Magnetic solid scalar 8 Brick MAG; reduced, difference, general
potential formulations
SOLID236 3-D Low-frequency edge 20 Brick AZ (edge), AZ (edge)-VOLT
SOLID237 3-D Low-frequency edge 10 Tet AZ (edge), AZ (edge)-VOLT
CIRCU124 1-D Circuit 2–6 Line VOLT, CURR; resistor, capacitor,
inductor, current source, voltage
source, mutual inductor, controlled
source
PLANE121 2-D Electrostatic solid 8 Quad VOLT
SOLID122 3-D Electrostatic solid 20 Brick VOLT
SOLID123 3-D Electrostatic solid 10 Tet VOLT
INFIN110 2-D Infinite solid 8 Quad AZ, VOLT, TEMP
INFIN47 3-D Infinite boundary 4 Quad MAG, TEMP
INFIN111 3-D Infinite solid 20 Brick MAG, AZ, VOLT, TEMP
LINK68 3-D Thermoelectric bar 2 Line TEMP-VOLT
SHELL157 3-D Thermoelectric shell 4 Quad TEMP-VOLT
PLANE13 2-D Coupled solid 4 Quad UX, UY, TEMP, AZ UX-UY-VOLT

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 11
Overview of Magnetic Field Analysis

Element Dim. Element Type No. Shape DOFs[1] and Other Features
of
Nodes
SOLID5 3-D Coupled solid 8 Brick UX-UY-UZ-TEMP-VOLT-MAG;
TEMP-VOLT-MAG UX-UY-UZ; TEMP,
VOLT, MAG
SOLID98 3-D Coupled tetrahedral 10 Tet UX-UY-UZ-TEMP-VOLT-MAG;
TEMP-VOLT-MAG UX-UY-UZ; TEMP,
VOLT, MAG
CONTA171 2-D Surface-to-surface 2 n/a AZ,VOLT
contact
CONTA172 2-D Surface-to-surface 3 n/a AZ,VOLT
contact
CONTA173 3-D Surface-to-surface 4 n/a MAG,VOLT
contact
CONTA174 3-D Surface-to-surface 8 n/a MAG,VOLT
contact
CONTA175 2-D Node-to-surface contact 1 n/a AZ, MAG,VOLT
3-D
TARGE169 2-D Target segment n/a n/a n/a
TARGE170 3-D Target segment n/a n/a n/a
PLANE230 2-D Electric solid 8 Quad VOLT
SOLID231 3-D Electric solid 20 Brick VOLT
SOLID232 3-D Electric solid 10 Tet VOLT

1. Degrees of freedom available depend on an element's KEYOPT settings.

1.5. GUI Paths and Command Syntax


You will often see references to commands and their equivalent GUI paths. Such references use only
the command name, because you do not always need to specify all of a command's arguments, and
specific combinations of command arguments perform different functions. For complete command
syntax descriptions, see the Command Reference.

The GUI paths shown are as complete as possible. In many cases, choosing the GUI path as shown will
perform the function you want. In other cases, using the given GUI path takes you to a menu or dialog
box; from there, you must choose additional options that are appropriate for the specific task being
performed.

For all types of analyses, specify the material that you intend to simulate using an intuitive material
model interface. The interface uses a hierarchical tree structure of material categories intended to assist
you in choosing the appropriate model for your analysis. See Material Model Interface in the Basic
Analysis Guide for details about the material model interface.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
12 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 2: 2-D Static Magnetic Analysis
A static magnetic analysis calculates the magnetic fields produced by one of the following:

• Permanent magnets

• The steady flow of direct electric current (DC)

• An applied voltage

• A moving conductor

• An applied external field.

Static magnetic analyses do not consider time-dependent effects such as eddy currents. You can model
both saturable and non-saturable magnetic materials, as well as permanent magnets in a static magnetic
analysis.

The procedure for a static magnetic analysis depends on several factors:

• Whether your model is 2-D or 3-D.

• Which method you wish to use for your analysis. If your static analysis is 2-D, you must use the vector
potential formulation discussed in this chapter. For a 3-D static analysis, you can choose between a
scalar formulation (described in 3-D Static Magnetic Analysis (Scalar Method) (p. 89)) or an edge element
formulation (explained in 3-D Magnetostatics and Fundamentals of Edge-Based Analysis (p. 113)).

• If you are modeling two contacting bodies with dissimilar meshes (such as the air gap in a rotor/stator
configuration). See Modeling Magnetic Contact for more information on modeling contact problems
using surface-to-surface or node-to-surface contact elements.

The following 2-D static magnetic analysis topics are available:


2.1. Elements Used in 2-D Static Magnetic Analysis
2.2. Legacy vs. Current-Technology 2-D Magnetic Elements
2.3. Steps in a Static Magnetic Analysis
2.4. 2-D Stranded Coil Analysis
2.5. Example 2-D Static Magnetic Analyses

2.1. Elements Used in 2-D Static Magnetic Analysis


A 2-D model uses 2-D elements to represent the geometry of the structure. Although all objects and
structures are 3-D, you can and often should consider using a 2-D model for your analysis when the
geometry and loading can be simplified to planar or axisymmetric modeling. This is because a 2-D
model usually is much easier to generate and takes less time to solve.

The program includes several elements (described below) for 2-D static magnetic analyses.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 13
2-D Static Magnetic Analysis

For detailed information about the elements, see the Element Reference.

Table 2.1: 2-D Solid Elements

Element Dimens. Shape or DOFs Notes


Characteristic
PLANE13 2-D 4-node quadrilateral Up to four at each node; Legacy element
or 3-node triangular these can be magnetic
vector potential (AZ), Supported for
displacements, cyclic symmetry
temperature, or (periodic) analysis.
time-integrated electric
potential
PLANE233 2-D 8-node quadrilateral Up to three at each Current-technology
or 6-node triangular node; these can be element
magnetic vector [1]
potential (AZ), electric
potential/voltage drop Supported for
or time-integrated cyclic symmetry
electric (periodic) analysis.
potential/voltage drop
(VOLT), electromotive
force or time-integrated
electromotive force
(EMF)

1. Whenever possible, use PLANE233 rather than PLANE13. Some of the procedural steps in this chapter are
not applicable to PLANE233. PLANE233 does not support nonlinear harmonic analysis or velocity effects.
See Legacy vs. Current-Technology 2-D Magnetic Elements (p. 15) for information on the differences
between PLANE233 and PLANE13.

Table 2.2: Far-Field Elements

Element Dimens. Shape or Characteristic DOFs


INFIN110 2-D 4-node or 8-node Magnetic vector potential (AZ), electric
quadrilateral potential, temperature

Table 2.3: General Circuit Elements

Element Dimens. Shape or Characteristic DOFs Notes


CIRCU124 None General circuit element; One or two at each node; Used to couple
up to 6 nodes electric potential, current with a magnetic
domain

Table 2.4: Contact Elements

Element Dimens. Shape or Characteristic DOFs Notes


TARGE169 2-D Target segment n/a Used to model the
target region for a
contact analysis

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
14 of ANSYS, Inc. and its subsidiaries and affiliates.
Legacy vs. Current-Technology 2-D Magnetic Elements

Element Dimens. Shape or Characteristic DOFs Notes


CONTA171 2-D Surface-to-surface AZ Used to model the
contact element contact region for a
(2-node) contact analysis
CONTA172 2-D Surface-to-surface AZ Used to model the
contact element contact region for a
(3-node) contact analysis
CONTA175 2-D Node-to-surface contact AZ Used to model the
element (1-node) contact region for a
contact analysis

The 2-D elements use a magnetic vector potential formulation. In 2-D, each node has only one vector
potential degree of freedom, AZ, the vector potential in the Z direction. The electric potential and time-
integrated electric potential (VOLT) is used for current-fed massive conductors and for enforcing terminal
conditions on conductors.

2.2. Legacy vs. Current-Technology 2-D Magnetic Elements


Whenever possible, use PLANE233 (the current-technology electromagnetic element) rather than PLANE13
(legacy magnetic element).

PLANE233 supports the magnetic (KEYOPT(1) = 0), electromagnetic (KEYOPT(1) = 1), and stranded coil
(KEYOPT(1) = 2) analysis options. For these analyses, the current technology element has more advanced
features than PLANE13. The following capabilities are available only with the PLANE233 element type:

• Thickness (plane geometry) or ° slice (axisymmetric geometry) input

• Nodal Maxwell and Lorentz forces

• Displacement current effect in a harmonic electromagnetic analysis

• Coupling to circuit elements through the electric potential (VOLT) degree of freedom

• Stranded coil formulation (see 2-D Stranded Coil Analysis (p. 38))

• Linear perturbation analysis.

PLANE233 does not support nonlinear harmonic analysis.

Some of the procedural steps in Steps in a Static Magnetic Analysis (p. 16) of this chapter and in the
respective sections of 2-D Harmonic Magnetic (AC) Analysis (p. 51) and 2-D Transient Magnetic Analys-
is (p. 75) are not applicable to PLANE233. Before setting up your analysis, consider the following differ-
ences between PLANE233 and PLANE13:

• PLANE233 always behaves as a stranded conductor (no eddy current effects are modeled) in a harmonic or
transient analysis when the element does not have the VOLT degree of freedom (KEYOPT(1) = 0).

• By default, the meaning of VOLT degree of freedom with PLANE233 is electric potential. To do an electro-
magnetic analysis with time-integrated electric potential as a VOLT degree of freedom, use KEYOPT(2) = 2
with PLANE233.

• With PLANE233, you do not need to apply any force flags to calculate magnetic forces. Depending on the
KEYOPT(8) setting, Maxwell (KEYOPT(8) = 0) or Lorentz (KEYOPT(8) = 1) forces will be calculated and output

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 15
2-D Static Magnetic Analysis

as FMAG either at each element node (KEYOPT(7) = 0) or condensed to the corner nodes (KEYOPT(7) = 1).
Lorentz forces are calculated for current carrying elements only. To summarize magnetic forces and torques,
use the EMFT command.

– When summarizing Maxwell forces, select all the nodes in the region of interest and select all the elements
attached to these nodes prior to issuing EMFT. For regions with corners, use KEYOPT(7) = 1 to obtain
more accurate Maxwell forces.

– When summarizing Lorentz forces, select all the nodes in the conductor and issue EMFT.

• When performing an electromagnetic analysis of a moving conductor using PLANE233, specify the transla-
tional or angular velocity via the BF,,VELO command. The angular velocity units are radians/sec.

The following examples of a 2-D magnetic analysis using the current technology element are available:

• Command Method (p. 41)

• Example: 2-D Static Magnetic Contact Analysis (p. 43)

• Example: Harmonic Magnetic Analysis (p. 72)

2.3. Steps in a Static Magnetic Analysis


A static magnetic analysis consists of five main steps:

1. Create the physics environment.

2. Build and mesh the model and assign physics attributes to each region within the model.

3. Apply boundary conditions and loads (excitation).

4. Obtain the solution.

5. Review the results.

The next few topics discuss what you must do to perform these tasks. At the end of this chapter, you
will find a 2-D static analysis example derived from an actual analysis of a solenoid actuator. The example
walks you through the analysis by choosing items from GUI menus, then shows you how to perform
the same analysis using commands.

2.3.1. Creating the Physics Environment


In defining the physics environment for an analysis, you enter the preprocessor (PREP7) and establish a
mathematical simulation model of the physical problem. To do so, you follow the steps listed below.
(Subsequent topics discuss each step in more detail.)

1. Set GUI Preferences.

2. Define the analysis title (/TITLE command).

3. Define element types and options (KEYOPT settings).

4. Define element coordinate systems.

5. Set real constants and define a system of units.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
16 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a Static Magnetic Analysis

6. Define material properties.

2.3.1.1. Setting GUI Preferences


If you are running ANSYS via the GUI, the first thing you should do after the GUI becomes active is choose
menu path Main Menu> Preferences. Then, on the dialog box that appears, select Magnetic-Nodal
from the list of magnetic analysis types. Because the GUI filters the elements available to you based on
the preference you choose, you must set preferences before doing anything else, and you must specify
Magnetic-Nodal to ensure that you can use the elements needed for 2-D static analysis.

2.3.1.2. Defining an Analysis Title


Give your analysis a title that reflects the problem being analyzed, such as "2-D solenoid actuator static
analysis." Be sure to choose a unique title to distinguish this analysis problem from others that may use
similar model geometry or physics. To assign a title, use either of the following:
Command(s): /TITLE
GUI: Utility Menu> File> Change Title

2.3.1.3. Specifying Element Types and Options


The tasks you perform to choose element types are the same for a static magnetic analysis as they are
for other analysis types, and the Basic Analysis Guide explains these procedures at length.

Element types establish the physics of the problem domain. Depending on the nature of the problem,
you may need to define several element types to model the different physics regions in the model. For
example, a permeable iron region may require one element type, and a stranded coil may require a
different element type. The element types you choose and their options (KEYOPTS, discussed next)
must be compatible with the nature of the domain to be solved. Once you have specified element types
and options, you can assign them to different regions of the model.

The tables and figures below show you regions that can exist within a 2-D model. Details on specifying
material properties and real constants noted in the tables and figures follow in the next few sections.

Air DOF: AZ

Material Properties: MUr (MURX), rho (RSVX) (if Joule heat losses
are desired)
Iron DOF: AZ

Material Properties: MUr (MURX) or B-H curve (TB command)


Permanent magnet DOF: AZ

Material Properties: MUr (MURX) or B-H curve (TB command);


Hc (coercive force in terms of vector components, MGXX,
MGYY)
Polarization direction is determined by coercion force (magnetization) terms MGXX
and MGYY in conjunction with the element coordinate system.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 17
2-D Static Magnetic Analysis

Current per turn "i"

Area "A"
Turns "n"

JS = ni
A

JS
(Source
Current
Density)

Current-fed Standard Coil

Current-fed DOF: AZ
stranded coil
Material Properties: MUr (MURX)

Special characteristics: Apply source current density, JS (using


BFE,,JS command)
Assumes a stranded insulated coil producing a constant DC current, unaffected by
surrounding conditions. You can calculate current density from the number of coil
turns, the current per turn, and the cross-section area of the coil.

CURR

Voltage-fed Stranded Coil

Voltage-fed DOFs:
stranded coil
AZ, VOLT, EMF (with PLANE233)

Material Properties:

MUr (MURX), rho (RSVX)

Real constants:

SC, NC, RAD, TZ, R, SYM

Special characteristics:

Apply voltage drop (VLTG) via BFE command.


Couple CURR DOFs in region.
Applied voltage is unaffected by surroundings.

For more details about voltage source modeling, see 2-D Stranded Coil Analysis (p. 38).

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
18 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a Static Magnetic Analysis

N N S N

OMEGAZ

y + (XLOC,YLOC)
VX

x
Global S N S
S
origin

Solid Rotor Induction Machine Linear Induction Machine

Moving conducting bodies with constant velocity

Moving conducting DOFs:


bodies
AZ (with PLANE233)

Material Properties:

MUr (MURX), or B-H curve (TB command), rho (RSVX)

Real constants:

None

Special characteristics:

Apply velocities VELOX, VELOY, OMEGAZ via BF,,VELO


command
Moving body must not undergo spatial change in the "material". See Step 1d for
more details.

PLANE13

TARGE169

Exploded view
of interface

PLANE13

CONTAC171 / 172

Dissimilar mesh DOFs: AZ


interface
Contact elements: TARGE169, CONTA171, CONTA172,
CONTA175

CONTA17x KEYOPTS: KEYOPT(1)=7 (AZ), KEYOPT(2)=2 (MPC


approach), KEYOPT(4) = 1 or 2 (n/a for CONTA175),
KEYOPT(12)=5

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 19
2-D Static Magnetic Analysis

Use PLANE13 or PLANE233 elements to represent all interior regions of your model magnetic (permeable)
regions, current-conducting regions, permanent (i.e., magnet) regions, and air (free space), etc.

To model an unbounded problem domain, use of INFIN110, the four- or eight-node boundary element,
is recommended. INFIN110 can model the far-field decay in the magnetic field and will give better results
than an assumed flux-parallel or flux-normal boundary condition.

Most element types have additional options known as KEYOPTS, which you use to modify element
characteristics. For example, element PLANE233 has the following KEYOPTS:

KEYOPT(1)
Selects the element's DOFs

KEYOPT(2)
Selects coupling method between magnetic and electric degrees of freedom (KEYOPT(1) = 1); also defines
the meaning of the VOLT degree of freedom

KEYOPT(3)
Selects plane or axisymmetric option

KEYOPT(5)
Activates or suppress eseddy currents in electromagnetic harmonic or transient analyses (KEYOPT(1) = 1)

KEYOPT(7)
Selects electromagnetic force output at each element node or at element corner nodes only

KEYOPT(8)
Selects a Maxwell or Lorentz electromagnetic force calculation

Each element type uses different KEYOPTS, and the characteristics that KEYOPTS define vary from one
element to another. KEYOPT(1) controls the use of additional degrees of freedom. These additional
DOFs are used to model different physics in the electromagnetic domain (for example, a stranded
conductor, a massive conductor, a circuit-coupled conductor, etc.). To see which KEYOPTS and KEYOPT
settings apply to a particular element, see its description in the Element Reference.

To specify KEYOPT settings, use one of the following:


Command(s): ET, KEYOPT
GUI: Main Menu> Preprocessor> Element Type> Add/Edit/Delete

2.3.1.4. Defining the Element Coordinate System


If you have laminated materials or permanent magnets aligned in an arbitrary manner, you need to
specify the element coordinate system or systems to be used. The Global Cartesian coordinate system
is the default. After defining element types and options, you can specify a different coordinate system
by specifying its origin location and orientation angles. To do so, use either of the following:
Command(s): LOCAL
GUI: Utility Menu> WorkPlane> Local Coordinate Systems> Create Local CS> At Specified Loc

The coordinate system types available are Cartesian, cylindrical (circular or elliptical), spherical (or
spheroidal), and toroidal. Once you have defined one or more element coordinate systems, you can set
a pointer that identifies the coordinate system to be assigned to subsequently defined elements (area
and volume elements only). Set the pointer using one of the following:
Command(s): ESYS
GUI: Main Menu> Preprocessor> Meshing> Mesh Attributes> Default Attribs

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
20 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a Static Magnetic Analysis

Main Menu> Preprocessor> Modeling> Create> Elements> Elem Attributes

2.3.1.5. Defining Element Real Constants and a System of Units


Element real constants are miscellaneous properties that depend on the element type. You specify real
constants using the R family of commands (R, RMODIF, etc.) and their equivalent GUI paths. In electro-
magnetics, you use real constants to define stranded coil geometry and winding characteristics, or to
describe velocity effects. Observe two rules when defining real constants:

1. You must enter real constants in the order in which they are listed in the Element Reference.

2. For models using multiple element types, use a separate real constant set (that is, a different REAL
reference number) for each element type. However, a single element type may reference several real
constant sets.

See Getting Started in the Basic Analysis Guide for more information about defining real constants.

2.3.1.5.1. Choosing a System of Units for Your Analysis


The default system of units is MKS (meter-ampere-second). You can change this to any other system
you prefer using one of the methods shown below. Voltage-fed or circuit-fed conductors may use only
the MKS system of units. Once you choose a system of units, all input data must be in that system.
Command(s): EMUNIT
GUI: Main Menu> Preprocessor> Material Props> Electromag Units

Based on the input units you specify, the free-space permeability μo is determined automatically as
follows:

μo= 4 π x 10-7 H/m in MKS units

or

μo= the value specified with the EMUNIT command or its GUI path equivalent.

2.3.1.6. Specifying Material Properties


Your model may have any or all of the following material regions: air, (free-space) permeable materials,
current-conducting regions, and permanent magnets. Each type of material region has certain required
material properties.

The ANSYS material library contains definitions of several materials with magnetic properties. Instead
of defining material properties from scratch, you can read these material properties into the ANSYS
database and, if necessary, modify them to match the materials in your analysis problem more closely.

Materials with magnetic properties defined in the ANSYS material library are as follows:

Material Material Property File Containing Its Definition


Copper emagCopper.SI_MPL
M3 steel emagM3.SI_MPL
M54 steel emagM54.SI_MPL
SA1010 steel emagSa1010.SI_MPL
Carpenter (silicon) steel emagSilicon.SI_MPL

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 21
2-D Static Magnetic Analysis

Material Material Property File Containing Its Definition


Iron cobalt vanadium steel emagVanad.SI_MPL

The copper property presents temperature-dependent resistivity and relative permeability. All other
properties are B-H curves.

The property definitions in the material library specify properties "typical" for the materials listed. ANSYS,
Inc. has extrapolated these properties to cover high saturation conditions. Your actual material values
may differ from those supplied; therefore, you may need to modify the ANSYS material library files you use.

2.3.1.6.1. Accessing Material Library Files


The next few paragraphs explain basic procedures for reading and writing material library files. You can
find a more detailed discussion of these procedures and the ANSYS material library in Getting Started
of the Basic Analysis Guide.

To read a material library file into the ANSYS database, do the following:

1. If you have not already specified the system of units you are using, issue the /UNITS command.

Note

The default system of units for ANSYS is MKS. The GUI lists only material library files
with the currently active units.

2. Define the material library read path for the material of interest. (You will need to know which directory
path your system administrator has used to store the material library files.) To do so, use either of the
following:
Command(s): /MPLIB,READ,pathdata
GUI: Main Menu> Preprocessor> Material Props> Material Library> Library Path

3. Read the material library file into the database using one of the following:
Command(s): MPREAD,filename...LIB
GUI: Main Menu> Preprocessor> Material Props> Material Library> Import Library
Main Menu> Preprocessor> Loads> Load Step Opts> Other> Change Mat Props
Main Menu> Preprocessor> Material Props> Material Library> Import Library

To write changes to a material library file, perform these steps:

1. Edit the material property definition using either the MP command (Main Menu> Preprocessor>
Material Props> Material Models, Isotropic). Make sure that your revised definition includes a ma-
terial number and at least one material property value (for example, magnetic permeability or MURX).

2. From the PREP7 preprocessor, issue the command shown below:


Command(s): MPWRITE,filename,,,LIB,MAT
GUI: Main Menu> Preprocessor> Material Props> Material Library> Export Library (material
library file)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
22 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a Static Magnetic Analysis

2.3.1.6.2. Additional Guidelines for Defining Regional Material Properties and Real Con-
stants
The next few paragraphs provide some guidelines for setting up physics regions for your model. In
addition, you may want to consult 2-D Harmonic Magnetic (AC) Analysis (p. 51); it pictures and describes
the regions that can exist within a 2-D model.

For air regions:

Specify a relative permeability of 1.0. To do so, use one of the following:


Command(s): MP,MURX
GUI: Main Menu> Preprocessor> Material Props> Material Models> Electromagnetics> Relative
Permeability> Constant

For permeable material regions:

For linear magnetic material, you can specify relative permeability values MURX, MURY, and MURZ using
the MP command. To specify a linear isotropic material, you only need to specify MURX. MURY and
MURZ default to MURX. Free-space permeability MUZRO is set by the EMUNIT command. Ignoring
permanent magnet effects, the B-H equations for linear magnetic materials are:

Bx = (MUZRO) (MURX) (Hx)


By = (MUZRO) (MURY) (Hy)
Bz = (MUZRO) (MURZ) (Hz)

For nonlinear soft magnetic material, specify the B-H curve by reading from a material library or by
creating your own B-H curve:
Command(s): MPREAD,filename, ...
GUI: Main Menu> Preprocessor> Material Props> Material Library> Import Library
Command(s): TB, TBPT
GUI: Main Menu> Preprocessor> Material Props> Material Models> Electromagnetics> BH Curve

If you specify a B-H curve, it should meet the following requirements for the material to be represented
accurately:

• The B values must be unique for each H value, and must start at the origin and monotonically increase
with H, as shown in Figure 2.1: B-H and Reluctivity vs. B Squared Curves (p. 24)(a). By default, the B-H
curve will pass through the origin (that is, the 0.0 point is not to be explicitly defined). You can verify
this by plotting B versus H using one of the methods shown below. (For more information, see the
Element Reference.)
Command(s): TBPLOT
GUI: Main Menu> Preprocessor> Material Props> Material Models> Electromagnetics> BH Curve

• The ν-B2 curve that Mechanical APDL calculates internally (where ν is the reluctivity) should be smooth
and continuous. You can verify this by plotting ν versus B2 using the TBPLOT command. (See Fig-
ure 2.1: B-H and Reluctivity vs. B Squared Curves (p. 24)(b).)

• The B-H curve should cover the complete operating range of the material. If a point beyond the end
of the curve is required, the B-H curve is extrapolated with a slope equal to the free-space permeability.
You can view values in the extrapolated region by adjusting the X-axis range. To do so, use one of the
following together with the TBPLOT command:
Command(s): /XRANGE
GUI: Utility Menu> PlotCtrls> Style> Graphs

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 23
2-D Static Magnetic Analysis

Figure 2.1: B-H and Reluctivity vs. B Squared Curves

If a nonlinear B-H curve is specified without any relative permeability values, the B-H equations are:

Bx = F(|H|) / (|H|) (Hx)


By = F(|H|) / (|H|) (Hy)
Bz = F(|H|) / (|H|) (Hz)
where:

|H| = {(Hx)2 + (Hy)2 + (Hz)2}1/2

If a nonlinear B-H curve and relative permeability (MURX label) are specified for the same material, the
relative permeability will be used.

Orthotropic material relative permeability may be assigned using the MURX, MURY, and MURZ labels
on the MP command. A B-H curve may be used in conjunction with relative permeability to model
nonlinear effects along any one of the three orthogonal axes (such as for laminated iron material). To
invoke the usage of a B-H curve along one of the axes, set the relative permeability for that axis explicitly
to zero. For example, assume a B-H curve is defined for material number 2. You want to have the curve
active along the Y-axis, while assigning the X and Z axes a relative permeability of 1000. Your input
would be:
mp,murx,2,1000
mp,mury,2,0! read B-H curve for material 2
mp,murz,2,1000

If a B-H curve is specified along with zero permeability in two directions and a non-zero permeability
in one direction, the B-H curve will be applied to the two axes with zero permeability. For example, if
MURX and MURY are zero and MURZ is non-zero, the B-H equations are:

Bx = F(|H|) / (|H|) (Hx)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
24 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a Static Magnetic Analysis

By = F(|H|) / (|H|) (Hy)


Bz = (MUZRO) (MURZ) (Hz)
where:

|H| = {(Hx)2 + (Hy)2 + (Hz)2}1/2

2.3.1.7. Source Conductor Regions


A source conductor is a conductor connected to an external current "generator" that supplies a constant
current. Specify resistivity if you wish to have the ANSYS program calculate Joule heating losses. Res-
istivity may be isotropic or orthotropic. To specify resistivity, use one of the following:
Command(s): MP,RSVX
GUI: Main Menu> Preprocessor> Material Props> Material Models> Electromagnetics> Resistivity>
Constant

In a static analysis, resistivity is used only for loss calculations.

2.3.1.8. Moving Conductor Regions


For a moving conductor analysis (velocity effects), specify isotropic resistivity (using the command or
GUI path shown above).

You can solve electromagnetic fields for special cases of moving bodies. Valid special cases are those
in which the moving body presents itself as a homogeneous moving body for which the moving "ma-
terial" undergoes no spatial change. Figure 2.2: Applicable Configurations for Considering Velocity Effects
of Moving Bodies (p. 25) shows two valid cases:

• In the first case, a solid rotor is rotating about an axis at a constant rotational speed.

• In the second case, an "infinitely" long conductor is translating at a constant velocity.

Figure 2.2: Applicable Configurations for Considering Velocity Effects of Moving Bodies

An invalid case would be a "slotted" rotor rotating at constant speed. In this case, the slots in the motor
present a discontinuity in material as the body rotates. Another invalid case would be a translating
conductor of finite width moving in a magnetic field. Typical valid applications are solid rotor induction
machines, linear induction machines, and eddy-current braking systems.

A static analysis requires input to specify the translational velocity or the rotational speed of the con-
ductor. With PLANE233, specify the following nodal velocities (BF,,VELO):

• VELOX, VELOY - Velocity components in the global Cartesian coordinate system X and Y direction, re-
spectively.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 25
2-D Static Magnetic Analysis

• OMEGAZ - Angular (rotational) velocity (in rad/sec) about the global Cartesian system Z axis.

Velocity effects can be suppressed (KEYOPT(5) = 2) if they are undesirable in the electromagnetic elements
adjacent to the domain with a specified velocity.

Accuracy of analysis results for electromagnetic problems with moving bodies depends on the mesh
refinement, permeability, conductivity, and velocity. A magnetic Reynolds number is defined to charac-
terize the problem:

Mre = μvd/ρ

In the equation above, μ is permeability, ρ is resistivity, v is velocity, and d is characteristic length (in
the directional motion) within a finite element of the conducting body. The magnetic Reynolds number
is meaningful only in a static or transient analysis.

The motion formulation is valid and accurate for relatively small values of the Reynolds number, typically
on the order of 1.0. Accuracy for higher Reynolds number values will vary from problem to problem.
The magnetic Reynolds number is calculated and available in the postprocessor for viewing. In addition
to a field solution, the motion solution includes currents in the conductor due to motion. This is available
in the postprocessor.

2.3.1.9. Permanent Magnet Regions


Requirements are the normal demagnetization B-H curve (or relative permeability, if linear) and com-
ponents of the magnetic coercive force vector (values MGXX, MGYY, or MGZZ for either of the following):
Command(s): MP
GUI: Main Menu> Preprocessor> Material Props> Material Models> Electromagnetics> BH Curve

The demagnetization B-H curve, which normally lies in the second quadrant, must be defined in the
first quadrant. To do this, you need to add a constant "shift" to all H values, as shown in Figure 2.3: Ac-
tual and ANSYS (Shifted) Demagnetization Curves (p. 26). The shift, given by:

represents the magnitude of the coercive force. The coercive force components are used to align the
magnetization axis of the magnet with the element coordinate system.

Figure 2.3: Actual and ANSYS (Shifted) Demagnetization Curves

The example below shows a bar magnet that lies along an axis 30o to the global X-Y plane. The elements
in the magnet are to be assigned to a local element coordinate system whose X-axis is aligned with

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
26 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a Static Magnetic Analysis

the polarization direction. The example also shows the magnet's demagnetization characteristics and
the corresponding material property input.

/PREP7
HC=3000 ! Coercive force
BR=4000 ! Residual induction

THETA=30 ! Permanent magnet orientation


*AFUN,DEG ! Angular parametric functions in degrees
MP,MGXX,2,HC! X component of coercive force

! B-H curve:
TB,BH,2 ! B-H curve for material 2
TBPT,DEFI,-3000+HC,0 ! Shifted B-H curve
TBPT,,-2800+HC,500 ! First field defaults to "DEFI"
TBPT,,-2550+HC,1000
TBPT,,-2250+HC,1500
TBPT,,-2000+HC,1800
TBPT,,-1800+HC,2000
TBPT,,-1350+HC,2500
TBPT,,-900+HC,3000
TBPT,,-425+HC,3500
TBPT,,0+HC,4000
TBPLOT,BH,2 ! Plot of B vs. H

Figure 2.4: B-H Curve for Bar Magnet Example (p. 27) shows the B-H curve for the permanent magnet
as created in the first quadrant. For more information, read the descriptions of the *AFUN, MP, TB, and
TBPLOT commands in the Command Reference.

Figure 2.4: B-H Curve for Bar Magnet Example

You can represent nonlinear orthotropic materials (laminated structures) by combining a single B-H
curve with orthotropic relative permeability. ANSYS will use the B-H curve in each element coordinate

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 27
2-D Static Magnetic Analysis

system direction where a zero specified value of relative permeability is assigned. (For related information,
see the description of the ESYS command in the Command Reference.)

2.3.2. Building and Meshing the Model and Assigning Region Attributes
To build your model, use the procedures discussed in the Modeling and Meshing Guide. Then, assign
attributes to each region in your model. (Attributes are the element types and options, element coordin-
ate systems, real constants, and material properties you defined in Creating the Physics Environ-
ment (p. 16).)

To assign attributes via the GUI, perform these tasks:

1. Choose Main Menu> Preprocessor> Meshing> Mesh Attributes> Picked Areas. The Meshing At-
tributes dialog box appears.

2. Pick the area(s) making up one of the regions in your model.

3. On the dialog box, specify the material number, real constant set number, element type number, and
element coordinate system to use for the area or areas. Click OK.

4. Repeat the process for the next region, the region after that, and so on until all regions have defined
attributes.

If you are modeling two contacted bodies, follow the steps for a magnetic contact analysis, explained
in Modeling Magnetic Contact.

To assign attributes via commands, issue the ASEL command to select a region's area or areas. Then,
issue these commands: MAT (specifies the material number), REAL (specifies a real constant set), TYPE
(assigns an element type number), and ESYS (assigns an element coordinate system). Issue the same
command sequence for each area until all model regions have assigned attributes. (The Command Ref-
erence contains detailed information about the commands.)

When you have assigned all regional attributes, mesh the model using the procedures explained in the
Modeling and Meshing Guide.

2.3.3. Applying Boundary Conditions and Loads


You can apply boundary conditions and loads to a 2-D static magnetic analysis either on the solid
model (keypoints, lines, and areas) or on the finite element model (nodes and elements). The ANSYS
program automatically transfers loads applied to the solid model to the mesh during solution.

You access all loading operations through a series of cascading menus. When you choose Main Menu>
Solution> Define Loads> Apply> Magnetic, the ANSYS program lists available boundary conditions
and three load categories. You then choose the appropriate category and the appropriate boundary
condition or load. The boundary conditions and loads you can choose for a 2-D static analysis are as
follows:

-Boundary- -Excitation- -Flag- -Other-


-Vector Poten- -Curr Density- Comp. Force -Curr Segment-
On Keypoints On Keypoints -Infinite Surf- On Keypoints
On Nodes On Nodes On Lines On Nodes
-Flux Par'l- On Elements On Areas -Maxwell Surf-

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
28 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a Static Magnetic Analysis

-Boundary- -Excitation- -Flag- -Other-


On Lines Voltage Drop On Nodes On Lines
On Nodes On Areas
-Flux Normal- On Nodes
On Lines -Virtual Disp-
On Nodes On Keypoints
Periodic BCs* On Nodes

*For periodic boundary conditions, use the cyclic symmetry capability.

For example, to apply current density to elements, follow this GUI path:

GUI:
Main Menu> Preprocessor> Define Loads> Apply> Magnetic> Excitation> Curr Density> On
Elements

You may see other load types or loads listed on the menus. If they are grayed out, either they do not
apply to 2-D static analysis or the appropriate KEYOPT option on the element type has not been set.
(However, the grayed-out items will be valid for other types of magnetic analysis; the ANSYS GUI filters
menu choices.)

Alternatively, you can issue ANSYS commands to specify loads. See Alternative Analysis Options and
Solution Methods (p. 289) of this manual for information on how to do so.

To list existing loads, follow this GUI path:

GUI:
Utility Menu> List> Loads> load type

The next few paragraphs describe the loads you can apply.

2.3.3.1. Boundary Conditions


2.3.3.1.1. Magnetic Vector Potentials (AZ)
These loads specify flux-parallel, far-field, and periodic boundary conditions, as well as an imposed ex-
ternal magnetic field. The following table shows the AZ values required for each type of boundary
condition:

Boundary Condition Value of AZ


Flux-normal None required (naturally occurring)
Flux-parallel Specify AZ = 0, using the D command (Main Menu> Preprocessor>
Loads> Define Loads> Apply> Magnetic> Boundary> Vector Poten
or Flux Par'l> On Lines or On Nodes).
Far-field Use element INFIN110
Periodic For static analyses, use ANSYS' cyclic symmetry capability. For harmonic
or transient analyses, use the PERBC2D macro (described in Electric
and Magnetic Macros (p. 193)) to create odd or even symmetry periodic
boundary conditions on nodes (only). Or, use GUI path Main Menu>

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 29
2-D Static Magnetic Analysis

Boundary Condition Value of AZ


Preprocessor> Loads> Define Loads> Apply> Magnetic> Boundary>
Vector Poten> Periodic BCs.
Imposed external field Apply nonzero values of AZ. Use Main Menu> Preprocessor> Loads>
Define Loads> Apply> Magnetic> Boundary> Vector Poten or Flux
Par'l> On Lines or On Nodes.

Flux-parallel boundary conditions force the flux to flow parallel to a surface, while flux-normal boundary
conditions force the flux to flow normal to a surface. You do not need to specify far-field zero boundary
conditions if you use INFIN110 boundary elements to represent the "infinite" boundary of the model.
Use the cyclic symmetry capability to apply periodic boundary conditions in models that take advantage
of periodic or repeating flux patterns. For an imposed magnetic field, specify the appropriate nonzero
value of AZ.

2.3.4. Excitation Loads


2.3.4.1. Source Current Density (JS)

This specifies applied current to a source conductor. The units of JS are amperes/meter2 in the MKS
system. For a 2-D analysis, only the Z component of JS is valid; a positive value indicates current flowing
in the +Z direction in the planar case and the -Z (hoop) direction in the axisymmetric case.

Usually, you apply current density directly to the elements. You specify source current density in location
number 3 (for the BFE command), using either of the following:
Command(s): BFE
GUI: Main Menu> Preprocessor> Loads> Define Loads> Apply> Magnetic> Excitation> Curr
Density> On Elements

Refer to the Command Reference for further information.

Alternatively, you can also apply source current densities to areas of the solid model by using the BFA
command. You can then transfer the specified source current densities from the solid model to the finite
element model by using either the BFTRAN command or the SBCTRAN command.

2.3.5. Flags and Other Loads


2.3.5.1. Infinite Surface (INF) Flags
Infinite surface flags are not actual loads, but they are used to indicate which surface of an infinite
element faces toward the open (infinite) domain. Applying the INF label to an element face turns the
flag on for that face.

2.3.5.2. Maxwell Surface (MXWF) Flags


Maxwell surface flags are not actual loads, but they are used to indicate on which element faces the
magnetic force distribution is to be calculated. Applying the MXWF label to an element face turns the
flag on for that face.

Typically, you turn the MXWF flag on for the surfaces of air elements adjacent to an air-iron interface.
Forces are calculated at the air-iron interface (using the Maxwell stress tensor approach) and stored in
the air elements. In POST1, you can review and sum the stored forces in each air element to get the

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
30 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a Static Magnetic Analysis

total force acting on the body. You may, if you wish, then use these forces as loads in a structural ana-
lysis.

You can specify more than one component, but the components must not share adjacent air elements.
(Sharing air elements is typical when a single element layer separates two components.)

Note

Lorentz forces are applicable to current carrying conductors and they are calculated automat-
ically. Do not apply Maxwell or virtual displacement flags to any current carrying conductor
surfaces.

2.3.5.3. Magnetic Virtual Displacement (MVDI) Flags


Magnetic virtual displacement flags are not actual loads, but they are used to initiate the calculation
of forces on a body in the model. The MVDI method provides an alternative to the Maxwell surface
(MXWF) method. The ANSYS program calculates the forces, using the virtual work approach, as it pro-
cesses the solution.

To trigger the calculation, specify the MVDI flag value as 1.0 at all nodes in the region of interest and
0.0 (default setting) at all adjacent air nodes. Although you can enter MVDI values greater than 1.0, you
should not normally do so. Forces will be calculated and stored in the air elements adjacent to the
body.

The band of air elements surrounding the region of interest should be uniformly thick. In POST1, you
can review and sum the stored forces in each air element to get the total force.

Figure 2.5: MVDI Specifications for Virtual Work Force Calculation


MVDI = 0.0 (default)

MVDI = 1.0

Iron

Air

Note

Lorentz forces are applicable to current carrying conductors and they are calculated automat-
ically. Do not apply Maxwell or virtual displacement flags to any current carrying conductor
surfaces.

2.3.5.4. Current Segments (CSGX)


This infrequently used load type applies nodal current loads. To compute the current segment for an
axisymmetric analysis, you must multiply the current at a node by 2 πr. Units for current segments are
ampere-meters in the MKS system.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 31
2-D Static Magnetic Analysis

Current flows in the Z direction, consistent with the degree of freedom AZ. You can specify a known
sheet current, for example, through current segments. Take care in distributing a current segment load
along nodes. For a discussion of load distribution on nodes, see the Modeling and Meshing Guide.

2.3.6. Solving the Analysis


This section describes the tasks you perform to solve a 2-D static magnetic analysis problem.

2.3.6.1. Defining the Analysis Type


The first step is to enter the SOLUTION processor. To do so, use either of the following:
Command(s): /SOLU
GUI: Main Menu> Solution

To specify the analysis type, do either of the following:

• In the GUI, choose menu path Main Menu> Solution> Analysis Type> New Analysis and then choose
a static analysis.

• If this is a new analysis, issue the command ANTYPE,STATIC,NEW.

If you want to restart a previous analysis (for example, to restart an unconverged solution or to specify
additional excitation), issue the command ANTYPE,STATIC,REST. You can restart an analysis only if you
previously completed a 2-D static magnetic analysis, and the files Jobname.EMAT, Jobname.ESAV, and
Jobname.DB from the previous run are available.

2.3.6.2. Defining Analysis Options


Next, you define which solver you want to use. You can specify any of these values:

• Sparse solver (default)

• Jacobi Conjugate Gradient (JCG) solver

• Incomplete Cholesky Conjugate Gradient (ICCG) solver

• Preconditioned Conjugate Gradient solver (PCG)

To select an equation solver, use either of the following:


Command(s): EQSLV
GUI: Main Menu> Solution> Analysis Type> Analysis Options

We recommend that you use the sparse solver for 2-D or shell/beam models. However, the JCG or PCG
solvers may be more useful for extremely large and bulky models. Models that are voltage-fed or that
include velocity effects produce unsymmetric matrices and can use only the sparse solver, the JCG
solver, or the ICCG solver. Circuit-fed models can use only the sparse solver.

2.3.6.3. Saving a Backup Copy of the Database


Use the SAVE_DB button on the ANSYS Toolbar to save a backup copy of the ANSYS database. This
enables you to retrieve your model should your computer fail while analysis is in progress. To retrieve
a model, re-enter ANSYS and use one of the following:
Command(s): RESUME
GUI: Utility Menu> File> Resume Jobname.db

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
32 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a Static Magnetic Analysis

2.3.6.4. Starting the Solution


In this step, you specify magnetic solution options and initiate the solution. For a nonlinear analysis,
use a two-step solution sequence:

1. Ramp the loads over three to five substeps, each with one equilibrium iteration.

2. Calculate the final solution over one substep, with five to 10 equilibrium iterations.

You can specify the two-step solution sequence and initiate the solution using either of the following:
Command(s): MAGSOLV (with OPT field set to zero)
GUI: Main Menu> Solution> Solve> Electromagnet> Static Analysis> Opt & Solv

If you like, you can step manually through the two-step solution sequence. See Alternative Analysis
Options and Solution Methods (p. 289) for the procedure to follow for manual solution.

2.3.6.5. Tracking Convergence Graphically


As nonlinear electromagnetic analysis proceeds, ANSYS computes convergence norms with corresponding
convergence criteria each equilibrium iteration. Available in both batch and interactive sessions, the
Graphical Solution Tracking (GST) feature displays the computed convergence norms and criteria while
the solution is in process. By default, /GST is ON for interactive sessions and OFF for batch runs. To turn
/GST on or off, use either of the following:
Command(s): /GST
GUI: Main Menu> Solution> Load Step Opts> Output Ctrls> Grph Solu Track

Figure 2.6: Convergence Norms Displayed by the Graphical Solution Tracking (GST) Feature (p. 33) below
shows a typical GST display:

Figure 2.6: Convergence Norms Displayed by the Graphical Solution Tracking (GST) Feature

2.3.6.6. Finishing the Solution


To leave the SOLUTION processor, use either of the following:
Command(s): FINISH
GUI: Main Menu> Finish

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 33
2-D Static Magnetic Analysis

2.3.6.7. Calculating the Inductance Matrix and Flux Linkage


Calculating the differential inductance matrix and the total flux linkage in each coil requires assigning
components to coil elements, defining nominal currents, and performing a nominal solution about an
operating point using the sparse equation solver.

For a system of coils modeled with PLANE233, use linear perturbation analysis to calculate the self- and
mutual differential inductances and the total flux linkage in each coil.

2.3.7. Reviewing Results


The program writes results from a 2-D static analysis to the magnetic results file, Jobname.RMG. Results
include the data listed below:

2.3.7.1. Primary data:


• Nodal magnetic DOFs (AZ, CURR)

2.3.7.2. Derived data:


• Nodal magnetic flux density (BX, BY, BSUM)

• Nodal magnetic field intensity (HX, HY, HSUM)

• Nodal magnetic forces (FMAG: components X, Y, SUM)

• Nodal reaction current segments (CSGZ)

• Element source current density (JSZ)

• Total electric current density (JT)

• Joule heat per unit volume (JHEAT)

Additional data, specific to each element type, also is available. See the Element Reference for details.

You can review analysis results in POST1, the general postprocessor, by choosing either in the following:
Command(s): /POST1
GUI: Main Menu> General Postproc

The following section, "Reading In Results Data," discusses some typical postprocessing operations for
a static magnetic analysis. For a complete description of all postprocessing functions, see the Basic
Analysis Guide.

2.3.8. Reading in Results Data


To review results in POST1, the ANSYS database must contain the same model for which the solution
was calculated. Also, the results file (Jobname.RMG) must be available.

To read the data from the results file into the database, use either in the following:
Command(s): SET
GUI: Utility Menu> List> Results> Load Step Summary

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
34 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a Static Magnetic Analysis

If the model is not in the database, restore it using the command or menu path listed below and then
use the SET command or its equivalent menu path to read in the desired set of results.
Command(s): RESUME
GUI: Utility Menu> File> Resume Jobname.db

To review the solutions available in the results file, specify the LIST option. You can identify the data
set by the load step and substep numbers or by time. If you specify a time value for which no results
exist, the ANSYS program performs linear interpolation to calculate the results at that time.

2.3.8.1. Flux Lines


Flux lines show lines of constant AZ (or constant radius-times-AZ for axisymmetric problems). Display
flux lines using either of the following:
Command(s): PLF2D
GUI: Utility Menu> Plot> Results> Flux Lines

2.3.8.2. Contour Displays


You can contour almost any result item (including flux density, field intensity, and total current density
(JTZ)) using the following commands or menu paths:
Command(s): PLNSOL, PLESOL
GUI: Utility Menu> Plot> Results> Contour Plot> Elem Solution
Utility Menu> Plot> Results> Contour Plot> Nodal Solution

Caution

Nodal contour plots for derived data, such as flux density and field intensity, are averaged
at the nodes.

In PowerGraphics mode (default), you can visualize nodal averaged contour displays which account for
material discontinuities. Should you need to activate PowerGraphics, use either /GRAPHICS,POWER or
Utility Menu> PlotCtrls> Style> Hidden-Line Options.

2.3.8.3. Vector Displays


Vector displays (not to be confused with vector mode) offer an effective way to view vector quantities
such as B, H, and FMAG. For vector displays, use either of the following:
Command(s): PLVECT
GUI: Utility Menu> Plot> Results> Vector Plot

For vector listings, use either method shown below:


Command(s): PRVECT
GUI: Utility Menu> List> Results> Vector Data

2.3.8.4. Tabular Listings


You can produce tabular listings of results data, either unsorted or sorted by node or by element. To
sort data before listing it, use any of the following:
Command(s): ESORT, NSORT
GUI: Main Menu> General Postproc> List Results> Sorted Listing> Sort Nodes
Main Menu> General Postproc> List Results> Sorted Listing> Sort Elems

To produce tabular data listings, use any of the following:

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 35
2-D Static Magnetic Analysis

Command(s): PRESOL, PRNSOL, PRRSOL


GUI: Main Menu> General Postproc> List Results> Element Solution
Main Menu> General Postproc> List Results> Nodal Solution
Main Menu> General Postproc> List Results> Reaction Solu

2.3.8.5. Magnetic Forces


Three types of magnetic forces are available when using PLANE13:

• Lorentz forces (the J x B forces) are calculated automatically for all current carrying elements. (Exercise caution
in interpreting Lorentz forces in permeable (μr > 1r ) materials.) To list these forces, select all current-carrying
elements and use either the PRNSOL,FMAG command or its equivalent menu path. You can also sum these
forces. First, move them to the element table using either of the following:
Command(s): ETABLE,tablename,FMAG,X (or Y)
GUI: Main Menu> General Postproc> Element Table> Define Table

Then, calculate the sum using either method below:


Command(s): SSUM
GUI: Main Menu> General Postproc> Element Table> Sum of Each Item

• Maxwell forces are calculated for all elements at which the surface flag MXWF is specified as a surface "load."
To list Maxwell forces, select all such elements, then select either of the following:
Command(s): PRNSOL, FMAG
GUI: Main Menu> General Postproc> List Results> Nodal Solution

The sum of these forces gives the total force on the surface. To sum the forces, use the procedure
described in the foregoing for Lorentz forces.

• Virtual work forces are calculated for all air elements with an MVDI specification adjacent to the body of in-
terest. To extract these forces, select these elements and use the ETABLE command along with the sequence
number (snum) for the data requested to store the forces from the element NMISC record (see Table 4.13-
3 in the Element Reference). Do so by choosing either of the following:
Command(s): ETABLE,tablename,NMISC,snum
GUI: Main Menu> General Postproc> Element Table> Define Table

Once you move the data to the element table, you can list them using the PRETAB command (shown
with its menu path equivalent below) and sum them with the SSUM command or its menu path
equivalent. You can also access the force data using the PLESOL and PRESOL commands (or their
equivalent menu paths) with the NMISC item label.
Command(s): PRETAB
GUI: Main Menu> General Postproc> Element Table> List Elem Table

The sum of these forces gives the total force on the surface. To sum the forces, use the procedure
described in the foregoing for Lorentz forces.

For information on calculating magnetic forces when using PLANE233, see Legacy vs. Current-Technology
2-D Magnetic Elements (p. 15).

2.3.8.6. Magnetic Torque


Lorentz, Maxwell and virtual work torque computations are available when using PLANE13:

• Lorentz torque (the J x B torque) is calculated automatically for all current carrying elements. (Exercise caution
in interpreting Lorentz torque values in permeable (mr > 1) materials.) To extract these torque values, select

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
36 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a Static Magnetic Analysis

all current-carrying elements and use the ETABLE command along with the sequence number (snum) for
the data requested to store the torque values from the element NMISC record (see Tables 4.13-3 and 4.53-
3 in the Element Reference). Do so by choosing either of the following:
Command(s): ETABLE,tablename,NMISC,snum
GUI: Main Menu> General Postproc> Element Table> Define Table

Once you move the data to the element table, you can list the torque values using the following
command:
Command(s): PRETAB
GUI: Main Menu> General Postproc> Element Table> List Elem Table

The torque data can also be listed using the PLESOL and PRESOL commands, respectively, with the
NMISC item label.

You can also sum the torque values to obtain the total torque on the body. To calculate the sum use
the following:
Command(s): SSUM
GUI: Main Menu> General Postproc> Element Table> Sum of Each Item

• Maxwell torque values are calculated for all elements at which the surface flag MXWF is specified as a surface
"load." To extract and sum Maxwell torque values, you can use the procedure described in the foregoing
for extracting and summing Lorentz torque values.

• Virtual work torque values are calculated for all air elements with an MVDI specification adjacent to the body
of interest. To extract and sum virtual work torque values, you can use the procedure described in the
foregoing for extracting and summing Lorentz torque values.

For information on calculating magnetic torques when using PLANE233, see Legacy vs. Current-Techno-
logy 2-D Magnetic Elements (p. 15).

2.3.8.7. Coil Resistance and Inductance


For stranded coils with the voltage-fed or circuit-fed options, you can calculate the resistance and in-
ductance of the coil. Each element stores values of resistance and inductance. Summing these values
gives the total resistance and inductance of the modeled region of the conductor. To store and sum
these values, select the conductor elements using the ETABLE,tablename,NMISC,n command or its
equivalent menu path. (For the n value, use 8 for resistance and 9 for inductance.) Use the SSUM
command or its menu path equivalent to sum the data.

2.3.8.8. Calculating Other Items of Interest


You can calculate many other items of interest (such as global forces, torque, source input energy, in-
ductance, flux linkages, and terminal voltage) from the data available in the database in postprocessing.
The ANSYS command set supplies the following macros for these calculations:

• The CURR2D macro calculates current flow in a 2-D conductor.

• The EMAGERR macro calculates the relative error in an electrostatic or electromagnetic field analysis.

• The FLUXV macro calculates the flux passing through a closed contour.

• The MMF macro calculates magnetomotive force along a path.

• The PLF2D macro generates a contour line plot of equipotentials.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 37
2-D Static Magnetic Analysis

• The SENERGY macro determines the stored magnetic energy or co-energy.

For more discussion of these macros, see Electric and Magnetic Macros (p. 193).

For information on the macros applicable to PLANE233, see the element's description in the Element
Reference.

2.4. 2-D Stranded Coil Analysis


This section describes how to perform a 2-D stranded coil analysis.

2.4.1. Performing a 2-D Stranded Coil Analysis


To perform a stranded coil analysis using PLANE233, you need to do the following:

1. Select PLANE233 element type and set KEYOPT(1) = 2.

2. Specify magnetic properties using MP,MURX or TB,BH.

3. Optionally, for a Joule heat calculation, you can specify isotropic electrical resistivity using MP,RSVX .

4. Specify coil parameters using the element real constants on the R command:

• THK (R1) – Out-of-plane thickness for the plane geometry (KEYOPT(3) = 0) and fraction of the 360° basis
for the axisymmetric geometry (KEYOPT(3) = 1). For 2-D planar problems, this constant represents the
true length of the coil. Defaults to 1.

• SC (R2) – Coil cross-sectional area. This constant represents the true physical cross-section of the coil
regardless of symmetry modeling considerations. It includes the cross-sectional area of the wire and the
non-conducting material filling the space between the winding.

• NC (R3) – Number of coil turns. This constant represents the total number of winding turns in a coil re-
gardless of any symmetry modeling considerations.

• RAD (R4) – Mean radius of the coil. This constant applies to the axisymmetric geometry (KEYOPT(3) = 1)
only. If the mean radius is not known, input VC/((2π)(SC)(THK)) , where VC is the full symmetry true
physical volume of the coil. VC includes the volume occupied by the wire and the non-conducting ma-
terial filling the space between the winding.

• TZ (R5) – Current polarity. This constant assigns a direction to the current flow with respect to the Z-axis.
It defaults to 1 for plane (KEYOPT(3) = 0) and to -1 for axisymmetric (KEYOPT(3) = 1) geometries.

• R (R6) – Coil resistance. This constant represents the total coil DC resistance regardless of any symmetry
modeling considerations. If the wire electrical resistivity ρ, total length L, and diameter D are available
instead, the total coil DC resistance can be calculated as follows R = 4ρL/(πD2).

• SYM (R7) – Coil symmetry factor. This constant represents the ratio of the full symmetry coil cross-sec-
tional area (SC) to the modeled coil area. The input should be greater or equal to 1.

5. Specify the analysis type. The stranded coil analysis can be static, transient, or harmonic.

• If you perform a static analysis, you can use KEYOPT(2) to select a strong (using matrix terms) or weak
(using the load vector) electromagnetic coupling. The strong coupling option (KEYOPT(2) = 0) produces
an unsymmetric matrix and, in a linear analysis, a coupled response is achieved after one iteration. The

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
38 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 2-D Static Magnetic Analyses

weak coupling option (KEYOPT(2) = 1) produces a symmetric matrix and requires at least two iterations
to achieve a coupled response.

• If you perform a transient or harmonic analysis, you can use KEYOPT(2) to choose between strong
coupling with 'true' voltage drop and back-EMF (VOLT and EMF) and strong coupling with time-integrated
VOLT and EMF. The strong coupling option with 'true' VOLT and EMF (KEYOPT(2) = 0) produces an un-
symmetric matrix. The strong coupling option with time-integrated VOLT and EMF (KEYOPT(2) = 2)
produces a symmetric matrix (provided any stranded coil symmetry factor (SYM) is 1). In a linear analysis,
a coupled response is achieved after one iteration.

6. Couple VOLT and EMF degrees of freedom for each coil: CP,,VOLT and CP,,EMF.

7. Apply magnetic and electric boundary conditions.

8. Apply electric loading:

• Nodal constraints for VOLT and EMF degrees-of-freedom: D,,VOLT and D,,EMF. Applicable when KEYOPT(2)
is set to 0 or 1.

• Nodal total electric current: F,,AMPS.

• Voltage or current loading using CIRCU124 with KEYOPT(1) = 3,4,or 9 through 12. Applicable when
KEYOPT(2) is set to 0 or 1.

2.4.2. Reviewing Results from a 2-D Stranded Coil Analysis


In addition to the degrees of freedom results AZ, VOLT and EMF, the following derived data is available
with the PLANE233 stranded-coil analysis:

• Nodal magnetic flux density B (X, Y, SUM)

• Nodal magnetic field intensity H (X, Y, SUM)

• Nodal magnetic forces FMAG (X, Y, SUM)

• Element conduction current density (JTZ or JSZ) at the element centroid [1]

• Joule heat rate per unit volume (JHEAT) [2]

• Element magnetic energy (SENE) (valid for linear materials only)

1. JTZ and JSZ are the effective current densities as they are calculated based on the coil cross-sectional area
(SC) that includes the wire and the non-conducting material filling the space between the winding.

2. JHEAT represents the effective Joule heat generation rate per unit volume as it is calculated based on the
modeled coil volume that includes the wire and the non-conducting material filling the space between
the winding.

2.5. Example 2-D Static Magnetic Analyses


The following examples are available:
2.5.1. Example: Basic 2-D Static Magnetic Analysis
2.5.2. Example: 2-D Static Magnetic Contact Analysis
2.5.3. Example: 2-D Static Magnetic Analysis with Velocity Effects
2.5.4. Other Examples

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 39
2-D Static Magnetic Analysis

2.5.1. Example: Basic 2-D Static Magnetic Analysis


The following example is a 2-D static magnetic analysis of a solenoid actuator.

2.5.1.1. Description
The example analysis, based on a solenoid actuator, analyzes the actuator as a 2-D axisymmetric model.
The example calculates the force on the armature (the moving component of the actuator) and the in-
ductance of the coil. Figure 2.7: Diagram of a Solenoid Actuator (p. 40) below shows you the solenoid
actuator:

Figure 2.7: Diagram of a Solenoid Actuator

Armature
td (iron)

gap space
Armature: moving component
ta tc of the actuator.

Back-iron: stationary iron


wc Backiron component of the actuator that
(iron) completes the magnetic circuit
around the coil.
hc Coil (copper)
650 turns Coil: stranded, wound coil
Axis of 1 amp/turn supplying a predefined current.
symmetry
Gap: thin rectangular region
of air between the armature
and the pole faces of the
back-iron.
Y tb
Z X

wc

2.5.1.2. Analysis Parameters


The analysis uses the parameters listed below to model the actuator geometry:

Parameter Description
Number of turns in the coil; used in postprocessing
I=1.0 Current per turn
ta=.75 Thickness of inner leg of magnetic circuit
tb=.75 Thickness of lower leg of magnetic circuit
tc=.50 Thickness of outer leg of magnetic circuit
td=.75 Armature thickness
wc=1 Width of coil
hc=2 Height of coil
gap=.25 Gap
space=.25 Space around coil
ws=wc+2*space
hs=hc+.75
w=ta+ws+tc Total width of model
hb=tb+hs
h=hb+gap+td Total height of model

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
40 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 2-D Static Magnetic Analyses

Parameter Description
acoil=wc*hc Coil area
jdens=n*i/acoil Current density of coil

2.5.1.3. Approach and Assumptions


The magnetic flux that the coil current produces is assumed to be small enough that no saturation of
the iron occurs. This allows a single iteration linear analysis. To simplify the example model, the flux
leakage out of the iron at the perimeter of the model is assumed to be minimal. Under normal conditions,
the model would include air surrounding the iron to model the effects of flux leakage.

Because no leakage is assumed at the perimeter of the model, the flux flows parallel to the surface. You
enforce this by placing a "flux parallel" condition around the model.

For a static (DC) current, you may enter the current in the form of current density over the area of the
coil. The APDL is used to compute the current density from the number of turns, the current per turn,
and the coil area. The armature is flagged for a force calculation.

In postprocessing, the forces are summarized for the armature, using both a Maxwell stress tensor and
a virtual work calculation. Flux density also is displayed. The final postprocessing operation computes
the terminal parameters including coil inductance.

Note

The example analysis is only one of many possible 2-D static magnetic analyses. Not all such
analyses follow exactly the same steps or perform those steps in the same sequence. The
properties of the material or materials being analyzed and the conditions surrounding those
materials determine which steps a specific analysis needs to include.

For a detailed step-by-step procedure for the magnetic analysis of a solenoid actuator, see the Electro-
magnetics Tutorial on the ANSYS Customer Portal.

2.5.1.4. Command Method


You can perform the example static analysis of a solenoid actuator using the commands shown below
rather than via the GUI method. All text prefaced by an exclamation point (!) is a comment.
/PREP7
/TITLE, 2-D Solenoid Actuator Static Analysis

ET,1,PLANE233 ! Define PLANE233 as element type


KEYOPT,1,3,1 ! Use axisymmetric analysis option
KEYOPT,1,7,1 ! Condense forces at the corner nodes
MP,MURX,1,1 ! Define material properties (permeability)
MP,MURX,2,1000 ! Permeability of backiron
MP,MURX,3,1 ! Permeability of coil
MP,MURX,4,2000 ! Permeability of armature

/com, ! Set parameter values for analysis


n=650 ! Number of coil turns
i=1.0 ! Current per turn
ta=.75 ! Model dimensions (centimeters)
tb=.75
tc=.50
td=.75
wc=1

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 41
2-D Static Magnetic Analysis

hc=2
gap=.25
space=.25
ws=wc+2*space
hs=hc+.75
w=ta+ws+tc
hb=tb+hs
h=hb+gap+td
acoil=wc*hc ! Cross-section area of coil (cm**2)
jdens=n*i/acoil ! Current density (A/cm**2)

/PNUM,AREA,1
RECTNG,0,w,0,tb ! Create rectangular areas
RECTNG,0,w,tb,hb
RECTNG,ta,ta+ws,0,h
RECTNG,ta+space,ta+space+wc,tb+space,tb+space+hc
AOVLAP,ALL
RECTNG,0,w,0,hb+gap
RECTNG,0,w,0,h
AOVLAP,ALL
NUMCMP,AREA ! Compress out unused area numbers
APLOT

ASEL,S,AREA,,2 ! Assign attributes to coil


AATT,3,1,1,0
ASEL,S,AREA,,1 ! Assign attributes to armature
ASEL,A,AREA,,12,13
AATT,4,1,1
ASEL,S,AREA,,3,5 ! Assign attributes to backiron
ASEL,A,AREA,,7,8
AATT,2,1,1,0
/PNUM,MAT,1 ! Turn material numbers on
ALLSEL,ALL
APLOT ! Plot areas

SMRTSIZE,4 ! Set smart size meshing level 4 (fine)


AMESH,ALL ! Mesh all areas
ESEL,S,MAT,,4 ! Select armature elements
CM,ARM,ELEM ! Define armature as a component
ALLSEL,ALL
ARSCAL,ALL,,,.01,.01,1,,,1 ! Scale model to MKS (meters)
FINISH

/SOLU
ESEL,S,MAT,,3 ! Select coil elements
BFE,ALL,JS,1,,,jdens/.01**2 ! Apply current density (A/m**2)
ESEL,ALL
NSEL,EXT ! Select exterior nodes
D,ALL,AZ,0 ! Set potentials to zero (flux-parallel)
ALLSEL,ALL
SOLVE
FINISH

/POST1
PLF2D ! Plot flux lines in the model

CMSEL,S,'ARM'
NSLE ! Select nodes attached to the armature
ESLN ! Select elements attached to the selected nodes
EMFT ! Summarize magnetic forces
ALLSEL,ALL
PLVECT,B,,,,VECT,ELEM,ON ! Plot flux density as vectors
/GRAPHICS,POWER ! Turn PowerGraphics on
AVRES,2 ! Don't average results across materials
PLNSOL,B,SUM ! Plot flux density magnitude
FINISH

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
42 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 2-D Static Magnetic Analyses

2.5.2. Example: 2-D Static Magnetic Contact Analysis


This example presents a 2-D model of a coil actuator that demonstrates the use of surface-to-surface
contact. Contact is typically used when multiple runs are required with re-positioning of a pole piece
in a static or transient analysis, or for convenience in meshing regions with non-connecting meshes.

2.5.2.1. Description
The contact region is located at the mid-span of the air gap. Two independent meshes are created; one
for the lower portion of the model consisting of the back iron, coil, and lower air, and the upper portion
consisting of the pole and the upper air. Target elements (TARGE169) are created using the ESURF
command on the upper air elements at the air gap (coarser mesh). Contact elements (CONTA172) are
created using the ESURF command on the lower air elements at the air gap (finer mesh). The MPC
option is selected using bonded contact.

Figure 2.8: Element Plot Showing Independent Meshes

2.5.2.2. Input Listing


/prep7
/title, Actuator model using surface to surface contact

et,1,233 ! plane233
et,2,169 ! Target
et,3,172,7,2,,2 ! Contact, MPC option
keyopt,3,12,5 ! Bonded contact

mp,murx,1,1

tb,bh,2,,40 ! BH curve
tbpt,,355,.7
,,405,.8
,,470,.9
,,555,1.
,,673,1.1
,,836,1.2
,,1065,1.3
,,1220,1.35
,,1420,1.4
,,1720,1.45
,,2130,1.5
,,2670,1.55
,,3480,1.6
,,4500,1.65
,,5950,1.70
,,7650,1.75
,,10100,1.8
,,13000,1.85
,,15900,1.9
,,21100,1.95

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 43
2-D Static Magnetic Analysis

,,26300,2.
,,32900,2.05
,,42700,2.1
,,61700,2.15
,,84300,2.2
,,110000,2.25
,,135000,2.3
,,200000,2.41
,,400000,2.69
,,800000,3.22

mp,murx,3,1 ! coil

! create backiron
rectng,0,.06,0,.01
rectng,0,.01,.01,.02
rectng,.05,.06,.01,.02

! create coil
rectng,.02,.04,-.005,0
rectng,.02,.04,.01,.015
aglue,all

! create lower air domain


rectng,-.02,.08,-.01,.021
aovlap,all
numcmp,area
cm,lower,area

! create pole
rectng,0,.06,.022,.032

! create upper air


rectng,-.02,.08,.021,.04
aovlap,7,8
asel,s,area,,7,9
cm,upper,area

asel,s,area,,4,6
aatt,2,1,1 ! backiron
asel,s,area,,7
aatt,2,1,1 ! pole
asel,s,area,,2,3
aatt,3,1,1 ! coil

cmsel,s,lower
esize,.002
amesh,all
cmsel,s,upper
esize,.003
amesh,all

esla,s
nsle,s
nsel,r,loc,y,.021
real,2 ! target element needs a real constant ID
type,2
esurf ! mesh target elements

cmsel,s,lower
esla,s
nsle,s
nsel,r,loc,y,.021
type,3
esurf ! mesh contact elements
allsel,all

nsel,s,loc,x,-.02
nsel,a,loc,x,.08
nsel,a,loc,y,-.01

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
44 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 2-D Static Magnetic Analyses

nsel,a,loc,y,.04
d,all,az,0 ! flux parallel

asel,s,area,,3
esla,s
bfe,all,js,,,,5e6 ! coil current density
asel,s,area,,2
esla,s
bfe,all,js,,,,-5e6
allsel,all
finish

/solu
solve
finish

/post1
plf2d
plnsol,b,sum
fini

Figure 2.9: Flux Line Plot

Figure 2.10: Flux Density Plot

2.5.3. Example: 2-D Static Magnetic Analysis with Velocity Effects


This example demonstrates the use of the velocity effects in a 2-D model of a hollow conductive cylinder
rotating around a stationary permanent magnet.

2.5.3.1. Description
A long conductive hollow cylinder rotates about its axis. A stationary solid cylindrical permanent magnet
resides with the hollow rotating one. The two bodies are concentric, and the permanent magnet is

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 45
2-D Static Magnetic Analysis

poled in a direction normal to its axis. The ends of the rotating hollow cylinder are electrically insulated,
so the net current flowing in the axial direction is zero (open terminal conductor).

The objective is to determine the Joule heat per unit length in the rotating conductive cylinder and
display the eddy currents induced in it by the velocity effects. The evaluation is made half-way along
the length of the rotating cylinder, well away from insulated ends where the induced current will reverse
direction and have significant non-axial components.

Figure 2.11: Finite Element Model

2.5.3.2. Input Listing


/title, Velocity Effects in a Hollow Cylinder
/nopr
/pnu,mat,1
/num,1

C*********************************************************
C*** PARAMETERS
C*********************************************************
pi=acos(-1)

r_PM=0.010
r1_cyl=0.012
r2_cyl=0.015

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
46 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 2-D Static Magnetic Analyses

r_dmn=0.025

l=0.050

Hc_PM=1e6
mur_PM=1.04

rsv_cyl=3e-8
mur_cyl=1

omga=50 ! ANGULAR VELOCITY, RPM

C*********************************************************
C*** GEOMETRY
C*********************************************************
/prep7

asel,none
pcir,r_PM,,0,90
aatt,2,2,2

asel,none
pcirc,r1_cyl,r2_cyl,0,90
aatt,3,3,3

alls
cm,keep_a,area

asel,none
pcirc,r_dmn,,0,90
cm,scrap_a,area

alls
asba,scrap_a,keep_a,,dele,keep
cmse,u,keep_a
aatt,1,1,1

alls
aplo

C*********************************************************
C*** ATTRIBUTES, MESH
C*********************************************************
et,1,233
mp,murx,1,1

et,2,233
mp,murx,2,mur_PM
mp,mgyy,2,Hc_PM

et,3,233,1 ! CYLINDER
mp,murx,3,mur_cyl
mp,rsvx,3,rsv_cyl

alls
ames,all

csys,1
agen,4,all,,,0,90,0
numm,node,1e-8,1e-8
numm,kp,1e-8,1e-8

C*********************************************************
C*** BCs
C*********************************************************
alls
nsel,s,ext
d,all,az

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 47
2-D Static Magnetic Analysis

esel,s,mat,,3
nsle
cp,1,volt,all
alls

C*********************************************************
C*** LOAD
C*********************************************************
bf,all,velo,,,,,,omga*(2*pi)/60 ! Angular velocity, rad/sec

C*********************************************************
C*** SOLVE
C*********************************************************
/solu
solve
fini

C*********************************************************
C*** RESULTS
C*********************************************************
/post1
set

etab,,jhea
etab,,volu
smul,ht,jhea,volu
ssum

*get,ht_total,ssum,,item,ht
ht_total=ht_total*l

/ann,dele
/tla,-0.25,0.90, Net Heat in Cylinder: %ht_total% W

/vie,1,1,2,3
plve,jc,,,,vect,,on

/com,
/com, Net Heat in Cylinder: %ht_total% W
/com,
fini

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
48 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 2-D Static Magnetic Analyses

2.5.3.3. Results
Figure 2.12: Current Density in the Conductive Cylinder

2.5.4. Other Examples


Another ANSYS, Inc., publication, the Mechanical APDL Verification Manual, contains several additional
examples of 2-D static magnetic analyses:

VM165 - Current-Carrying Ferromagnetic Conductor


VM172 - Stress Analysis of a Long, Thick, Isotropic Solenoid
VM188 - Force Calculation on a Current Carrying Conductor
VM270 - Forces in permanent magnets

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 49
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
50 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 3: 2-D Harmonic Magnetic (AC) Analysis
Harmonic magnetic analysis calculates the effects of alternating current (AC) or voltage excitation in
electromagnetic devices and moving conductors. These effects include:

• Eddy currents

• Skin effects (eddy currents in current conductors carrying an impressed current)

• Power loss due to eddy currents

• Forces and torque

• Impedance and inductance

• Two contacting bodies with dissimilar meshes (such as the air gap in a rotor/stator configuration).

Typical applications for harmonic analysis are transformers, induction machines, eddy-current braking
systems, and most other electromagnetic devices that work on AC.

Permanent magnets are not permitted in a harmonic analysis. Material hysteresis effects are neglected.

The following 2-D harmonic analysis topics are available:


3.1. Linear Versus Nonlinear Harmonic Analysis
3.2. Elements Used in Harmonic Magnetic Analysis
3.3. Creating a Harmonic 2-D Physics Environment
3.4. Building and Meshing the Model and Assigning Region Attributes
3.5. Applying Boundary Conditions Loads (Excitation) to Harmonic Problems
3.6. Obtain a Solution
3.7. Reviewing Results
3.8. Example 2-D Harmonic Magnetic Analyses

3.1. Linear Versus Nonlinear Harmonic Analysis


For low saturation cases a linear time-harmonic analysis can be run with assumed constant permeability
properties. For moderate to high saturation conditions a nonlinear time-harmonic or time-transient (2-
D Transient Magnetic Analysis (p. 75)) solution should be considered.

In moderate to high saturation cases, an analyst is often most interested in obtaining global electromag-
netic force, torque and power losses in a magnetic device under sinusoidal steady state excitation, but
less concerned with the actual flux density waveform. Under such circumstances, an approximate non-
linear time-harmonic analysis procedure may be pursued. This procedure can predict the time-averaged
torque and power losses with good accuracy, and yet at much reduced computational cost compared
to a transient time-stepping procedure.

The basic principle of the nonlinear time-harmonic analysis is to replace the DC B-H curve with a fictitious
or effective B-H curve based on an energy equivalence method.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 51
2-D Harmonic Magnetic (AC) Analysis

With the effective B-H curve, a nonlinear transient problem can be effectively reduced to a nonlinear
time-harmonic one. In this nonlinear analysis, all field quantities are all sinusoidal at a given frequency,
similar to the linear harmonic analysis, except that a nonlinear solution is computed.

It should be emphasized that in a nonlinear transient analysis, given a sinusoidal power source, the
magnetic flux density B has a non-sinusoidal waveform. While in the nonlinear harmonic analysis, B is
assumed sinusoidal. Therefore, it is not the true waveform, but rather represents an approximation to
the fundamental time harmonic of the true flux density waveform. The time-averaged global force,
torque and loss, which are determined by the approximated fundamental harmonics of fields, are then
subsequent approximations to the true values.

3.2. Elements Used in Harmonic Magnetic Analysis


A harmonic model uses only the vector potential formulation for eddy-current regions. Therefore, you
can use only the element types described below to model eddy current domains.

For detailed information about the elements, consult the Element Reference. That manual organizes
element descriptions in numeric order. The Mechanical APDL Theory Reference manual also contains in-
formation about the elements.

Table 3.1: 2-D Solid Elements

Element Dimens. Shape or DOFs Notes


Characteristic
PLANE13 2-D 4-node quadrilateral Up to four at each Legacy element
or 3-node triangular node; these can be
magnetic vector Supported for
potential (AZ), cyclic symmetry
displacements, (periodic) analysis,
temperature, or static only.
time-integrated electric
potential
PLANE233 2-D 8-node quadrilateral Up to three at each Current-technology
or 6-node triangular node; these can be element
magnetic vector [1]
potential (AZ), electric
potential/voltage drop Supported for
or time-integrated cyclic symmetry
electric (periodic) analysis.
potential/voltage drop
(VOLT), electromotive
force or time-integrated
electromotive force
(EMF)

1. Whenever possible, use PLANE233 (the current-technology electromagnetic element) rather than PLANE13
(legacy magnetic element). See Legacy vs. Current-Technology 2-D Magnetic Elements (p. 15) for a list of
the capabilities that are only available with PLANE233. PLANE233 does not support nonlinear harmonic
analysis or velocity effects.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
52 of ANSYS, Inc. and its subsidiaries and affiliates.
Creating a Harmonic 2-D Physics Environment

Some of the procedural steps in this chapter are not applicable to PLANE233. For information on
the differences between PLANE233 and PLANE13, see Legacy vs. Current-Technology 2-D Magnetic
Elements (p. 15).

Table 3.2: Far-Field Elements

Element Dimens. Shape or Characteristic DOFs


INFIN110 2-D Quadrilateral, four or eight Magnetic vector potential (AZ), electric
nodes potential, temperature

Table 3.3: General Circuit Elements

Element Dimens. Shape or Characteristic DOFs


CIRCU124 None Six nodes Up to two at each node; electric potential,
current

Table 3.4: Contact Elements

Element Dimens. Shape or DOFs Notes


Characteristic
TARGE169 2-D Target segment n/a Used to model the
target region for a
contact analysis
CONTA171 2-D Surface-to-surface AZ Used to model the
contact element contact region for a
(2-node) contact analysis
CONTA172 2-D Surface-to-surface AZ Used to model the
contact element contact region for a
(3-node) contact analysis
CONTA175 2-D Node-to-surface AZ Used to model the
contact element contact region for a
(1-node) contact analysis

3.3. Creating a Harmonic 2-D Physics Environment


As in any other type of analysis, for harmonic magnetic analyses you create a physics environment,
build a model, assign attributes to model regions, mesh the model, apply boundary conditions and
loads, obtain a solution, and then review the results. Most of the procedures for conducting a 2-D har-
monic magnetic analysis are identical or similar to the procedures for performing 2-D static analyses.
This topic discusses the tasks specific to harmonic analysis.

A 2-D harmonic magnetic analysis uses the same procedures to set GUI preferences, the analysis title,
element types and KEYOPT options, element coordinate systems, real constants, and a system of units.
2-D Static Magnetic Analysis (p. 13) describes these procedures.

When specifying material properties, in general use the same methods discussed in 2-D Static Magnetic
Analysis (p. 13); that is, where possible, use existing material property definitions from the material
library or that other users at your site have developed.

The next few topics provide some guidelines for setting up physics regions for your model, including
an illustrated discussion of terminal conditions you can model within a simulated physical region.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 53
2-D Harmonic Magnetic (AC) Analysis

3.3.1. Using DOFs to Manage Terminal Conditions on Conductors


The program offers several options to handle terminal conditions on conductors. These options offer
enormous flexibility in modeling, for example, stranded and massive conductors, short circuit and open
circuit conditions, and circuit-fed devices. To model each of these entities, you perform these tasks:

• Add extra degrees of freedom (DOFs) to the conducting region.

• Assign required real constants, material properties, and special treatments to the DOFs. Element types
and options, material properties, real constants and element coordinate systems are defined as "attrib-
utes" of the solid model; you assign them using the AATT and VATT commands or equivalent GUI
paths.

3.3.1.1. The AZ Option


Conductors modeled with only the AZ DOF simulate short-circuit conditions, due to the absence of
electric scalar potential which implies zero voltage drop along the length of the conductor.

PLANE233 always behaves as a stranded conductor (no eddy current effects are modeled) in a harmonic
or transient analysis when the element does not have the VOLT degree of freedom (KEYOPT(1) = 0).

3.3.1.2. The AZ-VOLT Option


The AZ-VOLT option allows you to model massive conductors with various terminal conditions by in-
cluding an electric potential in the overall electric field calculation:

E = δA/δt - V

The program replaces V with ν = Vdt (time-integrated potential), allowing additional flexibility for
considering open circuit conditions, current-fed massive conductors, and multiple conductors with end
connections, by allowing control over the electric field (VOLT).

The potential ν has units of volt-seconds and uses the VOLT degree of freedom. In a planar or axisym-
metric analysis, ν is constant over the conductor cross-section (that is, the voltage drop is in the out-
of-plane direction only). To enforce this requirement, you must couple nodes in each conducting region
using one of the following:
Command(s): CP
GUI: Main Menu> Preprocessor> Coupling/Ceqn> Couple DOFs

The coupling essentially reduces the unknowns to a single potential drop unknown in the conducting
region.

By default, the meaning of the VOLT degree of freedom for PLANE233 is electric potential. To do an
electromagnetic analysis with time-integrated electric potential as the VOLT degree of freedom, use
KEYOPT(2) = 2.

3.3.2. Characteristics and Settings for Physical Regions of a Model


The ANSYS program offers several options you can use to handle terminal conditions on conductors in
2-D magnetic analyses. Figure 3.1: Physical Region With Optional Terminal Conditions for Conduct-
ors (p. 55) pictures a physical region for a 2-D magnetic analysis and the conditions (options) that can
exist within it.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
54 of ANSYS, Inc. and its subsidiaries and affiliates.
Creating a Harmonic 2-D Physics Environment

Figure 3.1: Physical Region With Optional Terminal Conditions for Conductors

Jt Jt
y

x(r)

Planar Axisymmetric

Massive Conductor - Short Circuit

Short circuit DOFs: AZ


conductor
Material Properties: MUr, (MURX), rho (RSVX)

Eddy currents flow in a closed loop; there is no voltage drop


due to a short-circuit condition.

y
AZ-VOLT
VOLT Coupled

x(r)

x
AZ-VOLT
Planar VOLT Coupled
Axisymmetric

Massive Conductor - Open Circuit Conditions

Open circuit DOFs: AZ, VOLT


conductor
Material Properties: mur (MURX), rho (RSVX)

Special characteristics: Couple VOLT DOF


No net current flows in an open circuit conductor. The axisymmetric case simulates
a conductor with a finite cut (slit).

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 55
2-D Harmonic Magnetic (AC) Analysis

x
AZ-VOLT
Apply "AMPS" via F Command VOLT Coupled

Current-fed Massive Conductor

Current-fed massive DOFs: AZ, VOLT


conductor
Material Properties: MUr (MURX), rho (RSVX)

Special characteristics: Couple VOLT DOF in region; apply total


current (F,,AMPS command) to single node

Assumes a short-circuit condition with a net current flow from


a current source generator. Net current is unaffected by
surroundings.

Ground Plane

AZ-VOLT
VOLT Coupled

Simulates multiple conductors terminated at common ground

Multiple massive DOFs: AZ, VOLT


conductors
terminated by a Material Properties: MUr (MURX), rho (RSVX)
common ground
plane Special characteristics: Couple VOLT DOF of all conductor
regions into a single coupled node set.
Used to simulate devices such as squirrel cage rotors where end effects can be ignored.

Current per turn "i"

Area "A"
Turns "n"

JS = ni
A

JS
(Source
Current
Density)

Current-fed Standard Coil

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
56 of ANSYS, Inc. and its subsidiaries and affiliates.
Creating a Harmonic 2-D Physics Environment

Current-fed DOF: AZ
stranded coil
Material properties: MUr (MURX)

Special characteristics: No eddy currents; can apply source


current density (JS ) using BFE,,JS command (or alternatively
using the BFL or BFA command and transferring the load to
the finite element model by using the BFTRAN or SBCTRAN
command)
Assumes a stranded insulated coil producing a constant AC current, unaffected by
surrounding conditions. Current density can be calculated from the number of coil
turns, the current per turn, and the cross-section area of the coil.

Laminated iron DOF: AZ

Material Properties: MUr (MURX) or B-H curve

Simulating permeable regions where eddy currents can be


neglected. Requires only the AZ DOF.
Air DOF: AZ

Material Properties: MUr (MURX = I)


Moving conductor Model velocity effects from conductors moving at constant velocity
(velocity effects) using PLANE233 elements. For more information about moving
conductors, see the sections on velocity effects in this chapter and
2-D Static Magnetic Analysis (p. 13).

3.3.3. Velocity Effects


You can solve electromagnetic fields for special cases of moving bodies under the influence of an AC
excitation. Velocity effects are valid for static, harmonic, and transient analyses. 2-D Static Magnetic
Analysis (p. 13) discusses applications and limitations for motion analysis.

The procedure for solving a 2-D harmonic analysis with a moving conductor is identical to that for a
static analysis in terms of element KEYOPT options and body loads (PLANE233). Applied velocities are
constant and do not vary sinusoidally (as do the coil or field excitation) in a harmonic analysis.

The magnetic Reynolds number characterizes the velocity effect and numerical stability of the problem.
The equation used to produce this number is shown below:

Mre = μ νd/ρ

In the above equation, μ is permeability, ρ is resistivity, ν is velocity, and d is characteristic length (in
the directional motion) within a finite element of the conducting body. The magnetic Reynolds number
is meaningful only in a static or transient analysis.

The motion formulation is valid and accurate for relatively small values of the Reynolds number, typically
on the order of 1.0. Accuracy for higher Reynolds number values will vary from problem to problem.
In addition to a field solution, the motion solution includes currents in the conductor due to motion.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 57
2-D Harmonic Magnetic (AC) Analysis

3.4. Building and Meshing the Model and Assigning Region Attributes
For information on building a model, assigning attributes to regions within the model and meshing
the model, see 2-D Static Magnetic Analysis (p. 13) of this manual and the Modeling and Meshing Guide.

For information on modeling two contacted bodies, see Modeling Magnetic Contact.

3.4.1. Skin Depth Considerations


Electromagnetic field penetration in conducting bodies is a function of frequency, permeability, and
conductivity. Calculating the field and Joule heating losses accurately requires that the finite element
mesh be fine enough at the surface of the conductor to capture the surface phenomena. In general,
you should model one or two elements at a minimum through the skin depth. You can estimate the
skin depth from the following equation:

In the equation above, Δ is the skin depth (in meters), f is the frequency (in Hertz), μ is the absolute
permeability (in Henries/meters), and σ is conductivity (in Siemens/meter).

3.5. Applying Boundary Conditions Loads (Excitation) to Harmonic


Problems
You can apply boundary conditions and loads to a harmonic magnetic analysis either on the solid
model (keypoints, lines, and areas) or on the finite element model (nodes and elements). To apply
boundary conditions and loads to a 2-D harmonic analysis, use the same GUI paths and macros described
for a 2-D static analysis in 2-D Static Magnetic Analysis (p. 13)

For a harmonic magnetic analysis, you can specify three types of load step options: dynamic, general,
and output controls. Alternative Analysis Options and Solution Methods (p. 289) describes these load
step options.

For static analyses, use the ANSYS cyclic symmetry capability to define periodic boundary conditions.
For harmonic or transient analyses, use the PERBC2D macro.

3.5.1. Using the PERBC2D Macro


Using the PERBC2D macro, you can define periodic boundary conditions automatically for a 2-D ana-
lysis. PERBC2D writes constraint equations or assigns node coupling necessary for two periodic symmetry
planes. To invoke the macro, use either of the following:
Command(s): PERBC2D
GUI: Main Menu> Preprocessor> Loads> Define Loads> Apply> Magnetic> Boundary> Vector Poten>
Periodic BCs

Electric and Magnetic Macros (p. 193) discusses and illustrates options for using PERBC2D.

3.5.2. Amplitude, Phase Angle, and Operating Frequency


By definition, a harmonic analysis assumes that any applied load varies harmonically (sinusoidally) with
time. Specifying a harmonic load completely usually requires three pieces of information: the amplitude
(zero to peak value), the phase angle, and the operating frequency.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
58 of ANSYS, Inc. and its subsidiaries and affiliates.
Applying Boundary Conditions Loads (Excitation) to Harmonic Problems

3.5.2.1. Amplitude
This is the maximum value of the load (zero-to-peak) which you specify.

3.5.2.2. Phase Angle


Phase angle measures the time by which the load lags (or leads) a frame of reference. On the complex
plane (see Figure 3.2: Relationship Between Real / Imaginary Components and Amplitude / Phase
Angle (p. 59)), phase angle is the angle measures from the real axis. The phase angle is required only
if you have multiple loads that are out-of-phase with each other (for instance, in three-phase analysis).

For out-of-phase current densities or voltages, use the PHASE field on the BF, BFE, or BFK commands
(or their equivalent menu paths) to specify the phase angle in degrees. For out-of-phase potentials or
current segments, use the VALUE and VALUE2 fields on the appropriate load commands or menu
paths to specify the real and imaginary components of the complex loads. Figure 3.2: Relationship
Between Real / Imaginary Components and Amplitude / Phase Angle (p. 59) shows how to calculate
the real and imaginary components.

Figure 3.2: Relationship Between Real / Imaginary Components and Amplitude / Phase Angle

3.5.2.3. Operating Frequency


This is the frequency of the alternating current (in Hz). You specify it as a load step option via either
method shown below:
Command(s): HARFRQ
GUI: Main Menu> Solution> Load Step Opts> Time/Frequenc> Freq and Substps

3.5.3. Applying Source Current Density to Stranded Conductors


To apply source current density (JS) as a load directly to the elements of a stranded conductor, you can
use either of the following:
Command(s): BFE,,JS
GUI: Main Menu> Preprocessor> Loads> Define Loads> Apply> Magnetic> Excitation> Curr
Density> On Elements

Alternatively, you can apply source current densities to areas of the solid model by using the BFA
command. You can then transfer the specified source current densities from the solid model to the finite
element model by using either the BFTRAN command or the SBCTRAN command.

3.5.4. Applying Current to Massive Conductors


Current (AMPS) is a nodal current load that applies only to massive (solid) conductor regions with an
impressed current. In 2-D for the PLANE13 and PLANE233 elements, this load requires the AZ-VOLT
degree of freedom set in the conductor region. Current represents the total measurable current flow

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 59
2-D Harmonic Magnetic (AC) Analysis

through the conductor (units of current), and you can apply it only to 2-D planar and axisymmetric
models.

To apply a uniform current load through a cross-section of the skin-effect region, you must couple the
VOLT degree of freedom across that cross-section. To do so, use either of the following:
Command(s): CP
GUI: Main Menu> Preprocessor> Coupling/Ceqn> Couple DOFs

In 2-D planar or axisymmetric models, select all nodes in the skin-effect region and couple their VOLT
DOFs. Then, apply the current at one node in the cross-section, using one of the following:
Command(s): F
GUI: Main Menu> Preprocessor> Loads> Define Loads> Apply> Electric> Excitation> Impressed
Curr> On Nodes

3.5.5. Flags and Other Loads


3.5.5.1. Infinite Surface (INF) Flags
Infinite surface flags are not actual loads, but they are used to indicate which surface of an infinite
element faces toward the open (infinite) domain. Applying the INF label to an element face turns the
flag on for that face.

3.5.5.2. Maxwell Surface (MXWF) Flags


Maxwell surface flags are not actual loads, but they are used to indicate on which element faces the
magnetic force distribution is to be calculated. Applying the MXWF label to an element face turns the
flag on for that face.

Typically, you turn the MXWF flag on for the surfaces of air elements adjacent to an air-iron interface.
Forces are calculated at the air-iron interface (using the Maxwell stress tensor approach) and stored in
the air elements. In POST1, you can review and sum the stored forces in each air element to get the
total force acting on the body. You may, if you wish, then use these forces as loads in a structural ana-
lysis.

You can specify more than one component, but the components must not share adjacent air elements.
(Sharing air elements is typical when a single element layer separates two components.)

When using PLANE233, you do not need to apply any force flags to calculate magnetic forces. For more
information, see Legacy vs. Current-Technology 2-D Magnetic Elements (p. 15).

3.5.5.3. Magnetic Virtual Displacement (MVDI) Flags


Magnetic virtual displacement flags are not actual loads, but they are used to initiate the calculation
of forces on a body in the model. The MVDI method provides an alternative to the Maxwell surface
(MXWF) method. The ANSYS program calculates the forces, using the virtual work approach, as it pro-
cesses the solution.

To trigger the calculation, specify the MVDI flag value as 1.0 at all nodes in the region of interest and
0.0 (default setting) at all adjacent air nodes. Although you can enter MVDI values greater than 1.0, you
should not normally do so. Forces will be calculated and stored in the air elements adjacent to the
body.

The band of air elements surrounding the region of interest should be uniformly thick. In POST1, you
can review and sum the stored forces in each air element to get the total force.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
60 of ANSYS, Inc. and its subsidiaries and affiliates.
Obtain a Solution

Figure 3.3: MVDI Specifications for Virtual Work Force Calculation


MVDI = 0.0 (default)

MVDI = 1.0

Iron

Air

For information on calculating magnetic forces when using PLANE233, see Legacy vs. Current-Technology
2-D Magnetic Elements (p. 15).

3.6. Obtain a Solution


Most of the tasks you perform to solve a 2-D harmonic magnetic analysis are the same as the tasks
described in 2-D Static Magnetic Analysis (p. 13) for solving a 2-D static magnetic analysis. The main
differences are that you specify a different analysis type and that the harmonic analysis yields different
results that may require different postprocessing methods.

3.6.1. Defining the Harmonic Analysis Type


To specify the analysis type, do either of the following:

• In the GUI, choose menu path Main Menu> Solution> Analysis Type> New Analysis and then choose
a Harmonic analysis.

• If this is a new analysis, issue the command ANTYPE,HARMIC,NEW.

If you want to restart a previous analysis (for example, to restart an unconverged solution or to specify
additional excitation), issue the command ANTYPE,HARMIC,REST. You can restart an analysis only if you
previously completed a harmonic magnetic analysis, and the files Jobname.EMAT, Jobname.ESAV,
and Jobname.DB from the previous run are available.

3.6.2. Defining Analysis Options


You can use the following "Full" method to solve harmonic electromagnetic problems. It is the default
method.

First, define the solution method, using either of the following:


Command(s): HROPT
GUI: Main Menu> Solution> Analysis Options

Next, define how the harmonic degree of freedom solution is listed in the printed output (the Job-
name.OUT file). You can choose either real and imaginary parts (default) or amplitudes and phase
angles. This option is used mainly with circuit-coupled problems using the CURR and EMF degrees of
freedom. To specify the solution listing format, use either of the following:
Command(s): HROUT
GUI: Main Menu> Solution> Analysis Options

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 61
2-D Harmonic Magnetic (AC) Analysis

3.6.3. Selecting the Equation Solver


You can choose the sparse direct (SPARSE) solver (default), the Jacobi Conjugate Gradient (JCG) solver,
or the Incomplete Cholesky Conjugate Gradient (ICCG) solver.

To select an equation solver, use either of the following:


Command(s): EQSLV
GUI: Main Menu> Solution> Analysis Options

Note

You must "OK" the dialog box containing the HROPT and HROUT commands to reach the
equation solver dialog box.

For nonlinear problems, the program continues to do equilibrium iterations until the convergence criteria
are satisfied (or until the maximum number of equilibrium equations is reached.

To specify the convergence criteria, use either of the following:


Command(s): CNVTOL
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Nonlinear> Convergence Crit.
Main Menu> Solution> Load Step Opts> Nonlinear> Convergence Crit.

You can either use the default convergence criteria or define custom criteria.

• Default Convergence Criteria

By default, the program checks for degree of freedom (AZ, VOLT, EMF) convergence by comparing
the square root sum of the squares (SRSS) of the degree of freedom imbalances against the
product of VALUE X TOLER. The default value of VALUE is based upon the selected NORM and
the current total DOF value (program chosen), or MINREF, whichever is greater. In general, you
do not set MINREF. The default value of TOLER is 0.001.

For degrees of freedom, the program bases convergence checking on the change in degree of
freedom (Δu) between the current (i) and the previous (i-1) iterations: Δu = ui-ui-1.

• Custom Convergence Criteria

You can define custom convergence criteria, instead of using the default values.

Using tighter convergence criteria improves the accuracy of your results, but at the cost of more
equilibrium iterations. If you want to tighten (or loosen) your criteria, you change the TOLER by
one or two orders of magnitude. In general, you continue to use the default value of VALUE;
that is, change the convergence criteria by adjusting TOLER, not VALUE.

3.6.4. Setting the Analysis Frequency


For most electromagnetic problems only a single frequency is used. You set the frequency (in Hz), using
either of the following:
Command(s): HARFRQ
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Time/Frequenc> Freq and Substps

You can input a single frequency in either the FREQB or FREQE field.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
62 of ANSYS, Inc. and its subsidiaries and affiliates.
Obtain a Solution

3.6.5. Setting General Options


You can specify the number of harmonic solutions to be calculated. The solutions (or substeps) are
evenly spaced within the specified frequency range. For example, if you specify 10 solutions in the
range 30 to 40 Hz, the program calculates the response at 31, 32, 33, ..., 39, and 40 Hz. No response is
calculated at the lower end of the frequency range.

To specify the number of harmonic solutions, use either of the following:


Command(s): NSUBST
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Time/Frequenc> Freq and Substps

You can specify whether the excitations are stepped or ramped. By default, they are ramped, that is,
excitation amplitude is gradually increased with each substep. By stepping the excitations, the same
excitation amplitude is maintained for all substeps in the frequency range. For electromagnetic problems
excitations are normally stepped. The ramp option is useful for converging nonlinear problems at a
single frequency.

To specify whether the excitations are stepped or ramped, use either of the following:
Command(s): KBC
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Time/Frequency> Freq and Substps

You can specify the number of equilibrium iterations performed for a nonlinear harmonic analysis at
each frequency. The default is 25. It is recommended that the number of equilibrium iterations be set
to 50 or higher to ensure convergence.

To specify the number of equilibrium iterations, use either of the following:


Command(s): NEQIT
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Nonlinear> Equilibrium Iter

3.6.6. Setting Output Controls


You can set output control options.

An option enables you to include any results data in the printed output file (Jobname.OUT). To control
printed output, use either of the following:
Command(s): OUTPR
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Output Ctrls> Solu Printout

Another option controls what data goes to the results file (Jobname.RTH). To control database and
results file output, use either of the following:
Command(s): OUTRES
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Output Ctrls> DB/Results File

3.6.7. Saving a Backup Copy of the Database


Use the SAVE_DB button on the toolbar to save a backup copy of the database. To retrieve a model,
re-enter the program and use one of the following:
Command(s): RESUME
GUI: Utility Menu> File> Resume Jobname.db

3.6.8. Starting the Solution


For linear problems you can initiate a solution using either of the following:

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 63
2-D Harmonic Magnetic (AC) Analysis

Command(s): SOLVE
GUI: Main Menu> Solution> Solve> Current LS

For a nonlinear analysis, a two-step solution sequence at each frequency is recommended to ensure
convergence:

1. Ramp the excitation over three to five substeps, each with one equilibrium iteration.

To specify a ramped or stepped excitation, you use either of the following:


Command(s): KBC
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Time/Frequency> Freq and Substps

To specify three to five substeps, use either of the following:


Command(s): NSUBST
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Time/Frequenc> Freq and Substps

To specify one equilibrium iteration, use the following:


Command(s): NEQIT
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Nonlinear> Equilibrium Iter

To initiate a solution, use either of the following:


Command(s): SOLVE
GUI: Main Menu> Solution> Solve> Current LS

2. Calculate the final solution over one substep, with up to 50 equilibrium iterations.

To specify one substep, use either of the following:


Command(s): NSUBST
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Time/Frequenc> Freq and Substps

To specify up to 50 equilibrium iterations, use either of the following:


Command(s): NEQIT
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Nonlinear> Equilibrium Iter

To define custom convergence criteria, instead of using the default values, use either of the following:
Command(s): CNVTOL
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Nonlinear> Convergence Crit.
Main Menu> Solution> Load Step Opts> Nonlinear> Convergence Crit.

To initiate a solution, use either of the following:


Command(s): SOLVE
GUI: Main Menu> Solution> Solve> Current LS

3.6.9. Tracking Convergence Graphically


As nonlinear electromagnetic analysis proceeds, the program computes convergence norms with cor-
responding convergence criteria each equilibrium iteration. Available in both batch and interactive
sessions, the Graphical Solution Tracking (GST) feature displays the computed convergence norms and
criteria while the solution is in process. By default, /GST is ON for interactive sessions and OFF for batch
runs. To turn /GST on or off, use either of the following:
Command(s): /GST
GUI: Main Menu> Solution> Load Step Opts> Output Ctrls> Grph Solu Track

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
64 of ANSYS, Inc. and its subsidiaries and affiliates.
Reviewing Results

Figure 3.4: Convergence Norms Displayed by the Graphical Solution Tracking (GST) Feature (p. 65) shows
a typical GST display:

Figure 3.4: Convergence Norms Displayed by the Graphical Solution Tracking (GST) Feature

3.6.10. Finishing the Solution


To leave the SOLUTION processor, use either of the following:
Command(s): FINISH
GUI: Main Menu> Finish

3.7. Reviewing Results


The program writes results from a harmonic magnetic analysis to the magnetics results file, Job-
name.RMG (or to Jobname.RST if the electric potential (VOLT) or EMF degrees of freedom are active).
Results include the data listed below, all of which vary harmonically at the operating frequency (or fre-
quencies) for which you calculated the solution:

Primary data: Nodal DOFs (AZ, VOLT)

Derived data:

• Nodal magnetic flux density (BX, BY, BSUM)


• Nodal magnetic field intensity (HX, HY, HSUM)
• Nodal magnetic forces (FMAG: components X, Y, SUM)
• Nodal Lorentz magnetic forces (FMAG; components X, Y, SUM)
• Nodal reaction current segments (CSGZ)
• Total electric current density (JT)
• Joule heat per unit volume (JHEAT)

Note

For nonlinear time-harmonic analysis, the values of flux density (B) may exceed the values
input on the DC B-H curve. These values represent an approximation to the fundamental
harmonic component of the true waveform, not the actual measurable value.

Additional data, specific to each element type, also are available. See the Element Reference for details.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 65
2-D Harmonic Magnetic (AC) Analysis

You can review analysis results in POST1, the general postprocessor, or POST26, the time-history post-
processor. The results are out-of-phase with the input loads (that is, they lag the input loads), and
therefore are complex. They are calculated and stored in terms of real and imaginary components.

Use POST1 to review results over the entire model at specific frequencies. Use POST26 to review results
at specific points in the model over the entire frequency range.

For a harmonic magnetic analysis, the frequency range usually consists of only the AC frequency.
Therefore, POST1 is typically used to review the results.

To choose a postprocessor, use one of the following:


Command(s): /POST1 or /POST26
GUI: Main Menu> General Postproc
Main Menu> TimeHist Postpro

3.7.1. Commands or GUI Paths to Help You in Postprocessing


The ANSYS program provides a number of commands or GUI paths (see Table 3.5: Postprocessing GUI
Paths and Commands (p. 66)) which you may find helpful in postprocessing analysis results:

Table 3.5: Postprocessing GUI Paths and Commands

Task Command(s) GUI Path


Select the real solution SET,1,1,,0 Main Menu> General Postproc> List
Results> Results Summary
Select the imaginary solution SET,1,1,,1 Main Menu> General Postproc> List
Results> Results Summary
Print vector potential DOF (AZ)[5] PRNSOL,AZ Main Menu> General Postproc> List
Results> Nodal Solution
Print time-integrated potential PRNSOL,VOLT Main Menu> General Postproc> List
DOF (VOLT)[5] Results> Nodal Solution
Print magnetic flux density at PRVECT,B Main Menu> General Postproc> List
corner nodes[1,5] Results> Vector Data
Print magnetic field at corner PRVECT,H Main Menu> General Postproc> List
nodes[1,5] Results> Vector Data
Print total current density at PRVECT,JT Main Menu> General Postproc> List
centroids[5] Results> Vector Data
Print force at corner nodes[2,6] PRVECT,FMAG Main Menu> General Postproc> List
Results> Vector Data
Print magnetic flux density at PRESOL,B Main Menu> General Postproc> List
element nodes[5] Results> Element Solution
Print magnetic field at element PRESOL,H Main Menu> General Postproc> List
nodes[5] Results> Element Solution
Print total current density at PRESOL,JT Main Menu> General Postproc> List
element centroid[5] Results> Element Solution
Print force at element nodes[2,6] PRESOL,FMAG Main Menu> General Postproc> List
Results> Element Solution
Print magnetic energy[3,5] PRESOL,SENE Main Menu> General Postproc> List
Results> Element Solution

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
66 of ANSYS, Inc. and its subsidiaries and affiliates.
Reviewing Results

Task Command(s) GUI Path


Print Joule heat per unit PRESOL,JHEAT Main Menu> General Postproc> List
volume[4,6] Results> Element Solution
Create element table item for ETABLE,Lab,B,X Main Menu> General Postproc> Element
centroid flux density[5], X Table> Define Table
component. (Issue similar
commands for Y and SUM
components.)
Create element table item for ETABLE,Lab,H,X Main Menu> General Postproc> Element
centroid magnetic[5] field, X Table> Define Table
component. (Issue similar
commands for Y and SUM
components.)
Create element table item for ETABLE,Lab,JHEAT
Main Menu> General Postproc> Element
Joule heat per unit volume[4,6] Table> Define Table
Create element table item for ETABLE,Lab,JT,X Main Menu> General Postproc> Element
centroid current[5] density, X Table> Define Table
component. (Issue similar
commands for Y and SUM
components.)
Create element table item for ETABLE,Lab,FMAG,X
Main Menu> General Postproc> Element
magnetic force[2,6] over element, Table> Define Table
X component. (Issue similar
commands for Y and SUM
components.)
Create element table item for ETABLE,Lab,SENEMain Menu> General Postproc> Element
element stored energy[3] Table> Define Table
Print the indicated element table PRETAB,Lab,1,... Main Menu> General Postproc> List
item(s) Results> Elem Table Data

1. Average of selected elements adjacent to nodes.

2. Force is summed over elements and distributed among nodes for coupling purposes.

3. Magnetic energy is summed over elements.

4. To obtain power loss, multiply by element volume.

5. Instantaneous value (real/imaginary, at Ωt = 0 and Ωt = -90) in case of a harmonic analysis.

6. RMS value: measurable values are stored in the real set. (Velocity effect regions (KEYOPT(2) = 1) require
summation of real and imaginary parts to obtain RMS value.)

Note

See the Mechanical APDL Theory Reference for more information.

The ETABLE command or its GUI path also allow you to view less frequently used items.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 67
2-D Harmonic Magnetic (AC) Analysis

You can view most of these items graphically. To do so, substitute plotting commands for the commands
whose names begin with "PL" (for example, use PLNSOL instead of PRNSOL, as illustrated below):

Command Substitution GUI Path


PRNSOL PLNSOL Utility Menu> Plot> Results> Contour Plot>
Nodal Solution
PRVECT PLVECT Utility Menu> Plot> Results> Vector Plot
PRESOL PLESOL Utility Menu> Plot> Results> Contour Plot>
Elem Solution
PRETAB PLETAB Utility Menu> Plot> Results> Contour Plot>
Elem Table Data

You also can plot element table items. See the Basic Analysis Guide for more information.

The ANSYS Parametric Design Language (APDL) also contains commands that may be useful in postpro-
cessing, and several magnetics macros also are available for results processing purposes. See the ANSYS
Parametric Design Language Guide for more information about APDL. Electric and Magnetic Macros (p. 193)
describes the macros.

Reading in Results Data (p. 68) discusses some typical POST1 operations for a harmonic magnetic ana-
lysis. For a complete description of all postprocessing functions, see the Basic Analysis Guide.

3.7.2. Reading in Results Data


To review results in POST1, the ANSYS database must contain the same model for which the solution
was calculated. Also, the results file (Jobname.RMG or Jobname.RST) must be available.

Results from a harmonic magnetic analysis are complex and consist of real and imaginary components.
To read either type of component (you cannot read both types at the same time), use either of the
following:
Command(s): SET
GUI: Utility Menu> List> Results> Load Step Summary

An SRSS combination of the real and imaginary parts gives the true magnitude of the results. You can
do this via load case operations.

3.7.2.1. Contour Displays


You can contour almost any result item (including flux density and field intensity) using the following
commands or menu paths:
Command(s): PLNSOL, PLESOL
GUI: Utility Menu> Plot> Results> Contour Plot> Elem Solution
Utility Menu> Plot> Results> Contour Plot> Nodal Solution

Caution

The PLNSOL command or its equivalent menu path average nodal contour plots for derived
data, such as flux density and field intensity, at the nodes.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
68 of ANSYS, Inc. and its subsidiaries and affiliates.
Reviewing Results

In PowerGraphics mode (default), you can visualize nodal averaged contour displays which account for
material discontinuities. Should you need to activate PowerGraphics, use either /GRAPHICS,POWER
(Utility Menu> PlotCtrls> Style> Hidden-Line Options).

3.7.2.2. Vector Displays


Vector displays (not to be confused with vector mode) offer an effective way to view vector quantities
such as A, B, H, and FMAG. For vector displays, use either of the following:
Command(s): PLVECT
GUI: Utility Menu> Plot> Results> Vector Plot

For vector listings, use either method shown below:


Command(s): PRVECT
GUI: Utility Menu> List> Results> Vector Data

3.7.2.3. Tabular Listings


You can produce tabular listings of results data, either unsorted or sorted by node or by element. To
sort data before listing it, use any of the following:
Command(s): ESORT, NSORT
GUI: Main Menu> General Postproc> List Results> Sorted Listing> Sort Nodes
Main Menu> General Postproc> List Results> Sorted Listing> Sort Elems

To produce tabular data listings, use any of the following:


Command(s): PRESOL, PRNSOL, PRRSOL
GUI: Main Menu> General Postproc> List Results> Element Solution
Main Menu> General Postproc> List Results> Nodal Solution
Main Menu> General Postproc> List Results> Reaction Solu

3.7.2.4. Magnetic Forces


Lorentz, Maxwell and virtual work force computations are usually available when using PLANE13:

• Time-average Lorentz forces (the JxB forces) are calculated automatically for all current carrying elements.
These forces are stored in the "real" data set (see SET command to retrieve "real" results). (Exercise caution
in interpreting Lorentz forces in permeable (μr > 1 materials.) To list these forces, select all current-carrying
elements and use either the PRNSOL,FMAG command or its equivalent menu path. You can also sum these
forces. First, move them to the element table using either of the following:
Command(s): ETABLE,tablename,FMAG,X (or Y)
GUI: Main Menu> General Postproc> Element Table> Define Table

Then, calculate the sum using either of the following:


Command(s): SSUM
GUI: Main Menu> General Postproc> Element Table> Sum of Each Item

For velocity effect regions (KEYOPT(2) = 1), the time-average forces are obtained by summing the
data stored in the "real" and "imaginary" data sets.

• Time-average Maxwell forces are calculated for all elements at which the surface flag MXWF is specified as a
surface "load." To list Maxwell forces, select all such elements, read in the "real" data set and then select
either of the following:
Command(s): PRNSOL,FMAG
GUI: Main Menu> General Postproc> List Results> Nodal Solution

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 69
2-D Harmonic Magnetic (AC) Analysis

To sum the forces, use the procedure described in the foregoing for Lorentz forces.

Note

For velocity effect regions (KEYOPT(2) = 1), the time-average forces are obtained by sum-
ming the data stored in the "real" and "imaginary" data sets.

• Time-average virtual work forces are calculated for all air elements with an MVDI specification adjacent to
the body of interest. To extract these forces, select all current-carrying elements and use the ETABLE com-
mand along with the sequence number (snum) for the data requested to store the forces from the element
NMISC record (see PLANE13 Item and Sequence Numbers for ETABLE and ESOL in the Element Reference).
Do so by choosing either of the following:
Command(s): ETABLE,tablename,NMISC,snum
GUI: Main Menu> General Postproc> Element Table> Define Table

Once you move the data to the element table, you can list them using either of the following:
Command(s): PRETAB
GUI: Main Menu> General Postproc> Element Table> List Elem Table

To sum the forces, use the procedure described in the foregoing for Lorentz forces.

Note

For velocity effect regions (KEYOPT(2) = 1), the time average-forces are obtained by sum-
ming the data stored in the "real" and "imaginary" data sets.

For information on calculating magnetic forces when using PLANE233, see Legacy vs. Current-Technology
2-D Magnetic Elements (p. 15).

3.7.2.5. Magnetic Torque


Lorentz, Maxwell and virtual work torque computations are usually available when using PLANE13:

• Time-average Lorentz torque (the JxB torque) is calculated automatically for all current carrying elements.
These torque values are stored in the "real" data set (see SET command to retrieve "real" results). Exercise
caution in interpreting Lorentz torque values in permeable (mr>1) materials.) To extract these torque values,
select all current-carrying elements and use the ETABLE command along with the sequence number (snum)
for the data requested to store the torque values from the element NMISC record (see PLANE13 Item and
Sequence Numbers for ETABLE and ESOL in the Element Reference). Do so by choosing either of the following:
Command(s): ETABLE,tablename,NMISC,snum
GUI: Main Menu> General Postproc> Element Table> Define Table

Once you move the data to the element table, you can list the torque values using the following
command:
Command(s): PRETAB
GUI: Main Menu> General Postproc> Element Table> List Elem Table

The torque data can also be retrieved using the PLESOL and PRESOL commands with the NMISC
item label.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
70 of ANSYS, Inc. and its subsidiaries and affiliates.
Reviewing Results

You can also sum the torque values to obtain the total torque on the body. To calculate the sum use
the following:
Command(s): SSUM
GUI: Main Menu> General Postproc> Element Table> Sum of Each Item

Note

For velocity effect regions (KEYOPT(2) = 1), the time-average torque values are obtained
by summing the data stored in the "real" and "imaginary" data sets.

• Maxwell torque values are calculated for all elements at which the surface flag MXWF is specified as a surface
"load." To extract and sum Maxwell torque values, you can use the procedure described in the foregoing
for extracting and summing Lorentz torque values.

Note

For velocity effect regions (KEYOPT(2) = 1), the time-average torque values are obtained
by summing the data stored in the "real" and "imaginary" data sets.

• Time-average virtual work torque values are calculated for all air elements with an MVDI specification adjacent
to the body of interest. To extract and sum virtual work torque values, you can use the procedure described
in the foregoing for extracting and summing Lorentz torque values.

Note

For velocity effect regions (KEYOPT(2) = 1), the time-average torque values are obtained
by summing the data stored in the "real" and "imaginary" data sets.

For information on calculating magnetic torques when using PLANE233, see Legacy vs. Current-Techno-
logy 2-D Magnetic Elements (p. 15).

3.7.2.6. Coil Resistance and Inductance


For stranded coils with the voltage-fed or circuit-fed options, you can calculate the resistance and in-
ductance of the coil. Each element stores values of resistance and inductance. Summing these values
gives the total resistance and inductance of the modeled region of the conductor. To store and sum
these values, select the conductor elements using the ETABLE,tablename,NMISC,n command or its
equivalent menu path. (For the n value, use 8 for resistance and 9 for inductance.) Use the SSUM
command or its menu path equivalent to sum the data.

Inductance values calculated for voltage-fed or circuit-coupled stranded coils are only valid under the
following conditions:

• The problem is linear (constant permeability).

• There are no permanent magnets in the model.

• Only a single coil exists in the model.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 71
2-D Harmonic Magnetic (AC) Analysis

3.7.2.7. Calculating Other Items of Interest


You can calculate many other items of interest (such power loss and eddy currents) from the data
available in the database in postprocessing. The ANSYS command set supplies the following macros
for these calculations:

• The EMAGERR macro calculates the relative error in an electrostatic or electromagnetic field analysis.

• The FLUXV macro calculates the flux passing through a closed contour.

• The MMF macro calculates magnetomotive force along a path.

• The PLF2D macro generates a contour line plot of equipotentials.

• The POWERH macro calculates the rms power loss in a conducting body. Time-average (rms) power
loss represents the Joule heating losses. The ANSYS program calculates it from real and imaginary total
current density when you use the following command macro or GUI path:
Command(s): POWERH
GUI: Main Menu> General Postproc> Elec & Mag Calc> Power Loss

For heat transfer coupling, the power loss term is expressed in terms of Joule heat generation rate. You
can use it in a thermal analysis; to do so, read the data from the magnetics results file using the LDREAD
command (Main Menu> Solution> Define Loads> Apply> Thermal> Heat Generat> From Mag
Analy).

• The SENERGY macro determines the rms stored magnetic energy or co-energy.

For more discussion of these macros, see Electric and Magnetic Macros (p. 193).

For information on the macros applicable to PLANE233, see the element's description in the Element
Reference.

3.8. Example 2-D Harmonic Magnetic Analyses


The following examples are available:
3.8.1. Example: Harmonic Magnetic Analysis
3.8.2. Other Examples

3.8.1. Example: Harmonic Magnetic Analysis


Description
This example calculates the current that results from an AC voltage being applied to a thick stranded
coil in free space. Scalar parameters for this analysis are:

• n = 500 (coil turns)

• r = 3*s/2 meters (the mean radius of the coil)

• S = .02 (meters; the coil winding width and depth).

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
72 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 2-D Harmonic Magnetic Analyses

The following command listing demonstrates how to solve this problem using the current-technology
element PLANE233. The electromagnetic elements represent the voltage forced coil and air. INFIN110
elements represent the far-field.

Note

The example analysis presented here is only one of many possible harmonic magnetic analyses.
Not all such analyses follow exactly the same steps or perform those steps in the same se-
quence. The properties of the material or materials being analyzed and the conditions sur-
rounding those materials determine which steps a specific analysis needs to include.

3.8.1.1. Command Input Stream Using PLANE233


Below is the command input stream using current-technology element PLANE233. All text preceded by
an exclamation point (!) is a comment.
/prep7
/title, Voltage-fed thick stranded coil in free space
/com, Calculate the current in the coil from an applied AC voltage
/com,
/nopr
et,1,233,,,1 ! air
et,2,233,2,,1 ! stranded coil
et,3,110,,,1 ! far-field
mp,murx,1,1
mp,murx,2,1

! *** Coil parameters


s=.02 ! coil winding depth and width
n=500 ! number of turns
r=3*s/2 ! mean radius
rho=3e-8 ! resistivity

! *** Derived coil parameters


Sc=s**2 ! coil cros-sectional area
Vc=2*acos(-1)*r*Sc ! coil volume
Rcoil=rho*(n/Sc)**2*Vc ! coil resistance

rectng,s,2*s,0,s/2
pcirc,0,6*s,0,90
pcirc,0,12*s,0,90
aovlap,all
asel,s,area,,1
aatt,2,1,2

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 73
2-D Harmonic Magnetic (AC) Analysis

asum

asel,s,area,,4
aatt,1,1,3
asel,all
csys,1
lsel,s,loc,x,9*s
lesize,all,,,1
esize,,8
mshape,0,2d ! mapped mesh with quads
mshkey,1
amesh,1,4,3 ! mesh far-field and coil
smrtsize,2
esize,s/4
mshape,1,2d ! specify triangle elements
mshkey,0 ! free mesh
amesh,5 ! mesh air region

r,1,,Sc,n,r,1,Rcoil ! coil constants


rmore,2 ! symmetry factor

n1=node(s,0,0) ! get a node on the coil


esel,s,mat,,2 ! get coil elements
nsle,s
cp,1,volt,all ! couple VOLT dof in coil
cp,2,emf,all ! couple EMF dof in coil
allsel,all
csys,1
nsel,s,loc,x,12*s
sf,all,inf ! set infinite surface flag
csys,0
nsel,s,loc,x,0
d,all,az,0 ! flux-parallel condition
allsel,all
finish

/solu
antype,harm
d,n1,volt,12
harfrq,60 ! 60 Hz.
solve
finish

/post1
set,1
plf2d ! Plot real flux lines
*get,ireal,node,n1,rf,amps
set,1,1,,1
plf2d ! Plot imaginary flux lines
*get,imag,node,n1,rf,amps
*status ! Imaginary and real components of current
finish

3.8.2. Other Examples


Another ANSYS, Inc. publication, the Mechanical APDL Verification Manual, contains other examples of
2-D harmonic magnetic analysis:

VM166 - Long Cylinder in a Sinusoidal Magnetic Field


VM185 - AC Analysis of a Slot Embedded Conductor

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
74 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 4: 2-D Transient Magnetic Analysis
Transient magnetic analysis is a technique for calculating magnetic fields that vary over time, such as
those caused by surges in voltage or current or pulsed external fields. In a transient magnetic analysis,
typically the quantities you want to analyze are:

• Eddy currents

• Power loss due to eddy currents

• Magnetic forces induced by eddy currents

• Two contacting bodies with dissimilar meshes (such as the air gap in a rotor/stator configuration).

A transient magnetic analysis can be either linear or nonlinear.

The following 2-D transient magnetic analysis topics are available:


4.1. Elements Used in Transient Magnetic Analysis
4.2. Creating a 2-D Transient Magnetic Physics Environment
4.3. Building a Model, Assigning Region Attributes and Meshing the Model
4.4. Applying Boundary Conditions and Loads (Excitation)
4.5. Obtaining a Solution
4.6. Reviewing Results
4.7. Example Transient Magnetic Analyses

4.1. Elements Used in Transient Magnetic Analysis


Only the magnetic vector potential (MVP) formulation (see 2-D Static Magnetic Analysis (p. 13)) is valid
in eddy current regions for transient magnetic analysis. Therefore, you can use only the following element
types to model eddy current domains.

Table 4.1: 2-D Solid Elements

Element Dimens.Shape or DOFs Notes


Characteristic
PLANE13 2-D 4-node quadrilateral Up to four at each node; Legacy element
or 3-node triangular these can be magnetic
vector potential (AZ), Supported for
displacements, temperature, cyclic symmetry
or time-integrated electric (periodic) analysis,
potential static only.
PLANE233 2-D 8-node quadrilateral Up to three at each node; Current-technology
or 6-node triangular these can be magnetic element
[1]

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 75
2-D Transient Magnetic Analysis

Element Dimens.Shape or DOFs Notes


Characteristic
vector potential (AZ), Supported for
electric potential/voltage cyclic symmetry
drop or time-integrated (periodic) analysis.
electric potential/voltage
drop (VOLT), electromotive
force or time-integrated
electromotive force (EMF)

1. Whenever possible, ANSYS, Inc. recommends using PLANE233 (the current-technology electromagnetic
element) rather than PLANE13 (legacy magnetic element). See Legacy vs. Current-Technology 2-D Magnetic
Elements (p. 15) for a list of the capabilities that are only available with PLANE233.

Some procedural steps discussed here do not apply applicable to PLANE233. For information on the
differences between PLANE233 and PLANE13, see Legacy vs. Current-Technology 2-D Magnetic Ele-
ments (p. 15).

Table 4.2: Far-Field Elements

Element Dimens. Shape or Characteristic DOFs


INFIN110 2-D Quadrilateral, four or eight Magnetic vector potential (AZ), electric
nodes potential, temperature

Table 4.3: General Circuit Elements

Element Dimens. Shape or Characteristic DOFs


CIRCU124 None General circuit element Up to two at each node; electric potential,
applicable to circuit current
simulation, up to six
nodes

Table 4.4: Contact Elements

Element Dimens. Shape or DOFs Notes


Characteristic
TARGE169 2-D Target segment n/a Used to model the
target region for a
contact analysis
CONTA171 2-D Surface-to-surface AZ Used to model the
contact element contact region for a
(2-node) contact analysis
CONTA172 2-D Surface-to-surface AZ Used to model the
contact element contact region for a
(3-node) contact analysis
CONTA175 2-D Node-to-surface AZ Used to model the
contact element contact region for a
(1-node) contact analysis

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
76 of ANSYS, Inc. and its subsidiaries and affiliates.
Applying Boundary Conditions and Loads (Excitation)

4.2. Creating a 2-D Transient Magnetic Physics Environment


As in any other type of ANSYS analysis, for transient magnetic analyses you create a physics environment,
build a model, assign attributes to model regions, mesh the model, apply boundary conditions and
loads, obtain a solution, and then review the results. Most of the procedures for conducting a 2-D
transient magnetic analysis are identical or similar to the procedures for doing 2-D static analyses; this
chapter discusses the tasks that are specific to transient analysis.

A 2-D transient magnetic analysis uses the same procedures as a 2-D static analysis to set GUI preferences,
element KEYOPTS, and real constants and to choose a system of units. 2-D Static Magnetic Analysis (p. 13)
describes these procedures. When specifying material properties, in general use the same methods
discussed in 2-D Static Magnetic Analysis (p. 13); that is, where possible, use existing material property
definitions from the ANSYS material library or that other ANSYS users at your site have developed.

4.3. Building a Model, Assigning Region Attributes and Meshing the


Model
The Modeling and Meshing Guide explains techniques for building and meshing models. Once you have
built the model, you must assign attributes to each region within it. "Attributes" are the element types
and options, material properties, real constants and element coordinate systems you defined in Step
1; you assign attributes using the AATT and VATT commands or equivalent GUI paths. 2-D Static
Magnetic Analysis (p. 13) of this manual provides more details on assigning attributes to regions in
your model.

For information on modeling two contacted bodies, see Modeling Magnetic Contact.

4.4. Applying Boundary Conditions and Loads (Excitation)


You can apply loads to a transient magnetic analysis either on the solid model (keypoints, lines, and
areas) or on the finite element model (nodes and elements).

To apply boundary conditions (BCs) and loads to a 2-D transient magnetic analysis, use the same GUI
paths used to apply boundary conditions or loads to a 2-D static magnetic analysis. (See 2-D Static
Magnetic Analysis (p. 13) for details.) Optionally, you can apply loads and boundary conditions using
ANSYS commands, and you can specify load step options to the 2-D transient magnetic analysis. Altern-
ative Analysis Options and Solution Methods (p. 289) discusses both command-based loading and the
load step options.

By definition, a transient analysis involves boundary conditions and loads that are functions of time. To
specify such loads and BCs, you need to divide the load-versus-time curve into suitable load steps. Each
vertex on the load-time curve can be one load step, as shown in Figure 4.1: Examples of Load-Versus-
Time Curves (p. 77):

Figure 4.1: Examples of Load-Versus-Time Curves

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 77
2-D Transient Magnetic Analysis

For each load step, you need to specify both load or BC values and time values, among with other load
step options such as stepped or ramped loads, automatic time stepping, and so on. You then write the
load data to a file and repeat this process until all load steps are specified.

See Alternative Analysis Options and Solution Methods (p. 289) for details about the load step options
available for 2-D transient magnetic analysis.

4.4.1. Applying Boundary Conditions


While the ANSYS cyclic symmetry capability is used to define periodic boundary conditions in a static
analysis, use the PERBC2D macro for transient or harmonic analyses.

Using the PERBC2D macro, you can define periodic boundary conditions automatically for a 2-D ana-
lysis. PERBC2D writes constraint equations or assigns node coupling necessary for two periodic symmetry
planes. To invoke the macro, use either of the following:
Command(s): PERBC2D
GUI: Main Menu> Preprocessor> Loads> Define Loads> Apply> Magnetic> Boundary> Vector Poten>
Periodic BCs

Electric and Magnetic Macros (p. 193) discusses and illustrates options for using PERBC2D.

4.4.2. Applying Current


Current (AMPS) is a nodal current load that applies only to massive (solid) conductor regions with an
impressed current. It represents the total measurable current flow through the conductor (units of
current), and is valid only for 2-D planar and axisymmetric models and 3-D models. For the 2-D elements
PLANE13 and PLANE233, this load requires the AZ, VOLT degree of freedom set in the conductor region.

To apply a uniform current load through a cross-section of the skin-effect region, you must couple the
VOLT degrees of freedom across that cross-section. To do so, use one of the following:
Command(s): CP
GUI: Main Menu> Preprocessor> Coupling/Ceqn> Couple DOFs

In 2-D planar and axisymmetric models, simply select all nodes in the skin effect region and couple
their VOLT DOFs. Use one of the methods below to apply the current to a single node in the cross-
section:
Command(s): F,,AMPS
GUI: Main Menu> Preprocessor> Loads> Define Loads> Apply> Electric> Excitation> Impressed
Current
Main Menu> Solution> Define Loads> Apply> Electric> Excitation> Impressed Current

4.4.3. Other Loads


You can apply vector potential loads, time-integrated scalar potential loads, current segment loads,
Maxwell surface loads, source current density loads, and virtual displacement loads to a transient
magnetic analysis. For descriptions of these loads, see 2-D Static Magnetic Analysis (p. 13).

4.5. Obtaining a Solution


The next few topics describe the tasks you perform to solve a 2-D transient magnetic analysis.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
78 of ANSYS, Inc. and its subsidiaries and affiliates.
Obtaining a Solution

4.5.1. Entering the SOLUTION Processor


To enter the SOLUTION processor, use either of the following:
Command(s): /SOLU
GUI: Main Menu> Solution

4.5.2. Defining the Analysis Type


To specify the analysis type, do either of the following:

• Select menu path Main Menu> Solution> Analysis Type> New Analysis > Transient.

• If this is a new analysis, issue the ANTYPE,TRANSIENT,NEW command.

• To restart a previous analysis (for example, to restart an unconverged solution or to specify additional
excitation), issue ANTYPE,TRANSIENT,REST. In a nonlinear transient magnetic analysis, the default be-
havior is multiframe restart; for more information, see the RESCONTROL command.

4.5.3. Defining Analysis Options


Next, you define which solution method and which solver you want to use.

To select a solution method, use either of the following:


Command(s): TRNOPT
GUI: Main Menu> Solution> Analysis Type> New Analysis, Transient

Transient magnetic analyses require the full solution method.

To select an equation solver, use either of the following:


Command(s): EQSLV
GUI: Main Menu> Solution> Analysis Type> Analysis Options

You can choose any of the following solvers:

• Sparse solver (default)

• Jacobi Conjugate Gradient (JCG) solver

• Incomplete Cholesky Conjugate Gradient (ICCG) solver

• Preconditioned Conjugate Gradient (PCG) solver

Voltage-fed models or models including velocity effects produce unsymmetric matrices, and can use
only the sparse solver, the JCG solver, or the ICCG solver. Circuit-fed models can only use the sparse
solver.

4.5.4. Load Step Options


Load step options include the following:

• Time option

This option specifies time at the end of the load step.


Command(s): TIME

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 79
2-D Transient Magnetic Analysis

GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Time/Frequenc> Time - Time
Step
Main Menu> Solution> Load Step Opts> Time/Frequenc> Time - Time Step

• Number of substeps or time step size

The integration time step is the time increment used in the time integration scheme. You can
specify it directly via the DELTIM command or its equivalent menu path, or indirectly via NSUBST
or its menu path equivalent.

Time step size determines the accuracy of your solution. The smaller the time step size, the
higher the accuracy. The size of the first integration time step following any large step change
in loading conditions is especially critical. You can reduce inaccuracies such as thermal overshoot
by reducing the integration time step size.

Caution

Avoid using extremely small time steps, especially when establishing initial conditions.
Very small numbers can cause calculation errors in ANSYS. For instance, in a analysis
with a time scale of unity, time steps smaller that 1E-10 can cause numerical errors.

If you step-apply loads, ANSYS applies the entire load value at the first substep and holds it
constant for the remainder of the load step. If you ramp loads (the default), ANSYS increments
the load values at each substep.
Command(s): NSUBST, DELTIM
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Time/Frequenc> Time and Sub-
stps
Main Menu> Solution> Load Step Opts> Time/Frequenc> Time and Substps
Main Menu> Solution> Load Step Opts> Time/Frequenc> Time - Time Step

• Automatic Time Stepping

Also called time step optimization in a transient analysis, automatic time stepping allows ANSYS
to determine the size of load increments between substeps. It also increases or decreases the
time step size during solution, depending on how the model responds.

For most problems, you should turn on automatic time stepping and set upper and lower limits
for the integration time step. The limits help to control how much the time step varies. However,
time step optimization is not available for the CURR degree of freedom (voltage-fed conductors)
or the EMF degree of freedom (circuit-fed models).
Command(s): AUTOTS
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Time/Frequenc> Time and Sub-
stps
Main Menu> Solution> Load Step Opts> Time/Frequenc> Time and Substps
Main Menu> Solution> Load Step Opts> Time/Frequenc> Time - Time Step

4.5.5. Nonlinear Options


Specify nonlinear load options only if nonlinearities are present. Nonlinear options include the following:

• Newton-Raphson Options

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
80 of ANSYS, Inc. and its subsidiaries and affiliates.
Obtaining a Solution

These options specify how often the tangent matrix is updated during a nonlinear solution.
Available options are:

– Program-chosen (default)

– Full

– Modified

– Initial-stiffness.

For a nonlinear analysis, the full Newton-Raphson option is recommended. The adaptive descent
option may help convergence in transient problems. To specify Newton-Raphson options, use
either of the following:
Command(s): NROPT
GUI: Main Menu> Solution> Analysis Type> Analysis Options

• Number of equilibrium iterations

This option obtains a converged solution at each substep. The default is up to 25 equilibrium
iterations, but you may need to increase the number depending on the degree of nonlinearity.
For linear transient analysis, specify one iteration.
Command(s): NEQIT
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Nonlinear> Equilibrium Iter
Main Menu> Solution> Load Step Opts> Nonlinear> Equation Iter

• Convergence tolerances

ANSYS considers a nonlinear solution to be converged whenever specified convergence criteria


are met. Convergence checking may be based on magnetic potential (A), magnetic current seg-
ment (CSG), or both. You specify a typical value for the desired item (VALUE field) and a tolerance
about the typical value (TOLER field). ANSYS then calculates the convergence criterion via VALUE
* TOLER. For example, it you specify 5000 as the typical value for magnetic current segment
and 0.001 as the tolerance, the convergence criterion for magnetic flux would be 5.0.

ANSYS, Inc. recommends that VALUE be left to the default (program-calculated) and that TOLER
be set to 1.0E-3.

For potentials, ANSYS compares the change in nodal potentials between successive equilibrium
iterations ΔA = Ai - Ai-1 to the convergence criterion.

For a magnetic current segment, ANSYS compares the out-of-balance load vector to the conver-
gence criterion. If the solution does not converge within the specified number of equilibrium
iterations, the program either stops or moves on to the next load step, depending on whether
you activated the option to terminate an unconverged solution (see below).
Command(s): CNVTOL
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Nonlinear> Convergence Crit.
Main Menu> Solution> Load Step Opts> Nonlinear> Convergence Crit.

• Terminate an unconverged solution

If ANSYS cannot converge the solution within the specified number of equilibrium iterations,
ANSYS either stops the solution or moves on to the next load step, depending on what you
specify as the stopping criteria.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 81
2-D Transient Magnetic Analysis

4.5.6. Output Controls


This class of load step options enables you to control output. Output controls options are as follows:

• Control printed output

This option enables you to include any results data in the printed output file (Jobname.OUT).
Command(s): OUTPR
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Output Ctrls> Solu Printout
Main Menu> Solution> Load Step Opts> Output Ctrls> Solu Printout

• Control database and results file output

This option controls what data goes to the results file (Jobname.RMG).

By default, the ANSYS program writes only the last substep of each load step to the results file.
If you want all substeps on the results file, specify a write frequency of ALL or 1 (every loadstep).
Command(s): OUTRES
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Nonlinear> Convergence Crit
Main Menu> Solution> Loads> Load Step Opts> Nonlinear> Convergence Crit

4.5.7. Saving a Backup Copy of the Database


Use the SAVE_DB button on the ANSYS Toolbar to save a backup copy of the ANSYS database. This
enables you to retrieve your model should your computer fail while analysis is in progress. To retrieve
a model, re-enter ANSYS and use one of the following:
Command(s): RESUME
GUI: Utility Menu> File> Resume Jobname.db

4.5.8. Starting the Solution


In this step, you initiate the solution for all loads steps using one of the following:
Command(s): LSSOLVE
GUI: Main Menu> Solution> Solve> From LS Files

4.5.9. Finishing the Solution


To leave the SOLUTION processor, use either of the following:
Command(s): FINISH
GUI: Main Menu> Finish

4.6. Reviewing Results


The program writes results from a transient analysis to the magnetic results file, Jobname.RMG. Results
include the data listed below:

Primary data: Nodal DOFs (AZ, CURR, EMF, MAG, VOLT)

Derived data:

• Nodal magnetic flux density (BX, BY, BSUM)


• Nodal magnetic field intensity (HX, HY, HSUM)
• Nodal magnetic forces (FMAG: components X, Y, SUM)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
82 of ANSYS, Inc. and its subsidiaries and affiliates.
Reviewing Results

• Nodal reaction current segments (CSGZ)


• Total electric current density (JT)
• Joule heat per unit volume (JHEAT)

Additional data, specific to each element type, also is available. See the Element Reference for details.

You can review analysis results in POST1, the general postprocessor, or in POST26, the time-history
postprocessor:

• POST26 enables you to review results at specific points in the model over the entire transient.

• POST1 enables you to review results over the entire model at specific time points.

To choose a postprocessor, choose one of the following:


Command(s): /POST1 or /POST26
GUI: Main Menu> General Postproc
Main Menu> TimeHist Postpro

2-D Harmonic Magnetic (AC) Analysis (p. 51) and 3-D Harmonic Magnetic Analysis (Edge-Based) (p. 141)
of this manual discuss ANSYS commands that you may find useful in examining analysis results.

4.6.1. Reading Results in POST26


To review results in POST26, the time-history postprocessor, the ANSYS database must contain the same
model for which the solution was calculated, and the Jobname.RMG file (the results file) must be
available. If the model is not in the database, restore it using the command or menu path listed below
and then use the SET command or its equivalent menu path to read in the desired set of results.
Command(s): RESUME
GUI: Utility Menu> File> Resume Jobname.db

POST26 works with tables of result item versus time, known as variables. Each variable is assigned a
reference number, with variable number 1 reserved for time. Therefore the first things you need to do
is define the variables.

To define primary data variables, use either of the following:


Command(s): NSOL
GUI: Main Menu> TimeHist Postpro> Define Variables

To define derived data variables, use either of the following:


Command(s): ESOL
GUI: Main Menu> TimeHist Postpro> Define Variables

To define reaction data variable, use either of the following:


Command(s): RFORCE
GUI: Main Menu> TimeHist Postpro> Define Variables

Once you have defined these variables, you can graph them (versus time or any variable). To do so, use
this command or menu path:
Command(s): PLVAR
GUI: Main Menu> TimeHist Postpro> Graph Variables

To list the variables, use this command or menu path:


Command(s): PRVAR
GUI: Main Menu> TimeHist Postpro> List Variables

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 83
2-D Transient Magnetic Analysis

To list only the extreme variable values, use this command or menu path:
Command(s): EXTREM
GUI: Main Menu> TimeHist Postpro> List Extremes

By reviewing the time-history results at strategic points throughout the model, you can identify the
critical time points for further POST1 postprocessing.

To calculate and summarize electromagnetic forces, power loss, energy, and current on element com-
ponents (created in the PREP7 preprocessor via the CM command (Utility Menu> Select> Comp/As-
sembly> Create Comp/Assembly)), you can use either of the following:
Command(s): PMGTRAN
GUI: Main Menu> TimeHist Postpro> Elec&Mag> Magnetics

POST26 offers many other functions, such as performing math operations among variables, moving
variables into array parameters, etc. For more information, see the Basic Analysis Guide.

4.6.2. Reading Results in POST1


To review results in POST1, the ANSYS database must contain the same model for which the solution
was calculated. Also, the results file (Jobname.RMG, or Jobname.RST if either the magnetic scalar
potential or electric potential DOFs are active) must be available.

To read results at the desired time point into the database, use either of the following:
Command(s): SET,,,,,TIME
GUI: Utility Menu> List> Results> Load Step Summary

If you specify a time value for which no results are available, ANSYS performs linear interpolation to
calculate the results at that time. The program uses the last time point if the time specified is beyond
the time span of the transient analysis. You can also identify the results to be read by their load step
and substep numbers.

You can display contours of potentials (AZ, VOLT) flux density (BX, BY) and field intensity (HX, HY) using
either of the following methods:
Command(s): PLESOL, PLNSOL
GUI: Main Menu> General Postproc> Plot Results> Contour Plot> Element Solution
Main Menu> General Postproc> Plot Results> Contour Plot> Nodal Solu

You can display vector (arrow) displays of vector quantities such as A, B, and H using either of the fol-
lowing methods:
Command(s): PLVECT
GUI: Main Menu> General Postproc> Plot Results> Vector Plot> Predefined
Main Menu> General Postproc> Plot Results> Vector Plot> User Defined

4.6.2.1. Coil Resistance and Inductance


For stranded coils with the voltage-fed or circuit-fed options, you can calculate the resistance and in-
ductance of the coil. Each element stores values of resistance and inductance. Summing these values
gives the total resistance and inductance of the modeled region of the conductor. To store and sum
these values, select the conductor elements using the ETABLE,tablename,NMISC,n command or its
equivalent menu path. (For the n value, use 8 for resistance and 9 for inductance.) Use the SSUM
command or its menu path equivalent to sum the data.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
84 of ANSYS, Inc. and its subsidiaries and affiliates.
Example Transient Magnetic Analyses

4.6.2.2. Calculating Other Items of Interest


You can calculate many other items of interest (such as flux lines, eddy currents, torque, and force) from
the data available in the database in postprocessing. The ANSYS command set supplies the following
macros for these calculations:

• The CURR2D macro calculates current flow in a 2-D conductor.

• The EMAGERR macro calculates the relative error in an electrostatic or electromagnetic field analysis.

• The FLUXV macrocalculates the flux passing through a closed contour.

• The MMF macro calculates magnetomotive force along a path.

• The PLF2D macro generates a contour line plot of equipotentials.

• The SENERGY macro determines the stored magnetic energy or co-energy.

For more discussion of these macros, see Electric and Magnetic Macros (p. 193).

For information on the macros applicable to PLANE233, see the element's description in the Element
Reference.

4.7. Example Transient Magnetic Analyses


The following examples are available:
4.7.1. Example: Transient Magnetic Analysis
4.7.2. Other Examples

4.7.1. Example: Transient Magnetic Analysis


The following example shows how to perform a 2-D transient magnetic analysis of a solenoid actuator.

4.7.1.1. Example Description


The analysis, based on a solenoid actuator, analyzes the actuator as a 2-D axisymmetric model. The ex-
ample calculates the force on the armature (the moving component of the actuator), inductance of the
coil, and the coil current in response to a voltage excitation. Figure 4.2: Diagram of a Solenoid Actuat-
or (p. 85) below shows you the solenoid actuator:

Figure 4.2: Diagram of a Solenoid Actuator


Armature
td (iron)

gap space
Armature: moving component
ta tc of the actuator.

Back-iron: stationary iron


wc Backiron component of the actuator that
(iron) completes the magnetic circuit
around the coil.
hc Coil (copper)
650 turns Coil: stranded, wound coil
Axis of 1 amp/turn supplying a predefined current.
symmetry
Gap: thin rectangular region
of air between the armature
and the pole faces of the
back-iron.
Y tb
Z X

wc

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 85
2-D Transient Magnetic Analysis

4.7.1.2. Analysis Parameters


The analysis uses the parameters listed below to model the actuator geometry:

Parameter Description
n = 650 Number of turns in the coil; used in postprocessing
ta = .75 Thickness of inner leg of magnetic circuit
tb = .75 Thickness of lower leg of magnetic circuit
tc = .50 Thickness of outer leg of magnetic circuit
td = .75 Armature thickness
wc = 1 Width of coil
hc = 2 Height of coil
gap = .25 Gap
space = .25 Space around coil
ws = wc+2*space
hs = hc+.75
w = ta+ws+tc Total width of model
hb = tb+hs
h = hb+gap+td Total height of model
acoil = wc*hc Coil area

4.7.1.3. Approach and Assumptions


The solenoid actuator model for this transient example is identical to the solenoid example described
in 2-D Static Magnetic Analysis (p. 13). Instead of a DC current excitation, the coil is supplied a voltage
excitation which varies over time.

The coil is supplied a voltage which ramps from 0 volts to 12 volts over a .01 second time frame. After
that, the voltage is held constant and the analysis runs until a time of .06 seconds. The coil requires
additional characterization, including cross-section area and fill factor. Resistivity for copper is also
provided. The armature is assumed to be solid steel, so it requires the input of electrical resistivity as
well.

The purpose of the example analysis is to track the coil current, armature force, and coil inductance
over time in response to the applied voltage excitation. (The coil inductance will change slightly due
to the eddy currents developed in the armature.)

The solution uses constant time stepping over three load steps ending at .01, .03, and .06 seconds re-
spectively. In the time-history postprocessor (POST26), the desired results are computed for the defined
element components using the PMGTRAN command or equivalent GUI menu options. You can review
the results graphically using the DISPLAY program from the filemg_trns.plt created by the PMGTRAN
command.

You can perform the example analysis of transient eddy currents using the commands shown below.
All text prefaced by an exclamation point (!) is a comment.
/batch,list
/PREP7
/TITLE, 2-D Solenoid Actuator Transient Analysis

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
86 of ANSYS, Inc. and its subsidiaries and affiliates.
Example Transient Magnetic Analyses

ET,1,PLANE53,,,1 ! Define element type, set for axisymmetric run


ET,2,PLANE53,2,,1 ! Axisymmetric, voltage-fed coil option
MP,MURX,1,1 ! Define material permeability (air)
MP,MURX,2,1000 ! Permeability (backiron)
MP,MURX,3,1 ! Permeability (coil)
MP,MURX,4,2000 ! Permeability (armature)
MP,RSVX,3,3e-8 ! Define coil resistivity
MP,RSVX,4,70e-8 ! Define armature resistivity

/com ! Set parameter values


n=650
ta=.75
tb=.75
tc=.50
td=.75
wc=1
hc=2
gap=.25
space=.25
ws=wc+2*space
hs=hc+.75
w=ta+ws+tc
hb=tb+hs
h=hb+gap+td
acoil=wc*hc ! Cross-section of coil (cm**2)

R,1,acoil*.01**2,n,,1,.95 ! Coil constants (area, turns, dir., fill factor)


/PNUM,AREA,1
RECTNG,0,w,0,tb ! Create rectangular areas
RECTNG,0,w,tb,hb
RECTNG,ta,ta+ws,0,h
RECTNG,ta+space,ta+space+wc,tb+space,tb+space+hc
AOVLAP,ALL
RECTNG,0,w,0,hb+gap
RECTNG,0,w,0,h
AOVLAP,ALL
NUMCMP,AREA ! Compress out unused area numbers
APLOT

ASEL,S,AREA,,2 ! Assign attributes to coil


AATT,3,1,2,0
ASEL,S,AREA,,1 ! Assign attributes to armature
ASEL,A,AREA,,12,13
AATT,4,1,1
ASEL,S,AREA,,3,5 ! Assign attributes to backiron
ASEL,A,AREA,,7,8
AATT,2,1,1,0
/PNUM,MAT,1
ALLSEL,ALL
APLOT

SMRTSIZE,4 ! Set SmartSize meshing level


AMESH,ALL ! Mesh all areas
ESEL,S,MAT,,4 ! Select armature elements
CM,ARM,ELEM ! Define armature as a component
FMAGBC,'ARM' ! Apply force boundary conditions to armature
ESEL,S,MAT,,3
NSLE,S
CP,1,CURR,ALL
CM,COIL,ELEM ! Define coil as a component
ALLSEL,ALL
ARSCAL,ALL,,,.01,.01,1,,0,1 ! Scale model to MKS (meters)
FINISH

/SOLU
ANTYP,TRANS
NSEL,EXT ! Select exterior nodes
D,ALL,AZ,0 ! Set potentials to zero (flux-parallel)
CMSEL,S,COIL
BFE,ALL,VLTG,,12
ALLSEL,ALL
TIME,.01

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 87
2-D Transient Magnetic Analysis

DELTIM,.002
OUTRES,ALL,ALL
SOLVE
TIME,.03
NSUBST,1
SOLVE
TIME,.03
DELTIM,.005
TIME,.06
NSUBST,1
SOLVE
FINISH

/POST26
PMGTRAN,,,'ARM',,,,,'COIL','COIL'
FINISH

4.7.2. Other Examples


Another ANSYS, Inc., publication, the Mechanical APDL Verification Manual, contains an additional example
of transient magnetic analysis:

VM186 - Transient Analysis of a Slot-Embedded Conductor

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
88 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 5: 3-D Static Magnetic Analysis (Scalar Method)
Like the 2-D static magnetic analysis described in 2-D Static Magnetic Analysis (p. 13), a 3-D static
magnetic analysis calculates the magnetic fields produced by one of the following:

• Permanent magnets

• The steady flow of direct electric current (DC)

• An applied voltage

• An applied external field.

Static magnetic analyses do not consider time-dependent effects such as eddy currents. You can model
both saturable and non-saturable magnetic materials, as well as permanent magnets in a static magnetic
analysis.

In a 3-D static magnetic analysis, you can choose between a scalar formulation (described in this chapter)
or an edge element formulation (explained in 3-D Magnetostatics and Fundamentals of Edge-Based
Analysis (p. 113)).

The following 3-D static magnetic analysis topics are available:


5.1. Elements Used in 3-D Static Scalar Magnetic Analysis
5.2. Scalar Potential Formulation
5.3. Analysis Considerations
5.4. Steps in a 3-D Static Scalar Analysis
5.5. Example 3-D Static Magnetic Analyses (Scalar Method)

5.1. Elements Used in 3-D Static Scalar Magnetic Analysis


The ANSYS program provides the following scalar formulation element types for a 3-D static magnetic
analysis. For detailed information about the elements, see the Element Reference. That manual organizes
element descriptions in numeric order.

Table 5.1: 3-D Solid Elements

Element Dimens. Shape or DOFs Notes


Characteristic
SOLID5 3-D Brick, eight nodes Up to six at each node; Supported for cyclic
these can be displacements, symmetry (periodic)
electric potential, magnetic analysis.*
scalar potential, or
temperature
SOLID96 3-D Brick, eight nodes Magnetic scalar potential Supported for cyclic
symmetry (periodic)
analysis.*

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 89
3-D Static Magnetic Analysis (Scalar Method)

Element Dimens. Shape or DOFs Notes


Characteristic
SOLID98 3-D Tetrahedral, ten Magnetic scalar potential, Supported for cyclic
nodes displacements, electric symmetry (periodic)
potential, temperature analysis.*

* Coils must be modeled in full symmetry by SOURC36 elements.

Table 5.2: 3-D Source Elements

Element Dimens. Shape or Characteristic DOFs


SOURC36 3-D Bar, Three nodes None
Arc, Coil
Primitives

Table 5.3: 3-D Infinite Elements

Element Dimens. Shape or Characteristic DOFs


INFIN47 3-D Quadrilateral, four nodes Magnetic scalar potential, temperature
or triangle, three nodes
INFIN111 3-D Brick, 8 or 20 nodes Magnetic vector potential, electric potential,
magnetic scalar potential, temperature

SOLID96 is designed specifically for magnetic applications. SOLID5 and SOLID98 are better suited for
coupled-field applications.

Table 5.4: Contact Elements

Element Dimens. Shape or DOFs Notes


Characteristic
TARGE170 3-D Target segment n/a Used to model the
target region for a
contact analysis
CONTA173 3-D Surface-to-surface MAG Used to model the
contact element contact region for a
(2-node) contact analysis
CONTA174 3-D Surface-to-surface MAG Used to model the
contact element contact region for a
(3-node) contact analysis
CONTA175 3-D Node-to-surface MAG Used to model the
contact element contact region for a
(1-node) contact analysis

5.2. Scalar Potential Formulation


For the scalar potential formulation, you can use three different analysis methods: Reduced Scalar Po-
tential (RSP), Difference Scalar Potential (DSP), and Generalized Scalar Potential (GSP). The type of
model you are analyzing determines which method is best to use:

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
90 of ANSYS, Inc. and its subsidiaries and affiliates.
Analysis Considerations

• If the model contains no iron regions, or if it has iron regions but does not have current sources, use
the RSP method. Do not use the RSP method when the model has both iron regions and current sources,
because numerical cancellation errors may produce an inaccurate solution.

• If you cannot use the RSP method, choose between DSP and GSP. The DSP method is available for
models with "singly connected" iron regions, and the GSP method is for models with a "multiply con-
nected" iron region.

5.2.1. Singly Versus Multiply Connected Domains


A singly connected domain is an iron region that does not provide a closed iron loop to magnetic flux
that a current source produces. A multiply connected domain provides a closed loop. (see Figure 5.1: Con-
nected Domains (p. 91)) Figure (a) illustrates a singly connected iron domain (DSP method) and Figure
(b) depicts a multiply connected iron domain (GSP method).

Figure 5.1: Connected Domains

Inductor Inductor

Coil Air Gap Coil

(a) (b)

Mathematically, you can use Ampere's law in the iron region to check whether the domain is singly or
multiply connected. According to Ampere's law, the closed contour integral equals the enclosed current,
or magnetomotive force (MMF).

MMF = H(dl)

In a singly connected domain, the MMF drop in the iron should approach zero as the permeability of
the iron tends to infinity. Most of the MMF drop occurs in the air gap for a permeable core. In a multiple
connected domain, a closed contour integral in the iron linking the coil produces a nonzero MMF for
any value of permeability. All of the MMF drop in this case occurs in the iron core.

5.3. Analysis Considerations


Before setting up your analysis, consider the following:

• You can use the SOLID96 element to represent all interior regions of your model: saturable regions,
permanent magnet regions, and air (free space). For current-conducting regions, you need to use current
source primitives represented by the SOURC36 element. See Modeling Current Conduction Re-
gions (p. 97) for more details.

• At the exterior of air elements, use of INFIN47, the four-node boundary element, or INFIN111, the 8- or
20-node boundary element, is recommended. INFIN47 and INFIN111 can model the far-field decay in
the magnetic field, and usually give better results than a flux-parallel or flux-normal condition. Of the
two elements, the INFIN111 element more accurately models the exterior domain.

• When using SOLID5, SOLID96, or SOLID98 elements with SOURC36 elements, the source elements
should be placed so that the resulting Hs field fulfills boundary conditions for the total field, i.e., the
source field created by SOURC36 elements should closely match the boundary conditions on the meshed

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 91
3-D Static Magnetic Analysis (Scalar Method)

domain. For example, at unconstrained surfaces of the model where the total field will be parallel, the
source field should be approximately parallel.

• The phenomenon is similar to the treatment of symmetry conditions. Even if the studied domain is
only a fraction of the full size problem, you should extend the SOURC36 geometry to the full model to
obtain a good solution.

• The default system of units is MKS (meter-kilogram-second). You can change this to any other system
you prefer using one of the methods shown below. Once you choose a system of units, all input data
must be in that system. For convenience, you may create your geometry in other units (for example,
millimeters or inches) and then scale it to the appropriate analysis units.
Command(s): EMUNIT
GUI: Main Menu> Preprocessor> Material Props> Electromag Units

• Based on the input units you specify, the free space permeability μo is determined automatically as
follows:

μo = 4 π* 10-7 H/m in MKS units, or

μo = value specified with the EMUNIT command.

5.4. Steps in a 3-D Static Scalar Analysis


This type of analysis has essentially the same steps as a 2-D static analysis:
5.4.1. Create the Physics Environment
5.4.2. Build the Model
5.4.3. Apply Boundary Conditions and Loads (Excitation)
5.4.4. Solve the Analysis (RSP, DSP, or GSP Method)
5.4.5. Review Analysis Results (RSP, DSP, or GSP Method Analysis)

5.4.1. Create the Physics Environment


To begin, set the analysis preference to Magnetic-Nodal and give the analysis a title. Then, use the
ANSYS preprocessor (PREP7) to define the items that comprise the physics environment for the analysis,
including element types and KEYOPT settings, material properties, and so on. For a 3-D static analysis,
most of these procedures are the same as those described in 2-D Static Magnetic Analysis (p. 13). The
rest of this chapter contains information that is specific to 3-D static analysis.

5.4.1.1. Setting GUI Preferences


If you are running ANSYS via the GUI, before you start building your model you should choose menu
path Main Menu> Preferences. Then, on the dialog box that appears, select Magnetic-Nodal from
the list of magnetic analysis types. Because the GUI filters the elements available to you based on the
preference you choose, you must specify Magnetic-Nodal to ensure that you can use the elements
needed for 3-D static analysis.

5.4.1.2. Specifying Material Properties


Your model may have any or all of the following material regions: air, (free-space) permeable materials,
current-conducting regions, and permanent magnets. Each type of material region has certain required
material properties.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
92 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a 3-D Static Scalar Analysis

The ANSYS material library contains definitions of several materials with magnetic properties. Instead
of defining material properties from scratch, you can read these material properties into the ANSYS
database and, if necessary, modify them to match the materials in your analysis problem more closely.

Materials with magnetic properties defined in the ANSYS material library are as follows:

Material Material Property File Containing Its Definition


Copper emagCopper.SI_MPL
M3 steel emagM3.SI_MPL
M54 steel emagM54.SI_MPL
SA1010 steel emagSa1010.SI_MPL
Carpenter (silicon) steel emagSilicon.SI_MPL
Iron cobalt vanadium steel emagVanad.SI_MPL

The copper property presents temperature-dependent resistivity and relative permeability. All other
properties are B-H curves.

The property definitions in the material library specify properties "typical" for the materials listed. ANSYS,
Inc. has extrapolated these properties to cover high saturation conditions. Your actual material values
may differ from those supplied; therefore, you may need to modify the ANSYS material library files you use.

5.4.1.2.1. Accessing Material Library Files


The next few paragraphs explain basic procedures for reading and writing material library files. You can
find a more detailed discussion of these procedures and the ANSYS material library in Getting Started
in the Basic Analysis Guide.

To read a material library file into the ANSYS database, do the following:

1. If you have not already specified the system of units you are using, issue the /UNITS command or its
GUI equivalent.

Note

The default system of units for ANSYS is MKS. The GUI lists only material library files
with the currently active units.

2. Define the material library read path for the material of interest. (You will need to know which directory
path your system administrator has used to store the material library files.) To do so, use either of the
following:
Command(s): /MPLIB,READ,pathdata
GUI: Main Menu> Preprocessor> Material Props> Material Library> Library Path

3. Read the material library file into the database using one of the following:
Command(s): MPREAD,filename...LIB
GUI: Main Menu> Preprocessor> Material Props> Material Library> Import Library
Main Menu> Preprocessor> Loads> Load Step Opts> Other> Change Mat Props> Material Library>
Import Library

To write changes to a material library file, perform these steps:

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 93
3-D Static Magnetic Analysis (Scalar Method)

1. Edit the material property definition using either the MP command or the GUI (Main Menu> Preprocessor>
Material Props> Material Models> Electromagnetics). Make sure that your revised definition includes
a material number and at least one material property value (for example, magnetic permeability or MURX).

2. From the PREP7 preprocessor, issue the command shown below:


Command(s): MPWRITE,filename,,,LIB,MAT
GUI: Main Menu> Preprocessor> Material Props> Material Library> Export Library

5.4.1.3. Additional Guidelines for Defining Regional Material Properties and Real
Constants
The next few paragraphs provide some guidelines for setting up physics regions for your model. In
addition, you may want to consult 2-D Harmonic Magnetic (AC) Analysis (p. 51); it pictures and describes
the regions that can exist within a 2-D model.

5.4.1.3.1. For Air Regions:


Specify a relative permeability of 1.0. To do so, use one of the following:
Command(s): MP,MURX
GUI: Main Menu> Preprocessor> Material Props> Material Models> Electromagnetics> Relative
Permeability> Constant

5.4.1.3.2. For Free-Space Permeable Material Regions:


Specify the B-H curve by reading from a material library or by creating your own B-H curve:
Command(s): MPREAD,filename, ...
GUI: Main Menu> Preprocessor> Material Props> Material Library> Import Library
Command(s): TB, TBPT
GUI: Main Menu> Preprocessor> Material Props> Material Models> Electromagnetics> BH Curve

If the material is linear, all you need is the relative permeability μr (which may be isotropic or orthotropic).
If you specify a B-H curve, it should meet the following requirements for the material to be represented
accurately:

• The B values must be unique for each H value, and must monotonically increase with H, as shown in
Figure 2.1: B-H and Reluctivity vs. B Squared Curves (p. 24)(a). By default, the B-H curve will pass through
the origin (that is, the 0.0 point is not to be explicitly defined). You can verify this by plotting B versus
H using one of the methods shown below. (For more information, see the Element Reference.)
Command(s): TBPLOT
GUI: Main Menu> Preprocessor> Material Props> Material Models> Electromagnetics> BH Curve

• The μ-H curve that ANSYS calculated internally (where μ is the permeability) should be smooth and
continuous. You can verify this by plotting μ versus H using TBPLOT. (See Figure 5.1: Connected Do-
mains (p. 91)(b)). The B-H curve should cover the complete operating range of the material. If a point
beyond the end of the curve is required, the B-H curve is extrapolated at constant slope. The constant
slope should be equal to or greater than μr. You can view values in the extrapolated region by adjusting
the x-axis range of your B versus H plot. To adjust the x-axis range, use one of the following:
Command(s): /XRANGE
GUI: Utility Menu> PlotCtrls> Style> Graphs

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
94 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a 3-D Static Scalar Analysis

Figure 5.2: B-H and mu-H Curves With Extrapolation

(a) B-H curve with extrapolation; (b) μ-H curve with extrapolation

For permanent magnets and nonlinear orthotropic materials, material input is the same as for 2-D
static analysis.

5.4.2. Build the Model


You can find most of the information you need to build a model for a 3-D static scalar magnetic problem
in the Modeling and Meshing Guide. For 3-D scalar analyses, however, there are some special considerations
for modeling current sources.

For information on modeling two contacted bodies, see Modeling Magnetic Contact. You can use contact
to:

• Model contact between bodies with dissimilar meshes (such as the air gap in a rotor/stator configuration)

• Model the gap permeance between bodies without having to create a finite mesh of the void region
between the bodies.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 95
3-D Static Magnetic Analysis (Scalar Method)

SOLID96 / 98

TARGE170

Exploded view
of interface

SOLID96 / 98

CONTAC173 / 174

Dissimilar mesh DOF: MAG


interface
Contact elements: TARGE170, CONTA173, CONTA174,
CONTA175

CONTA17x Keyoptions: KEYOPT(1)=7 (MAG), KEYOPT(2)=2 (MPC


approach), KEYOPT(12)=5
Contact permeance DOF: MAG

Contact elements: TARGE170, CONTA173, CONTA174,


CONTA175

Real constant: MCC (contact permeance) (real constant number


26)

CONTA17x KEYOPTS: KEYOPT(1)=7 (MAG)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
96 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a 3-D Static Scalar Analysis

5.4.2.1. Modeling Current Conduction Regions


You can model current conduction regions with primitive sources, so they do not need material prop-
erties.

In a 3-D scalar potential analysis, current sources are not modeled as an integral part of the geometry
(as they are in a 2-D analysis). Instead, you use a "dummy" finite element, SOURC36, to represent the
shape and location of current sources. You can define coils, bars, or arcs at any location in the model.
The amount of current and other current-source data are specified as element real constants. Figure 5.3: A
Coil Source Represented by SOURC36 Elements (p. 97) shows an example of a coil current-source rep-
resented with SOURC36 primitives.

Figure 5.3: A Coil Source Represented by SOURC36 Elements

Note

You must model the entire current source even if the rest of the model uses half-symmetry
or quarter-symmetry. Coil and arc elements cannot have a zero inside radius.

Because SOURC36 elements are not true finite elements, you can use only direct generation (not solid
modeling) to define them. Direct generation uses the following menu paths or equivalent commands:
Command(s): N
GUI: Main Menu> Preprocessor> Modeling> Create> Nodes> In Active CS
Main Menu> Preprocessor> Modeling> Create> Nodes> In Active CS
Main Menu> Preprocessor> Modeling> Create> Nodes> On Working Plane
Command(s): E
GUI: Main Menu> Preprocessor> Modeling> Create> Elements> Auto Numbered> Thru Nodes
Command(s): EGEN
GUI: Main Menu> Preprocessor> Modeling> Copy> Elements> Auto Numbered

To display current source elements, use the commands or menu paths listed below (in the order shown):
Command(s): /ESHAPE, EPLOT
GUI: Utility Menu> PlotCtrls> Style> Size and Shape
Utility Menu> Plot> Elements

The following is a command-based example of defining current sources.

/PREP7
ET,2, 36 ! Current source element

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 97
3-D Static Magnetic Analysis (Scalar Method)

EMUNIT,MKS ! MKS units


! Define convenient parameters:
I=0.025 ! Current (amps)
N=300 ! Turns
S=0.04 ! Solenoid length
R=0.01 ! Solenoid radius
THK=0.002 ! Solenoid thickness
!
R=2,1,N*1,THK,S ! Real constant set 2: coil type, current
! thickness, length,
CSYS,1 ! Global cylindrical system
N,1001,R ! Nodes for the source element
N,1002,R,90
N,1003
TYPE,2 ! Attributes
REAL,2
E,1001,1002,1003 ! Element definition
/ESHAPE,1
/VIEW,1,2,1,.5
/VUP,1,Z
/TRIAD, LBOT
/TYPE,1,HIDP
EPLOT

The following example demonstrates the use of SOURC36 current source elements using three arcs of
120°.
/title,,,full circle coils against 3x120 and 6x60 degree arcs
/com
/com This example demonstrates the usage of SOURC36 current source elements.
/com It compares results of a full circle coils with
/com 6 arcs of 60 degrees and 3 arcs of 120 degrees
/com
/nopr
!
coil=1
arc=3
cur=10
dr=0.1 ! radius of source
dz=dr
eps=0.0005
ri=5 ! radius of the coil R >> dr,dz
step=1 ! step along Z
pi=3.1415926
n=21 ! Z = -10 to +10 by 1

*dim,hhx,array,n,3
*dim,hhy,array,n,3
*dim,hhz,array,n,4 ! to store targeted results in the center
*dim,hhs,array,n,3

/com ***** full coil (360 degrees) *****


/prep7
et,1,36
r,1,coil,cur,dr,dz,eps ! define the source
n,10001,ri, 0, 0
n,10002, 0,ri, 0
n,10003, 0, 0, 0
e,10001,10002,10003
et,2,96
mp,murx,1,1
n,1,0,0,-10*step ! define the calculated nodes
ngen,n,1,1,,,,,step
/solv
biot,new
/post1
*do,i,1,n
*get,hx,node,i,hs,x
*get,hy,node,i,hs,y
*get,hz,node,i,hs,z
hh=hx**2+hy**2+hz**2
hh=sqrt(hh)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
98 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a 3-D Static Scalar Analysis

hhx(i,1)=hx
hhy(i,1)=hy
hhz(i,1)=hz
hhs(i,1)=hh
*enddo
/com ! to check if hx=hy=0
/com********************** 360-degree coil **********************
/com Hx Hy Hz Hsum
*vwrite,hhx(1,1),hhy(1,1),hhz(1,1),hhs(1,1)
('H=',4f15.6)
/com*************************************************************
fini

/com *** arcs ***


/prep7
et,1,36
r,1,arc,cur,dr,dz,eps ! define the source
edele,all
ndele,all
n,10001,ri , 0, 0
n,10002, ri/2, ri*sqrt(3)/2, 0
n,10003,-ri/2, ri*sqrt(3)/2, 0
n,10004,-ri, 0, 0
n,10005, ri/2,-ri*sqrt(3)/2, 0
n,10006,-ri/2,-ri*sqrt(3)/2, 0
n,10007, 0, 0, 0
e,10001,10002,10007
e,10002,10003,10007
e,10003,10004,10007
e,10004,10005,10007
e,10005,10006,10007
e,10006,10001,10007
et,2,96
mp,murx,1,1
n,1,0,0,-10*step ! define the calculated nodes
ngen,n,1,1,,,,,step
/solv
biot,new
/post1
*do,i,1,n
*get,hx,node,i,hs,x
*get,hy,node,i,hs,y
*get,hz,node,i,hs,z
hh=hx**2+hy**2+hz**2
hh=sqrt(hh)
hhx(i,2)=hx
hhy(i,2)=hy
hhz(i,2)=hz
hhs(i,2)=hh
*enddo
/com
/com ****************** 6 times 60-degree arc *******************
/com Hx Hy Hz Hsum
*vwrite,hhx(1,2),hhy(1,2),hhz(1,2),hhs(1,2)
('H=',4f15.6)
/com*************************************************************
fini

/com *** 3 times 120-degree arcs ***


/prep7
et,1,36
r,1,arc,cur,dr,dz,eps ! define the source
edele,all
ndele,all
n,10001,ri , 0, 0
n,10002,-ri/2, ri*sqrt(3)/2, 0
n,10003,-ri/2,-ri*sqrt(3)/2, 0
n,10005, 0, 0, 0
e,10001,10002,10005
e,10002,10003,10005

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 99
3-D Static Magnetic Analysis (Scalar Method)

e,10003,10001,10005
et,2,96
mp,murx,1,1
n,1,0,0,-10*step ! define the calculated nodes
ngen,n,1,1,,,,,step
/solv
biot,new
/post1
*do,i,1,n
*get,hx,node,i,hs,x
*get,hy,node,i,hs,y
*get,hz,node,i,hs,z
hh=hx**2+hy**2+hz**2
hh=sqrt(hh)
hhx(i,3)=hx
hhy(i,3)=hy
hhz(i,3)=hz
hhs(i,3)=hh
*enddo
/com
/com ***************** 3 times 120-degree arc *******************
/com Hx Hy Hz Hsum
*vwrite,hhx(1,3),hhy(1,3),hhz(1,3),hhs(1,3)
('H=',4f15.6)
/com*************************************************************
fini

! target result with Biot-Savart law


*do,i,1,n,1
hhz(i,4) = cur/2*ri**2/(ri**2+(i-11)**2)**(3/2)
*enddo

/com
/com ********************** Biot Savart *************************
/com
/com H(Z) = I/2*R^2/(R^2+Z^2)^(3/2)
/com
/com ************************************************************
/com ******************** 3 cases results ***********************
/com data
*vwrite,cur,dr,ri
(' current = ',f4.2,' Amp, radius section = ',f5.2,', coil radius = ',f5.2)
/com z= -10 to +10 by 1
/com
/com 360-degree 6*60-degree 3*120-degree target(B-S)
*vwrite,hhz(1,1),hhz(1,2),hhz(1,3),hhz(1,4)
('H=',4f15.6)
/com ************************************************************
/com
/com good approximation for radius section << coil radius
/com
/com ************************************************************
finish

For further information, see the descriptions of the following commands in the Command Reference:
ET, EMUNIT, R, CSYS, N, TYPE, REAL, E, /ESHAPE, /VIEW, /VUP, /TRIAD, and /TYPE.

5.4.2.2. Building a 3-D Racetrack Coil


To help you build a 3-D "racetrack" current source, ANSYS provides the RACE command macro. To invoke
this macro, use either of the following:
Command(s): RACE
GUI: Main Menu> Preprocessor> Modeling> Create> Racetrack Coil
Main Menu> Preprocessor> Loads> Define Loads> Apply> Magnetic> Excitation> Racetrack Coil

The RACE macro enables you to define a racetrack current source in the working plane coordinate
system. The ANSYS program generates the current source from bar and arc source primitives using the

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
100 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a 3-D Static Scalar Analysis

SOURC36 element (which is assigned the next available element type number). Current flows in a
counterclockwise direction with respect to the working plane. See Electric and Magnetic Macros (p. 193)
for additional details about this macro and a racetrack coil diagram.

To delete a racetrack coil, you delete individual SOURC36 elements using the EDELE command (Main
Menu> Preprocessor> Modeling> Delete> Elements). Before doing so, you should first review the
elements to choose the appropriate elements to delete. Review elements using one of the methods
shown below:
Command(s): ELIST
GUI: Utility Menu> List> Elements> Attributes + RealConst
Utility Menu> List> Elements> Attributes Only
Utility Menu> List> Elements> Nodes + Attributes
Utility Menu> List> Elements> Nodes + Attr + RealConst

5.4.3. Apply Boundary Conditions and Loads (Excitation)


5.4.3.1. Applying Loads to a 3-D Scalar Static Analysis
In addition to applying boundary conditions and loads, you also will need to specify load step options
if you opt to step through the analysis manually, See Alternative Analysis Options and Solution Meth-
ods (p. 289) for details. The next few topics explain how to perform the tasks involved in a routine ana-
lysis.

The scalar potential formulation uses different boundary conditions (BCs) and loads than those for the
vector potential formulation. Following are the appropriate BCs and loads and the menu paths to define
them. (See Alternative Analysis Options and Solution Methods (p. 289) for information on applying loads
or BCs via ANSYS commands.)

You access all loading operations through a series of cascading menus. When you choose Main Menu>
Solution> Define Loads> Magnetic, the ANSYS program lists one BC category and three load categories.
You then choose the appropriate category and the appropriate load or BC. The categories and BCs or
loads you can choose for a 3-D static analysis are as follows:

-Boundary- -Excitation- -Flag- -Other-


-Scalar Poten- (none)[1] Comp. Force -Magnetic Flux-
On Keypoints -Infinite Surf- On Keypoints
On Nodes On Lines On Nodes
On Areas On Areas -Maxwell Surf-
Flux Parallel On Nodes On Lines
-Flux Normal- On Areas
On Areas On Nodes
On Nodes -Virtual Disp-
On Keypoints
On Nodes

1. See Excitation (p. 102) below.

For example, to apply the flux-normal condition on an area, choose this GUI path:

Main Menu> Solution> Define Loads> Apply> Magnetic> Boundary> Flux Normal> On Areas

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 101
3-D Static Magnetic Analysis (Scalar Method)

You may see other load types or BCs or loads listed on the menus. If they are grayed out, either they
do not apply to 3-D static analysis or the appropriate KEYOPT option on the element type has not been
set. (However, the grayed-out items will be valid for other types of magnetic analysis; the ANSYS GUI
filters menu choices.)

5.4.3.2. Boundary Conditions


5.4.3.2.1. Magnetic Scalar Potentials
Use magnetic scalar potentials (MAG) to specify flux-normal, flux-parallel, and far-field zero, and cyclic
symmetry (periodic) boundary conditions, as well as an imposed external magnetic field. The following
table shows the MAG values required for each type of boundary condition:

Boundary Value of MAG


Condition
Flux-normal MAG = 0 (Use the DSYM,SYMM command (Main Menu> Solution>
Define Loads> Apply> Magnetic> Boundary> Scalar Poten>
Flux Normal> On Nodes.)
Flux-parallel None required (occurs naturally)
Far-field Use element INFIN47 or INFIN111
Far-field zero MAG = 0
Periodic Use ANSYS' cyclic symmetry capability.
Imposed external Apply nonzero values of MAG.
field

5.4.3.3. Excitation
You supply current excitation via the SOURC36 element as noted previously. Invoking the RACE macro
simplifies application of this type of coil arrangement.

5.4.3.4. Flags and Other Loads


5.4.3.4.1. Infinite Surface (INF) Flags
Infinite surface flags are not actual loads, but they are used to indicate which surface of an infinite
element faces toward the open (infinite) domain. Applying the INF label to an element face turns the
flag on for that face.

5.4.3.4.2. Maxwell Surface (MXWF) Flags


Maxwell surface flags are the same as described for 2-D static magnetic analyses. They are used to in-
dicate on which element faces the magnetic force distribution is to be calculated. You may, if you wish,
then use these forces as loads in a structural analysis.

5.4.3.4.3. Magnetic Virtual Displacement (MVDI) Flags


Magnetic virtual displacement flags are the same as described for 2-D static magnetic analyses. They
are used to initiate the calculation of forces on a body in the model (using the virtual work approach).

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
102 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a 3-D Static Scalar Analysis

5.4.4. Solve the Analysis (RSP, DSP, or GSP Method)


This section describes the steps involved in solving a 3-D static scalar magnetic analysis using the three
solution methods available. Solution steps for the RSP method are presented first, followed by solution
procedures for the DSP method and then the GSP method.

5.4.4.1. Solve Using the RSP Method


5.4.4.1.1. Entering the SOLUTION Processor
To enter the SOLUTION processor, use either of the following:
Command(s): /SOLU
GUI: Main Menu> Solution

5.4.4.1.2. Defining the Analysis Type


To specify the analysis type, do either of the following:

• In the GUI, choose menu path Main Menu> Solution> Analysis Type> New Analysis and choose a
Static analysis.

• If this is a new analysis, issue the command ANTYPE,STATIC,NEW.

• If you want to restart a previous analysis (for example, to specify additional loads), issue the command
ANTYPE,STATIC,REST. You can restart an analysis only if you previously completed a 3-D static magnetic
analysis, and the files Jobname.EMAT, Jobname.ESAV, and Jobname.DB from the previous run
are available.

5.4.4.1.3. Defining Analysis Options


Next, you define which solver you want to use. You can specify any of these values:

• Sparse solver (default)

• Jacobi Conjugate Gradient (JCG) solver

• Incomplete Cholesky Conjugate Gradient (ICCG) solver

• Preconditioned Conjugate Gradient solver (PCG)

To select an equation solver, use either of the following:


Command(s): EQSLV
GUI: Main Menu> Solution> Analysis Type> Analysis Options

Either the JCG solver or the PCG solver is recommended for 3-D models.

5.4.4.1.4. Saving a Backup Copy of the Database


Use the SAVE_DB button on the ANSYS Toolbar to save a backup copy of the ANSYS database. This
enables you to retrieve your model should your computer fail while analysis is in progress. To retrieve
a model, re-enter ANSYS and use one of the following:
Command(s): RESUME

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 103
3-D Static Magnetic Analysis (Scalar Method)

GUI: Utility Menu> File> Resume Jobname.db

Caution

If you use the BIOT option and issue the SAVE command (Utility Menu> File> Save As)
after solution or postprocessing, the Biot-Savart calculations are saved to the database, but
will be overwritten upon normal exit from the program. To save this data after issuing SAVE,
use the /EXIT,NOSAVE command. You can also issue the /EXIT,SOLU command to exit ANSYS
and save all solution data, including the Biot-Savart calculations, in the database. Otherwise,
when you resume your analysis, the Biot-Savart calculation will be lost (resulting in a zero
solution).

5.4.4.1.5. Starting the Solution


You can initiate the solution using either of the following:
Command(s): MAGSOLV (with OPT field set to 2)
GUI: Main Menu> Solution> Solve> Electromagnet> Static Analysis> Opt&Solv

To learn how to step manually through the solution sequence, see Alternative Analysis Options and
Solution Methods (p. 289).

5.4.4.1.6. Finishing the Solution


To leave the SOLUTION processor, use either of the following:
Command(s): FINISH
GUI: Main Menu> Finish

5.4.4.2. Solve Using DSP Method


The DSP method is recommended only if the model has singly connected iron regions. The DSP method
uses the same procedures for building the model and reviewing results as the RSP method uses. (To
see descriptions of these procedures, refer to the discussion of the RSP method.) However, for the DSP
method you use different procedures to apply loads and obtain a solution.

The DSP method requires a two-step solution sequence:

• You use the first load step to calculate an approximate air-only solution with iron regions internally set
to a near-infinite permeability.

• Using the second load step, you calculate the final solution with all regions reset to specified material
properties.

Follow the steps shown below to perform the solution sequence:

1. Enter the SOLUTION processor, define the analysis type, define the analysis options, and apply loads
according to the procedures described in the discussion of the RSP method.

2. Save a backup of the ANSYS database to a named file, using either of the following:
Command(s): SAVE

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
104 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a 3-D Static Scalar Analysis

GUI: Utility Menu> File> Save as Jobname.db

Caution

If you use the BIOT option and issue SAVE after solution or postprocessing, the Biot-
Savart calculations are saved to the database, but will be overwritten upon normal
exit from the program. To save this data after issuing SAVE, use the /EXIT,NOSAVE
command. You can also issue the /EXIT,SOLU command to exit ANSYS and save all
solution data, including the Biot-Savart calculations, in the database. Otherwise,
when you issue RESUME, the Biot-Savart calculation will be lost (resulting in a zero
solution).

3. Specify magnetic solution options and initiate the two-step solution. To do so, use either of the follow-
ing:
Command(s): MAGSOLV (with OPT field set to 3)
GUI: Main Menu> Solution> Solve> Electromagnet> Static Analysis> Opt and Solv

4. Specify Main Menu> Finish or issue the FINISH command to end the solution.

5.4.4.3. Solve Using the GSP Method


The GSP method is the best method to use if the model has current sources and a multiply connected
iron region. The analysis procedures are the same, except for the procedure for solving the model. The
GSP method requires a three-step solution sequence where:

• The first load step calculates an approximate iron-only solution.

• The second load step calculates an approximate air-only solution.

• The third load step calculates the final solution.

To obtain a solution for a GSP analysis, perform these steps:

1. Enter the SOLUTION processor, define the analysis type and options, and apply loads using the pro-
cedures described in Review Analysis Results (RSP, DSP, or GSP Method Analysis) (p. 106). Make sure
that at least one node in the iron region has a specified scalar potential value of zero.

2. Save a backup of the ANSYS database to a named file, using either of the following:
Command(s): SAVE
GUI: Utility Menu> File> Save as Jobname.db

Caution

If you use the BIOT option and issue SAVE after solution or postprocessing, the Biot-
Savart calculations are saved to the database, but will be overwritten upon normal
exit from the program. To save this data after issuing SAVE, use the /EXIT,NOSAVE
command. You can also issue the /EXIT,SOLU command to exit ANSYS and save all
solution data, including the Biot-Savart calculations, in the database. Otherwise,
when you issue RESUME, the Biot-Savart calculation will be lost (resulting in a zero
solution).

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 105
3-D Static Magnetic Analysis (Scalar Method)

3. Specify magnetic solution options and initiate the three-step solution. To do so, use either of the fol-
lowing:
Command(s): MAGSOLV (with OPT field set to 4)
GUI: Main Menu> Solution> Solve> Electromagnet> Static Analysis> Opt and Solv

4. Specify Main Menu> Finish or issue the FINISH command to end the solution process.

5.4.5. Review Analysis Results (RSP, DSP, or GSP Method Analysis)


Results from a 3-D static magnetic analysis (scalar potential formulation) consist of the following data:

Primary data: Nodal magnetic DOFs (MAG)

Derived data:

• Nodal magnetic flux density (BX, BY, BZ, BSUM)

• Nodal magnetic field intensity (HX, HY, HZ, HSUM)

• Nodal magnetic forces (FMAG: components X, Y, Z, SUM)

• Nodal reaction magnetic flux (FLUX)

• etc.

Additional data also are available. See the Element Reference for details.

You can review analysis results in POST1, the general postprocessor, by choosing either of the following:
Command(s): /POST1
GUI: Main Menu> General Postproc

The following section, "Reading in Results Data," discusses some typical postprocessing operations for
a 3-D static magnetic analysis. For a complete description of all postprocessing functions, see the Basic
Analysis Guide.

5.4.5.1. Reading in Results Data


To review results in POST1, the ANSYS database must contain the same model for which the solution
was calculated. Also, the results file (Jobname.RMG) must be available.

To read the data from the results file into the database, use either of the following:
Command(s): SET
GUI: Utility Menu> List> Results

If the model is not in the database, restore it using the command or menu path listed below and then
use the SET command to read in the desired set of results.
Command(s): RESUME
GUI: Utility Menu> File> Resume Jobname.db

5.4.5.2. Flux Lines


Flux lines are not readily available with the scalar potential formulation. Use vector displays of flux
density to visualize flux paths.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
106 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in a 3-D Static Scalar Analysis

5.4.5.3. Vector Displays


Vector displays (not to be confused with vector mode) are an effective way to view vector quantities
such as B, H, and FMAG. To produce vector displays, use either method shown below:
Command(s): PLVECT
GUI: Main Menu> General Postproc> Plot Results> Vector Plot> User-Defined
Main Menu> General Postproc> Plot Results> Vector Plot> Predefined
Utility Menu> Plot>Results> Vector Plot

To produce vector listings, use one of the following:


Command(s): PRVECT
GUI: Main Menu> General Postproc> List Results> Vector Data
Utility Menu> List> Results> Vector Data

5.4.5.4. Contour Displays


You can contour almost any result item, including flux density and field intensity, using the following
commands or menu paths:
Command(s): PLNSOL, PLESOL
GUI: Utility Menu> Plot> Results> Contour Plot> Elem Solution
Utility Menu> Plot> Results> Contour Plot> Elem Solution

Caution

Nodal contour plots for derived data, such as flux density and field intensity, are averaged at the
nodes. In PowerGraphics mode (default), you can visualize nodal averaged contour displays
which account for material discontinuities.

5.4.5.5. Charged Particle Trace Displays


You can find details on how to graphically display a charged particle traveling in a magnetic field in
Particle Flow and Charged Particle Traces and Controlling Particle Flow or Charged Particle Trace Displays
in the Basic Analysis Guide. See Electromagnetic Particle Tracing in the Mechanical APDL Theory Reference
for more details.

5.4.5.6. Tabular Listings


You can produce tabular listings of results data, either unsorted or sorted by node or by element. To
sort data before listing it, use any of the following:
Command(s): ESORT, NSORT
GUI: Main Menu> General Postproc> List Results> Sorted Listing> Sort Elems
Main Menu> General Postproc> List Results> Sorted Listing> Sort Elems

To produce tabular listings, use any of the following:


Command(s): PRESOL, PRNSOL, PRRSOL
GUI: Main Menu> General Postproc> List Results> Element Solution
Main Menu> General Postproc> List Results> Nodal Solution
Main Menu> General Postproc> List Results> Reaction Solu

5.4.5.7. Magnetic Forces


To review Maxwell or virtual work forces, use the following approach:

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 107
3-D Static Magnetic Analysis (Scalar Method)

• Maxwell forces are calculated for all elements at which the surface flag MXWF is specified as a surface
"load." To list Maxwell forces, select all such elements, then select either of the following:
Command(s): PRNSOL,FMAG
GUI: Main Menu> General Postproc> List Results> Nodal Solution

The sum of these forces gives the total force on the surface. To sum the forces, select all elements
with the Maxwell surface and use the ETABLE command (Main Menu> General Postproc>
Element Table> Define Table) to move the forces to the element table. Then issue the SSUM
command (Main Menu> General Postproc> Element Table> Sum of Each Item).

• Virtual work forces are calculated for all air elements with an MVDI specification adjacent to the body
of interest. One way to access virtual work forces is via the element's NMISC record. Do so by choosing
either of the following:
Command(s): PRETAB
GUI: Main Menu> General Postproc> Element Table> List Elem Table

5.4.5.8. Calculating Other Items of Interest


In postprocessing, you can calculate many other items of interest from the data available in the database.
The ANSYS command set supplies the following macros to perform calculations for you automatically:

• The EMAGERR macro calculates the relative error in an electromagnetic or electrostatic field analysis.

• The SENERGY macro determines the stored magnetic energy.

• The MMF macro calculates magnetomotive force along a path.

See Electric and Magnetic Macros (p. 193) for details on these macros or the Command Reference.

5.5. Example 3-D Static Magnetic Analyses (Scalar Method)


The following examples are available:
5.5.1. Example of a 3-D Static Magnetic Analysis
5.5.2. Other Examples

5.5.1. Example of a 3-D Static Magnetic Analysis


This section shows you how to perform a sample 3-D static magnetic analysis.

5.5.1.1. Description
This example calculates the force acting on the armature when the coil in the solenoid actuator shown
in Figure 5.4: Solenoid Actuator (p. 109) is energized . A static (DC) current excites the coil and provides
the force to move the armature. The current is 6 amps and there are 500 turns in the coil. The analysis
uses a 1/4 symmetry model of the positive x and y quadrant.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
108 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Static Magnetic Analyses (Scalar Method)

Figure 5.4: Solenoid Actuator

5.5.1.1.1. Material Properties


The analysis uses a relative permeability of 1.0 for the air regions.

The B-H data for the pole and armature steel follows. You will enter the B and H values in this analysis.

H(A/m) B(T) H(A/m) B(T)


355 0.70 7650 1.75
405 0.80 10100 1.80
470 0.90 13000 1.85
555 1.00 15900 1.90
673 1.10 21100 1.95
836 1.20 26300 2.00
1065 1.30 32900 2.05
1220 1.35 42700 2.10
1420 1.40 61700 2.15
1720 1.45 84300 2.20
2130 1.50 110000 2.25
2670 1.55 135000 2.30
3480 1.60 200000 2.41

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 109
3-D Static Magnetic Analysis (Scalar Method)

H(A/m) B(T) H(A/m) B(T)


4500 1.65 400000 2.69
5950 1.70 800000 3.22

5.5.1.1.2. Approach and Assumptions


The analysis uses a smart sizing level (LVL) of 8. For production work a finer mesh should be used (LVL
6).

All surfaces are assumed to be flux-parallel. This is a natural boundary condition that is satisfied auto-
matically without any prescription of an explicit boundary condition.

A single node is constrained to avoid an ill-conditioned problem.

5.5.1.1.3. Results
This example uses a smart element sizing (SmartSizing) level of 8.

The computed results you should obtain are:

Virtual Work Force (z direction) = -12.77 N


Maxwell Force (z direction) = -11.87 N

The total force acting on the armature can be computed by multiplying the results above by a factor
of 4 for symmetry. Forces in the x and y directions cancel.

For additional information on the solution to this problem, see M. Gyimesi and D. Ostergaard, “Non-
Conforming Hexahedral Edge Elements for Magnetic Analysis,” IEEE Transactions on Magnetics, Vol. 34,
No. 5 (1998).

5.5.1.2. Command Listing


/prep7
/title, 3-D Static Force Problem - Tetrahedral
/com,
!
! define analysis parameters
!
n=500 ! coil turns
i=6 ! current per turn
!
!define element type
!
et,1,96
!
mp,murx,1,1 !define material properties for air and steel
tb,bh,2,,40
tbpt,,355,.7
,,405,.8
,,470,.9
,,555,1.0
,,673,1.1
,,836,1.2
,,1065,1.3
,,1220,1.35
,,1420,1.4
,,1720,1.45
,,2130,1.5
,,2670,1.55
,,3480,1.6
,,4500,1.65

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
110 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Static Magnetic Analyses (Scalar Method)

,,5950,1.7
,,7650,1.75
,,10100,1.8
,,13000,1.85
,,15900,1.9
,,21100,1.95
,,26300,2.0
,,32900,2.05
,,42700,2.1
,,61700,2.15
,,84300,2.2
,,110000,2.25
,,135000,2.3
,,200000,2.41
,,400000,2.69
,,800000,3.22
tbcopy,bh,2,3
!
/pnum,volu !create pole volumes
block,0,63.5,0,25/2,0,25
/view,1,1,1,1
/replot
block,38.5,63.5,0,25/2,25,125
block,13.5,63.5,0,25/2,125,150
vglue,all
!
!create armature and air volumes and compress numbers
!
block,0,12.5,0,5,26.5,125 ! armature
block,0,13,0,5.5,26,125.5 ! air region
vovlap,1,2
numcmp,volu
cyl4,,,0,0,100,90,175
vovlap,all
numcmp,volu
!
!set volume attributes
!
vsel,s,volu,,1
vatt,3,1,1 ! armature
vsel,s,volu,,3,5
vatt,2,1,1 ! pole
!
!mesh the model
!
allsel,all
smrt,8 ! for production work a finer mesh should be used, (LVL 6)
mshape,1,3d
mshkey,0
vmesh,all
/pnum,mat,1
/number,1
eplot
!
!define armature as a component and apply force flags
!
esel,s,mat,,3 ! armature
cm,arm,elem
cmsel,,arm
nsle
bf,all,mvdi,1 ! apply virtual work flags to the armature
nsel,r,ext
esln
cmsel,u,arm
sf,all,mxwf ! apply maxwell surface flags to the air surrounding the armature

!
!scale the model to meters
!
allsel,all
vlscale,all,,,.001,.001,.001,,0,1
!

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 111
3-D Static Magnetic Analysis (Scalar Method)

!create the coil


!
local,12,0,0,0,75/1000
wpcsys,-1
race,.0285,.0285,.014,n*i,.018,.0966,,,'coil1'
/eshape,1
eplot
save
finish
!
/solu
d,2,mag,0 ! apply boundary conditions
!
allsel,all
magsolv,3,,,,,1 ! solve
finish
!
/post1 ! calculate the armature forces
!
cmsel,,arm ! select the elements at the air/armature interface
nsel,,ext
esln
etab,fmx_x,fmag,x ! store maxwell forces
etab,fmx_y,fmag,y
etab,fmx_z,fmag,z
etab,fvw_x,nmisc,4 ! store virtual work forces
etab,fvw_y,nmisc,5
etab,fvw_z,nmisc,6
ssum ! sum the forces over all the selected elements
!
finish

5.5.2. Other Examples


Another ANSYS, Inc. publication, the Mechanical APDL Verification Manual, contains other examples of
various types of analyses, including the following examples of 3-D static magnetic analysis:

VM168 - Magnetic Field in a Nonferrous Solenoid


VM169 - Permanent Magnetic Circuit with an Air Gap
VM190 - Ferromagnetic Inductor

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
112 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 6: 3-D Magnetostatics and Fundamentals of Edge-Based
Analysis
The edge method is a version of the magnetic vector potential method where the magnetic degrees
of freedom are located on element edge nodes, rather than corner nodes.

You can use the edge method to solve a static analysis when the scalar method is not convenient or
efficient. You also can use the edge method for harmonic and transient analyses when the scalar
method cannot be used.

Typical uses for edge-based analysis are as follows:

• Electric machines

• Transformers

• Induction heating

• Solenoid actuators

• High-field magnets

• Nondestructive testing

• Magnetic stirring

• Electrolyzing cells

• Particle accelerators

• Medical and geophysical instruments.

See the Mechanical APDL Theory Reference for more information on the magnetic edge-based formulation.

In an edge element, the magnetic degree of freedom is edge-flux (AZ). In the MKS system, it has the
units of magnetic flux - weber (Volt-sec). The edge-flux DOF represents the integral of the tangential
component of the vector potential A, along the element edge. The sum the values of the edge-flux
DOF around a closed loop formed by the edges is the flux passing through the closed loop. A positive
flux value along an element edge indicates that the edge vector is oriented from the lower corner node
number to the high corner node number (shared by the element edge). The closed loop orientation
and the flux direction is related by the right hand rule.

Support is available for 3-D static, harmonic, and transient edge-based analyses. 3-D Harmonic Magnetic
Analysis (Edge-Based) (p. 141) discusses and presents examples of 3-D harmonic edge-based analysis,
as well as linear perturbation static and harmonic analyses. 3-D Transient Magnetic Analysis (Edge-
Based) (p. 169) describes and demonstrates 3-D transient edge-based analysis.

The following 3-D edge-based static analysis topics are available:


6.1. Elements Used in Edge-Based Analysis

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 113
3-D Magnetostatics and Fundamentals of Edge-Based Analysis

6.2. Characteristics and Settings for Physical Regions of a Model


6.3. Analysis Considerations
6.4. Performing a Static Edge-Based Analysis
6.5. Reviewing Results from a Static Edge-Based Analysis
6.6. 3-D Stranded Coil Analysis
6.7. Example 3-D Magnetostatic and Edge-Based Analyses

6.1. Elements Used in Edge-Based Analysis


The ANSYS program provides two solid element types for low-frequency edge-based electromagnetic
analysis. For a detailed description of these elements, see the Element Reference

Table 6.1: 3–D Solid Edge-Based Elements

Element Dim. Shape or Degrees of Notes


Characteristic Freedom
SOLID236 Brick, 20 nodes Magnetic edge-flux Current-technology
degrees of freedom element
(AZ) at each midside
node; electric
potential/voltage
drop or
time-integrated
electric
potential/voltage
drop (VOLT) at each
node. Electromotive
force or
time-integrated
electromotive force
(EMF) at each node
SOLID237 Tetrahedral, 10 Magnetic edge-flux Current-technology
nodes (AZ) at each midside element
node; electric
potential/voltage
drop or
time-integrated
electric
potential/voltage
drop (VOLT) at each
node. Electromotive
force or
time-integrated
electromotive force
(EMF) at each node

The following examples of an edge-based analysis using the current technology elements are available:

• Example: Force Calculation Between Two Permanent Magnets (p. 128)

• Example: Eddy Currents Induced in a Ferromagnetic Plate (p. 149)

• Example: Magnetic Field in a Parallel Plate Capacitor (p. 154)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
114 of ANSYS, Inc. and its subsidiaries and affiliates.
Characteristics and Settings for Physical Regions of a Model

• Example: Transformer Analysis (p. 160)

6.2. Characteristics and Settings for Physical Regions of a Model


The ANSYS program offers several options you can use to handle terminal conditions on conductors in
3-D magnetic analyses. Figure 6.1: Physical Region With Optional Terminal Conditions for Conduct-
ors (p. 115) below pictures a physical region for a 3-D magnetic analysis and the conditions (options)
that can exist within it.

Figure 6.1: Physical Region With Optional Terminal Conditions for Conductors
Current-fed massive conductor
Current-fed Laminated iron
solid source
conductor
Air

Current-fed
Conductor -
stranded coil
open circuit

Moving
conductor
Conductor -
short circuit

Voltage-fed
solid source
conductor

Laminated iron Degree of freedom: AZ

Air Elements: SOLID236 or SOLID237 with KEYOPT(1) = 1

Permanent
magnets

Jt
It

VOLT = 0 Couple VOLT


Current-fed massive conductor (3-D)

Current-fed Degrees of freedom: AZ, VOLT


massive
conductor Elements: SOLID236 or SOLID237 with KEYOPT(1) = 1

Special characteristics: Couple VOLT Degree of Freedom in


region, apply total current (F,,AMPS command) to single node

Assumes a short-circuit condition with a net current flow from


a current source generator. Net current is unaffected by
surroundings.

Jt
It

VOLT = 0 Couple VOLT


Current-fed massive conductor (3-D)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 115
3-D Magnetostatics and Fundamentals of Edge-Based Analysis

Voltage-fed massive Degrees of freedom: AZ, VOLT


conductor
Elements SOLID236 or SOLID237 with KEYOPT(1) = 1

Open circuit Degrees of freedom: AZ, VOLT


conductor
Elements: SOLID236 or SOLID237 with KEYOPT(1) = 1

For symmetry structures, set VOLT = 0 at one plane and couple


nodes at the other. For general 3-D structures, set VOLT = 0
at one node.

J = ni
A

Current-fed Degree of freedom: AZ


stranded conductor
Elements: SOLID236 or SOLID237 with KEYOPT(1) = 0

Special characteristics: no eddy currents; can apply source


current density BFE,, JS

Short circuit Degrees of freedom: AZ, VOLT


conductor
Elements: SOLID236 or SOLID237 with KEYOPT(1) = 1

Prescribe VOLT = 0 at symmetry planes of a conductor to


indicate no net buildup of potential.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
116 of ANSYS, Inc. and its subsidiaries and affiliates.
Performing a Static Edge-Based Analysis

J
It F,,AMPS

VOLT = 0 Couple VOLT

Current-fed solid Degrees of freedom: AZ, VOLT


source conductor
Elements: SOLID236 or SOLID237 with KEYOPT(1) = 1

Special characteristics: Couple VOLT Degree of Freedom in


region; apply total current (F,,AMPS command) to single node.

Assumptions: Solid conductor does not model eddy current


effects within the conductor and has no back EMF effects.

J
D,,VOLT

VOLT = 0 VOLT Load

Voltage-fed solid Degrees of freedom: AZ, VOLT


source conductor
Elements: SOLID236 or SOLID237 with KEYOPT(1) = 1 and
KEYOPT(5) = 1

Special characteristics: Apply voltage (VOLT) via D command.

Assumptions: solid conductor does not model eddy current


effects within the conductor and has no back EMF effects.

6.3. Analysis Considerations


Before setting up your analysis, consider the following:

• When modeling stranded conductors using SOLID236 or SOLID237 with KEYOPT(1)=0, the applied current
density J specified on the BFE command (BFE,,JS) must satisfy the solenoidal condition .

‘Solenoidal’ refers to the closed nature of any real current loop. To be solenoidal, there can be no
closed surface inside the model for which the surface integral of current density is nonzero. In other
words, a conductor cannot end inside the model; however, conductors can begin or end at the surface
of the model. If this condition is not satisfied, the edge-based magnetic analysis can produce erroneous
solutions. To make sure that the applied current density is solenoidal, perform a preliminary static
electric current conduction analysis to obtain the current density distribution (e.g., using electric
elements, see Electric Field Analysis (p. 209)). Once the currents are determined, bring them into the
magnetic analysis using the LDREAD command.

6.4. Performing a Static Edge-Based Analysis


Follow these steps to perform a static edge-based magnetic analysis:

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 117
3-D Magnetostatics and Fundamentals of Edge-Based Analysis

1. Specify the electromagnetics edge formulation by choosing Main Menu> Preferences> Electromag-
netics: Magnetic-Edge from the GUI. Doing so lets you filter out other ANSYS commands not involved
in edge analysis.

2. Define a jobname and title for your analysis. To do so, use the commands shown below:
Command(s): /FILNAME and /TITLE
GUI: Utility Menu> File> Change Jobname
Utility Menu> File> Change Title

3. Enter the ANSYS preprocessor to begin defining your model:


Command(s): /PREP7
GUI: Main Menu> Preprocessor

4. Choose element type SOLID236 or SOLID237:


Command(s): ET
GUI: Main Menu> Preprocessor> Element Type> Add/Edit/Delete

5. Select the formulation option suitable for the specified element type and physics region. (For inform-
ation on formulation options, see Characteristics and Settings for Physical Regions of a Model (p. 115))
Command(s): KEYOPT
GUI: Main Menu> Preprocessor> Element Type> Add/Edit/Delete

6. Define material properties. 2-D Static Magnetic Analysis (p. 13) describes the material properties you
can use and tells you how to specify them. For a static analysis, you must specify the relative permeab-
ility (defined by the MP command) or a B-H curve (defined by the TB command). Permanent magnetic
orientation is defined in the element coordinate system, ESYS.
Command(s): MP
GUI: Main Menu> Preprocessor> Material Props> Material Models> Electromagnetics> Relative
Permeability> Constant
Command(s): TB
GUI: Main Menu> Preprocessor> Material Props> Material Models> Electromagnetics> BH Curve

7. Build the model. (For instructions on building and meshing models, see the Modeling and Meshing
Guide.) If you are using the ANSYS GUI, choose Main Menu> Preprocessor> Modeling.

8. Assign attributes to the volumes (that is, associate the element types, the material properties with the
appropriate volumes).

GUI:
Main Menu> Preprocessor> Meshing> Mesh Attributes

9. Mesh the model, specifying brick or tetrahedral element shape.


Command(s): VMESH
GUI: Main Menu> Preprocessor> Meshing> Mesh> Volumes> Mapped

10. Apply flux-parallel and flux-normal solid model boundary conditions to the boundaries.
Command(s): DA
GUI: Main Menu> Solution> Define Loads> Apply> Magnetic> Boundary

For edge-based analyses, the label AZ (when set to zero) applies the flux-parallel boundary
condition. No prescription is required to set flux-normal, because it is the natural boundary
condition. In the rare case when the AZ = 0 condition is not general enough for flux-parallel
conditions, you can prescribe constraints using individual D commands.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
118 of ANSYS, Inc. and its subsidiaries and affiliates.
Reviewing Results from a Static Edge-Based Analysis

11. Apply source loading. See Characteristics and Settings for Physical Regions of a Model (p. 115) for in-
formation on source loading.

You can use constraint equations to define cyclic symmetry.

12. Enter the SOLUTION processor, using either of the following:


Command(s): /SOLU
GUI: Main Menu> Solution

13. Choose the static analysis type.


Command(s): ANTYPE,STATIC,NEW
GUI: Main Menu> Solution> Analysis Type> New Analysis> Static

To restart a previous analysis (for example, to specify additional loads), issue the command
ANTYPE,STATIC,REST. In a static and transient nonlinear magnetic analysis, the default behavior
is multiframe restart; for more information, see the RESCONTROL command.

14. Choose the solver you wish to use. The sparse solver is recommended. Select an equation solver using
either of the following:
Command(s): EQSLV
GUI: Main Menu> Solution> Analysis Type> Analysis Options

15. Choose load step options. (Alternative Analysis Options and Solution Methods (p. 289) of this manual
describes these options.)

16. Solve the model.

When you use the edge-element formulation, by default the ANSYS program gauges the
problem domain over all selected elements and nodes. Gauging removes unneeded degrees
of freedom by setting them to zero; this in turn enables ANSYS to solve your analysis problem
faster. You can control gauging using either of the following:
Command(s): GAUGE
GUI: Main Menu> Solution> Load Step Opts> Magnetics> Options Only> Gauging

Gauging is required for electromagnetic analyses with elements using an edge formulation.
Therefore, in most cases you should not turn automatic gauging off. If you do turn gauging off,
you must perform manual gauging.

To initiate the two-step solution sequence, use the following:


Command(s): SOLVE
GUI: Main Menu> Solution> Solve

17. To leave the SOLUTION processor, use one of the following:


Command(s): FINISH
GUI: Main Menu> Finish

18. Perform postprocessing and review the analysis results, as described in Reviewing Results from a
Static Edge-Based Analysis (p. 119).

6.5. Reviewing Results from a Static Edge-Based Analysis


The program writes results from a 3-D static analysis to the magnetics results file, Jobname.RMG (or
Jobname.RST for a dynamic analysis). Results include the data listed below:

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 119
3-D Magnetostatics and Fundamentals of Edge-Based Analysis

Primary data: Magnetic Degrees of freedom (AZ, VOLT, EMF)

Derived data:

• Nodal magnetic flux density (BX, BY, BZ, BSUM)

• Nodal magnetic field intensity (HX, HY, HZ, HSUM)

• Nodal electric field intensity (EFX, EFY, EFZ, EFSUM)

• Nodal electric conduction current density JC (JCX, JCY, JCZ, JCSUM)

• Nodal magnetic forces (FMAG: components X, Y, Z, SUM)

• Element total current density (JTX, JTY, JTZ)

• Joule heat rate per unit volume (JHEAT)

• Element magnetic energy (SENE, MENE)

• Element magnetic co-energy (COEN)

• Element apparent magnetic energy (AENE)

• Element incremental magnetic energy (IENE) [1]

1. Available in a linear perturbation analysis only.

Additional data also are available. See the Element Reference for details.

You can review analysis results in POST1, the general postprocessor, by choosing either of the following:
Command(s): /POST1
GUI: Main Menu> General Postproc

6.5.1. Reading in Results Data


Postprocessing for 3-D edge-based static magnetic analyses is basically the same as postprocessing for
2-D static analysis. See 2-D Static Magnetic Analysis (p. 13) for more information. For a summary of the
most frequently used commands, see the section on reviewing results in 3-D Harmonic Magnetic Ana-
lysis (Edge-Based) (p. 141) of this manual.

6.5.1.1. Flux Lines


Use vector displays of flux density to visualize flux paths.

6.5.1.2. Contour Displays, Vector Displays, Tabular Listings, and Magnetic Forces
See 2-D Static Magnetic Analysis (p. 13) for details.

6.5.1.3. Charged Particle Trace Displays


You can find details on how to graphically display a charged particle traveling in a magnetic field in
Particle Flow and Charged Particle Traces and Controlling Particle Flow or Charged Particle Trace Displays
in the Basic Analysis Guide. See Electromagnetic Particle Tracing in the Mechanical APDL Theory Reference
for more details.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
120 of ANSYS, Inc. and its subsidiaries and affiliates.
Reviewing Results from a Static Edge-Based Analysis

6.5.1.4. Calculating Magnetic Force and Torque


You can calculate electromagnetic force and torque from the data available in the database in postpro-
cessing. Use the EMFT macro for these calculations.

Three types of magnetic forces are usually available:

• Current segment force: Force from the finite element boundary domain. Forces and fields here are typ-
ically normal to the air gap. To list these forces:

1. Select the nodes on the body of interest.

2. Select all elements.

3. Issue EMFT.
Command(s): EMFT
GUI: Main Menu> General Postproc> Elec&Mag Calc> Summarize Force/Torque

• Reluctance force: Force due to a change in material properties. Here, the direction of the field may be
arbitrary with regard to the force. To list this force:

1. Select the nodes at the interface between the body of interest and the adjacent air elements.

2. Select all elements.

3. Issue EMFT.

This method may use a truncated portion of the body of interest if the body extends past the
FE boundary.

Figure 6.2: Reluctance Force

B B

area of interest

• Body forces (including Lorentz forces): This method uses the entire body of interest:

1. Select the nodes of the body of interest and all elements.

2. Issue EMFT.

Exercise caution in interpreting Lorentz forces in permeable (μr > 1) materials. If you independently
calculate the J x B forces, they may be incomplete, as they do not include the reluctance term.
Whereas the J x B forces may be incorrect, the body forces calculated in ANSYS will be correct.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 121
3-D Magnetostatics and Fundamentals of Edge-Based Analysis

For SOLID236 and SOLID237 with KEYOPT(8)=1, the components of the total Lorentz forces are
stored as nodal magnetic force record FMAG.

Note

In models that use symmetry, you must select nodes and elements carefully. You need to
select the surface nodes on the surfaces interior to the body and then select the elements
adjacent to those nodes.

Force results will be reported in the coordinate system specified by RSYS. However, if using a coordinate
system other than global Cartesian (RSYS ≠ 0), torque results will take into account the coordinate
system shift and rotation only.

You can use the same procedure described above with the LDREAD command to transfer static mag-
netic forces from a magnetic element to a structural element type.

To transfer static magnetic forces acting on selected bodies in the model:

1. Select nodes of interest as described for the EMFT procedure, above.

2. Issue LDREAD,FORC.

This procedure is valid for any material properties, and combines Lorentz, reluctance, and CSG forces.

6.5.1.5. Calculating Other Items of Interest


You can calculate many other items of interest (such as source input energy, inductance, flux linkages,
and terminal voltage) from the data available in the database in postprocessing. The ANSYS command
set supplies the following macros for these calculations:

• The MMF macro calculates magnetomotive force along a path.

• The PMGTRAN macro summarizes electromagnetic results from a transient analysis.

• The POWERH macro calculates the RMS power loss in a conducting body.

For more discussion of these macros, see Electric and Magnetic Macros (p. 193).

You can use linear perturbation static analysis to calculate the differential inductance of a system of
coils. For more information, see Electromagnetic Linear Perturbation Analysis.

6.6. 3-D Stranded Coil Analysis


This section describes how to do a stranded coil analysis using the current technology 3-D edge-based
elements.

6.6.1. Elements Used in a 3-D Edge-Based Stranded Coil Analysis


To do a stranded coil analysis, you need to use one of these elements:

• SOLID236 20-node hexahedral solid, KEYOPT(1) = 2

• SOLID237 10-node tetrahedral solid, KEYOPT(1) = 2

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
122 of ANSYS, Inc. and its subsidiaries and affiliates.
3-D Stranded Coil Analysis

6.6.2. Performing a Stranded Coil Analysis


To perform a stranded coil analysis you need to do the following:

1. Select SOLID236 or SOLID237 element type and set KEYOPT(1) = 2.

2. Specify magnetic properties using MP,MURX or TB,BH commands.

3. Optionally, you can specify isotropic electrical resistivity using MP,RSVX for Joule heat calculation.

4. Specify coil parameters using the element real constants on the R command:

• SC (R1) – Coil cross-sectional area. This constant represents the true physical cross-section of the coil
regardless of symmetry modeling considerations. It includes the cross-sectional area of the wire and the
non-conducting material filling the space between the winding.

• NC (R2) – Number of coil turns. This constant represents the total number of winding turns in a coil re-
gardless of any symmetry modeling considerations. Default is 1 turn.

• VC (R3) – Coil volume. This constant represents the true physical volume of the coil regardless of symmetry
modeling considerations. It includes the volume occupied by the wire and the non-conducting material
filling the space between the winding.

• TX (R4) – Coil winding X-directional cosine. This constant represents the X-component of the coil direction
vector T = {TX, TY, TZ}T, where T is a unit vector tangent to the coil winding that designates the current
flow direction. Default TX is 0.

• TY (R5) – Coil winding Y-directional cosine. This constant represents the Y-component of the unit coil
direction vector T. Default TY is 1.

• TZ (R6) – Coil winding Z-directional cosine. This constant represents the Z-component of the unit coil
direction vector T. Default TZ is 0.

• R (R7) – Coil resistance. This constant represents the total DC resistance of the coil regardless of any
symmetry modeling considerations. If the wire electrical resistivity ρ, total length L, and diameter D are
available instead, the total coil DC resistance can be calculated as follows R = 4ρL/(πD2).

• SYM (R8) – Coil symmetry factor. This constant represents the ratio of the full symmetry coil volume (VC)
to the modeled coil volume. The input should be greater or equal to 1.

As an example, the figure below illustrates the application of these coil constants for a 90° arc of a
stranded conductor. The figure depicts symmetry about a plane, for which only the top half needs
to be modeled. To specify the current flow, you need to follow these steps:

a. Specify a cylindrical element coordinate system using ESYS.

b. Modify the elements to inherit the new ESYS attribute, using EMODIF.

c. Set the current flow direction constants as {TX, TY, TZ}T = {0,1,0}T.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 123
3-D Magnetostatics and Fundamentals of Edge-Based Analysis

Figure 6.3: Coil Constants for 1/8 Symmetry Sector of Circular Stranded Coil
Elements in cylindrical
ESYScoordinate system
VC
T(X,Y,Z) = (0,1,0)
Modeled
SYM = 8
J
Not Modeled

SC

1/8 Coil Model

5. Specify the analysis type. The stranded coil analysis can be static, transient or harmonic.

• If you perform a static analysis, you can use KEYOPT(2) to select a strong (matrix) or weak (load vector)
electromagnetic coupling. The strong coupling option (KEYOPT(2) = 0) produces an unsymmetric matrix.
In a linear analysis, a strong coupled response is achieved after one iteration. The weak coupling option
(KEYOPT(2) = 1) produces a symmetric matrix and requires at least two iterations to achieve a coupled
response.

• If you perform a transient or harmonic analysis, you can use KEYOPT(2) to choose between strong
coupling with 'true' or time-integrated electric degrees of freedom (VOLT and EMF). The strong coupling
option with 'true' voltage drop and back-EMF (KEYOPT(2) = 0) produces a nonsymmetric matrix. The
strong coupling option with time-integrated voltage drop and time-integrated back-EMF (KEYOPT(2) =
2) produces a symmetric matrix provided the symmetry factor (SYM) is 1.

6. Couple VOLT and EMF degrees of freedom for each coil: CP,,VOLT and CP,,EMF.

7. Apply magnetic and electric boundary conditions.

8. Apply electric loading:

• Nodal constraints for VOLT and EMF degrees-of-freedom: D,,VOLT and D,,EMF. Applicable when KEYOPT(2)
is set to 0 or 1.

• Nodal total electric current: F,,AMPS.

• Voltage or current loading using KEYOPT(1) = 3, 4,or 9 through 12 of CIRCU124. Applicable when KEYOPT(2)
is set to 0 or 1.

6.6.3. Reviewing Results from a 3-D Stranded Coil Analysis


In addition to the degrees of freedom results AZ, VOLT and EMF, the following derived data is available
with the stranded-coil analysis:

• Nodal magnetic flux density B (X, Y, Z, SUM)

• Nodal magnetic field intensity H (X, Y, Z, SUM)

• Nodal magnetic forces FMAG (X, Y, Z, SUM)

• Element conduction current density JT or JS (X, Y, Z, SUM) at the element centroid [1]

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
124 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Magnetostatic and Edge-Based Analyses

• Joule heat rate per unit volume (JHEAT) [2]

• Element magnetic energy (SENE) (valid for linear materials only)

1. JT and JS are the effective current densities as they are calculated based on the coil cross-sectional area
(SC) that includes the wire and the non-conducting material filling the space between the winding.

2. JHEAT represents the effective Joule heat generation rate per unit volume as it is calculated based on the
modeled coil volume (VC) that includes the wire and the non-conducting material filling the space between
the winding.

6.7. Example 3-D Magnetostatic and Edge-Based Analyses


The following examples are available:
6.7.1. Example: Current-Carrying Conductor
6.7.2. Example: Force Calculation Between Two Permanent Magnets
6.7.3. Example: Two-Plate Hall Sensor
6.7.4. Other Examples

6.7.1. Example: Current-Carrying Conductor


This section describes a sample static edge-based analysis employing SOLID236 3-D 20-Node Electro-
magnetic Solid elements

6.7.1.1. Analysis Description


This example examines the solution in the slot of an electric machine. For a specified current, the ana-
lysis calculates the magnetic field, energy, Joule heat losses, and Lorentz forces.

Figure 6.4: Current-Carrying Conductor in a Slot Within an Iron Region (p. 125) and Figure 6.5: Volume
Model of the Conductor (p. 126) below illustrate, respectively, the problem domain and a volume model
of the conductor within the slot in the domain.

Figure 6.4: Current-Carrying Conductor in a Slot Within an Iron Region

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 125
3-D Magnetostatics and Fundamentals of Edge-Based Analysis

Figure 6.5: Volume Model of the Conductor

The geometry is a block modeling a slot of an electrical machine. The Z-axis coincides with the axis of
the machine; l = 0.3 m is the length. The slot, with a depth of d = 0.1 m, is oriented in the X-axis. The
width of the slot in the y direction is denoted by w = 0.01 m. A conductor with relative permeability,
μr = 1, and resistivity, ρ = 1.0e-8, carries a current, I=1000 A, in the Z direction.

The side and bottom of the slot are ideal iron. This is a flux-normal boundary condition (natural, or
Neumann, boundary condition); it is satisfied automatically without any prescription of an explicit
boundary condition.

At the opening of the slot at X = d and at axial faces Z = 0 and Z = 1, the flux lines are parallel. This is
an essential flux-parallel (Dirichlet) boundary condition; that is, its satisfaction is not automatic. You can
prescribe it by constraining the flux-edge DOFs – AZ - to zero.

The example uses MKS units (the default).

6.7.1.2. Analysis Parameters


l = 0.3 Length
d = 0.1 Depth
w = 0.01 Width
I = 1000 Current
μr = 1 Relative magnetic permeability
ρ = 1.0e-8 Electric resistivity (required for Joule heat loss)
n=5 Number of divisions through the slot depth

6.7.1.3. Target Data


Target data for the example are as follows:

Vt = d w l = 3e-4 m^3 - volume


Hy = i/w x/d = 1e5 x/d A/m - magnetic field
By = mur mu0 H = 4e-2 π x/d T - flux density
Jz = i/ (d w) = 1e6 A/m^2 - current density

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
126 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Magnetostatic and Edge-Based Analyses

JLOSS = 3.00 W
Fx = -integral Jz By dV = -18.85 N - total force
SENE = .622 J - energy

6.7.1.4. The Analysis Input


/ Analysis of a Current-Carrying Conductor
/nopr

! *** Problem parameters


l=0.3 ! length
d=0.1 ! depth
w=0.01 ! width
I=1000 ! current
mur=1 ! relative magnetic permeability
rho=1.0e-8 ! electric resistivity (required for Joule heat loss)
n=5 ! number of divisions through the slot depth

! *** Derived parameters


jx=0 ! current density; x, y, z refer to component
jy=0
jz=I/d/w

! *** Expected results


/com,
/com, Hy = I/w*X/d = 1e5X/d A/m
/com, By = mur*mu0*H = 4e-2*Pi*X/d T
/com, Jz = I/(d*w) = 1e6 A/m^2
/com, JHEATloss = 3.0 W
/com, Fx = -integral (Jz*By*dV) = -18.85 N
/com, Energy = 0.622 J
/com,

! *** Create Model


/prep7
et,1,236 ! define magnetic element type - SOLID236
keyopt,1,8,1 ! use Lorentz force option
mp,murx,1,mur ! define relative permeability
mp,rsvx,1,rho ! define electric resistivity

block,0,d,0,w,0,l ! define rectangular block volume region

lsel,s,loc,X,d/2 ! select lines to specify the number of elements


lesize,all,,,n ! divide the lines along the slot depth for meshing
lsel,all ! select all lines
esize,,1 ! solid volume are subdivided into elements
vmesh,all ! mesh solid volumes
fini

/solu
! *** Apply Flux-parallel boundary condition
asel,s,loc,X,d ! select areas at the opening of the slot, x=d
asel,a,loc,Z,0 ! add areas at Z=0 to the selected set
asel,a,loc,Z,l ! add areas at Z=l to the selected set
da,all,az,0 ! apply a zero constraint on selected areas to specify a
! flux-parallel condition
asel,all ! select all areas.

! *** Prescribe current density - body load


bfe,all,js,,jx,jy,jz ! apply current density on all selected elements

solve
fini

! *** Extract solution


/post1
presol,h ! print magnetic field at the corner nodes of elements
/com
presol,b ! print flux density at the corner nodes of elements

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 127
3-D Magnetostatics and Fundamentals of Edge-Based Analysis

/com
presol,jt ! print current density at element centroids
/com
presol,jheat ! print Joule heat per volume in elements
/com
presol,fmag ! print magnetic force at the corner nodes of elements

EMFT ! sum up forces

/view,1,1,.4,.5 ! change the viewing angle for displays


/com
plnsol,h,sum ! plot the H field; data from the elements are averaged
/com
plnsol,b,sum ! display the flux density, B (magnitude)
/com
plvect,h,,,,vect,node,on ! display as a vector the field intensity H

/com
! *** store element output items
etable,fe,fmag,X ! x-component of FMAG force
etable,hy,h,y ! y-component of the magnetic field
etable,by,b,y ! y-component of the flux density
etable,jz,jt,z ! z-component of the current density
etable,pd,jheat ! Joule heat rate per unit volume
etable,ve,volu ! element volume
etable,we,sene ! element magnetic energy (SENE)
smult,pe,pd,ve ! element Joule heat

! *** Print the element table items


pretab,ve,by,hy,we
pretab,ve,jz,jh,pe
pretab,ve,jz,by,fe

ssum ! sum the entries in the element table

! *** Obtain (*get) the results of the summation (ssum)


*get,ft,ssum,,item,fe
*get,wt,ssum,,item,we
*get,pt,ssum,,item,pe
*get,vt,ssum,,item,ve

*VWRITE,vt,ft,wt,pt
(/'volume=',e10.3,' force=',e10.3,' energy=',e10.3,' loss=',e10.3/)
fini

! *** couple with thermal analysis


/prep7 ! enter preprocessor
et,1,90 ! change element type to thermal
ldread,hgen,,,,,,rmg ! read heat generation load from the result file
bfelist,all,hgen ! list heat generation element body loads
fini

! *** couple with structural analysis


/prep7
et,1,186 ! change element type to structural
ldread,forc,,,,,,rmg ! read nodal force load from the result file
flist ! list nodal forces
fini

6.7.2. Example: Force Calculation Between Two Permanent Magnets


This example problem considers the magnetic force interaction between two permanent magnets. The
magnet configuration and the analytical solution are described in “3-D Analytical Calculation of the Forces
Exerted between Two Cuboidal Magnets” by G. Akoun and J.-P. Yonnet, IEEE Transactions on Magnetics,
vol. MAG-20, No. 5, pp. 1962-1964 (1984)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
128 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Magnetostatic and Edge-Based Analyses

6.7.2.1. Problem Description and Results


Two permanent magnets of sizes 20 x 12 x 6 mm and 12 x 20 x 6 mm are positioned in space such that
their respective sides are parallel and their centers are offset by -4 mm in the X- and Y-directions and
by 8mm in the Z-direction with respect to the lower magnet (Figure 6.6: Finite Element Model of the
Magnets (p. 129)). In both magnets, the residual induction vector of magnitude 0.38 tesla is oriented
along the Z-axis.

Figure 6.6: Finite Element Model of the Magnets

A series of magnetostatic analyses is performed to determine the magnetic forces Fx and Fy acting on
the magnets as the upper magnet moves in the X-direction (Figure 6.7: Magnetic Forces vs. Upper
Magnet Displacement (p. 130)). The magnets are enclosed in an air box of size 60 x 60 x 54 mm. Flux
parallel boundary conditions are imposed on the exterior surface of the air enclosure. Both the magnets
and the air region are modeled using the magnetic analysis option (KEYOPT(1)=0) of SOLID236. For a
more accurate force summation over the regions with corners, the midside nodes contribution to
magnetic forces is included in the corner node FMAG force output (KEYOPT(7)=1).

The EMFT command macro is used to sum up the element FMAG forces acting on the lower magnet
(volume 2). Note that to correctly sum up the Maxwell forces using the EMFT macro, you must select
all the nodes of the lower magnet as well as the elements attached to those nodes.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 129
3-D Magnetostatics and Fundamentals of Edge-Based Analysis

Figure 6.7: Magnetic Forces vs. Upper Magnet Displacement

The side view of the magnetic field and magnetic force distribution for the initial position of the upper
magnet (d = 0 mm) are shown in Figure 6.8: Magnetic Field Distribution in the Magnets (p. 131) and
Figure 6.9: Magnetic Force Distribution in the Magnets (p. 132) respectively.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
130 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Magnetostatic and Edge-Based Analyses

Figure 6.8: Magnetic Field Distribution in the Magnets

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 131
3-D Magnetostatics and Fundamentals of Edge-Based Analysis

Figure 6.9: Magnetic Force Distribution in the Magnets

6.7.2.2. Command Listing

/title, Forces between two permanent magnets


/nopr

!npts=16
!*dim,dist,table,npts
!*dim,F,table,npts,2
d=0
d_air=0

!*do,i,1,npts

!parsave,all
!/clear,nostart
!parres

! Problem parameters
Pi=acos(-1)
mu0=4*Pi*1e-7 ! permeability of free space, H/m
mu0r=1 ! relative permeability of free space
Br=0.38 ! residual induction, tesla
a=10 $ b=6 $ c=3 ! lower magnet dimensions
aa=6 $ bb=10 $ cc=3 ! upper magnet dimensions
xo=-4 $ yo=-4 $ zo=8 ! upper magnet center offset

/com, *** Upper Magnet Displacement d = %d% (mm)

/PREP7

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
132 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Magnetostatic and Edge-Based Analyses

! Solid model
block,-a,a,-b,b,-c,c ! lower magnet volume
wpoff,xo,yo,zo
block,-aa+d,aa+d,-bb,bb,-cc,cc ! upper (moving) magnet volume
vplot
wpoff,-xo,-yo,-zo
block,-30,30+d_air,-34,26,-23,31 ! air box
vovlap,all

! Finite element model


esize,1
et,1,SOLID236 ! magnetic solid
keyop,1,7,1 ! condense forces to the corner nodes
vmesh,1,2
esize,4
numcmp,volu
esha,1
vmesh,3

! Material properties
mp,mgzz,2,Br/mu0
mp,murx,2,mu0r
mp,murx,1,mu0r
vsel,s,,,1,2,,1
emod,all,mat,2
alls

nsel,s,ext
d,all,az,0 ! flux parallel boundary conditions
alls

vlscale,all,,,1e-3,1e-3,1e-3,,,1 ! scale the volumes to mm

WPSTYLE,,,,,,,,0
/ANG,1
/VIEW,1,1,1,1
/VUP,1,Z
esel,s,mat,,2
eplot
alls
fini

/SOLU
solve
fini

/POST1
vsel,s,,,2,,,1 ! select lower magnet along with the
! associated elements and nodes
esln
EMFT ! sum up magnetic forces
alls

esel,s,mat,,2
/VSCALE,,0.3
plvect,b,,,,vect,elem,on,on ! plot magnetic field
plvect,fmag,,,,vect,node,on,on ! plot magnetic forces
alls
fini

!/com, i = %i%
!dist(i)=d
!F(i,1)=_fxsum ! FX sum calculated by EMFT
!F(i,2)=_fysum ! FY sum calculated by EMFT
!d=d+2 ! upper magnet displacement update
!*if,d,gt,8,then
!d_air=d-8
!*endif
!*enddo

!/axlab,x,Distance d (mm)
!/axlab,y,Forces acting the magnet (N)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 133
3-D Magnetostatics and Fundamentals of Edge-Based Analysis

!/gcol,1,Fx
!/gcol,2,Fy
!*vplot,dist(1),F(1,1),2

6.7.3. Example: Two-Plate Hall Sensor


A two-plate Hall sensor measurement of an applied magnetic field is demonstrated. A detailed model
description can be found in “Smart Silicon Sensors – Examples of Hall-effect Sensors” by P. C. De Jong,
F. R. Reidijk, and J. Van der Meer, IEEE Sensors, vol. 2, 2002: pp. 1440-1444.

The analytical solution is described in "Integrated Hall Magnetic Sensors" by “Popovic, R. S., and P. Kejik,
Smart Sensor Systems. Chichester: John Wiley & Sons, Ltd. 2008: p. 252.

6.7.3.1. Problem Description and Results

Two 6.0e-3 m x 6.0e-3 m x 0.4e-3 m plates are modeled with Hall coefficient Rh = -0.0001 m3/C, electrical
resistivity ρ = 1.6e-3Ω*m, and relative magnetic permeability µ = 1 using SOLID236 elements with the
electromagnetic analysis option (KEYOPT(1)=1).

Electrical contacts are made on the plates by coupling the voltage of nodes (CP, VOLT) located within
a small volume at each corner of the plates.

The plates are connected in parallel to a voltage source. The voltage load V0 = 3 V is applied by coupling
the voltage (CP, VOLT) of the independent voltage source (CIRCU124 with KEYOPT (1) = 4) with the
corresponding electrical contacts on the plates. A ground is created by setting the voltage of one
electrical contact on each plate to zero (D,,VOLT).

The plates are connected to two terminals for measuring the output voltage. Corresponding electrical
contacts on each plate are connected to the same terminal, as shown in Figure 6.10: Finite Element
Model of the Two-Plate Hall Sensor (p. 135). The connections for these terminals are created by coupling
the voltage (CP,VOLT) of the appropriate electrical contacts on the plates.

Meshing facet elements (MESH200) are used to depict the presence of wires.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
134 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Magnetostatic and Edge-Based Analyses

Figure 6.10: Finite Element Model of the Two-Plate Hall Sensor

A series of static electromagnetic analyses is performed on the sensor to determine the Hall voltage.
The first analysis is performed without any applied magnetic field to determine the offset voltage. The
output voltage should be zero in the absence of a magnetic field. Due to non-uniform meshing, the
current distribution is not symmetrical, resulting in a small potential difference (offset voltage) across
the output pair of contacts. In a real application, the offset voltage can be caused by various factors,
such as mechanical stresses, material inhomogeneities, or temperature variations.

The initial electric potential distribution in the Hall plates is created by the applied voltage across the
sensor, as shown in Figure 6.11: Electric Potential Distribution in the Plates (p. 136).

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 135
3-D Magnetostatics and Fundamentals of Edge-Based Analysis

Figure 6.11: Electric Potential Distribution in the Plates

For the second static analysis, the output voltage is calculated when there is an applied magnetic field
(0.8 T) perpendicular to the Hall plate, as shown in Figure 6.12: Vector Plot of Applied Magnetic Field
on the Plates (p. 137). The offset voltage is subtracted from this output voltage to determine the Hall
voltage.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
136 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Magnetostatic and Edge-Based Analyses

Figure 6.12: Vector Plot of Applied Magnetic Field on the Plates

The magnetic field as measured by the sensor can be calculated by Eq. 9.14 in the reference:

Where:

I = the average current through the Hall plates. This value is retrieved using *GET.

c = the thickness of the plates.

VH = the Hall voltage from the sensor.

From the two-plate sensor measurement for Hall voltage, the applied magnetic field is calculated to be
0.788 T. The actual applied magnetic field is 0.8 T.

6.7.3.2. Command Listing


/title, Example of a Two Hall Plate Sensor
/NOPR

! *** Plate dimensions


a=3e-3 ! Half plate length, m
b=3e-3 ! Half plate height, m
c=0.4e-3 ! Plate width, m

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 137
3-D Magnetostatics and Fundamentals of Edge-Based Analysis

! *** Material properties for n-type InAs


Rh=-0.0001 ! Hall coefficient, m^3/C
rho=1.6e-3 ! Resistivity, Ohm*m
mu=1 ! Relative magnetic permeability

! *** Load parameters


V=3 ! Applied voltage, V
Bz=0.8 ! Applied magnetic field, T

/PREP7
et,1,SOLID236,1 ! Electromagnetic analysis, AZ+VOLT
mp,rh,1,Rh
mp,rsvx,1,rho
mp,murx,1,mu
block,-a,a,-b,b,0,c ! Hall plate 1
block,-a,-a+a/8,b,b-b/8,c/2,c ! Electrical contacts plate 1
block,-a,-a+a/8,-b,-b+b/8,c/2,c
block,a,a-a/8,b,b-b/8,c/2,c
block,a,a-a/8,-b,-b+b/8,c/2,c
block,2*a,4*a,2*b,4*b,0,c ! Hall plate 2
block,2*a,2*a+a/8,4*b,4*b-b/8,c/2,c ! Electrical contacts plate 2
block,2*a,2*a+a/8,2*b,2*b+b/8,c/2,c
block,4*a,4*a-a/8,2*b,2*b+b/8,c/2,c
block,4*a,4*a-a/8,4*b,4*b-b/8,c/2,c
esize,c
msha,1,3d ! Tetrahedral
vovlap,all
vmesh,all

! *** Voltage supply and wires


w1=node(-a,b,c) ! Nodes for wire modeling
w2=node(a,-b,c)
w3=node(a,b,c)
w4=node(-a,-b,c)
w5=node(2*a,2*b,c)
w6=node(4*a,4*b,c)
w7=node(4*a,2*b,c)
w8=node(2*a,4*b,c)

*get,n_max,node,,num,max ! Get max node number


n,n_max+1,-2*a,2*b,c ! Define nodes for voltage and wire elements
n,n_max+2,-2*a,,c
n,n_max+3,-2*a,-2*b,c
n,n_max+4,-a,2*b,c
n,n_max+5,a,-2*b,c
n,n_max+6,5*a,-2*b,c
n,n_max+7,5*a,4*b,c
n,n_max+8,a,4*b,c
n,n_max+9,-a,-3*b,c
n,n_max+10,4*a,-3*b,c
n,n_max+11,a,5*b,c
n,n_max+12,7*a,5*b,c
n,n_max+13,7*a,-3*b,c

et,2,CIRCU124,4 ! Independent voltage source from CIRCU124


r,2,V
type,2
real,2
e,n_max+1,n_max+3,n_max+2
/icscale,,0.1

et,3,MESH200,0,0,0,0 ! Wire from MESH200


type,3
e,n_max+1,n_max+4
e,n_max+4,w1
e,n_max+3,n_max+5
e,n_max+5,w2
e,n_max+5,n_max+6
e,n_max+6,n_max+7
e,n_max+7,w6
e,n_max+4,w5
e,w3,n_max+8

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
138 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Magnetostatic and Edge-Based Analyses

e,n_max+8,w8
e,w4,n_max+9
e,n_max+9,n_max+10
e,n_max+10,w7
e,n_max+8,n_max+11
e,n_max+11,n_max+12
e,n_max+10,n_max+13
/color,elem,12,3620,3628
/color,elem,5,3629,3636

! *** Boundary conditions and loads


vsel,s,volu,,11
vsel,a,volu,,16
nslv
nsel,a,node,,n_max+1
cp,1,volt,all ! Couple for voltage supply
vsel,s,volu,,14
vsel,a,volu,,18
nslv
nsel,a,node,,n_max+3
d,all,volt,0 ! Ground
vsel,s,volu,,12
vsel,a,volu,,17
nslv
cp,2,volt,all ! Couple for output voltage
n1=ndnext(0)
vsel,s,volu,,13
vsel,a,volu,,15
nslv
cp,3,volt,all ! Couple for output voltage
n2=ndnext(0)
alls

dflx,all,,,0 ! Set B-field in the +Z-direction to B=0 T


fini

/SOLU
outres,all,all
solve
Voff=volt(n2)-volt(n1) ! Offset voltage
esel,s,type,,1
nsle
dflx,all,,,Bz ! Create uniform B-field in the +Z-direction
alls
solve
fini

/POST1
vsel,s,volu,,11
nslv
fsum
*get,I_1,fsum,,ITEM,amps ! Current through plate 1
vsel,s,volu,,16
nslv
fsum
*get,I_2,fsum,,ITEM,amps ! Current through plate 2
alls
I_avg=(I_1+I_2)/2 ! Average current through plates
/com
/com -------------------- RESULTS --------------------
/com
/com ***** Offset Voltage *****
/com
/com Offset voltage: %Voff% V
/com
/com
/com ***** Total Output Voltage *****
/com
/com Total output voltage (with magnetic field): %volt(n2)-volt(n1)% V
/com
/com
/com ***** Hall Voltage *****

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 139
3-D Magnetostatics and Fundamentals of Edge-Based Analysis

/com
/com Calculated Hall Voltage: %volt(n2)-volt(n1)-Voff% V
/com
/com
/com ***** Magnetic Field *****
/com
/com Calculated Magnetic Field: %((volt(n2)-volt(n1)-Voff)*c)/(Rh*I_avg)% T
/com Applied Magnetic Field: %Bz% T
/com
/com
fini

6.7.4. Other Examples


Another ANSYS, Inc. publication, the Mechanical APDL Verification Manual, contains other examples of
various types of analyses, including the following examples of 3-D static edge-based magnetic analysis:

• VM213 -- Differential Inductance of a Transformer

• VM214 -- Rod Rotating in a Uniform Magnetic Field

• VM241 -- TEAM20: 3-D Static Force problem

• VM277 -- Hall Plate in a Uniform Magnetic Field

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
140 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 7: 3-D Harmonic Magnetic Analysis (Edge-Based)
Harmonic edge-based analyses use SOLID236 and SOLID237 elements. See Elements Used in Edge-Based
Analysis (p. 114) and Characteristics and Settings for Physical Regions of a Model (p. 115) for more inform-
ation about the edge-based analysis.

The following edge-based harmonic analysis topics are available:


7.1. Analysis Considerations
7.2. Performing a Harmonic Edge-Based Analysis
7.3. Reviewing the Results from a Harmonic Edge-Based Analysis
7.4. Example 3-D Harmonic Magnetic (Edge-Based) Analyses

7.1. Analysis Considerations


Before setting up your analysis, consider the following:

• When modeling stranded conductors using SOLID236 or SOLID237 with KEYOPT(1)=0, the applied current
density J specified on the BFE command (BFE,,JS) must satisfy the solenoidal condition . For more
details about the solenoidal condition, see Analysis Considerations (p. 117).

• The harmonic analysis supports only linear material properties: magnetic permeability MP,MURX (also MURY,
MURZ) and electrical resistivity MP,RSVX (also RSVY, RSVZ). An electromagnetic harmonic analysis using
SOLID236 and SOLID237 also supports electrical permittivity MP,PERX (also PERY, PERZ).

• Permanent magnets are not permitted in a harmonic analysis unless this is a linear perturbation harmonic
analysis.

7.2. Performing a Harmonic Edge-Based Analysis


To perform a harmonic edge-based magnetic analysis, do the following tasks:

1. Specify the electromagnetics edge formulation by choosing Main Menu> Preferences> Electromag-
netics: Magnetic-Edge from the GUI. Doing so lets you filter out other ANSYS commands not involved
in an edge-based magnetic analysis.

2. Define a jobname and title for your analysis. To do so, use the commands or GUI paths shown below:
Command(s): /FILNAME and /TITLE
GUI: Utility Menu> File> Change Jobname
Utility Menu> File> Change Title

3. Enter the ANSYS preprocessor to begin defining your model:


Command(s): /PREP7
GUI: Main Menu> Preprocessor

4. Choose element type SOLID236 or SOLID237 via either of the following:


Command(s): ET
GUI: Main Menu> Preprocessor> Element Type> Add/Edit/Delete

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 141
3-D Harmonic Magnetic Analysis (Edge-Based)

5. Select the formulation option suitable for the specified element type and physics region. (For inform-
ation on formulation options, see the earlier discussion.)
Command(s): KEYOPT
GUI: Main Menu> Preprocessor> Element Type> Add/Edit/Delete

6. Define material properties. 2-D Static Magnetic Analysis (p. 13) describes the material properties you
can use and tells you how to specify them. For an eddy current region, you must specify the electric
resistivity, RSVX.

7. Build the model. For instructions on building and meshing models, see the Modeling and Meshing
Guide.

8. Assign attributes to the volumes (that is, associate the element types, the conducting and nonconduct-
ing regions, the material properties, etc. with the appropriate volumes).
Command(s): VATT
GUI: Main Menu> Preprocessor> Meshing> Mesh Attributes

9. Mesh the model, specifying brick or tetrahedral element shape.


Command(s): VMESH
GUI: Main Menu> Preprocessor> Meshing> Mesh> Volumes> Mapped

10. Enter the SOLUTION processor, using either of the following:


Command(s): SOLU
GUI: Main Menu> Solution

11. Apply flux-parallel and flux-normal solid model boundary conditions to the boundaries.
Command(s): DA
GUI: Main Menu> Solution> Define Loads> Apply> Magnetic> Boundary

For edge-based analyses, the label AZ (when set to zero) applies the flux-parallel boundary
condition. No prescription is required to set flux-normal, because it is the natural boundary
condition. In the rare case where the AZ = 0 condition is not general enough for flux-parallel
conditions, you can prescribe constraints using individual D commands (or the equivalent GUI
path).

12. Apply source loading. See Characteristics and Settings for Physical Regions of a Model (p. 115) for in-
formation on source loading.

13. Choose the harmonic analysis type and select the frequency of the time change. To specify the ana-
lysis type, use either of the following:
Command(s): ANTYPE,HARMIC,NEW
GUI: Main Menu> Solution> Analysis Type> New Analysis> Harmonic

To specify the frequency, use the command or GUI path shown below:
Command(s): HARFRQ
GUI: Main Menu> Solution> Load Step Opts> Time/Frequenc> Freq and Substps

14. Choose the solver you wish to use. Edge formulation analyses can use the sparse direct (SPARSE)
solver (default), the Jacobi Conjugate Gradient (JCG) solver, or the Incomplete Cholesky Conjugate
Gradient (ICCG) solver. Select an equation solver using either of the following:
Command(s): EQSLV
GUI: Main Menu> Solution> Analysis Type> Analysis Options

The sparse and ICCG solvers are recommended for harmonic edge analysis.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
142 of ANSYS, Inc. and its subsidiaries and affiliates.
Reviewing the Results from a Harmonic Edge-Based Analysis

15. Choose load step options. (Alternative Analysis Options and Solution Methods (p. 289) of this manual
describes these options.)

16. Solve the model by using either of the following:


Command(s): SOLVE (with OPT field set to zero)
GUI: Main Menu> Solution> Solve> Current LS

When you use the edge-element formulation, by default the ANSYS program gauges the
problem domain over all selected elements and nodes. Gauging removes unneeded degrees
of freedom by setting them to zero; this in turn enables ANSYS to solve your analysis problem
faster. You can control gauging using either of the following:
Command(s): GAUGE
GUI: Main Menu> Solution> Load Step Opts> Magnetics> Options Only> Gauging

Gauging is required for electromagnetic analyses with elements using an edge formulation.
Therefore, in most cases you should not turn automatic gauging off unless you are an expert ANSYS
user and want to do your own gauging. The ANSYS program removes the extra constraints set
by gauging after solution; therefore, gauging is transparent to users.

17. To leave the SOLUTION processor, use one of the following:


Command(s): FINISH
GUI: Main Menu> Finish

18. Do postprocessing and review the analysis results, as described below.

7.3. Reviewing the Results from a Harmonic Edge-Based Analysis


The program writes results from an edge-based harmonic magnetic analysis to the magnetics results
file, Jobname.RMG (or to Jobname.RST if the electric potential (VOLT) is active). Results include the
data listed below, many of which vary harmonically at the operating frequency (or frequencies) for
which the measurable quantities can be computed as the real solution times cosine (Ωt) minus the
imaginary solution times sine (Ωt). Ω is the angular frequency. For more details, see the Mechanical
APDL Theory Reference.

Primary data: Nodal DOFs ( AZ, VOLT, EMF)

Derived data:

• Nodal magnetic flux density (BX, BY, BZ, BSUM)

• Nodal magnetic field intensity (HX, HY, HZ, HSUM)

• Nodal electric field intensity (EFX, EFY, EFZ, EFSUM)

• Nodal electric conduction current density JC, (JCX, JCY, JCZ, JCSUM)

• Nodal magnetic forces (FMAG; components X, Y, Z, SUM)

• Total current density (JTX, JTY, JTZ, JTSUM)

• Joule heat rate per unit volume (JHEAT)

• Element magnetic energy (SENE)

Additional data are available. See the Element Reference for details.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 143
3-D Harmonic Magnetic Analysis (Edge-Based)

You can review analysis results in POST1, the general postprocessor. The results are out-of-phase with
the input loads (that is, they lag the input loads), and therefore are complex. They are calculated and
stored in terms of real and imaginary components as detailed above.

Use POST1 to review results over the entire model at specific frequencies. For viewing results over a
range of frequencies, use the time-history postprocessor, POST26.

For a harmonic magnetic analysis, the frequency range usually consists of only the AC frequency.
Therefore, typically you use POST1 to review the results.

To choose a postprocessor, use one of the following:


Command(s): /POST1, /POST26
GUI: Main Menu> General Postproc
Main Menu> TimeHist Postpro

7.3.1. Commands to Help You in Postprocessing


ANSYS provides a number of commands (listed below) for Postprocessing:

Table 7.1: Postprocessing Commands

Task Command(s)
Select the real solution SET,1,1,,0
Select the imaginary solution SET,1,1,,1
Print edge-flux degree of freedom (AZ) [5] PRNSOL,AZ
Print electric potential [6] or time integrated electric potential degree of PRNSOL,VOLT
freedom (VOLT) [5]
Print magnetic flux density at corner nodes [1, 5] PRVECT,B
Print magnetic field at corner nodes [1,5] PRVECT,H
Print electric field intensity at corner nodes [1, 5] PRVECT,EF
Print conduction current density at corner nodes [1, 5] PRVECT,JC
Print total current density at element centroids [5] PRVECT,JT
Print force at element nodes [2, 6] PRVECT,FMAG
Print magnetic flux density at element nodes [5] PRESOL,B
Print electric field intensity at element nodes [5] PRESOL,EF
Print conduction current density at element nodes [5] PRESOL,JC
Print magnetic field at element nodes [5] PRESOL,H
Print total current density at element centroid [5] PRESOL,JT
Print force at element nodes [2,6] PRESOL,FMAG
Print magnetic energy [3, 5] PRESOL,SENE
Print Joule heat density [4, 6] PRESOL,JHEAT
Create element table item for centroid flux density [5], X component. (Issue ETABLE,Lab,B,X
similar commands for Y, Z, and SUM components.)
Create element table item for centroid magnetic [5] field, X component. ETABLE,Lab,H,X
(Issue similar commands for Y, Z, and SUM components.)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
144 of ANSYS, Inc. and its subsidiaries and affiliates.
Reviewing the Results from a Harmonic Edge-Based Analysis

Task Command(s)
Create element table item for centroid electric field intensity [5], X ETABLE,Lab,EF,X
component. (Issue similar commands for Y, Z, and SUM components.)
Create element table item for electric current density [5] field, X component.ETABLE,Lab,JC,,X
(Issue similar commands for Y, Z, and SUM components.)
Create element table item for Joule heat density [4, 6] ETABLE,Lab,JHEAT
Create element table item for centroid current [5] density, X component. ETABLE,Lab,JT,X
(Issue similar commands for Y, Z, and SUM components.)
Create element table item for magnetic force [2, 6] over element, X ETABLE,Lab,FMAG,X
component. (Issue similar commands for Y, Z, and SUM components.)
Create element table item for element stored energy [3] ETABLE,Lab,SENE
Print the indicated element table item(s) PRETAB,Lab,1,...

1. Average of selected elements adjacent to nodes.

2. Force is summed over elements and distributed among nodes for coupling purposes.

3. Magnetic energy is summed over elements.

4. To obtain power loss, multiply by element volume.

5. Instantaneous value (real/imaginary, at Ωt = 0 and Ωt = -90) in case of a harmonic analysis.

6. Time-averaged value stored in both the real and imaginary data sets.

For more information about these notations, see the Mechanical APDL Theory Reference.

The ETABLE command also allows you to view less frequently-used items.

You can view most of these items graphically. To do so, substitute plotting commands for the commands
whose names begin with "PL" (for example, use PLNSOL instead of PRNSOL, as illustrated below):

For this Substitute this Or this GUI Path...


Command... Command...

PRNSOL PLNSOL Utility Menu> Plot> Results> Contour Plot> Nodal


Solution
PRVECT PLVECT Utility Menu> Plot> Results> Vector Plot
PRESOL PLESOL Utility Menu> Plot> Results> Contour Plot> Elem
Solution
PRETAB PLETAB Utility Menu> Plot> Results> Contour Plot> Elem
Table Data

You also can plot element table items. See the Basic Analysis Guide for more information.

The ANSYS Parametric Design Language (APDL) also contains commands that may be useful in postpro-
cessing, and several magnetics macros also are available for results processing purposes. For more in-
formation about the APDL, see the ANSYS Parametric Design Language Guide.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 145
3-D Harmonic Magnetic Analysis (Edge-Based)

The following topic, "Reading In Results Data," discusses some typical POST1 operations for a harmonic
magnetic analysis. For a complete description of all postprocessing functions, see the Basic Analysis
Guide.

7.3.2. Reading in Results Data


To review results in POST1, the ANSYS database must contain the same model for which the solution
was calculated. Also, the results file (Jobname.RMG or Jobname.RST) must be available.

Results from a harmonic magnetic analysis are complex and consist of real and imaginary components.
To read either type of component (you cannot read both types at the same time), use either of the
following:
Command(s): SET
GUI: Utility Menu> List> Results

An SRSS combination of the real and imaginary parts gives the true magnitude of the results. You can
do this via load case operations.

7.3.2.1. Contour Displays


You can contour almost any result item (including flux density and field intensity) using the following
commands or menu paths:
Command(s): PLNSOL, PLESOL
GUI: Utility Menu> Plot> Results> Contour Plot> Elem Solution
Utility Menu> Plot> Results> Contour Plot> Nodal Solution

Caution

The PLNSOL command or its equivalent menu path average nodal contour plots for derived
data, such as flux density and field intensity, at the nodes. Therefore, be sure to disallow
averaging of data across material boundaries, using one of these methods:
Command(s): AVRES,2
GUI: Main Menu> General Postproc> Options for Outp

7.3.2.2. Tabular Listings


You can produce tabular listings of results data, either unsorted or sorted by node or by element. To
sort data before listing it, use any of the following:
Command(s): ESORT, NSORT
GUI: Main Menu> General Postproc> List Results> Sorted Listing> Sort Nodes
Main Menu> General Postproc> List Results> Sorted Listing> Sort Elems

To produce tabular data listings, use any of the following:


Command(s): PRESOL, PRNSOL, PRRSOL
GUI: Main Menu> General Postproc> List Results> Element Solution
Main Menu> General Postproc> List Results> Nodal Solution
Main Menu> General Postproc> List Results> Reaction Solu

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
146 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Harmonic Magnetic (Edge-Based) Analyses

7.3.2.3. Calculating Other Items of Interest


You can calculate many other items of interest (such as global forces, torque, source input energy, in-
ductance, flux linkages, and terminal voltage) from the data available in the database in postprocessing.
The ANSYS command set supplies the following macros for these calculations:

• The MMF macro calculates magnetomotive force along a path.

• The POWERH macro calculates the RMS power loss in a conducting body.

• The EMFT macro sums up the electromagnetic nodal forces. (See Calculating Magnetic Force and
Torque (p. 121))

For more discussion of these macros, see Electric and Magnetic Macros (p. 193).

7.4. Example 3-D Harmonic Magnetic (Edge-Based) Analyses


The following examples are available:
7.4.1. Example: 3-D Harmonic Edge-Based Analysis
7.4.2. Example: Eddy Currents Induced in a Ferromagnetic Plate
7.4.3. Example: Magnetic Field in a Parallel Plate Capacitor
7.4.4. Example: Transformer Analysis

7.4.1. Example: 3-D Harmonic Edge-Based Analysis


This section describes a sample harmonic edge-based analysis, performed using ANSYS.

7.4.1.1. The Analysis Described


This example examines the solution in the slot of an electric machine. For a specified AC (harmonic)
current, the analysis calculates the magnetic field, energy, Joule heat losses and forces.

Figure 6.4: Current-Carrying Conductor in a Slot Within an Iron Region (p. 125) (in 3-D Magnetostatics
and Fundamentals of Edge-Based Analysis (p. 113)) and Figure 7.1: Volume Model of the Conductor (p. 147)
illustrate, respectively, the problem domain and a volume model of the conductor within the slot in
the domain.

Figure 7.1: Volume Model of the Conductor

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 147
3-D Harmonic Magnetic Analysis (Edge-Based)

The geometry is a block modeling a slot of an electrical machine. The z-axis coincides with the axis of
the machine; l = .3 m is the length. The slot, with a depth of d = 0.1 m, is oriented in the x-axis. The
width of the slot in the y direction is denoted by w = 0.01 m. A conductor with relative permeability,
µr = 1, and resistivity, ρ = 1.0e-8, carries a current of 2236 A at a phase angle of 26.57° (corresponds in
complex terms to 2000 + j1000 A). The analysis frequency is 3 Hz, which corresponds to a 5% slip fre-
quency for a machine operating at 60 Hz.

The side and bottom of the slot are ideal iron. This is a flux-normal boundary condition (natural (Neu-
mann) boundary condition); it is satisfied automatically without any prescription of an explicit boundary
condition.

At the opening of the slot at x = d and at axial faces z = 0 and z = 1, the flux lines are parallel. This is
an essential flux-parallel (Dirichlet) boundary condition; that is, its satisfaction is not automatic. You can
prescribe it by setting (constraining) the flux-edge DOFs to a constant value, usually zero.

The example uses MKS dimensions (the default).

7.4.1.2. Analysis Parameters


Parameters for the example are as follows:

l = 0.3 Length
d = 0.1 Depth
w = 0.01 Width
i = 2000 + j1000 Current
mur = 1 Relative magnetic permeability
ρ = 1.0e-8 Electric resistivity (required for Joule loss)
n = 20 Number of divisions through the slot depth
fr = 3 Frequency

7.4.1.3. Target Data


Target data for the example are as follows:

Time-average Force in slot

FXrms = -46.89

Time-average Joule heat loss

PAVG = 25.9 watts


/TITLE, Harmonic analysis of a conducting plate
/COM
/NOPR

! *** Define model parameters

l=0.3 ! length
d=0.1 ! depth
w=0.01 ! width
mur=1 ! relative magnetic permeability
rho=1.0e-8 ! electric resistivity (required for Joule loss)
fr=3 ! rotor frequency at 5% slip
curr=2000.0 ! current real

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
148 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Harmonic Magnetic (Edge-Based) Analyses

curi=1000.0 ! current imaginary


n=20 ! meshing parameter
pi=3.1415926
mu0=pi*4.0e-7 ! free space permeability

! *** create model


/PREP7
ET,1,236,1
KEYO,1,2,2 ! timie-integrated VOLT, symmetric system
KEYO,1,8,1 ! calculate Lorentz force
MP,MURX,1,mur
MP,RSVX,1,rho
BLOCK,0,d,0,w,0,l
LSEL,S,LOC,X,d/2
LESIZE,ALL,,,n
LSEL,ALL
ESIZE,,1
VMESH,ALL
FINI

/SOLU
ANTYP,HARM
HARFR,fr

! *** Apply Dirichlet boundary condition


NSEL,S,LOC,X,d
NSEL,A,LOC,Z,0
NSEL,A,LOC,Z,l
D,ALL,AZ,0

NSEL,S,LOC,Z,0
D,ALL,VOLT,0
NSEL,S,LOC,Z,l
CP,1,VOLT,ALL
*get,n1,node,,num,min
F,n1,AMPS,curr,curi
NSEL,ALL
SOLVE
FINI

! *** Extract solution


/POST1
SET,1,1
ETABLE,fxr,FMAG,X
PRETAB,fxr
POWERH
SSUM
FINI

! *** Extract solution


/POST1
SET,1,1
ETABLE,fxr,FMAG,X
PRETAB,fxr
POWERH
SSUM
FINI

7.4.2. Example: Eddy Currents Induced in a Ferromagnetic Plate


This example problem considers eddy currents in a ferromagnetic plate excited by a coil. A detailed
model description can be found in “Challenges of Magnetic Quasi-Stationary Field Computations in In-
dustrial Power Devices” by B. Cranganu-Cretu, J. Smajic and H. Nordborg, Proc. 12th International
Symposium on Numerical Field Calculation in Electrical Engineering, pp. 313-317 (2006).

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 149
3-D Harmonic Magnetic Analysis (Edge-Based)

7.4.2.1. Problem Description and Results


A 0.1 x 0.1 x 0.015 m ferromagnetic plate with electrical conductivity σ = 6.66e6 S/m and relative
magnetic permeability of μ = 200 is excited by a cylindrical coil placed at a distance d = 0.05 m from
the plate. The coil of height hc = 0.1 m with inner and outer radii of ri = 0.05 m and ro = 0.06 m respect-
ively is energized by an rms current I = 1e5 A at 50 Hz.

A harmonic electromagnetic analysis is performed to determine the eddy current loss in a ferromagnetic
plate. Only a quarter symmetry sector is considered for the analysis (Figure 7.2: Finite Element Model
of the Ferromagnetic Plate and Coil (p. 150)). The coil and the plate are enclosed in an air box of size
0.5 x 0.5 x 0.4 m. Flux parallel boundary conditions are imposed on the exterior surface of the air en-
closure.

Figure 7.2: Finite Element Model of the Ferromagnetic Plate and Coil

Both the coil and the ferromagnetic plate are modeled using the electromagnetic analysis option
(KEYOPT(1) = 1) of SOLID236. In addition, KEYOPT(5) is set to 1 for the coil to suppress the eddy currents.
The air box is modeled using the magnetic analysis option KEYOPT(1) = 0.

The POWERH command macro is used to calculate the time-averaged (rms) power loss in the plate.
Taking into account the symmetry factor, the power loss is found to be Pav=131.9 watts. The real and
imaginary components of eddy current density in the plate are shown in Figure 7.3: Eddy Currents Dis-
tribution in the Plate (Real Solution) (p. 151) and in Figure 7.4: Eddy Currents Distribution in the Plate
(Imaginary Solution) (p. 151), below.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
150 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Harmonic Magnetic (Edge-Based) Analyses

Figure 7.3: Eddy Currents Distribution in the Plate (Real Solution)

Figure 7.4: Eddy Currents Distribution in the Plate (Imaginary Solution)

The electromagnetic analysis is followed by a steady-state thermal analysis to determine the temperature
distribution in the plate due to Joule heating produced by the eddy currents. The ambient temperature
is assumed to be 70 °C. The thermal conductivity and convection coefficient of the plate are taken to
be k=50 watts/(m°C) and h=100 W/(m2°C) respectively.

The time-averaged Joule heat generation rate is transferred to the thermal SOLID90 model using the
LDREAD,HGEN command. The resulting steady-state temperature distribution is shown in Figure 7.5: Tem-

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 151
3-D Harmonic Magnetic Analysis (Edge-Based)

perature Distribution in the Plate (p. 152). The average calculated temperature in the plate is Tav=110.1
°C

Figure 7.5: Temperature Distribution in the Plate

7.4.2.2. Command Listing


/title, Ferromagnetic plate excited with a cylindrical coil, 1/4 symmetry
/nopr
/VIEW,1,1,1,1
/VUP,1,Z
/SHOW,win32c ! use /SHOW,x11c for X Window System
/CONT,1,18

! *** Problem parameters

! Ferromagnetic plate:
lp=0.1 ! length, m
hp=0.015 ! height, m
eszp=0.002 ! element size, m
sigp=6.66e6 ! conductivity, S/m
mu_fer=200 ! relative permeability
k=50 ! thermal conductivity, W/m_C
h=100 ! convection coefficient, W/(m^2_C)

! Coil:
ri=0.05 ! inner radius, m
ro=0.06 ! outer radius, m
hc=0.1 ! height, m
d=0.05 ! distance between the coil and the plate,m
eszc=0.005 ! element size, m
frq=50 ! frequency, Hz
I=1e5 ! rms coil current, A
mu_coil=1 ! relative permeability

! Air box:
la=0.5 ! length, m
ha1=0.05 ! lower height, m
ha2=0.35 ! upper height, m
esza=0.03 ! element size, m
mu_air=1 ! relative permeability
sigc=2e-8 ! conductivity, S/m
Tamb=70 ! ambient temperature,C

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
152 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Harmonic Magnetic (Edge-Based) Analyses

/com,
/com, *** Eddy current analysis
/com,
/PREP7
et,1,236,1 ! AZ-VOLT - ferromagnetic plate
et,2,236,1,,,,1 ! AZ-VOLT (no eddy currents) - coil
et,3,236 ! AZ - air

block,0,lp/2,0,lp/2,0,hp ! plate
cylinder,ri,ro,hp+d,hp+d+hc,0,90 ! coil
block,0,la/2,0,la/2,-ha1,ha2 ! air
vovlap,all
numcmp,all

mp,murx,1,mu_fer
mp,rsvx,1,1/sigp

mp,murx,2,mu_coil
mp,rsvx,2,sigc

mp,murx,3,mu_air

type,1
mat,1
esize,eszp
vmesh,1

type,2
mat,2
esize,eszc
vmesh,2

esha,1
type,3
mat,3
esize,esza
vmesh,3

asel,s,,,11
nsla,s,1
cp,1,volt,all
f,ndnext(0),amps,I*sqrt(2) ! rms

asel,s,,,12
nsla,s,1
d,all,volt,0
nsel,all

asel,s,,,3
asel,a,,,5
nsla,s,1
d,all,volt,0
nsel,all

nsel,s,ext
d,all,az,0 ! Flux-parallel magnetic BC
nsel,all
allsel
fini

/SOLU
antyp,harm
harf,,frq
solve
fini

/POST1
set,1,1
esel,s,mat,,1 ! select the plate
POWERH ! calculate rms power loss
plve,jt,,,,vect,elem,on ! plot eddy currents (real part)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 153
3-D Harmonic Magnetic Analysis (Edge-Based)

set,1,1,,1
plve,jt,,,,vect,elem,on ! plot eddy currents (imag part)
alls
fini

/com,
/com, Ansys computed power loss = %Pavg*4% watts

/com,
/com, *** Thermal analysis
/com,
/PREP7
ddele,all,az
vsel,s,volu,,1
eslv
et,1,90
LDREAD,hgen
vsel,inve
vclear,all
alls
etdele,2,3

mp,kxx,1,k
nsel,s,ext
sf,all,conv,h,Tamb
nsel,all
fini

/SOLU
anty,static
solve
fini

/POST1
set,1,1
plnsol,temp
nsort,temp
*get,minTemp,sort,,min
*get,maxTemp,sort,,max
avTemp=(minTemp+maxTemp)/2
/com,
/com, Average temperature of the plate = %avTemp% (C)
/com,
fini

7.4.3. Example: Magnetic Field in a Parallel Plate Capacitor


This example problem demonstrates the calculation of the magnetic field induced by both the conduction
and displacement currents in a parallel plate capacitor filled with a lossy dielectric. Simulation results
are compared to the analytical solution.

7.4.3.1. Problem Description and Results


A parallel plate capacitor of radius a = 2 cm and thickness d = 0.5 cm is filled with a lossy dielectric
with relative permittivity ε = 3.8 and electrical resistivity ρ = 1000 Ωm. The capacitor is driven by a time-
harmonic electric field of magnitude Eo = 2400 V/m at frequency f = 1 MHz. A harmonic electromagnetic
analysis is performed to determine the magnetic field induced in the capacitor as a function of distance
r from the axis. Only a quarter symmetry sector is considered for the finite element model (Figure 7.6: Fi-
nite Element Model of the Lossy Capacitor (p. 155)).

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
154 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Harmonic Magnetic (Edge-Based) Analyses

Figure 7.6: Finite Element Model of the Lossy Capacitor

The capacitor is modeled using the electromagnetic analysis option (KEYOPT(1) = 1) of SOLID236. Flux
parallel magnetic boundary conditions (AZ = 0) are imposed on the exterior surfaces of the capacitor
and on the symmetry planes. The electrodes are defined by coupling the electric potential degree of
freedom (VOLT) on the circular surfaces of the capacitor. The electric potential difference Eo*d is applied
across the electrodes to create a uniform electric field (Figure 7.7: Electric Field in the Capacitor (p. 155)).

Figure 7.7: Electric Field in the Capacitor

The total current density induced in the lossy dielectric is composed of the conduction current
density (real part)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 155
3-D Harmonic Magnetic Analysis (Edge-Based)

and the displacement current density (imaginary part)

Note that the operating frequency f is low enough to allow neglecting the eddy currents contribution
to the conduction current Jc. The conduction and displacement currents induce the real (Figure 7.8: Mag-
netic Field Induced by the Conduction Current (p. 156)) and imaginary (Figure 7.9: Magnetic Field Induced
by the Displacement Current (p. 157).) magnetic fields, respectively.

Figure 7.8: Magnetic Field Induced by the Conduction Current

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
156 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Harmonic Magnetic (Edge-Based) Analyses

Figure 7.9: Magnetic Field Induced by the Displacement Current

Using the Ampere's circuital law:

the real and imaginary parts of the magnetic field magnitude can be expressed respectively as follows:

and

These analytical expressions were used to demonstrate the agreement between the ANSYS calculated
and the target magnetic field as a function of distance r from the axis. (Figure 7.10: Computed and
Analytical Real Magnetic Fields Hr (p. 158) and Figure 7.11: Computed and Analytical Imaginary Magnetic
Field Hi (p. 158))

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 157
3-D Harmonic Magnetic Analysis (Edge-Based)

Figure 7.10: Computed and Analytical Real Magnetic Fields Hr

Figure 7.11: Computed and Analytical Imaginary Magnetic Field Hi

7.4.3.2. Command Listing


/title, Magnetic field in a parallel plate capacitor, 1/4 symmetry
/VIEW,1,1,1,1
/VUP,1,Z
/com,
/com, Problem parameters:
Pi=acos(-1)
a=2.e-2 ! radius, m
d=0.5e-2 ! thickness, m
epsr=3.8 ! relative permittivity

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
158 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Harmonic Magnetic (Edge-Based) Analyses

rho=1000 ! electrical resistivity, Ohm*m


E=2400 ! electric field V/m
f=1.e6 ! frequency, Hz
eps0=8.854e-12 ! free space permittivity, F/m

Jc=E/rho ! conduction current density (Re)


Jd=2*Pi*f*epsr*eps0*E ! displacement current density (Im)

/nopr
/PREP7
et,1,SOLID236,1 ! AZ+VOLT
mp,perx,1,epsr
mp,rsvx,1,rho
mp,murx,1,1

cyl4,,,,,a,90,d
esize,d/2
vmesh,all

! Electric boundary conditions and loads


nsel,s,loc,z,0
cp,1,volt,all ! define bottom electrode
*get,n_grd,node,0,num,min ! get master node on bottom electrode
nsel,s,loc,z,d
cp,2,volt,all ! top electrode
*get,n_load,node,0,num,min ! get master node on top electrode
nsel,all
d,n_grd,volt,0 ! ground bottom electrode
d,n_load,volt,E*d ! apply voltage load to top electrode

! Magnetic boundary conditions for 1/4 symmetry model


nsel,s,loc,z,0
nsel,a,loc,z,d
csys,1
nsel,a,loc,x,a
csys,0
d,all,az,0 ! flux-parallel BCs
nsel,all
fini

/solu
antype,harm
harfrq,,f
outres,all,all
kbc,1 ! stepped load
solve
fini

/com,
/com, Compare ANSYS and Expected H-field
/com,
/post1
path,path1,2,10,20
ppath,1,,0,0,0
ppath,2,,0,a,0

/com,
/com, - Real solution
/com,
set,1,1
plvect,ef,,,,vect,elem,on ! electric field
plvect,jt,,,,vect,elem,on ! conduction current
plvect,h,,,,vect,elem,on ! magnetic field

pdef,Hsum,h,sum,avg
pcalc,add,Hsum_tar,s,,Jc/2

/tlabel,-0.2,0.8,H-field (A/m) - Real part


plpath,Hsum,Hsum_tar
prpath,Hsum,Hsum_tar

/com,

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 159
3-D Harmonic Magnetic Analysis (Edge-Based)

/com, - Imaginary solution


/com,
set,1,1,,1
plvect,js,,,,vect,elem,on ! displacement current
plvect,h,,,,vect,elem,on ! magnetic field

pdef,Hsum,h,sum,avg
pcalc,add,Hsum_tar,s,,Jd/2

/ann,dele
/tlabel,-0.2,0.8,H-field (A/m) - Imaginary part
plpath,Hsum,Hsum_tar
prpath,Hsum,Hsum_tar

/ann,dele
fini

7.4.4. Example: Transformer Analysis


This example problem demonstrates an harmonic analysis of a transformer.

7.4.4.1. Problem Description and Results


A transformer consists of primary and secondary coils wound around a ferromagnetic core of high
permeability μ. The coils have the same inner and outer radii R1 = 1.5 cm and R2 = 2 cm, respectively,
and same height H = 4 cm. The primary coil is characterized by resistance RP = 24 Ω and the number
of turns NP. The secondary coil resistance is RS = RP(NS/NP), where NS is the number of turns in the
secondary coil. An additional high resistance R = 10000 Ω is attached to the secondary coil to minimize
the output current.

The primary coil is energized with an alternating voltage of magnitude V = 1 Volt and frequency f = 50
Hz. The electric current in the primary coil creates a time-harmonic magnetic flux in the core, which
induces a voltage in the secondary coil. A harmonic stranded coil analysis is performed to determine
the voltage and electromotive force (EMF) induced in the secondary coil. A parametric analysis is also
performed to determine how the core permeability μ and the ratio of the number of turns in the coils
NS/NP affect the ratio of voltages in the secondary and primary coils.

The coils are modeled using the stranded coil option (KEYOPT(1) = 2) of SOLID236. The core and the
surrounding air are modeled using the magnetic option (KEYOPT(1) = 0) of SOLID236. The resistance
attached to the secondary coil is modeled using the resistor option (KEYOPT(1) = 0) of CIRCU124. Only
a quarter symmetry sector is considered for the finite element model (Figure 7.12: Finite Element Model
of the Transformer (1/4 Symmetry) (p. 161)). Flux parallel magnetic boundary conditions (AZ = 0) are
imposed on the exterior surfaces of the air domain and on the symmetry planes. The VOLT and EMF
degrees of freedom are coupled in the coils.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
160 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Harmonic Magnetic (Edge-Based) Analyses

Figure 7.12: Finite Element Model of the Transformer (1/4 Symmetry)

The first harmonic analysis (see the Command Listing) was performed with a core relative permeability
μ = 100000 and a coil turn ratio NS/NP = 200. The resulting voltage and EMF in the coils are shown in
the following table.

Table 7.2: Coil Voltage and EMF (μ = 100000 and NS/NP = 200)

Coil Voltage EMF


Primary 1+j*0 0.970+j*0.142
Secondary -1.919-j*0.281 -1.937-j*0.284

The magnetic flux in the core (real and imaginary) are shown in the following figures.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 161
3-D Harmonic Magnetic Analysis (Edge-Based)

Figure 7.13: Magnetic Field (Real) in the Core (μ = 100000 and NS/NP = 200)

Figure 7.14: Magnetic Field (Imaginary) in the Core (μ = 100000 and NS/NP = 200)

The current density in the primary and secondary coils (real and imaginary) are shown in the following
figures.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
162 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Harmonic Magnetic (Edge-Based) Analyses

Figure 7.15: Current Density (Real) in the Coils (μ = 100000 and NS/NP = 200)

Figure 7.16: Current Density (Imaginary) in the Coils (μ = 100000 and NS/NP = 200)

As shown in the following tables, several subsequent harmonic analyses were performed to study the
dependence of the voltage ratio in the coils as a function of core permeability and the ratio of the
number of turns.

Table 7.3: Secondary and Primary Coil Voltage Ratio as a Function of Core Permeability μ (NS/NP
= 200)

Core permeability μ Voltage Ratio VS/VP


1000 0.129

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 163
3-D Harmonic Magnetic Analysis (Edge-Based)

Core permeability μ Voltage Ratio VS/VP


10000 1.098
100000 1.94

Table 7.4: Secondary and Primary Coil Voltage Ratio as a Function of Ratio of Turns NS/NP (μ =
100000)

Ration of Turns NS/NP Voltage Ratio VS/VP


200 1.94
300 2.84
400 3.67

7.4.4.2. Command Listing


/title, 3-D Transformer Harmonic Response, 1/4 symmetry
/vie,1,2,-1,3
/pnu,mat,1
/num,1
pi=acos(-1)

! *** Model parameters


a_core=0.010 ! core cross-section width
w_core=0.075 ! overall core width
h_core=0.075 ! overall core height

r1_coil=0.015 ! inner radius, both coils


r2_coil=0.020 ! outer radius, both coils
h_coil=0.040 ! height, both coils

d_dmn=0.025 ! depth of surrounding domain

esz1=a_core/3 ! element size, components


esz2=3*esz1 ! element size, surrounding domain

mu_core=100000 ! core permeability

! *** Primary coil


Np=100 ! # of turns
Rp=24 ! DC resistance (ohms)
care_left=(r2_coil-r1_coil)*h_coil ! cross-sectional area
volu_left=pi*(r2_coil**2-r1_coil**2)*h_coil ! volume
Vp=1 ! voltage (V)

! *** Secondary coil


Ns=200 ! # of turns
Rs=Rp*(Ns/Np)**2 ! DC resistance (ohms)
care_right=(r2_coil-r1_coil)*h_coil ! cross-sectional area
volu_right=pi*(r2_coil**2-r1_coil**2)*h_coil ! volume

R=1e4 ! resistance attached to the secondary coil

frqncy=50 ! operating frequency (Hz)


symm=4 ! symmetry factor

/nopr
! *** Geometry
/PREP7
vsel,none ! core
bloc,-w_core/2,w_core/2,,h_core/2,-a_core/2,0
cm,scrap1_v,volu
vsel,none
bloc,-(w_core/2-a_core),w_core/2-a_core,,h_core/2-a_core,-a_core/2,0
cm,scrap2_v,volu

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
164 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Harmonic Magnetic (Edge-Based) Analyses

cmse,s,scrap1_v
cmse,a,scrap2_v
vsbv,scrap1_v,scrap2_v
cm,core_v,volu
vatt,2,2,2

wpcs,-1,0 ! left coil ESYS


wpof,-w_core/2+a_core/2
wpro,,-90
cswp,11,1

wpcs,-1,0 ! right coil ESYS


wpof,w_core/2-a_core/2
wpro,,-90
cswp,12,1

csys

vsel,none ! left coil


wpcs,-1,11
cyli,r1_coil,r2_coil,0,h_coil/2,0,90
cyli,r1_coil,r2_coil,0,h_coil/2,90,180
vatt,3,3,3,11

vsel,none ! right coil


wpcs,-1,12
cyli,r1_coil,r2_coil,0,h_coil/2,0,90
cyli,r1_coil,r2_coil,0,h_coil/2,90,180
vatt,4,4,4,12

alls
cm,keep_v,volu
*get,xmin,kp,,mnloc,x
*get,xmax,kp,,mxloc,x
*get,ymax,kp,,mxloc,y
*get,zmin,kp,,mnloc,z

wpcs,-1,0 ! surrounding domain


vsel,none
bloc,xmin-d_dmn,xmax+d_dmn,,ymax+d_dmn,zmin-d_dmn,0
cm,scrap_v,volu

cmse,all
vsbv,scrap_v,keep_v,,dele,keep
cmse,u,keep_v
cm,air_v,volu
vatt,1,1,1

alls
vplo

! *** FE model
et,1,236 ! air
mp,murx,1,1

et,2,236 ! core (laminated, non-conducting)


mp,murx,2,mu_core

et,3,236,2 ! left primary coil


mp,murx,3,1
r,3,care_left,Np,volu_left,0,1,0 ! left coil data
rmore,Rp,symm

et,4,236,2 ! right secondary coil


mp,murx,4,1
r,4,care_right,Ns,volu_right,0,1,0 ! right coil data
rmore,Rs,symm

! *** Mesh
numm,kp,1e-8,1e-8
esiz,esz1
vsel,s,mat,,3,4

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 165
3-D Harmonic Magnetic Analysis (Edge-Based)

vmes,all
vsel,s,mat,,2
vswe,all

vsel,s,mat,,1
msha,1
esiz,esz2
vmes,all
alls

! *** Boundary conditions and loads


asel,s,ext ! flux parallel exterior
csys
asel,u,loc,y
da,all,az

vsel,s,mat,,3 ! left primary coil


alls,belo,volu
cp,1,emf,all
cp,2,volt,all
nd_p=ndnext(0)
alls

vsel,s,mat,,4 ! right secondary coil


alls,belo,volu
cp,3,emf,all
cp,4,volt,all
nd_s=ndnext(0)
alls

d,nd_p,volt,Vp

! *** Circuit
et,5,124,0 ! resistor connected to the secondary coil
r,5,R

*get,nmax,node,,num,max

n,nmax+1,0,h_coil/2
type,5
real,5
e,nd_s,nmax+1

d,nmax+1,volt,0 ! ground
csys

eplo
fini

! *** Solution
/solu
antype,harmonic
harf,frqncy
solve
fini

! *** Post-processing
/post1
set,,,,0 ! Real solution set
Vp_real=volt(nd_p)
Vs_real=volt(nd_s)

/com,
/com, *** Real solution
/com, Vp = %Vp_real%
/com, Vs = %Vs_real%
/com,
vsel,s,mat,,2,4
alls,belo,volu
plve,jt,,,,vect,,on
plve,b,,,,vect,,on
plnsol,emf

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
166 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Harmonic Magnetic (Edge-Based) Analyses

alls

set,,,,1 ! Imaginary solution set


Vp_imag=volt(nd_p)
Vs_imag=volt(nd_s)

/com,
/com, *** Imag solution
/com, Vp = %Vp_imag%
/com, Vs = %Vs_imag%
/com,
vsel,s,mat,,2,4
alls,belo,volu
plve,jt,,,,vect,,on
plve,b,,,,vect,,on
plnsol,emf
alls

Vp = sqrt(Vp_real**2 + Vp_imag**2)
Vs = sqrt(Vs_real**2 + Vs_imag**2)
/com,
/com, *** Secondary to Primary Coil Voltage Ratio = %Vs/Vp%
fini

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 167
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
168 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 8: 3-D Transient Magnetic Analysis (Edge-Based)
Transient edge-based analyses use the SOLID236 and SOLID237 elements. See Elements Used in Edge-
Based Analysis (p. 114) and Characteristics and Settings for Physical Regions of a Model (p. 115) for more
information about the edge-based analysis.

The following edge-based transient analysis topics are available:


8.1. Analysis Considerations
8.2. Performing a Transient Edge-Based Analysis
8.3. Reviewing Results
8.4. Example 3-D Transient Magnetic Edge-Based Analyses

8.1. Analysis Considerations


Before setting up your analysis, consider the following:

• When modeling stranded conductors using SOLID236 or SOLID237 with KEYOPT(1) = 0, the applied current
density J specified on the BFE command (BFE,,JS) must satisfy the solenoidal condition . For more
details about the solenoidal condition, see Analysis Considerations (p. 117).

• In transient electromagnetic with electric potential (VOLT) degree of freedom using SOLID236 and SOLID237,
the THETA integration parameter is set to 1.0 by default. To overwrite this default, issue the TINTP command.

8.2. Performing a Transient Edge-Based Analysis


Follow these steps to perform a transient edge-based magnetic analysis:

1. Specify the electromagnetics edge formulation by choosing Main Menu> Preferences> Electromag-
netics: Magnetic-Edge from the GUI. Doing so lets you filter out other ANSYS commands not involved
in an edge-based magnetic analysis.

2. Define a jobname and title for your analysis. To do so, use the commands or GUI paths shown below:
Command(s): /FILNAME and /TITLE
GUI: Utility Menu> File> Change Jobname
Utility Menu> File> Change Title

3. Enter the ANSYS preprocessor to begin defining your model:


Command(s): /PREP7
GUI: Main Menu> Preprocessor

4. Choose element type SOLID236 or SOLID237 via either of the following:


Command(s): ET
GUI: Main Menu> Preprocessor> Element Type> Add/Edit/Delete

5. Select the formulation option suitable for the specified element type and physics region.
Command(s): KEYOPT
GUI: Main Menu> Preprocessor> Element Type> Add/Edit/Delete

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 169
3-D Transient Magnetic Analysis (Edge-Based)

6. Define material properties. 2-D Static Magnetic Analysis (p. 13) describes the material properties you
can use and tells you how to specify them. For an eddy current region, you must specify the electric
resistivity, RSVX.

7. Build the model. For instructions on building and meshing models, see the Modeling and Meshing
Guide.

8. Assign attributes to the volumes (that is, associate the element types, the conducting and nonconduct-
ing regions, the material properties, etc. with the appropriate volumes).
Command(s): VATT
GUI: Main Menu> Preprocessor> Meshing> Mesh Attributes> Define

9. Mesh the model, specifying brick or tetrahedral element shape.


Command(s): VMESH
GUI: Main Menu> Preprocessor> Meshing> Mesh> Volumes> Mapped

10. Enter the SOLUTION processor, using either of the following:


Command(s): /SOLU
GUI: Main Menu> Solution

11. Apply flux-parallel and flux-normal solid model boundary conditions to the boundaries.
Command(s): DA
GUI: Main Menu> Solution> Define Loads> Apply> Magnetic> Boundary

For edge-based analyses, the label AZ (when set to zero) applies the flux-parallel boundary
condition. No prescription is required to set flux-normal, because it is the natural boundary
condition. In the rare case where the AZ = 0 condition is not general enough for flux-parallel
conditions, you can prescribe constraints using individual D commands (or the equivalent GUI
path).

12. Apply source loading. See Characteristics and Settings for Physical Regions of a Model (p. 115) for more
information on source loading.

Note

You can use constraint equations to define cyclic symmetry.

13. Choose the transient analysis type.


Command(s): ANTYPE,TRANSIENT,NEW
GUI: Main Menu> Solution> Analysis Type> New Analysis> Transient

To restart a previous analysis (for example, to specify additional loads), issue the command
ANTYPE,TRANSIENT,REST. You can restart an analysis only if you previously completed a 3-D
edge-based magnetic analysis, and the files Jobname.EMAT, Jobname.ESAV, and Job-
name.DB from the previous run are available.

14. Define analysis options.

Next, you define which solution method and which solver you want to use.

To select a solution method, use either of the following:


Command(s): TRNOPT
GUI: Main Menu> Solution> Analysis Type> New Analysis>Transient

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
170 of ANSYS, Inc. and its subsidiaries and affiliates.
Performing a Transient Edge-Based Analysis

Transient magnetic analyses require the full solution method.

Edge formulation analyses can use the sparse solver (default), the Jacobi Conjugate Gradient
(JCG) solver, or the Incomplete Cholesky Conjugate Gradient (ICCG) solver. Select an equation
solver using either of the following:
Command(s): EQSLV
GUI: Main Menu> Solution> Analysis Type> Analysis Options

15. Choose load step options. Load step options are described in the following sections.

8.2.1. Time Option


This option specifies time at the end of the load step.
Command(s): TIME
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Time/Frequenc> Time - Time Step
Main Menu> Solution> Load Step Opts> Time/Frequenc> Time - Time Step

8.2.2. Number of Substeps or Time Step Size


The integration time step is the time increment used in the time integration scheme. You can specify
it directly via the DELTIM command or its equivalent menu path, or indirectly via NSUBST or its menu
path equivalent.

Time step size determines the accuracy of your solution. The smaller the time step size, the higher the
accuracy. The size of the first integration time step following any large step change in loading conditions
is especially critical. You can reduce inaccuracies such as thermal overshoot by reducing the integration
time step size.

Caution

Avoid using extremely small time steps, especially when establishing initial conditions. Very small
numbers can cause calculation errors in ANSYS. For instance, on a problem time scale of unity,
time steps smaller that 1E-10 can cause numerical errors.

If you step-apply loads, ANSYS applies the entire load value at the first substep and holds it constant
for the remainder of the load step. If you ramp loads (the default), ANSYS increments the load values
at each substep.
Command(s): NSUBST, DELTIM
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Time/Frequenc> Time and Substps
Main Menu> Solution> Load Step Opts> Time/Frequenc> Time and Substps
Main Menu> Solution> Load Step Opts> Time/Frequenc> Time - Time Step

8.2.3. Automatic Time Stepping


Also called time step optimization in a transient analysis, automatic time stepping allows ANSYS to de-
termine the size of load increments between substeps. It also increases or decreases the time step size
during solution, depending on how the model responds.

For most problems, you should turn on automatic time stepping and set upper and lower limits for the
integration time step. The limits help to control how much the time step varies.
Command(s): AUTOTS
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Time/Frequenc> Time and Substps

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 171
3-D Transient Magnetic Analysis (Edge-Based)

Main Menu> Solution> Load Step Opts> Time/Frequenc>Time and Substps


Main Menu> Solution> Load Step Opts> Time/Frequenc>Time - Time Step

8.2.4. Newton-Raphson Options


These options specify how often the tangent matrix is updated during a nonlinear solution. Available
options are:

• Program-chosen (default)

• Full

• Modified

• Initial-stiffness.

For a nonlinear analysis, the full Newton-Raphson option is recommended. The adaptive descent option
may help convergence in transient problems. To specify Newton-Raphson options, use either of the
following:
Command(s): NROPT
GUI: Main Menu> Solution> Analysis Type> Analysis Options

8.2.5. Number of Equilibrium Iterations


This option obtains a converged solution at each substep. The default is up to 25 equilibrium iterations,
but you may need to increase the number depending on the degree of nonlinearity. For linear transient
analysis, specify one iteration.
Command(s): NEQIT
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Nonlinear> Equilibrium Iter
Main Menu> Solution> Load Step Opts> Nonlinear> Equation Iter

8.2.6. Convergence Tolerances


ANSYS considers a nonlinear solution to be converged whenever specified convergence criteria are
met. Convergence checking may be based on magnetic potential (A), magnetic current segment (CSG),
or both. You specify a typical value for the desired item (VALUE field) and a tolerance about the typical
value (TOLER field). ANSYS then calculates the convergence criterion via VALUE X TOLER. For example,
it you specify 5000 as the typical value for magnetic current segment and 0.001 as the tolerance, the
convergence criterion for magnetic flux would be 5.0.

ANSYS, Inc. recommends that VALUE be left to the default (program-calculated) and that TOLER be
set to 1.0E-3.

For potentials, ANSYS compares the change in nodal potentials between successive equilibrium iterations
(ΔA = Ai - Ai-1) to the convergence criterion.

For magnetic current segment, ANSYS compares the out-of-balance load vector to the convergence
criterion. If the solution dies not converge within the specified number of equilibrium iterations, the
program either stops or moves on to the next load step, depending on whether you activated the option
to terminate an unconverged solution (see below).
Command(s): CNVTOL
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Nonlinear> Convergence Crit.
Main Menu> Solution> Load Step Opts> Nonlinear> Convergence Crit.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
172 of ANSYS, Inc. and its subsidiaries and affiliates.
Performing a Transient Edge-Based Analysis

8.2.7. Terminate an Unconverged Solution


If ANSYS cannot converge the solution within the specified number of equilibrium iterations, ANSYS
either stops the solution or moves on to the next load step, depending on what you specify as the
stopping criteria.

8.2.8. Control Printed Output


This option enables you to include any results data in the printed output file (Jobname.OUT).
Command(s): OUTPR
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Output Ctrls> Solu Printout
Main Menu> Solution> Load Step Opts> Output Ctrls> Solu Printout

8.2.9. Control Database and Results File Output


This option controls what data goes to the results file (Jobname.RMG).

Note

By default, the ANSYS program writes only the last substep of each load step to the results
file. If you want all substeps (that is, the solution at all frequencies) on the results file, specify
a frequency or ALL or 1.

Command(s): OUTRES
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Nonlinear> Convergence Crit
Main Menu> Solution> Load Step Opts> Nonlinear> Convergence Crit

8.2.10. Saving a Backup Copy of the Database


Use the SAVE_DB button on the ANSYS Toolbar to save a backup copy of the ANSYS database. This
enables you to retrieve your model should your computer fail while analysis is in progress. To retrieve
a model, re-enter ANSYS and use one of the following:
Command(s): RESUME
GUI: Utility Menu> File> Resume Jobname.db

8.2.11. Starting the Solution


In this step, you initiate the solution for all loads steps using one of the following:
Command(s): LSSOLVE
GUI: Main Menu> Solution> Solve> From LS Files

If only a single load step is used, you may use one of the following:
Command(s): SOLVE
GUI: Main Menu> Solution> Solve> Current LS

When you use the edge-element formulation, by default the ANSYS program gauges the problem domain
over all selected elements and nodes. Gauging removes unneeded degrees of freedom by setting them
to zero; this in turn enables ANSYS to solve your analysis problem faster. You can control gauging using
either of the following:
Command(s): GAUGE
GUI: Main Menu> Solution> Load Step Opts> Magnetics> Options Only> Gauging

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 173
3-D Transient Magnetic Analysis (Edge-Based)

Gauging is required for static electromagnetic analyses with elements using an edge formulation.
Therefore, in most cases you should not turn automatic gauging off. The GAUGE,OFF command is de-
signed for expert ANSYS users who wish to apply their own gauging. The ANSYS program removes the
extra constraints set by gauging after solution; therefore, gauging is transparent to users.

1. To leave the SOLUTION processor, use one of the following:


Command(s): FINISH
GUI: Main Menu> Finish

2. Do postprocessing and review the analysis results, as described below.

8.3. Reviewing Results


The program writes results from a transient analysis to the magnetic results file, Jobname.RST. Results
include the data listed below:

Primary data: Nodal DOFs (AZ, VOLT, EMF)

Derived data:

• Nodal magnetic flux density (BX, BY, BZ, BSUM)

• Nodal magnetic field intensity (HX, HY, HZ, HSUM)

• Nodal electric field intensity (EFX, EFY, EFZ, EFSUM) [1]

• Nodal electric conduction current density JC (JCX, JCY, JCZ, JCSUM) [1]

• Nodal magnetic forces (FMAG: components X, Y, Z, SUM)

• Total current density (JTZ, JTY, JTZ, JTSUM)

• Joule heat per unit volume (JHEAT)

• Element magnetic energy (SENE)

[1] Available only in an electromagnetic analysis using SOLID236 and SOLID237.

Additional data are available. See the Element Reference for details.

You can review analysis results in POST1, the general postprocessor, or in POST26, the time-history
postprocessor:

• POST26 enables you to review results at specific points in the model over the entire transient.

• POST1 enables you to review results over the entire model at specific time points.

To choose a postprocessor, choose one of the following:


Command(s): /POST1 or /POST26
GUI: Main Menu> General Postproc
Main Menu> TimeHist Postpro

For a complete description of all postprocessing functions, see the Basic Analysis Guide.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
174 of ANSYS, Inc. and its subsidiaries and affiliates.
Reviewing Results

8.3.1. Reading Results in POST26


3-D Magnetostatics and Fundamentals of Edge-Based Analysis (p. 113) of this manual summarizes the
results available for postprocessing.

To review results in POST26, the time-history postprocessor, the ANSYS database must contain the same
model for which the solution was calculated, and the Jobname.RST file (the results file) must be
available. If the model is not in the database, restore it using the command or menu path listed below
and then use the SET command or its equivalent menu path to read in the desired set of results.
Command(s): RESUME
GUI: Utility Menu> File> Resume Jobname.db

POST26 works with tables of result item versus time, known as variables. Each variable is assigned a
reference number, with variable number 1 reserved for time. Therefore, the first thing you need to do
is define the variables.

To define primary data variables, use either of the following:


Command(s): NSOL
GUI: Main Menu> TimeHist Postpro> Define Variables

To define derived data variables, use either of the following:


Command(s): ESOL
GUI: Main Menu> TimeHist Postpro> Define Variables

To define reaction data variable, use either of the following:


Command(s): RFORCE
GUI: Main Menu> TimeHist Postpro> Define Variables

Once you have defined these variables, you can graph them (versus time or any variable). To do so, use
this command or menu path:
Command(s): PLVAR
GUI: Main Menu> TimeHist Postpro> Graph Variables

To list the variables, use this command or menu path:


Command(s): PRVAR
GUI: Main Menu> TimeHist Postpro> List Variables

To list only the extreme variable values, use this command or menu path:
Command(s): EXTREM
GUI: Main Menu> TimeHist Postpro> List Extremes

By reviewing the time-history results at strategic points throughout the model, you can identify the
critical time points for further POST1 postprocessing.

To calculate and summarize electromagnetic forces, power loss, energy, and current on element com-
ponents (created in the PREP7 preprocessor via the CM command or Utility Menu> Select>
Comp/Assembly> Create Comp/Assembly), you can use either of the following:
Command(s): PMGTRAN
GUI: Main Menu> TimeHist Postpro> Elec&Mag> Magnetics

POST26 offers many other functions, such as performing math operations among variables, moving
variables into array parameters, etc. For more information, see the Basic Analysis Guide.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 175
3-D Transient Magnetic Analysis (Edge-Based)

8.3.2. Reading Results in POST1


To review results in POST1, the ANSYS database must contain the same model for which the solution
was calculated. Also, the results file (Jobname.RST) must be available.

To read results at the desired time point into the database, use either of the following:
Command(s): SET,,,,,TIME
GUI: Utility Menu> List> Results> Load Step Summary

If you specify a time value for which no results are available, ANSYS performs linear interpolation to
calculate the results at that time. The program uses the last time point if the time specified is beyond
the time span of the transient analysis. You can also identify the results to be read by their load step
and substep numbers.

You can display contours of electric scalar potential (VOLT) magnetic flux density (BX, BY, BZ, SUM),
magnetic field intensity (HX, HY, HZ, SUM), electric field intensity (EFX, EFY, EFZ, EFSUM) and electric
conduction current density (JCX, JCY, JCZ, JCSUM) using either of the following methods:
Command(s): PLESOL, PLNSOL
GUI: Main Menu> General Postproc> Plot Results> Contour Plot> Element Solution
Main Menu> General Postproc> Plot Results> Contour Plot> Nodal Solu

8.3.2.1. Calculating Other Items of Interest


You can calculate many other items of interest (such as global forces, torque, source input energy, in-
ductance, flux linkages, and terminal voltage) from the data available in the database in postprocessing.
The ANSYS command set supplies the following macros for these calculations:

• The SENERGY macro determines the stored magnetic energy or co-energy.

• The EMFT macro sums up electromagnetic nodal forces. (see Calculating Magnetic Force and
Torque (p. 121))

• The MMF macro calculates magnetomotive force along a path.

• The PMGTRAN macro summarizes electromagnetic results from a transient analysis.

• The POWERH macro calculates the RMS power loss in a conducting body.

For more discussion of these macros, see Electric and Magnetic Macros (p. 193).

8.4. Example 3-D Transient Magnetic Edge-Based Analyses


The following examples are available:
8.4.1. Example: Transient Magnetic Field in a Conducting Block
8.4.2. Other Examples

8.4.1. Example: Transient Magnetic Field in a Conducting Block


This example problem demonstrates the calculation of the transient magnetic field in a copper block
placed between the pole-pieces of a C-magnet subject to a sinusoidal current excitation. A similar
magnetic circuit is described in P.P. Silvester and R.L. Ferrari “Finite Elements for Electrical Engineers”
(Third edition), Cambridge University Press (1996), pp. 365-367. In the present example, magnetic circuit
parameters have been chosen arbitrarily and the simulation results differ from those in the reference.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
176 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Transient Magnetic Edge-Based Analyses

8.4.1.1. Problem Description and Results


A 2.5 x 5 x 2 cm copper block with electric resistivity ρ = 1.7e-7 Ωm is placed between the pole-pieces
of a C-magnet. The magnet consists of a 2.5 cm thick C-shaped iron core with relative permeability μ
= 1000 and a 4 cm long cylindrical coil with an average radius of 5 cm carrying a 50 Hz sinusoidal current.
The problem considers a half symmetry model of the electromagnet and the block (Figure 8.1: Finite
Element Model of the C-Magnet and the Conducting Block (p. 177)) which also includes a 10 cm thick
layer of surrounding air.

Figure 8.1: Finite Element Model of the C-Magnet and the Conducting Block

Element SOLID236 is used for all parts of the model. The conducting block is modeled using the elec-
tromagnetic analysis option (KEYOPT(1)=1) with time-integrated electric potential (KEYOPT(2)=2). The
coil is modeled as a stranded conductor (KEYOPT(1)=0) with a sinusoidal current density (Figure 8.2: Cur-
rent Density in the Coil (p. 178)) applied as a tabular JS-body load (BFV,,JS,,%jcoil%) with time as a
primary variable. The same magnetic analysis option (KEYOPT(1)=0) is used to discretize the iron core
(bricks) and the air (tetrahedra).

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 177
3-D Transient Magnetic Analysis (Edge-Based)

Figure 8.2: Current Density in the Coil

Flux parallel magnetic boundary conditions (AZ = 0) are imposed on the exterior surfaces of the domain
and on the symmetry plane. Zero potential (VOLT = 0) electric boundary conditions are applied on the
symmetry plane of the conducting block.

A transient electromagnetic analysis is performed during one full cycle T (T = 0.02 s) to determine the
magnetic field in the conducting block. Note that to minimize the size of the output files, only the ele-
ment results for the element component CCB that includes the coil, core and the block
(OUTRES,ESOL,,CCB) are stored.

The progression of the magnetic field through the copper block is shown in Figure 8.3: Magnetic Field
in the Copper Block at Successive Time Intervals (p. 179) at five successive time intervals T/40, T/4, T/2,
3T/4, and T.

Figure 8.4: Eddy Currents in the Conducting Block (p. 181) shows the eddy currents distribution in the
block at the end of the cycle.

Figure 8.5: Magnetic Field between the Pole-Pieces with and without the Copper Block (p. 182) shows
the magnetic field H at the center-point between the pole-pieces in the C-magnet with the copper
block in place and without it. The figure demonstrates that the field inside the copper block is attenuated
and lagging in phase compared to the external magnetic field.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
178 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Transient Magnetic Edge-Based Analyses

Figure 8.3: Magnetic Field in the Copper Block at Successive Time Intervals

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 179
3-D Transient Magnetic Analysis (Edge-Based)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
180 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Transient Magnetic Edge-Based Analyses

Figure 8.4: Eddy Currents in the Conducting Block

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 181
3-D Transient Magnetic Analysis (Edge-Based)

Figure 8.5: Magnetic Field between the Pole-Pieces with and without the Copper Block

8.4.1.2. Command Listing


/title, Transient Analysis of Magnetic Field in a Copper Block
/VUP,1,z
/VIEW,1,3,2,1
/PNU,mat,1
/NUM,1

! *** Problem Parameters


pi=acos(-1)
muo=pi*4e-7

! --- Geometry
a=0.05 ! core and copper block cross section edge length, m
b=0.1 ! distance between inner surfaces of magnetic circuit, m
c=0.02 ! copper block thickness, m
gap=0.005 ! pole face/copper block gap,m

r=0.05 ! coil average radius, m


l=0.04 ! coil length, m
ac=0.025 ! coil cross section edge length, m

dext=0.1 ! extent of domain beyond modeled components, m

esz1=0.005 ! element size of conductive block


esz2=0.01 ! element size of core and coil
esz3=0.05 ! mesh size of surrounding domain

! --- Material properties


muc=1000 ! core relative permeability
mub=1 ! conducting block relative permeability
rho=1.7e-8 ! electric resistivity of copper (Ohm-m)

! --- Excitation parameters


J=1e6 ! coil current density amplitude (A/m^2)
ncyc=1.0 ! number of cycles
nsubT=40 ! number of time steps per cycle
f=50 ! frequency, Hz

! --- Derived parameters


skin=sqrt(rho/(pi*mub*muo*f)) ! skin depth

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
182 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Transient Magnetic Edge-Based Analyses

T=1/f ! time period


tend=ncyc*T ! solution time
nsubs=nsubT*ncyc ! total number of time steps

! table array - sin current vs. time


*dim,jcoil,table,nsubs

*do,i,1,nsubs
jcoil(i,1)=J*sin(2*pi*f*(i/nsubs)*T)
jcoil(i,0)=(i/nsubT)*T
*enddo

/axl,x,Time (s)
/axl,y,Coil Current Density (A/m^2)
*vplo,jcoil(1,0),jcoil(1,1)
/com,
/com, *** BLOCK EDGE LENGTH = %a% m, SKIN DEPTH = %skin% m
/com,

/nopr
! *** FE Model
/PREP7
! --- Core
vsel,none
block,0,-a/4, -a/2,a/2, -b/2-5*a/4,b/2+5*a/4
block,0,-a/4, -a/2,2*a+b, -b/2-5*a/4,-b/2-a/4
block,0,-a/4, -a/2,2*a+b, b/2+a/4,b/2+5*a/4
block,0,-a/4, a+b,2*a+b, -b/2-5*a/4,-(gap+c/2)
block,0,-a/4, a+b,2*a+b, gap+c/2,b/2+5*a/4
vovl,all
vatt,2,2,2

! --- Conducting block


vsel,none
block,0,-a/4, a+b,2*a+b, -c/2,c/2
vatt,3,3,3

! --- Coil
vsel,none
cyli,r-ac/2,r+ac/2, -l/2,l/2, 90,180
cyli,r-ac/2,r+ac/2, -l/2,l/2, 180,270
allsel,belo,volu
numm,kp
vatt,4,4,4,14
allsel

cm,keep_v,volu

! --- Air box


*get,xmin,kp,,mnloc,x
*get,ymin,kp,,mnloc,y
*get,ymax,kp,,mxloc,y
*get,zmin,kp,,mnloc,z
*get,zmax,kp,,mxloc,z
vsel,none
block,xmin-dext,0, ymin-dext,ymax+dext, zmin-dext,zmax+dext
cm,scrap_v,volu
allsel
vsbv,scrap_v,keep_v,,dele,keep
cmse,u,keep_v
cm,air_v,volu
vatt,1,1,1
allsel

! --- Air
et,1,236 ! AZ
mp,murx,1,1

! --- Core
et,2,236 ! AZ
mp,murx,2,muc

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 183
3-D Transient Magnetic Analysis (Edge-Based)

! --- Conducting block


et,3,236,1,2 ! AZ + time-integrated VOLT
mp,murx,3,mub
mp,rsvx,3,rho

! --- Coil
et,4,236 ! AZ
mp,murx,4,1

cswp,14,1 ! cylindrical ESYS for coil current direction


csys

vsel,s,mat,,3 ! brick mesh for the block


esize,esz1
vmesh,all

vsel,s,mat,,2,4,2 ! brick mesh for the coil and core


esize,esz2
vmesh,all

vsel,s,mat,,1 ! mesh air box (hex-to-tet)


esize,esz3
mshape,1
vmes,all
allsel
eplo

! Define Coil-Core-Block element component


esel,s,type,,2,4
cm,CCB,elem
eplo
allsel

! *** Boundary Conditions and Loads


asel,s,ext
da,all,az ! flux parallel magnetic BCs

vsel,s,mat,,3
allsel,belo,volu
asel,r,loc,x
da,all,volt ! current normal to symmetry plane

vsel,s,mat,,4
bfv,all,js,0,%jcoil%,0 ! tabular current density load
allsel
fini

! *** SOLVE
/SOLU
antype,trans
time,tend
nsub,nsubs
outres,esol,all,CCB
kbc,1 ! step applied load
solve
fini

! *** POST PROCESS


/POST1
!set,,,,,0 ! results at time=0 s
!set,,,,,T/4 ! results at time=T/4 s
!set,,,,,T/2 ! results at time=T/2 s
!set,,,,,3*T/4 ! results at time=3*T/4 s
set,last,last
cmsel,s,CCB ! select coil, core and conducting block
plve,h,,,,vect,,on ! plot magnetic field
esel,s,mat,,3 ! select conducting block
plve,jt,,,,vect,,on ! plot current density
allsel
fini

*dim,Hz,array,nsubs

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
184 of ANSYS, Inc. and its subsidiaries and affiliates.
Example 3-D Transient Magnetic Edge-Based Analyses

/post26
ansol,2,node(0,3*a/2+b,0),h,z,Hz_copper
/axl,x,Time (s)
/axl,y,Hz @ Center of Block (A/m)
plva,2
vget,Hz,2
fini

/PREP7
et,3,236 ! replace copper block by an 'air' block
fini

! *** Repeat solution


/SOLU
antype,trans
time,tend
nsub,nsubs
outres,esol,all,CCB
kbc,1 ! step applied load
solve
fini

/POST26
ansol,2,node(0,3*a/2+b,0),h,z,Hz_air
/axl,x,Time (s)
/axl,y,Hz @ Center of Block (A/m)
vput,Hz,3,,,Hz_copper
plvar,2,3
fini

8.4.2. Other Examples


Another ANSYS, Inc. publication, the Mechanical APDL Verification Manual, contains other examples of
various types of analyses, including the following 3-D transient edge-based magnetic analysis example:

• VM121 -- Voltage Forced Coil (1/8 Symmetry)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 185
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
186 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 9: Electromagnetic Linear Perturbation Analysis
A linear perturbation electromagnetic analysis can be used to solve a linear problem following a non-
linear electromagnetic analysis. The total tangent matrix form the nonlinear solution (base analysis) is
used in the linear perturbation analysis to capture the linear and nonlinear magnetic effects at the op-
erating point of the nonlinear analysis.

The linear perturbation electromagnetic analysis can be static or harmonic.

These electromagnetic solid elements support linear perturbation analysis: PLANE233, SOLID236 and
SOLID237.

The following related topics are available:


9.1. Performing an Electromagnetic Linear Perturbation Analysis
9.2. Example: Electromagnetic Linear Perturbation Analysis

For more information about linear perturbation, see Linear Perturbation Analysis in the Structural Ana-
lysis Guide.

9.1. Performing an Electromagnetic Linear Perturbation Analysis


The primary analysis steps in the linear perturbation procedure are as follows:

1. Issue the RESCONTROL command in the nonlinear (base) electromagnetic analysis to specify at which
operating point data should be saved for the multiframe restart in the first phase of the linear perturbation
analysis.

If no RESCONTROL command is issued, the linear perturbation starts at the last converged substep
of the nonlinear analysis.

2. In the first phase of the linear perturbation analysis, specify the operating point (load step, substep) and
the linear perturbation analysis type, then regenerate the tangent matrices using the following commands,
respectively:

a. ANTYPE,Antype,RESTART,,,PERTURB

b. PERTURB

c. SOLVE,ELFORM

3. In the second phase of the linear perturbation analysis, apply the linear perturbation loads and obtain the
perturbed solution (SOLVE).

4. The results of the linear perturbation analysis are written to the Jobname.RSTP file. Issue the FILE,,RSTP
and SET commands to review the linear perturbation analysis results.

Permanent magnets (MP,MGXX, also MGYY, MGZZ) are supported in a linear perturbation harmonic
analysis. Although they contribute only to the base (operating point solution), they should not be re-
moved from the model in the linear perturbation analysis.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 187
Electromagnetic Linear Perturbation Analysis

For more information, see General Procedure for Linear Perturbation Analysis in the Structural Analysis
Guide.

9.2. Example: Electromagnetic Linear Perturbation Analysis


This example problem demonstrates the use of the linear perturbation method to calculate the differ-
ential inductance matrix of a transformer (linear perturbation static analysis) and a DC-biased harmonic
analysis (linear perturbation harmonic analysis). The transformer model is described in Example: Trans-
former Analysis .
/title, Linear Perturbation Analysis of a Transformer, 1/4 Symmetry
/vie,1,2,-1,3
/pnu,mat,1
/num,1
pi=acos(-1)

! *** Model parameters


a_core=0.010 ! core cross-section width
w_core=0.075 ! overall core width
h_core=0.075 ! overall core height

r1_coil=0.015 ! inner radius, both coils


r2_coil=0.020 ! outer radius, both coils
h_coil=0.040 ! height, both coils

d_dmn=0.025 ! depth of surrounding domain

esz1=a_core/3 ! element size, components


esz2=3*esz1 ! element size, surrounding domain

! *** Primary coil


Np=100 ! # of turns
Rp=24 ! DC resistance (ohms)
care_left=(r2_coil-r1_coil)*h_coil ! cross-sectional area
volu_left=pi*(r2_coil**2-r1_coil**2)*h_coil ! volume
Vp=0.5 ! voltage (V)

! *** Secondary coil


Ns=200 ! # of turns
Rs=Rp*(Ns/Np)**2 ! DC resistance (ohms)
care_right=(r2_coil-r1_coil)*h_coil ! cross-sectional area
volu_right=pi*(r2_coil**2-r1_coil**2)*h_coil ! volume

R=1e4 ! resistance attached to the secondary coil

frqncy=50 ! operating frequency (Hz)


symm=4 ! symmetry factor

/nopr
! *** Geometry
/PREP7
vsel,none ! core
bloc,-w_core/2,w_core/2,,h_core/2,-a_core/2,0
cm,scrap1_v,volu
vsel,none
bloc,-(w_core/2-a_core),w_core/2-a_core,,h_core/2-a_core,-a_core/2,0
cm,scrap2_v,volu

cmse,s,scrap1_v
cmse,a,scrap2_v
vsbv,scrap1_v,scrap2_v
cm,core_v,volu
vatt,2,2,2

wpcs,-1,0 ! left coil ESYS


wpof,-w_core/2+a_core/2
wpro,,-90
cswp,11,1

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
188 of ANSYS, Inc. and its subsidiaries and affiliates.
Example: Electromagnetic Linear Perturbation Analysis

wpcs,-1,0 ! right coil ESYS


wpof,w_core/2-a_core/2
wpro,,-90
cswp,12,1

csys

vsel,none ! left coil


wpcs,-1,11
cyli,r1_coil,r2_coil,0,h_coil/2,0,90
cyli,r1_coil,r2_coil,0,h_coil/2,90,180
vatt,3,3,3,11

vsel,none ! right coil


wpcs,-1,12
cyli,r1_coil,r2_coil,0,h_coil/2,0,90
cyli,r1_coil,r2_coil,0,h_coil/2,90,180
vatt,4,4,4,12

alls
cm,keep_v,volu
*get,xmin,kp,,mnloc,x
*get,xmax,kp,,mxloc,x
*get,ymax,kp,,mxloc,y
*get,zmin,kp,,mnloc,z

wpcs,-1,0 ! surrounding domain


vsel,none
bloc,xmin-d_dmn,xmax+d_dmn,,ymax+d_dmn,zmin-d_dmn,0
cm,scrap_v,volu

cmse,all
vsbv,scrap_v,keep_v,,dele,keep
cmse,u,keep_v
cm,air_v,volu
vatt,1,1,1

alls
vplo

! *** FE model
et,1,236 ! air
mp,murx,1,1

et,2,236 ! core (laminated, non-conducting)


TB,BH,2 , 1, 20 ! M6
TBPT,, 0.8 , 0.01
TBPT,, 1.12 , 0.02
TBPT,, 2.39 ,0.07
TBPT,, 4 , 0.24
TBPT,, 5.57 , 0.31
TBPT,, 8 , 0.7
TBPT,, 16 , 1.14
TBPT,, 40 , 1.5
TBPT,, 79.6 , 1.62
TBPT,, 159 , 1.70
TBPT,, 398 , 1.76
TBPT,, 796 , 1.82
TBPT,, 1592 , 1.88
TBPT,, 3365 , 1.94
TBPT,, 3979 , 1.95
TBPT,, 7958 , 1.985
TBPT,, 15915 , 2.010
TBPT,, 39789 , 2.041
TBPT,, 79577 , 2.093
TBPT,, 160000 , 2.2

et,3,236,2 ! left primary coil


mp,murx,3,1
r,3,care_left,Np,volu_left,0,1,0 ! left coil data

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 189
Electromagnetic Linear Perturbation Analysis

rmore,Rp,symm

et,4,236,2 ! right secondary coil


mp,murx,4,1
r,4,care_right,Ns,volu_right,0,1,0 ! right coil data
rmore,Rs,symm

! *** Mesh
numm,kp,1e-8,1e-8
esiz,esz1
vsel,s,mat,,3,4
vmes,all
vsel,s,mat,,2
vswe,all

vsel,s,mat,,1
msha,1
esiz,esz2
vmes,all
alls

! *** Boundary conditions and loads


asel,s,ext ! flux parallel exterior
csys
asel,u,loc,y
da,all,az

vsel,s,mat,,3 ! left primary coil


alls,belo,volu
cp,1,emf,all
cp,2,volt,all
nd_p=ndnext(0)
alls

vsel,s,mat,,4 ! right secondary coil


alls,belo,volu
cp,3,emf,all
cp,4,volt,all
nd_s=ndnext(0)
alls

! *** Circuit
et,5,124,0 ! resistor connected to the secondary coil
r,5,R

*get,nmax,node,,num,max

n,nmax+1,0,h_coil/2
type,5
real,5
e,nd_s,nmax+1

d,nmax+1,volt,0 ! ground
csys

eplo
fini

! *** Operating point solution


/solu
antyp,static
d,nd_p,volt,Vp
solve
fini

! *** Post-processing
/post1
set,1,1
vsel,s,mat,,2,4
alls,belo,volu
plve,jt,,,,vect,,on

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
190 of ANSYS, Inc. and its subsidiaries and affiliates.
Example: Electromagnetic Linear Perturbation Analysis

plve,b,,,,vect,,on
fini

! *** Linear perturbation static analysis


! to determine the self- and mutual inductances of the coils
/solu
antyp,static,restart,,,perturb
perturb,stat,,current,allkeep
solve,elform

! *** Apply test current to the primary coil to determine its self-inductance
ddele,nd_p,volt
curr=1.e-3
f,nd_p,amps,curr
solve

! *** Apply test current to the secondary coil to determine its self-inductance
fdele,nd_p,amps
f,nd_s,amps,curr
solve

! *** Apply test current to both coils to determine their mutual inductance
f,nd_p,amps,curr
solve
fini

/post1
file,,rstp

set,1,last
etable,_iene,iene
ssum
*get,iene_p,ssum,,item,_iene
Lp=2*iene_p/curr**2*symm

set,2,last
etable,_iene,iene
ssum
*get,iene_s,ssum,,item,_iene
Ls=2*iene_s/curr**2*symm

set,3,last
etable,_iene,iene
ssum
*get,iene_m,ssum,,item,_iene
Lm=(iene_m-iene_p-iene_s)/curr**2*symm

/com, *******************************************************************
/com, Self-inductance of the primary coil Lp = %Lp% H
/com, Self-inductance of the secondary coil Ls = %Ls% H
/com, Mutual inductance of two coils Lm = %Lm% H
/com, *******************************************************************

! *** Linear perturbation harmonic analysis around the operating point


/solu
antyp,static,restart,,,perturb
perturb,harmonic,,current,allkeep
solve,elform

harfrq,frqncy
d,nd_p,volt,Vp/10
solve

fini

/post1
file,,rstp
set,1,last,,0 ! Real solution set
Vp_real=volt(nd_p)
Vs_real=volt(nd_s)

/com,

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 191
Electromagnetic Linear Perturbation Analysis

/com, *** Real solution


/com, Vp = %Vp_real%
/com, Vs = %Vs_real%
/com,
vsel,s,mat,,2,4
alls,belo,volu
plve,jt,,,,vect,,on
plve,b,,,,vect,,on
plnsol,emf
alls

set,1,last,,1 ! Imaginary solution set


Vp_imag=volt(nd_p)
Vs_imag=volt(nd_s)

/com,
/com, *** Imag solution
/com, Vp = %Vp_imag%
/com, Vs = %Vs_imag%
/com,
vsel,s,mat,,2,4
alls,belo,volu
plve,jt,,,,vect,,on
plve,b,,,,vect,,on
plnsol,emf
alls

Vp = sqrt(Vp_real**2 + Vp_imag**2)
Vs = sqrt(Vs_real**2 + Vs_imag**2)
/com,
/com, *** Secondary to Primary Coil Voltage Ratio = %Vs/Vp%
fini

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
192 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 10: Electric and Magnetic Macros
Electric and magnetic macros help you to prepare models and examine the results of a magnetic field
analysis. The following macros are available:

• CMATRIX calculates self and mutual capacitance coefficients between conductors.

• CURR2D calculates current flow in a 2-D conductor.

• EMAGERR calculates the relative error in an electrostatic or electromagnetic field analysis.

• EMF calculates the electromotive force (emf ) or voltage drop along a predefined path.

• EMFT summarizes electromagnetic forces and torques on selected nodes (PLANE121, SOLID122, SOL-
ID123 only).

• EMTGEN generates a set of TRANS126 elements.

• FLUXV calculates the flux passing through a closed contour.

• MAGSOLV specifies magnetic solution options and initiates the solution for a static analysis.

• MMF calculates magnetomotive force along a path.

• PERBC2D generates periodic constraints for 2-D planar analysis.

• PLF2D generates a contour line plot of equipotentials.

• PMGTRAN summarizes electromagnetic results from a transient analysis.

• POWERH calculates the RMS power loss in a conducting body.

• RACE defines a "racetrack" current source.

• SENERGY determines the stored magnetic energy or co-energy.

You can find more information about the macros in the Command Reference and in the Mechanical APDL
Theory Reference.

The following table shows where you can apply electric and magnetic macros:

Table 10.1: Application of Electric and Magnetic Macros

2-D 2-D Elec-


Magnetic PREP POST POST MVP MSP Pla- Axi- Edge tro-
Macros 7 Sol 1 26 Dom Dom nar sym 3-D Form Static Harm Trans stat
CMATRIX Y Y - - - - Y Y Y - - - - Y
CURR2D - - Y - Y - Y Y Y - Y Y Y -
EMAGERR - - Y - Y Y Y Y Y Y Y Y Y -

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 193
Electric and Magnetic Macros

2-D 2-D Elec-


Magnetic PREP POST POST MVP MSP Pla- Axi- Edge tro-
Macros 7 Sol 1 26 Dom Dom nar sym 3-D Form Static Harm Trans stat
EMF[1] - - Y - - - - - - - - Y - Y
EMFT[1] - - Y - - - - - Y Y Y - - Y
EMTGEN Y - - - - - Y Y Y - Y Y Y Y
FLUXV - - Y - Y - Y Y Y - Y Y Y -
MAGSOLV Y Y - - Y Y Y Y Y Y Y - Y -
MMF - - Y - Y Y Y Y Y Y Y Y Y -
PERBC2D Y - - - Y - Y - - - Y Y Y -
PLF2D - - Y - Y - Y Y - - Y Y Y -
PMGTRAN - - - Y Y Y Y Y Y Y - - Y -
POWERH - - Y - Y - Y Y Y Y - Y - -
RACE Y - - - - Y - - Y - Y - - -
SENERGY - - Y - Y Y Y Y Y Y Y Y Y -

1. Macros also apply to electrostatic field problems.

10.1. Using Electric and Magnetic Macros


The electric and magnetic macros can be grouped into four categories:
10.1.1. Modeling Aids
10.1.2. Solution Aids
10.1.3. Postprocessing Calculations

10.1.1. Modeling Aids


The RACE, PERBC2D, and EMTGEN macros are available as modeling aids.

RACE generates a racetrack shaped current source from bar and arc primitives (SOURC36 elements). To
invoke this macro, use one of the following:
Command(s): RACE
GUI: Main Menu> Preprocessor> Modeling> Create> Racetrack Coil
Main Menu> Preprocessor> Loads> Loads> Apply> Magnetic> Excitation> Racetrack Coil

The RACE macro requires parameters as noted in Figure 10.1: Racetrack Current Source (p. 195). The
racetrack is located by two parameters XC and YC; these are the distances to the midpoints of the coil
thickness along the X and Y axes of the working plane, respectively. As input to the RACE macro, you
can assign a component name, Cname, to the group of SOURC36 elements. Cname must be enclosed
in single quotes in the RACE command line.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
194 of ANSYS, Inc. and its subsidiaries and affiliates.
Using Electric and Magnetic Macros

Figure 10.1: Racetrack Current Source

YC RAD

Z
X
XC
TCUR
DY

Thickness = DZ

PERBC2D generates periodic boundary conditions by writing constraint equations or assigning node
coupling necessary for two periodic symmetry planes. Use this method only for harmonic or transient
magnetic analyses. For static analyses, use ANSYS' cyclic symmetry capability. Invoke the macro as follows:
Command(s): PERBC2D
GUI: Main Menu> Preprocessor> Loads> Define Loads> Apply> Magnetic> Boundary> Vector
Poten> Periodic BCs

The diagrams below illustrate the form for three options:

Figure 10.2: Periodic Symmetry at Two Planes at Constant Angles

Figure 10.3: Periodic Symmetry at Two Planes Parallel to the Y Axis

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 195
Electric and Magnetic Macros

Figure 10.4: Periodic Symmetry at Two Planes Parallel to the X Axis

The odd symmetry option represents a half-period symmetry condition for a device. The even symmetry
condition represents a full period condition (repeating structure).

EMTGEN generates a distributed set of TRANS126 elements between the surface of a moving structure
and a plane (i.e. ground plane). This arrangement allows for fully coupled electrostatic-structural simu-
lations for cases where the gap is small compared to the overall area of the structure. Invoke the macro
as follows:
Command(s): EMTGEN
GUI: Main Menu> Preprocessor> Modeling> Create> Transducers> Node to Plane

10.1.2. Solution Aids


The MAGSOLV and CMATRIX macros are available as solution aids.

10.1.2.1. MAGSOLV
MAGSOLV allows you to specify solution options quickly and initiate the solution for most magneto-
static analyses. It applies to 2-D and 3-D models, scalar, vector, and edge formulations, and linear and
nonlinear analyses. The macro eliminates the need to use the MAGOPT command and step through a
two-step or three-step solution sequence required for certain situations. It also allows you to specify
convergence criteria for nonlinear analyses, and gives you an option to force recalculation of the Biot-
Savart integration from current sources.

To invoke the MAGSOLV macro, use one of the following:


Command(s): MAGSOLV
GUI: Main Menu> Solution> Solve> Electromagnet> Static Analysis> Opt&Solv

10.1.2.2. CMATRIX
CMATRIX allows you to calculate “ground” and “lumped” capacitance matrices. The “ground” capacitance
values relate the charge of one conductor with the conductor's voltage drop (to ground). The “lumped”
capacitance values relate the capacitance's between conductors. For more details and an example
problem, see Extracting Capacitance from Multi-conductor Systems (p. 255) and Example: Capacitance
Calculation (p. 267) of this manual, respectively. See the Mechanical APDL Theory Reference for more details.

To invoke the CMATRIX macro, use one of the following:


Command(s): CMATRIX
GUI: Main Menu> Solution> Solve> Electromagnet> Static Analysis> Capac Matrix

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
196 of ANSYS, Inc. and its subsidiaries and affiliates.
Using Electric and Magnetic Macros

10.1.3. Postprocessing Calculations


Figure 10.5: MMF Paths

MMF calculates the magnetomotive force, the line integral of magnetic field, H, along a predefined
path (defined with the PATH and PPATH command). A counterclockwise ordering of nodes will give
the correct sign on the MMF. The MMF macro sets the "ACCURATE" mapping method and "MAT" dis-
continuity option of the PMAP command. The ANSYS program retains these settings for PMAP after
issuing the macro. If the path spans multiple materials, include at least 1 path point in each material
(See Figure 10.5: MMF Paths (p. 197) (b)).

To invoke the MMF macro, use either of the following:


Command(s): MMF
GUI: Main Menu> General Postproc> Elec & Mag Calc> Path Based> MMF

EMF calculates the electromotive force (emf ), the line integral of electric field, E, or voltage drop along
a path (defined using the PATH command or its GUI counterpart). It can operate in both 2-D and 3-D
electric and electrostatic field analysis. The parameter EMF stores the calculated emf value.

Before invoking EMF, you must first define a path. The macro uses calculated values of the electric field
(EF), and uses path operations to perform the calculations. All path items are cleared when the macro
completes.

The EMF macro sets the "ACCURATE" mapping method and "MAT" discontinuity option of the PMAP
command. The ANSYS program retains these settings for PMAP after issuing the macro.

To invoke the EMF macro, use either of the following:


Command(s): EMF
GUI: Main Menu> General Postproc> Elec & Mag Calc> Path Based> EMF

POWERH calculates the time-averaged power loss in a conducting body from a harmonic analysis. You
must select the elements of the conducting region before invoking the macro. POWERH is most accurate
when fine meshes are available in the conducting regions. To invoke the macro, use one of the following:
Command(s): POWERH
GUI: Main Menu> General Postproc> Elec & Mag Calc> Element Based> Power Loss

FLUXV calculates the flux passing through a predefined line contour. In a 2-D analysis, at least two
nodes must define the path. In a 3-D MVP analysis, the path must be a closed contour; that is, the first
and last nodes must be the same. A counterclockwise ordering of nodes on the path will yield the
correct sign on flux. Figure 10.6: Flux Calculations (p. 198) illustrates the path selection, when invoking
FLUXV for both 2-D and 3-D analysis. The macro is valid only with the magnetic vector potential formu-
lation.

To invoke the FLUXV macro, use one of the following:


Command(s): FLUXV

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 197
Electric and Magnetic Macros

GUI: Main Menu> General Postproc> Elec & Mag Calc> Path Based> Path Flux

Figure 10.6: Flux Calculations

(a) 2-D path definition:

(b) 3-D contour definitions:

PLF2D generates a display of equipotential lines with the degree of freedom AZ. In an axisymmetric
analysis, the display consists of constant values of radius * AZ. Use this macro for 2-D analysis only.
These equipotential lines are parallel to flux lines and provide a good representation of magnetic flux
patterns.

To invoke PLF2D, use one of the following:


Command(s): PLF2D
GUI: Main Menu> General Postproc> Plot Results> Contour Plot> 2D Flux Lines
Utility Menu> Plot Ctrls> Results> Flux Lines

SENERGY calculates the stored magnetic energy or co-energy in the model. The energy calculation is
summarized in a table by material number, and the energy density is stored in the element table for
displaying and listing.

Figure 10.7: Energy and Co-energy for Nonpermanent Magnets

Figure 10.7: Energy and Co-energy for Nonpermanent Magnets (p. 198) illustrates how the magnetic
energy and co-energy are determined for nonpermanent magnets. The energy at a point on the curve
is the area above the curve bounded by the value of B at that point, and the co-energy is the area under
the curve at that point.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
198 of ANSYS, Inc. and its subsidiaries and affiliates.
Using Electric and Magnetic Macros

Figure 10.8: Energy and Co-energy for Permanent Magnets

For a permanent magnet, energy and co-energy for a point on the curve are calculated as follows:

• The energy is the area to the right of the curve in the positive B region (see graph (a) in Figure 10.8: Energy
and Co-energy for Permanent Magnets (p. 199)). Note that the energy is negative for the shown case.

• The co-energy is the area under the curve (see graph (b) in Figure 10.8: Energy and Co-energy for Permanent
Magnets (p. 199)).

The energy and co-energy of a linear permanent magnet are show in graph (c) in Figure 10.8: Energy
and Co-energy for Permanent Magnets (p. 199).

SENERGY determines the energy and co-energy using the following B-H relationships:

where B1-H1 is a soft magnetic characteristic of the material and Hc is the coercive force.

For a linear soft magnetic material, the B1-H1 relationship is given by:

where µo is the free-space permeability and µr is the relative permeability specified by the MP command
and the MURX, MURY, and MURZ labels.

For a nonlinear soft magnetic material, you input a B1-H1 curve using the TB command with the BH
label. You then enter the data points using the TBPT or TBDATA command. The curve must start at
the origin and increase monotonically. For the energy calculations, the curve is approximated with a
spline fit up to the last data point. Beyond the last data point, it is extrapolated as a straight line with
a slope equal to the free-space permeability.

To invoke SENERGY, use one of the following:


Command(s): SENERGY
GUI: Main Menu> General Postproc> Elec & Mag Calc> Element Based> Co-Energy
Main Menu> General Postproc> Elec & Mag Calc> Element Based> Energy

EMAGERR calculates the relative error in the computed field quantities (B, H) for each element in a
model. The error represents the average difference in the element computed field value and a continuous
field value. The continuous field is represented by the average nodal field values. Optionally, you can
normalize the error value with respect to the highest computed nodal-averaged field value per material.
The error measure considers material discontinuities when calculating the average nodal continuous
field values.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 199
Electric and Magnetic Macros

To invoke EMAGERR, use either of the following:


Command(s): EMAGERR
GUI: Main Menu> General Postproc> Elec & Mag Calc> Element Based> Error Eval

CURR2D calculates the total current flowing in a conducting body for 2-D models. The current may be
from an applied source current, or induced eddy current. This macro is useful for checking total current
flow.

To invoke CURR2D, use either of the following:


Command(s): CURR2D
GUI: Main Menu> General Postproc> Elec & Mag Calc> Element Based> Current

EMFT summarizes in tabular form the resulting electromagnetic forces and torques on a set of selected
nodes. This command is applicable only to PLANE121, SOLID122, and SOLID123 elements.

To invoke EMFT, use either of the following:


Command(s): EMFT
GUI: Main Menu> General Postproc>

PMGTRAN calculates and summarizes electromagnetic field data on element components for a transient
analysis. Calculations may include magnetic forces, power loss, stored energy, or total current. The
SENERGY macro calculates stored energy, and the CURR2D macro calculates total current.

To invoke PMGTRAN, use either of the following:


Command(s): PMGTRAN
GUI: Main Menu> TimeHist Postpro> Elec & Mag> Magnetics

The data is summarized in a report as well as written to a file. The ANSYS program automatically prepares
display plots of the results as a function of time and saves them in a plot file for use by the DISPLAY
program.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
200 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 11: Far-Field Elements
A far-field element, also called an infinite boundary element, allows you to model the effects of far-field
decay in magnetic, electrostatic, thermal, or electric current conduction analyses. Without far-field ele-
ments, you otherwise model the near-field to a distance where you assume you can apply a flux-parallel
or flux-normal boundary condition. Such an assumption is an approximation, however, that can signi-
ficanly affect the accuracy of the results in the near-field area of the model. Using far-field elements,
you are not forced to make assumptions about conditions at the model boundary. The elements model
the decaying behavior of the field, out to an infinite distance, even though the elements themselves
extend to a finite distance. They produce better accuracy, often at a computation reduction in the size
of the model.

Consider, for example, a dipole and its 2-D, quarter-symmetry finite element model (see Figure 11.1: Flux
Lines Without Far-Field Elements (p. 201)). Without far-field elements, you should model the air surround-
ing the iron core out to a very large distance where the assumption of a flux-normal boundary conditions
is reasonably correct. The number of elements required, and the corresponding computational expense,
means you'll trade off some accuracy for smaller model size. Note the imposed flux-normal behavior at
the boundary.

Figure 11.1: Flux Lines Without Far-Field Elements

The alternative shown below uses one-dimensional (line) far-field elements at the boundary instead of
the flux-normal condition. Without extending the physical location of the model boundary, the behavior
of the flux lines at the boundary is much more realistic, and the results in the near-field are better as
a result.

Figure 11.2: Flux Lines With Far-Field Elements

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 201
Far-Field Elements

ANSYS offers 2-D and 3-D solid infinite elements for far-field effects.

How much of the surrounding air should you model? The answer depends on the problem you are
solving. For relatively closed flux paths (little leakage to surroundings), not much of the air needs to be
modeled, that is, you can place the far-field elements relatively close to the model region of interest.
For open-boundary problems, you should extend the air elements well beyond the region of interest
before placing the far-field elements.

Far-Field Elements Described

ANSYS offers the following far-field elements.

Table 11.1: 2-D Far-Field Elements

Analysis Enclosed
Element Description Analysis Type
Category Elements
INFIN110 4 or 8 Node Quadrilateral Magnetic PLANE13 Static

Planar or Axisymmetric Models Harmonic

Transient
Electrostatic PLANE121 Static

Harmonic
Thermal PLANE35 Steady-state

PLANE55 Transient

PLANE77
Electric PLANE230 Steady-state
Current
Conduction Harmonic

Transient

Table 11.2: 3-D Far-Field Elements

Analysis Enclosed
Element Description Analysis Type
Category Elements
INFIN47 4 Node Quadrilateral or 3 Node Magnetic SOLID5 Static
Triangle
SOLID96 Harmonic

SOLID98 Transient
Thermal SOLID70 Steady-state

Transient
INFIN111 8 or 20 node hexahedral Magnetic SOLID5 Static

SOLID96

SOLID98
Electrostatic SOLID122 Static

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
202 of ANSYS, Inc. and its subsidiaries and affiliates.
Tips for Using Far-Field Elements

Analysis Enclosed
Element Description Analysis Type
Category Elements
SOLID123 Harmonic
Thermal SOLID70 Steady-state

SOLID87 Transient

SOLID90
Electric SOLID231 Steady-state
Current
Conduction SOLID232 Harmonic

Transient

Note

You can also use far-field elements in a thermal analysis. Refer to the Thermal Analysis Guide
for details on thermal analysis.

11.1. Tips for Using Far-Field Elements


You must place the INFIN47 elements such that the global origin is located centrally with respect to
them. A circular arc of far-field elements at the boundary of the finite element domain usually gives
best results.

The infinite elements INFIN110 and INFIN111 give you greater flexibility in modeling far-field effects.

For best results, define INFIN110 and INFIN111 elements with their "poles" (see the Element Reference)
coinciding with centers of disturbances, such as loads. There may be multiple poles, which may or may
not fall at the coordinate system origin. Element poles should coincide with nearby disturbances, or
with the approximate centroid of disturbances. In contrast to INFIN47, INFIN110 and INFIN111 need not
be placed such that the global origin is located centrally with respect to them.

When using the INFIN110 or INFIN111 elements, you must flag the exterior surface with the INF surface
load. To do so, use the SF family of commands or their equivalent menu paths. (See 2-D Transient
Magnetic Analysis (p. 75).)

You can easily define a layer of INFIN111 elements by creating a volume to be meshed, using one of
the following:
Command(s): VEXT
GUI: Main Menu> Preprocessor> Modeling> Operate> Extrude> Areas> By XYZ offset

The INFIN110 and INFIN111 elements are usually much longer in the infinite direction, resulting in
skewed meshes. Therefore, contour plots exclude these elements. Element plots, however, include them.

For optimal performance of either INFIN110 or INFIN111, you must meet one or both of the following
conditions.

Boundaries Must Describe a Smooth Curvature

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 203
Far-Field Elements

INFIN110 and INFIN111 perform best when the boundary between the finite element (FE) domain and
the infinite element (IFE) domain describes a smooth curvature. Figure 11.3: Interface between FE and
Infinite Element Domains (p. 204) illustrates this point.

Figure 11.3: Interface between FE and Infinite Element Domains

If your model construction does not allow a smooth FE to IFE domain interface, you may do so provided
the infinite elements "radiate" from any sharp corners in the FE domain. Only one element edge may
be "exposed" to the open exterior. Figure 11.4: IFE Constructions for Non-Smooth FE to IFE Domain In-
terface (p. 204) illustrates this point for both a correct and incorrect IFE construction for a quarter symmetry
model.

Figure 11.4: IFE Constructions for Non-Smooth FE to IFE Domain Interface

Figure 11.4: IFE Constructions for Non-Smooth FE to IFE Domain Interface (p. 204) also illustrates that
only one face of an infinite element may be exposed to infinity. Be careful to assure that one face of
the infinite element is exposed to infinity. You should avoid constructions that lead to infinite element
with sides converging from the FE interface to the interface with infinity. Figure 11.5: 2-D Infinite Element
Structures (p. 204) illustrates this point.

Figure 11.5: 2-D Infinite Element Structures

Examples of correct and incorrect

The accuracy of field calculations at sharp edges of the FE/IFE domain interface will be of lower quality
than those achieved at a smooth interface.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
204 of ANSYS, Inc. and its subsidiaries and affiliates.
Example Far-Field Analysis

Length of Elements Should Equal Depth of Domain

The second condition that improves the performance of INFIN110 and INFIN111 is the relative dimensions
of the FE and IFE domains. The relative length of the infinite elements should be approximately equal
to the depth of your model's FE domain. Figure 11.6: Relative Dimensions of FE and IFE Domains (p. 205)
illustrates this relationship for a 2-D quarter symmetry example.

Figure 11.6: Relative Dimensions of FE and IFE Domains

When INFIN47 elements enclose higher-order elements in a model, remove the midside nodes of the
higher-order elements at the interface with the far-field elements (EMID command). When INFIN110 or
INFIN111 elements enclose higher-order elements in a model, use the higher-order setting for the far-
field elements (KEYOPT(2) = 1).

11.2. Example Far-Field Analysis


This example considers the electric conduction problem with infinite boundaries described as problem
# 476 in "Worked problems in Applied Mathematics," by N.N. Lebedev, I.P. Skalskaya, Y.S. Ufland, Dover
Publications, Inc., NY, p. 226 (1979).

11.2.1. Problem Description


A DC current (I) enters ground of conductivity σ through a plate in the form of a disk of radius a. Find
the distribution of electric current under the plate and calculate the resistance of the plate.

Figure 11.7: Grounding Plate with Current Loading


Y

I
X
2a

The geometric and electrical parameters are:

Radius a = 1 cm
Applied current I = 5 mA
Soil electrical conductivity σ = 0.5 e-2 S/m

Axisymmetric PLANE230 triangular elements model a rectangular area of width 2a and depth a below
the circular electrode. A single layer of axisymmetric INFIN110 quadrilateral elements represents the
exterior semi-infinite domain (IFE). The ratio of the IFE domain dimensions to the FE domain dimensions

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 205
Far-Field Elements

is equal to 1.8 (that is, the length of the infinite elements is approximately equal to the depth of the
FE domain). The electrode is defined by coupling the VOLT degrees of freedom of the ground surface.
The current load is applied as a concentrated nodal load.

11.2.2. Results
The electric current results are shown in the following figure.

Figure 11.8: Electric Current Distribution

The calculated resistance is 4943 Ohms. The expected result from the above reference is:

R = 1/(4σa) = 5000 Ohms

11.2.3. Command Listing


You can perform this electric conduction analysis using the ANSYS commands shown below. Text prefaced
by an exclamation point (!) is a comment.
/title, Current distribution of circular electrode
! Problem parameters
I=5e-3 ! current, A
sig=0.5e-2 ! conductivity of soil, S/m
a=1e-2 ! disk radius, m
w=2*a ! finite region width
d=a ! finite region depth
r=1.8 ! ratio infinite to finite

/prep7
et,1,PLANE230,,,1 ! axisymmetric 8-node electric quad
et,2,INFIN110,3,1,1 ! axisymmetric 8-node infinite electric quad
mp,rsvx,1,1/sig ! resistivity input

rect,,w,,-d ! enveloped area


k,5,,r*(-d)
k,6,r*w,r*(-d)
k,7,r*w
a,1,5,6,2
a,2,6,7,3

lesize,3,,,16 ! specify line divisions


lesize,1,,,16
lesize,6,,,16

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
206 of ANSYS, Inc. and its subsidiaries and affiliates.
Example Far-Field Analysis

lesize,4,,,8
lesize,2,,,8
lesize,8,,,8

lesize,9,,,1
lesize,5,,,1

msha,1,2d ! mesh finite region with triangles


type,1
amesh,1

mshk,1 ! mesh infinite region with quads


msha,0,2d

type,2
amesh,2,3
nummrg,node

lsel,s,line,,6 ! flag exterior surface of INFIN elements


lsel,a,line,,8
sfl,all,INF
lsel,all

nsel,s,loc,y,0 ! define electrode


nsel,r,loc,x,0,a
cp,1,volt,all ! couple VOLT dof
n_load=ndnext(0) ! master node
nsel,all
fini

/solu
antype,static
f,n_load,amps,I ! apply total current
solve
fini

/post1
plesol,jc,sum ! plot electric current vector sum
/com
/com Calculated resistance R = %volt(n_load)/I% Ohm
/com
/com **************************************************************************
/com Expected results: R = %1/(4*sig*a)% Ohm
/com **************************************************************************
finish

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 207
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
208 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 12: Electric Field Analysis
Electric field analyses calculate the electric field in conductive or capacitive systems. Typical quantities
of interest in an electric field analysis include:

• Electric field

• Current density

• Electric flux density

• Charge density

• Joule heat

This chapter describes elements used in all types of electric field analysis. You can use them to model
electric effects in lossy dielectrics, high-voltage insulators, microwave passive components, semiconductor
devices, micro-electromechanical (MEMS) devices, and biological tissues. This chapter also specifically
covers the procedures for performing steady-state current conduction analysis and quasistatic time-
harmonic and time-transient electric field analyses.

See Electrostatic Field Analysis (p. 247) and Electric Circuit Analysis (p. 271) for a description of the other
types of electric field analysis.

ANSYS uses Maxwell's equations as the basis for electric field analysis. Refer to Electromagnetics in the
Mechanical APDL Theory Reference for details. The primary unknowns (nodal degrees of freedom) that
the finite element solution calculates are electric scalar potentials (voltages). Other electric field quant-
ities are then derived from the nodal potentials.

This document describes electric-only field analysis, specifically steady-state current conduction analysis,
quasistatic time-harmonic and time-transient electric field analyses, electrostatic field analysis, and
electric circuit analysis. Some of the elements described can also be used as coupled-field elements.
The Coupled-Field Analysis Guide discusses coupled-field analyses.

Electric contact is also available. See Modeling Electric Contact in the Contact Technology Guide for details.

The following electric field topics are available:


12.1. Elements Used in Electric Field Analysis
12.2. Element Compatibility
12.3. Current Densities
12.4. Steady-State Current Conduction Analysis
12.5. Harmonic Quasistatic Electric Analysis
12.6.Transient Quasistatic Electric Analysis
12.7. Example Electric Field Analyses

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 209
Electric Field Analysis

12.1. Elements Used in Electric Field Analysis


The ANSYS program has a large number of elements available for specific types of electric field analysis.
The following tables summarize them to make element type selection easier. These elements enable
you to perform the following types of analysis:

• Steady-state current conduction analysis

• Quasistatic time-harmonic and time-transient electric field analyses

• Electrostatic field analysis

• Electric circuit analysis

Table 12.1: Conducting Bar Elements

Element Dimens. Shape or DOFs Usage Notes


Characteristic
LINK68 3-D Uniaxial, two nodes Temperature and voltage at Steady-state current
each node conduction analysis;
thermal-electric
coupled-field analysis

Table 12.2: 2-D Planar Elements

Element Dimens. Shape or DOFs Usage Notes


Characteristic
PLANE121 2-D Quadrilateral, eight Voltage at each node Electrostatic analysis;
nodes quasistatic
time-harmonic analysis
PLANE230 2-D Quadrilateral, eight Voltage at each node Steady-state current
nodes conduction analysis;
quasistatic
time-harmonic and
time-transient analyses

Table 12.3: 3-D Solid Elements

Element Dimens. Shape or DOFs Usage Notes


Characteristic
SOLID5 3-D Hexahedral, eight Up to six at each node; the Steady-state current
nodes DOFs are structural conduction analysis;
displacements, temperature, thermal-electric
electric potential, and coupled-field analysis
magnetic scalar potential or coupled-field
electromagnetic
analysis
SOLID98 3-D Tetrahedral, ten Up to six at each node; the Steady-state current
nodes DOFs are structural conduction analysis;
displacements, temperature, thermal-electric
electric potential, and coupled-field analysis
magnetic scalar potential or coupled-field

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
210 of ANSYS, Inc. and its subsidiaries and affiliates.
Elements Used in Electric Field Analysis

Element Dimens. Shape or DOFs Usage Notes


Characteristic
electromagnetic
analysis
SOLID122 3-D Hexahedral, twenty Voltage at each node Electrostatic analysis;
nodes quasistatic
time-harmonic analysis
SOLID123 3-D Tetrahedral, ten Voltage at each node Electrostatic analysis;
nodes quasistatic
time-harmonic analysis
SOLID231 3-D Hexahedral, twenty Voltage at each node Steady-state current
nodes conduction analysis;
quasistatic
time-harmonic and
time-transient analyses
SOLID232 3-D Tetrahedral, ten Voltage at each node Steady-state current
nodes conduction analysis;
quasistatic
time-harmonic and
time-transient analyses

Table 12.4: Shell Elements

Element Dimens. Shape or DOFs Usage Notes


Characteristic
SHELL157 3-D Quadrilateral shell, Temperature and voltage at Steady-state current
four nodes each node conduction analysis;
thermal-electric
coupled-field analysis

Table 12.5: Specialty Elements

Element Dimens. Shape or Characteristic DOFs


MATRIX50 None Depends on the elements that it Depends on the included element types
(super- includes in its structure
element)
INFIN110 2-D Four or eight nodes One per node; this can be a magnetic
vector potential, temperature, or electric
potential
INFIN111 3-D Hexahedral, eight or twenty nodes AZ magnetic vector potential,
temperature, electric scalar potential, or
magnetic scalar potential

Table 12.6: General Circuit Elements

Element Dimens. Shape or Characteristic DOFs


CIRCU94 None Circuit element for use in Voltage at two nodes (plus charge at a
piezoelectric-circuit analyses, two or third node for an independent voltage
three nodes source)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 211
Electric Field Analysis

Element Dimens. Shape or Characteristic DOFs


CIRCU124 None General circuit element applicable Up to two at each node; electric
to circuit simulation, up to six nodes potential, current

12.2. Element Compatibility


Your finite element model may intermix certain elements with the VOLT degree of freedom. To be
compatible, the elements must have the same meaning of the VOLT degree of freedom (electric potential
or time-integrated electric potential) and the same reaction solution (see table below). Electric charge
reactions must all be positive or negative.

Table 12.7: Reaction Solutions for Elements with VOLT DOF

Material
KEYOPT
Element DOFs Property Input Reaction Solution
(1)
for VOLT DOF
LINK68 N/A TEMP, VOLT RSVX Electric Current (F label = AMPS)
SHELL157 N/A TEMP, VOLT RSVX, RSVY Electric Current (F label = AMPS)
RSVX, RSVY,
SOLID236 1 AZ, VOLT [4] RSVZ, PERX, Electric Current (F label = AMPS)
PERY, PERZ
RSVX, RSVY,
SOLID237 1 AZ, VOLT [4] RSVZ, PERX, Electric Current (F label = AMPS)
PERY, PERZ
PERX, PERY, Positive or Negative Electric
PLANE121 N/A VOLT
RSVX, RSVY,LSST Charge (F label = CHRG) [1]
PERX, PERY,
Positive or Negative Electric
SOLID122 N/A VOLT PERZ, RSVX,
Charge (F label = CHRG) [1]
RSVY, RSVZ, LSST
PERX, PERY,
Positive or Negative Electric
SOLID123 N/A VOLT PERZ, RSVX,
Charge (F label = CHRG) [1]
RSVY, RSVZ, LSST
RSVX, RSVY,
PLANE230 N/A VOLT Electric Current (F label = AMPS)
PERX, PERY, LSST
RSVX, RSVY,
SOLID231 N/A VOLT RSVZ, PERX, Electric Current (F label = AMPS)
PERY, PERZ, LSST
RSVX, RSVY,
SOLID232 N/A VOLT RSVZ, PERX, Electric Current (F label = AMPS)
PERY, PERZ, LSST
Negative or Positive Electric
CIRCU94 0–5 VOLT, CURR N/A Charge (F label = CHRG or
AMPS) [2]
CIRCU124 0–12 VOLT, CURR N/A Electric Current (F label = AMPS)
UX-VOLT, Electric Current (F label =
TRANS126 N/A N/A
UY-VOLT, UZ-VOLT AMPS)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
212 of ANSYS, Inc. and its subsidiaries and affiliates.
Element Compatibility

Material
KEYOPT
Element DOFs Property Input Reaction Solution
(1)
for VOLT DOF
Mechanical Force (F label =
FX)
6 VOLT, AZ RSVX, RSVY Electric Current (F label = AMPS)
PLANE13 Negative Electric Charge (F label
7 UX, UY, UZ, VOLT PERX, PERY
= AMPS)
RSVX, RSVY,
Electric Current (F label = AMPS)
UX, UY, UZ, TEMP, RSVZ
0
VOLT, MAG Negative Electric Charge (F label
PERX, PERY, PERZ
= AMPS)
RSVX, RSVY,
SOLID5 1 TEMP, VOLT, MAG Electric Current (F label = AMPS)
RSVZ
Negative Electric Charge (F label
3 UX, UY, UZ, VOLT PERX, PERY, PERZ
= AMPS)
RSVX, RSVY,
9 VOLT Electric Current (F label = AMPS)
RSVZ
RSVX, RSVY,
Electric Current (F label = AMPS)
UX, UY, UZ, TEMP, RSVZ
0
VOLT, MAG Negative Electric Charge (F label
PERX, PERY, PERZ
= AMPS)
RSVX, RSVY,
SOLID98 1 TEMP, VOLT, MAG Electric Current (F label = AMPS)
RSVZ
Negative Electric Charge (F label
3 UX, UY, UZ, VOLT PERX, PERY, PERZ
= AMPS)
RSVX, RSVY,
9 VOLT Electric Current (F label = AMPS)
RSVZ
101 UX, UY, VOLT RSVX, RSVY Electric Current (F label = AMPS)
Positive or Negative Electric
1001 UX, UY, VOLT PERX, PERY, LSST
Charge (F label = CHRG) [3]
RSVX, RSVY,
110 TEMP, VOLT Electric Current (F label = AMPS)
PLANE223 PERX, PERY
UX, UY, TEMP, RSVX, RSVY,
111 Electric Current (F label = AMPS)
VOLT PERX, PERY
UX, UY, TEMP, PERX, PERY, Negative Electric Charge (F label
1011
VOLT LSST, DPER = CHRG)
RSVX, RSVY,
101 UX, UY, UZ, VOLT Electric Current (F label = AMPS)
RSVZ
PERX, PERY, Positive or Negative Electric
1001 UX, UY, UZ, VOLT
SOLID226 PERZ, LSST Charge (F label = CHRG) [3]
RSVX, RSVY,
110 TEMP, VOLT RSVZ, PERX, Electric Current (F label = AMPS)
PERY, PERZ

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 213
Electric Field Analysis

Material
KEYOPT
Element DOFs Property Input Reaction Solution
(1)
for VOLT DOF
RSVX, RSVY,
UX, UY, UZ, TEMP,
111 RSVZ, PERX, Electric Current (F label = AMPS)
VOLT
PERY, PERZ
UX, UY, UZ, TEMP, PERX, PERY, Negative Electric Charge (F label
1011
VOLT PERZ, LSST, DPER = CHRG)
RSVX, RSVY,
101 UX, UY, UZ, VOLT Electric Current (F label = AMPS)
RSVZ
PERX, PERY, Positive or Negative Electric
1001 UX, UY, UZ, VOLT
PERZ, LSST Charge (F label = CHRG) [3]
RSVX, RSVY,
110 TEMP, VOLT RSVZ, PERX, Electric Current (F label = AMPS)
SOLID227
PERY, PERZ
RSVX, RSVY,
UX, UY, UZ, TEMP,
111 RSVZ, PERX, Electric Current (F label = AMPS)
VOLT
PERY, PERZ
UX, UY, UZ, TEMP, PERX, PERY, Negative Electric Charge (F label
1011
VOLT PERZ, LSST, DPER = CHRG)
Positive or Negative Electric
INFIN110 1 VOLT PERX, PERY
Charge (F label = CHRG) [1]
Positive or Negative Electric
INFIN111 2 VOLT PERX, PERY, PERZ
Charge (F label = CHRG) [1]

1. The following apply to electrostatic elements PLANE121, SOLID122, and SOLID123 and far-field elements
INFIN110 and INFIN111:

• If KEYOPT(6) is set to 0, the reaction solution is positive electric charge.

• If KEYOPT(6) is set to 1, the reaction solution is negative electric charge.

2. The following apply to circuit element CIRCU94, KEYOPT(1) = 0-4:

• If KEYOPT(6) is set to 0, the analysis type is piezoelectric-circuit and the reaction solution is negative
electric charge.

• If KEYOPT(6) is set to 1, the analysis type is electrostatic-circuit and the reaction solution is positive
electric charge.

3. The following apply to coupled-field elements PLANE223, SOLID226, and SOLID227, KEYOPT(1) = 1001:

• If a piezoelectric matrix is specified (TB,PIEZ), the analysis type is piezoelectric and the reaction solution
is negative electric charge.

• If a piezoelectric matrix is not specified, the analysis type is electroelastic and the reaction solution is
positive electric charge.

4. The following apply to electromagnetic elements SOLID236 and SOLID237, KEYOPT(1) = 1 or 2.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
214 of ANSYS, Inc. and its subsidiaries and affiliates.
Steady-State Current Conduction Analysis

• If KEYOPT(2) is set to 2 in a harmonic or transient analysis, VOLT is a time-integrated electric potential


(KEYOPT(1) = 1) or a time-integrated voltage drop (KEYOPT(1) = 2).

• In all the other cases, the VOLT degree of freedom represents an electric potential (KEYOPT(1) = 1) or a
voltage drop (KEYOPT(1) = 2).

12.3. Current Densities


The ANSYS output includes various element current densities (JS, JT, and JC item labels). As shown in
the following table, their meaning depends upon the type of low-frequency electromagnetic analysis.

Table 12.8: Current Densities in Low-Frequency Analyses

Current
Low-Frequency Magnetic
Density Low-Frequency Electric Analysis
Analysis
Label
Total element current density. It is the sum Source current density.
of the element conduction and the
JS displacement current densities. It may be
used as a source for a subsequent
magnetostatic analysis.
Element conduction current density. Total measurable element current
JT
density.
JC Nodal conduction current density. —

12.4. Steady-State Current Conduction Analysis


Steady-state current conduction analysis determines the current density and electric potential (voltage)
distribution caused by direct current (DC) or potential drop. You can apply two types of loads in this
analysis: voltage and electric current. Refer to Electromagnetics in the Mechanical APDL Theory Reference
for more information.

A steady-state current conduction analysis is assumed to be linear. That is, the electric current is propor-
tional to the applied voltage.

The procedure for doing a steady-state current conduction analysis consists of three main steps:

1. Build the model. (p. 215)

2. Apply loads and obtain the solution. (p. 216)

3. Review the results. (p. 218)

The next few topics discuss what you must do to perform these steps.

12.4.1. Building the Model


To build the model, you start by specifying the jobname and a title for your analysis, using the following
commands or GUI paths:
Command(s): /FILNAME, /TITLE
GUI: Utility Menu> File> Change Jobname
Utility Menu> File> Change Title

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 215
Electric Field Analysis

If you are using the ANSYS GUI , the next step is to set preferences for an electric analysis: Main Menu>
Preferences> Electromagnetics> Electric

You must set the preference to Electric to ensure that the elements needed for your analysis will be
available. (The ANSYS GUI filters element types based on the preference you choose.)

Once you have set the Electric preference, use the ANSYS preprocessor (PREP7) to define the element
types, the material properties, and the model geometry. These tasks are common to most analyses. The
Modeling and Meshing Guide explains them in detail.

You can use the following types of elements in a steady-state current conduction analysis:

Table 12.9: Elements Used in a Steady-State Analysis

Element Dimens. Type


LINK68 3-D Two node thermal /electric line
PLANE230 2-D Eight node electric quadrilateral
SOLID5 3-D Eight node
structural/thermal/magnetic/electric
hexahedral
SOLID98 3-D Ten node
structural/thermal/magnetic/electric
tetrahedral
SOLID231 3-D Twenty node electric hexahedral
SOLID232 3-D Ten node electric tetrahedral
SHELL157 3-D Four node thermal/electric shell
MATRIX50 3-D Superelement

You must specify electric resistivity values RSVX, RSVY, and RSVZ using the MP command. These prop-
erties may be constant or temperature dependent.

12.4.2. Applying Loads and Obtaining a Solution


In this step, you define the analysis type and options, apply loads to the model, specify load step options,
and initiate the finite element solution. The next few topics explain how to perform the following tasks:

1. Enter the SOLUTION Processor. (p. 216)

2. Define the analysis type. (p. 217)

3. Define the analysis options. (p. 217)

4. Apply loads. (p. 217)

5. Start the solution. (p. 218)

6. Finish the solution. (p. 218)

12.4.2.1. Entering the SOLUTION Processor


To enter the SOLUTION processor, use either of the following:
Command(s): /SOLU

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
216 of ANSYS, Inc. and its subsidiaries and affiliates.
Steady-State Current Conduction Analysis

GUI: Main Menu> Solution

12.4.2.2. Defining Analysis Type


To specify the analysis type, do either of the following:

• In the GUI, choose menu path Main Menu> Solution> Analysis Type> New Analysis and choose a
Steady-state analysis.

• If this is a new analysis, issue the command ANTYPE,STATIC,NEW.

• If you want to restart a previous analysis (for example, to specify additional loads), issue the command
ANTYPE,STATIC,REST. You can restart an analysis only if you previously completed a steady-state ana-
lysis, and the files Jobname.EMAT, Jobname.ESAV, and Jobname.DB from the previous run are
available.

12.4.2.3. Defining Analysis Options


Next, you define which solver you want to use. You can use the sparse solver (default), the Jacobi
Conjugate Gradient (JCG) solver, the Incomplete Cholesky Conjugate Gradient (ICCG) solver, or the
Preconditioned Conjugate Gradient solver (PCG).

To select an equation solver, use either of the following:


Command(s): EQSLV
GUI: Main Menu> Solution> Analysis Type> Analysis Options

12.4.2.4. Applying Loads


You can apply loads to a steady-state analysis either on the solid model (keypoints, lines, and areas) or
on the finite element model (nodes and elements). You can specify several types of loads:

12.4.2.4.1. Current
Electric currents (AMPS) are concentrated nodal loads that you usually specify at model boundaries (the
label AMPS is just a load label; it does not indicate the units of measurement). A positive value of current
indicates current flowing into the node. For a uniform current density distribution, couple the appropriate
nodes in the VOLT degree of freedom, and apply the full current at one of the nodes.

To apply current, use one of the following:


Command(s): F
GUI: Main Menu> Solution> Define Loads> Apply> Electric> Excitation> Current

12.4.2.4.2. Voltage (VOLT)


Voltages are DOF constraints that you usually specify at model boundaries to apply a known voltage.
A typical approach specifies a zero voltage at one end of the conductor (the "ground" end) and a desired
voltage at the other end.

To apply voltage, use the following command or GUI path:


Command(s): D
GUI: Main Menu> Solution> Define Loads> Apply> Electric> Boundary> Voltage

You can also apply current and voltage loads using the independent current and voltage source options
of CIRCU124. For more information, refer to Electric Circuit Analysis (p. 271).

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 217
Electric Field Analysis

Optionally, you can use other commands to apply loads to a steady-state analysis, and you also can
specify output controls as load step options. For information about using these commands to apply
loads and about the load step options available for steady-state analysis, see Alternative Analysis Options
and Solution Methods (p. 289).

12.4.2.5. Starting the Solution


In this step, you initiate the solution for all load steps using one of the following:
Command(s): SOLVE
GUI: Main Menu> Solution> Solve> Current LS

12.4.2.6. Finishing the Solution


To leave the SOLUTION processor, use either of the following:
Command(s): FINISH
GUI: Main Menu> Finish

12.4.3. Reviewing Results


The program writes results from a steady-state current conduction analysis to the results file, Job-
name.RTH (or to Jobname.RST if other degrees of freedom are available besides VOLT). Results include
the data listed below:

Primary data: Nodal voltages (VOLT).

Derived data:

• Nodal electric field (EFX, EFY, EFZ, EFSUM).

• Nodal conduction current densities (JCX, JCY, JCZ, JCSUM). Supported only by PLANE230, SOLID231,
and SOLID232.

• Element conduction current densities (JSX, JSY, JSZ, JSSUM, JTX, JTY, JTZ, JTSUM).

• Element Joule heat (JHEAT).

• Nodal reaction currents.

You can review analysis results in POST1, the general postprocessor. To access the postprocessor, choose
one of the following:
Command(s): /POST1
GUI: Main Menu> General Postproc

For a complete description of all postprocessing functions, see the Basic Analysis Guide.

12.4.3.1. Reviewing Results in POST1


To review results in POST1, the ANSYS database must contain the same model for which the solution
was calculated. Also, the results file (Jobname.RTH or Jobname.RST) must be available.

To read results at the desired time point into the database, use either of the following:
Command(s): SET,,,,,TIME
GUI: Utility Menu> List> Results> Load Step Summary

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
218 of ANSYS, Inc. and its subsidiaries and affiliates.
Steady-State Current Conduction Analysis

If you specify a time value for which no results are available, the program performs linear interpolation
to calculate the results at that time.

To identify the results data you want, use a combination of a label and a sequence number or component
name.

You can now review the results by obtaining graphics displays and tabular listings. To obtain these, use
the following:

Table 12.10: Reviewing Results

Step Commands GUI Path


Produce PLESOL, Main Menu> General Postproc> Plot Results>
contour PLNSOL Contour Plot> Element Solution
displays.
Main Menu> General Postproc> Plot Results>
Contour Plot> Nodal Solu
Produce PLVECT Main Menu> General Postproc> Plot Results> Vector
vector Plot> Predefined
(arrow)
displays. Main Menu> General Postproc> Plot Results> Vector
Plot> User Defined
Produce PRESOL, Main Menu> General Postproc> List Results>
tabular data PRNSOL, Element Solution
listings. PRRSOL
Main Menu> General Postproc> List Results> Nodal
Solution

Main Menu> General Postproc> List Results>


Reaction Solu

To gain access to certain element results data that are not otherwise directly accessible, you must use
the following commands or menu paths after you have read the results into the database:

Table 12.11: ETABLE Results

Step Commands GUI Path


Produce ETABLE Main Menu> General Postproc> Element Table>
contour Define Table
displays.
Produce PLETAB Main Menu> General Postproc> Plot Results>
vector Contour Plot> Elem Table
(arrow)
displays. Main Menu> General Postproc> Element Table>
Plot Elem Table
Produce PRETAB Main Menu> General Postproc> List Results> Elem
tabular data Table Data
listings.
Main Menu> General Postproc> Element Table> List
Elem Table

POST1 performs many other postprocessing functions, including mapping results onto a path and load
case combinations. For more information, see the Basic Analysis Guide manual.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 219
Electric Field Analysis

12.4.4. Extracting Conductance from Multi-Conductor Systems


A key parameter from an electric solution is conductance. For multiple conductor systems, this involves
extracting self and mutual conductance terms so that equivalent circuit lumped conductors can be
defined for use in circuit simulators. The GMATRIX command macro has been developed to extract self
and mutual conductance terms for multiple conductor systems.

See the Mechanical APDL Theory Reference for more details.

GMATRIX works with the following elements:

• SOLID5 (KEYOPT(1) = 9)

• SOLID98 (KEYOPT(1) = 9)

• LINK68

• PLANE230

• SOLID231

• SOLID232

12.4.4.1. Ground Conductances and Lumped Conductances


Finite element simulation can readily compute and extract a "Ground" conductance matrix of conductance
values that relate the current on one conductor with the conductor's voltage drop (to ground). Fig-
ure 12.1: Three Conductor System (p. 220) illustrates a three-conductor system (one conductor is ground).
The following two equations relate currents on electrodes 1 and 2, I1 and I2, with the voltage drops for
the electrodes, V1 and V2:

Figure 12.1: Three Conductor System


Conductor 1 Conductor 2

Conductive medium (RSVX)

Conductor 3 (ground)

where Gg represents a matrix of conductances referred to as “ground conductances”. These ground


conductances do not represent lumped conductances typically used in a circuit simulator because they
do not relate the conductances between conductors. However, the GMATRIX command macro can
convert the ground conductance matrix to a lumped conductance matrix which is suitable for use in
circuit simulators. Figure 12.2: Lumped Conductor Equivalence of Three Conductor System (p. 221) illus-
trates the lumped conductances between the conductors. The following two equations then relate the
currents with the voltage drops:

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
220 of ANSYS, Inc. and its subsidiaries and affiliates.
Steady-State Current Conduction Analysis

In the equations above, conductance is in Siemens (1/Ω).

Figure 12.2: Lumped Conductor Equivalence of Three Conductor System

where Gl represents a matrix of conductances referred to as "lumped conductances".

12.4.4.2. Procedure
The GMATRIX command macro will perform multiple simulations and extract both the ground conduct-
ance matrix values and the lumped conductance matrix values. To prepare for GMATRIX, you must
group the conductor nodes into node components. Do not apply any loads to the model (voltages,
current, etc.). The component name applied to the conductor nodes must contain a common prefix,
followed by a numerical suffix progressing from 1 to the highest numbered conductor in the system.
The last numbered conductor in the system must be the ground conductor (the conductor whose po-
tential is assumed to be zero). The procedure for using GMATRIX is as follows:

1. Build and mesh the solid model with electric elements (p. 220). Conductors are assumed to be perfect
conductors and hence do not require a finite element mesh within the conductor domain. Only the sur-
rounding conductive regions require a mesh. The resulting nodes on the boundary of the conductors
represent the nodes that will be grouped into node components.

2. Select the nodes on the surface of the each conductor and group them into node components:
Command(s): CM
GUI: Utility Menu> Select> Comp/Assembly> Create Component

Share a command prefix for the component names, and use a numerical value sequencing from 1
to the highest numbered conductor. For example, in Figure 12.2: Lumped Conductor Equivalence
of Three Conductor System (p. 221), three node components would be defined for each set of con-
ductor nodes. Using a prefix "cond", the node component names would be "cond1", "cond2", and
"cond3". The last component, "cond3", would be the nodes representing the ground.

3. Enter the SOLUTION processor:


Command(s): SOLU
GUI: Main Menu> Solution

4. Select an equation solver (sparse or ICCG solver recommended):


Command(s): EQSLV
GUI: Main Menu> Solution> Analysis Type> Analysis Options

5. Invoke the GMATRIX macro:

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 221
Electric Field Analysis

Command(s): GMATRIX
GUI: Main Menu> General Postproc> Elec&Mag Calc> Component Based> Self/Mutual conductance

The GMATRIX command macro requires the following input:

• A symmetry factor (SYMFAC). If there is no symmetry in the model, the symmetry factor is 1 (default). If
you wish to model only a portion of the model by taking advantage of symmetry, use the symmetry
factor as a multiplier to obtain the correct conductance.

• The node component prefix name (Condname). This is the prefix of the node component names used
to define the conductor node components. In the above example, the prefix name is "cond". The command
macro requires that you put single quotes around the prefix name when entering the character string.
Thus, the input for this example would be 'cond'. In the GUI, the single quotes are automatically handled
by the program.

• The number of conductor node components (NUMCOND). Insert the total number of conductor node
components. In the above example, you would use "3".

• Enter a name for the stored matrix of conductance values (Matrixname). The command macro stores
the computed ground and lumped matrix values in a 3-D array vector where the "i" and "j" columns
represent the conductor indices, the "k" column indicates ground (k = 1) or lumped (k = 2) terms. The
default name is GMATRIX. For example, the command macro stores the ground terms in GMATRIX(i,j,1)
and the lumped terms in GMATRIX(i,j,2). The command macro also creates a text file containing the
matrix values and stores it in a file with the stored matrix name and a .TXT extension.

Do not apply inhomogeneous loads before using the GMATRIX command. Inhomogeneous loads are
those created by:

• Degree of freedom commands (D, DA, etc.) specifying nonzero degree of freedom values on nodes or
solid model entities

• Force commands (F, BF, BFE, BFA, etc.) specifying nonzero force values on nodes, elements, or solid
model entities

• Any CE command with a nonzero constant term

GMATRIX executes a series of solutions to compute self and mutual conductance between conductors.
The solutions, which are stored in the results file, are available for postprocessing, if desired. At the end
of the execution, the command macro presents a summary table.

12.5. Harmonic Quasistatic Electric Analysis


A harmonic electric analysis determines the effects of alternating current (AC), charge or voltage excit-
ation in electric devices. In this analysis, the time-harmonic electric and magnetic fields are uncoupled,
and the electromagnetic field can be treated as quasistatic. Eddy currents are considered to be negligible,
and the electric field is derived from the electric scalar potential. Capacitive effects and displacement
current are taken into account. Refer to Electromagnetics in the Mechanical APDL Theory Reference for
more information.

You can use this analysis to determine the voltage, electric field, electric flux density, and electric current
density distributions in an electric device as a function of frequency in response to time-harmonic
loading.

The procedure for doing a harmonic quasistatic analysis consists of three main steps:

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
222 of ANSYS, Inc. and its subsidiaries and affiliates.
Harmonic Quasistatic Electric Analysis

1. Build the model. (p. 223)

2. Apply loads and obtain the solution. (p. 224)

3. Review the results. (p. 226)

The next few topics discuss what you must do to perform these steps.

12.5.1. Building the Model


To build the model, you first specify a jobname and a title for your analysis as described in Steady-State
Current Conduction Analysis (p. 215). If you are using the ANSYS GUI, you set preferences for an electric
analysis. You then use the ANSYS preprocessor (PREP7) to define the element types, the material
properties, and the model geometry.

To perform a current-based harmonic quasistatic analysis, you can use the following types of elements:

Table 12.12: Elements Used in a Current-Based Harmonic Analysis [1]

Element Dimens. Type


PLANE230 2-D Eight node electric quadrilateral
SOLID231 3-D Twenty node electric hexahedral
SOLID232 3-D Ten node electric tetrahedral

1. The reaction solution is current.

To perform a charge-based harmonic quasistatic analysis, you can use the following types of elements:

Table 12.13: Elements Used in a Charge-Based Harmonic Analysis [1]

Element Dimens. Type


PLANE121 3-D Eight node electrostatic quadrilateral
SOLID122 3-D Twenty node electrostatic hexahedral
SOLID123 3-D Ten node electrostatic tetrahedral

1. The reaction solution is charge.

The default system of units is MKS. In the MKS system of units, free-space permittivity is set to 8.85e-
12 Farads/meter. To specify your own system of units and free-space permittivity use one of the following:
Command(s): EMUNIT
GUI: Main Menu>Preprocessor>Material props>Electromag Units

To model resistive and capacitive effects, a harmonic electric analysis requires the specification of
electrical resistivity and electric permittivity, respectively. Define electrical resistivity values as RSVX,
RSVY, and RSVZ on the MP command. Define relative electric permittivity values as PERX, PERY, and
PERZ on the MP command.

You can specify losses by defining electrical resistivity (RSVX, RSVY, RSVZ) or a loss tangent (LSST) on
the MP command. Resistivity and loss tangent effects are additive.

These properties may be constant or temperature dependent.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 223
Electric Field Analysis

12.5.2. Applying Loads and Obtaining a Solution


In this step, you define the analysis type and options, apply loads to the model, specify load step options,
and initiate the finite element solution. The next few topics explain how to perform the following tasks:

1. Enter the SOLUTION processor. (p. 224)

2. Define the analysis type. (p. 224)

3. Define the analysis options. (p. 224)

4. Apply loads. (p. 225)

5. Start the solution. (p. 226)

6. Finish the solution. (p. 226)

12.5.2.1. Entering the SOLUTION Processor


To enter the SOLUTION processor, use either of the following:
Command(s): /SOLU
GUI: Main Menu> Solution

12.5.2.2. Defining the Analysis Type


To specify the analysis type, do either of the following:

• In the GUI, choose menu path Main Menu> Solution> Analysis Type> New Analysis and choose a
Harmonic analysis.

• If this is a new analysis, issue the command ANTYPE,HARMONIC,NEW.

• If you want to restart a previous analysis (for example, to specify additional loads), issue the command
ANTYPE,HARMONIC,REST. You can restart an analysis only if you previously completed a harmonic
analysis, and the files Jobname.EMAT, Jobname.ESAV, and Jobname.DB from the previous run
are available.

12.5.2.3. Defining Analysis Options


Next, you define which solution method and which solver you want to use. Harmonic electric analyses
require the full solution method. To select a solution method, use one of the following:
Command(s): HROPT,FULL
GUI: Main Menu> Solution> Analysis Type> New Analysis> Harmonic

You can use the sparse solver (default), the Jacobi Conjugate Gradient (JCG) solver, the Incomplete
Cholesky Conjugate Gradient (ICCG) solver, or the Preconditioned Conjugate Gradient solver (PCG). To
select an equation solver, use one of the following:
Command(s): EQSLV
GUI: Main Menu> Solution> Analysis Type> Analysis Options

To specify the frequency range, use any of the following:


Command(s): HARFRQ
GUI: Main Menu> Preprocessor> Loads> Load Step opts> Time/Frequency
Main Menu> Solution> Loads> Load Step opts> Time/Frequency

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
224 of ANSYS, Inc. and its subsidiaries and affiliates.
Harmonic Quasistatic Electric Analysis

To specify the number of harmonic solutions within the load step, use either of the following:
Command(s): NSUBST
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Time/Frequenc> Freq & and Substps
Main Menu> Solution> Load Step Opts> Time/Frequenc> Freq & Substps

When specifying multiple substeps within a load step, you need to indicate whether the loads are to
be ramped or stepped. The KBC command is used for this purpose: KBC,0 indicates ramped loads (de-
fault), and KBC,1 indicates stepped loads.
Command(s): KBC
GUI: Main Menu> Solution> Load Step Opts> Time/Frequenc> Time and Substps (or Time & Time
Step)
Main Menu> Solution> Load Step Opts> Time/Frequenc> Time and Substps (or Time & Time Step)

To specify results data for the printed output file (Jobname.OUT), use one of the following:
Command(s): OUTPR
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Output Ctrls> Solu Printout
Main Menu> Solution> Load Step Opts> Output Ctrls> Solu Printout

You can also control the solution items sent to the results file (Jobname.RTH). By default, the ANSYS
program writes only the last substep of each load step to the results file. If you want all substeps (that
is, the solution at all time substeps) on the results file, use one of the following to specify a frequency
or ALL or 1.
Command(s): OUTRES
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Output Ctrls> DB/Results File
Main Menu> Solution> Loads> Load Step Opts> Output Ctrls> DB/Results File

12.5.2.4. Applying Loads


You can apply loads in a harmonic analysis either on the solid model (keypoints, lines, and areas) or on
the finite element model (nodes and elements). The type of loads you can specify depends on the element
type chosen for a harmonic analysis.

Table 12.14: Load Types

Analysis Element Types Loads


Current-Based Analysis PLANE230, SOLID231, Current
SOLID232
Voltage
Charge-Based Analysis PLANE121, SOLID122, Charge
SOLID123
Surface charge density

Volume charge density

Voltage

12.5.2.4.1. Current
Electric currents (AMPS) are concentrated nodal loads that you usually specify at model boundaries (the
label AMPS is just a load label; it does not indicate the units of measurement). A positive value of current
indicates current flowing into the node. For a uniform current density distribution, couple the appropriate
nodes in the VOLT degree of freedom, and apply the full current at one of the nodes.

To apply current, use one of the following:

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 225
Electric Field Analysis

Command(s): F
GUI: Main Menu> Solution> Define Loads> Apply> Electric> Excitation> Current

You can also apply current loads using the independent current source option of CIRCU124. For more
information, refer to Electric Circuit Analysis (p. 271).

12.5.2.4.2. Charge
Electric charges (CHRG) are concentrated nodal force loads. To apply them, use the following command
or GUI path:
Command(s): F
GUI: Main Menu> Solution> Define Loads> Apply> Electric> Excitation> Charge> On Nodes

12.5.2.4.3. Voltage (VOLT)


Voltages are DOF constraints that you usually specify at model boundaries to apply a known voltage.
A typical approach specifies a zero voltage at one end of the conductor (the "ground" end) and a desired
voltage at the other end.

To apply voltage, use the following command or GUI path:


Command(s): D
GUI: Main Menu> Solution> Define Loads> Apply> Electric> Boundary> Voltage

You can also apply voltage loads using the independent voltage source option of CIRCU124. For more
information, refer to Electric Circuit Analysis (p. 271).

12.5.2.5. Starting the Solution


In this step, you initiate the solution for all load steps using one of the following:
Command(s): SOLVE
GUI: Main Menu> Solution> Solve> Current LS

12.5.2.6. Finishing the Solution


To leave the SOLUTION processor, use either of the following:
Command(s): FINISH
GUI: Main Menu> Finish

12.5.3. Reviewing Results


The program writes results from a harmonic electric analysis to the results file, Jobname.RTH. Results
include the data listed below:

Primary data: Nodal DOF (VOLT).

Derived data:

Note

Some output quantities depend on the element type used in the analysis.

• Nodal electric field (EFX, EFY, EFZ, EFSUM).

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
226 of ANSYS, Inc. and its subsidiaries and affiliates.
Harmonic Quasistatic Electric Analysis

• For a current-based analysis using electric elements, nodal conduction current densities (JCX, JCY, JCZ,
JCSUM).

• For a charge-based analysis using electrostatic elements, nodal electric flux densities (DX, DY, DZ,
DSUM).

• Element current densities (JSX, JSY, JSZ, JSSUM). This output item represents the total (that is, sum of
conduction and displacement current densities). It can be used as a source for a subsequent magnetic
analysis.

• Element conduction current densities (or total measurable current density) (JTX, JTY, JTZ, JTSUM).

• Element Joule heat generation rate per unit volume (JHEAT). This is a time-averaged value.

• Element stored electric energy (SENE). This is a time-averaged value.

• For a current-based analysis using electric elements, nodal reaction currents.

• For a charge-based analysis using electrostatic elements, nodal reaction charges.

You can review analysis results in POST1, the general postprocessor, or in POST26, the time-history
postprocessor. To access the general postprocessor, choose one of the following:
Command(s): /POST1
GUI: Main Menu> General Postproc
To access the time-history postprocessor, choose one of the following:
Command(s): /POST26
GUI: Main Menu> TimeHist Postproc

The following table summarizes the applicable labels for the /POST1 and /POST26 commands.

Table 12.15: Command Labels

Analysis
Output Quantity Label Command(s) Current-based
Charge-based
[1] [2]
Nodal DOF VOLT PRNSOL, Y Y
PLNSOL,
ETABLE,
NSOL
Nodal electric field EF PRNSOL, Y Y
Nodal conduction current density JC PLNSOL, Y –
PRESOL,
Nodal electric flux density D PLESOL, – Y
PRVECT,
PLVECT,
ETABLE,
ESOL
Element total current density JS [3 ] PRESOL, Y Y
Element conduction current density JT [3 ] PLESOL, Y Y
PRVECT,
PLVECT,
ETABLE,
ESOL

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 227
Electric Field Analysis

Analysis
Output Quantity Label Command(s) Current-based
Charge-based
[1] [2]
Element Joule heat generation rate per unit JHEAT PRESOL, Y Y
volume (time-averaged) PLESOL,
Element stored electric energy (time-averaged) SENE ETABLE, Y Y
ESOL
Nodal reaction current AMPS RFORCE, Y –
Nodal reaction charge CHRG PRRFOR, – Y
PRRSOL,
PRESOL,
PLESOL

1. PLANE230, SOLID231, and SOLID232 are current-based.

2. PLANE121, SOLID122, and SOLID123 are charge-based.

3. Refer to Table 12.8: Current Densities in Low-Frequency Analyses (p. 215) for the meaning of this label.

For a complete description of all postprocessing functions, see The General Postprocessor (POST1) and
The Time-History Postprocessor (POST26) in the Basic Analysis Guide.

12.5.3.1. Reviewing Results in POST1


To review results in POST1, the ANSYS database must contain the same model for which the solution
was calculated. Also, the results file (Jobname.RTH) must be available.

The procedures for reviewing POST1 harmonic electric analysis results are identical to the procedures
described in Steady-State Current Conduction Analysis (p. 215) with the following exception. Results
from a harmonic electric analysis are complex and consist of real and imaginary components. Set KIMG=0
or KIMG=1 on the SET command to read the real or imaginary results respectively.

12.5.3.2. Reviewing Results in POST26


To review results in POST26, the time-history postprocessor, the ANSYS database must contain the same
model for which the solution was calculated, and the results file (Jobname.RTH) must be available. If
the model is not in the database, restore it using one of the following:
Command(s): RESUME
GUI: Utility Menu> File> Resume Jobname.db

Then use one of the following to read in the desired set of results.
Command(s): SET
GUI: Utility Menu> List> Results> Load Step Summary

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
228 of ANSYS, Inc. and its subsidiaries and affiliates.
Transient Quasistatic Electric Analysis

POST26 works with tables of result item versus frequency, known as variables. Each variable is assigned
a reference number, with variable number 1 reserved for frequency. Therefore the first things you need
to do is define the variables using the following commands or GUI paths.

Table 12.16: Defining Variables

Step Command GUI Path


Define primary data NSOL Main Menu> TimeHist
variables Postpro> Define Variables
Define derived data ESOL Main Menu> TimeHist
variables Postpro> Define Variables
Define reaction data RFORCE Main Menu> TimeHist
variables. Postpro> Define Variables

Once you have defined these variables, you can graph or list them (versus time or any variable) using
the following commands or GUI paths.

Table 12.17: Graphing and Listing Variables

Step Command GUI Path


To graph variables. PLVAR Main Menu> TimeHist
Postpro> Graph Variables
To list variables. PRVAR Main Menu> TimeHist
Postpro> List Variables
To list only the extreme EXTREM Main Menu> TimeHist
variables. Postpro> List Extremes

POST26 offers many other functions, such as performing math operations among variables, moving
variables into array parameters, etc. For more information, see The Time-History Postprocessor (POST26)
in the Basic Analysis Guide.

By reviewing the time-history results at strategic points throughout the model, you can identify the
critical time points for further POST1 postprocessing.

12.6. Transient Quasistatic Electric Analysis


A transient electric analysis determines the effects of time-dependent current or voltage excitation in
electric devices. In this analysis, the time-varying electric and magnetic fields are uncoupled, and the
electromagnetic field can be treated as quasistatic. Eddy currents are considered to be negligible, and
the electric field is derived from the electric scalar potential. A transient electric analysis is assumed to
be linear. Refer to Electromagnetics in the Mechanical APDL Theory Reference for more information.

You can use this analysis to determine the voltage, electric field, and electric current density distributions
in an electric device as a function of time in response to time-dependent loading. The time scale of the
loading is such that the capacitive effects and displacement current are considered to be important. It
they are not important, you might be able to use a steady-state current conduction analysis instead.

The procedure for doing a transient quasistatic analysis consists of three main steps:

1. Build the model. (p. 230)

2. Apply loads and obtain the solution. (p. 230)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 229
Electric Field Analysis

3. Review the results. (p. 232)

The next few topics discuss what you must do to perform these steps.

12.6.1. Building the Model


To build the model, you first specify a jobname and a title for your analysis as described in Steady-State
Current Conduction Analysis (p. 215). If you are using the ANSYS GUI, you set preferences for an electric
analysis. You then use the ANSYS preprocessor (PREP7) to define the element types, the material
properties, and the model geometry.

You can use the following types of elements in a transient electric analysis:

Table 12.18: Elements Used in a Transient Analysis

Element Dimens. Type


PLANE230 2-D Eight node electric quadrilateral
SOLID231 3-D Twenty node electric hexahedral
SOLID232 3-D Ten node electric tetrahedral

The default system of units is MKS. In the MKS system of units, free-space permittivity is set to 8.85e-
12 Farads/meter. To specify your own system of units and free-space permittivity use one of the following:
Command(s): EMUNIT
GUI: Main Menu>Preprocessor>Material props>Electromag Units

To model resistive and capacitive effects, a transient electric analysis requires the specification of elec-
trical resistivity and electric permittivity, respectively. Define electrical resistivity values as RSVX, RSVY,
and RSVZ on the MP command. Define relative electric permittivity values as PERX, PERY, and PERZ on
the MP command. These properties may be constant or temperature dependent.

12.6.2. Applying Loads and Obtaining a Solution


In this step, you define the analysis type and options, apply loads to the model, specify load step options,
and initiate the finite element solution. The next few topics explain how to perform the following tasks:

1. Enter the SOLUTION processor. (p. 230)

2. Define the analysis type. (p. 231)

3. Define the analysis options. (p. 231)

4. Apply loads. (p. 232)

5. Start the solution. (p. 232)

6. Finish the solution. (p. 232)

12.6.2.1. Entering the SOLUTION Processor


To enter the SOLUTION processor, use either of the following:
Command(s): /SOLU
GUI: Main Menu> Solution

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
230 of ANSYS, Inc. and its subsidiaries and affiliates.
Transient Quasistatic Electric Analysis

12.6.2.2. Defining the Analysis Type


To specify the analysis type, do either of the following:

• In the GUI, choose menu path Main Menu> Solution> Analysis Type> New Analysis and choose a
Transient analysis.

• If this is a new analysis, issue the command ANTYPE,TRANSIENT,NEW.

• If you want to restart a previous analysis (for example, to specify additional loads), issue the command
ANTYPE,TRANSIENT,REST. You can restart an analysis only if you previously completed a transient
analysis, and the files Jobname.EMAT, Jobname.ESAV, and Jobname.DB from the previous run
are available.

12.6.2.3. Defining Analysis Options


Next, you define which solution method and which solver you want to use. Transient electric analyses
require the full solution method. To select a solution method, use one of the following:
Command(s): TRNOPT,FULL
GUI: Main Menu> Solution> Analysis Type> New Analysis>Transient

You can use the sparse solver (default), the Jacobi Conjugate Gradient (JCG) solver, the Incomplete
Cholesky Conjugate Gradient (ICCG) solver, or the Preconditioned Conjugate Gradient solver (PCG). To
select an equation solver, use one of the following:
Command(s): EQSLV
GUI: Main Menu> Solution> Analysis Type> Analysis Options

To specify the time at the end of a load step, use any of the following:
Command(s): TIME
GUI: Main Menu>Preprocessor>Loads>Load Step opts>Time/Frequency
Main Menu>Solution>Loads>Load Step opts>Time/Frequency

The integration time step is the time increment used in the time integration scheme. It determines the
accuracy of your solution. The smaller the time step size, the higher the accuracy. The size of the first
integration time step following any large step change in loading conditions is especially critical. You
can reduce inaccuracies by reducing the integration time step size. You can specify it directly via the
DELTIM command or indirectly via the NSUBST command.
Command(s): DELTIM
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Time/Frequenc> Time & Time Step
Main Menu> Solution> Load Step Opts> Time/Frequenc> Time & Time Step
Command(s): NSUBST
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Time/Frequenc> Time and Substps
Main Menu> Solution> Load Step Opts> Time/Frequenc> Time and Substps

When specifying multiple substeps within a load step, you need to indicate whether the loads are to
be ramped or stepped. The KBC command is used for this purpose: KBC,0 indicates ramped loads (de-
fault), and KBC,1 indicates stepped loads.
Command(s): KBC
GUI: Main Menu> Solution> Load Step Opts> Time/Frequenc> Time and Substps (or Time & Time
Step)
Main Menu> Solution> Load Step Opts> Time/Frequenc> Time and Substps (or Time & Time Step)

To specify results data for the printed output file (Jobname.OUT), use one of the following:
Command(s): OUTPR

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 231
Electric Field Analysis

GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Output Ctrls> Solu Printout
Main Menu> Solution> Load Step Opts> Output Ctrls> Solu Printout

You can also control the solution items sent to the results file (Jobname.RTH). By default, the ANSYS
program writes only the last substep of each load step to the results file. If you want all substeps (that
is, the solution at all time substeps) on the results file, use one of the following to specify a frequency
or ALL or 1.
Command(s): OUTRES
GUI: Main Menu> Preprocessor> Loads> Load Step Opts> Output Ctrls> DB/Results File
Main Menu> Solution> Loads> Load Step Opts> Output Ctrls> DB/Results File

12.6.2.4. Applying Loads


You can apply loads in a transient analysis either on the solid model (keypoints, lines, and areas) or on
the finite element model (nodes and elements). You can specify current and voltage loads. The procedures
and GUI paths you use to apply these loads are identical to those described in Steady-State Current
Conduction Analysis (p. 215).

You can also apply current and voltage loads using the independent current and voltage source options
of CIRCU124. For more information, refer to Electric Circuit Analysis (p. 271).

12.6.2.5. Starting the Solution


In this step, you initiate the solution for all load steps using one of the following:
Command(s): SOLVE
GUI: Main Menu> Solution> Solve> Current LS

12.6.2.6. Finishing the Solution


To leave the SOLUTION processor, use either of the following:
Command(s): FINISH
GUI: Main Menu> Finish

12.6.3. Reviewing Results


The program writes results from a transient electric analysis to the results file, Jobname.RTH. Results
include the data listed below:

Primary data: Nodal DOF (VOLT).

Derived data:

• Nodal electric field (EFX, EFY, EFZ, EFSUM).

• Nodal conduction current densities (JCX, JCY, JCZ, JCSUM).

• Element current densities (JSX, JSY, JSZ, JSSUM). This output item represents the total (that is, the sum
of conduction and displacement current densities). It can be used as a source for a subsequent magnetic
analysis.

• Element conduction current densities (or total measurable current density) (JTX, JTY, JTZ, JTSUM).

• Element Joule heat generation rate per unit volume (JHEAT).

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
232 of ANSYS, Inc. and its subsidiaries and affiliates.
Example Electric Field Analyses

• Element stored electric energy (SENE).

• Nodal reaction currents.

You can review analysis results in POST1, the general postprocessor, or in POST26, the time-history
postprocessor. To access the general postprocessor, choose one of the following:
Command(s): /POST1
GUI: Main Menu> General Postproc
To access the time-history postprocessor, choose one of the following:
Command(s): /POST26
GUI: Main Menu> TimeHist Postproc

For a complete description of all postprocessing functions, see The General Postprocessor (POST1) and
The Time-History Postprocessor (POST26) in the Basic Analysis Guide.

12.6.3.1. Reviewing Results in POST1


To review results in POST1, the ANSYS database must contain the same model for which the solution
was calculated. Also, the results file (Jobname.RTH) must be available.

The procedures for reviewing POST1 transient electric analysis results are identical to the procedures
described in Steady-State Current Conduction Analysis (p. 215).

12.6.3.2. Reviewing Results in POST26


To review results in POST26, the time-history postprocessor, the ANSYS database must contain the same
model for which the solution was calculated, and the Jobname.RTH file (the results file) must be
available. If the model is not in the database, restore it using one of the following:
Command(s): RESUME
GUI: Utility Menu> File> Resume Jobname.db

The procedures for reviewing POST26 transient electric analysis results are identical to the procedures
described in Harmonic Quasistatic Electric Analysis (p. 222). Variable number 1 is reserved for time instead
of frequency.

12.7. Example Electric Field Analyses


The following examples are available:
12.7.1. Example: Steady-State Conduction Current Analysis
12.7.2. Example: Conductance Calculation
12.7.3. Example: Harmonic Quasistatic Electric Analysis
12.7.4. Example: Transient Quasistatic Electric Analysis
12.7.5. Other Examples

12.7.1. Example: Steady-State Conduction Current Analysis


This example problem shows how to perform a steady-state conduction current analysis.

A current I is applied to a thin disk of radius r = a. As shown in the following figure, the current enters
and leaves via point electrodes located at r = b, ϕ = 0 and r = b, ϕ = π. Find the potential and dc-current
distributions in the disk.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 233
Electric Field Analysis

Figure 12.3: Conducting Disk with Current Loading


y

a
I I
x
-b b

The geometric and electrical parameters are:

Radius a = 20 cm
Distance from the center to the point electrodes b = 10 cm
Applied Current I = 1 mA
Disk Resistivity ρ = 100 Ωm

To obtain an accurate field distribution, the disc area is densely meshed with triangle-shaped PLANE230
electric elements. A VOLT degree of freedom constraint is applied to the center of the disk. Current
loads are applied as concentrated nodal loads. A cylindrical coordinate system is used.

12.7.1.1. Results
Table 12.19: Electric Potential at Points with Coordinates r = a and ϕ

Electric Potential (V)


ϕ (degrees)
Computed Target [1 ]
0 –.03501 –.03497
10 –.03399 –.03392
20 –.03124 –.03110
30 –.02708 –.02716
40 –.02269 –.02271
50 –.01814 –.01810
60 –.01360 –.01349
70 –.00880 –.00894
80 –.00438 –.00445
90 0.0 0.0

1. Problem # 286, p.137 in N.N. Lebedev, I.P. Skalskaya, Y.S. Ufland, "Worked problems in Applied Mathematics,"
Dover Publications, Inc., NY (1979).

The following figures display the potential and dc-current distributions in the disk.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
234 of ANSYS, Inc. and its subsidiaries and affiliates.
Example Electric Field Analyses

Figure 12.4: Potential Distribution

Figure 12.5: Current Distribution

12.7.1.2. Command Listing


You can perform this example steady-state analysis using the ANSYS commands shown below. Text
prefaced by an exclamation point (!) is a comment.
/batch,list
/title, DC-current distribution in a thin conducting disk
a=20.e-2 ! disk radius, m
b=10.e-2 ! electrode distance from the center, m
I=1.e-3 ! current, A
rho=100 ! resistivity, Ohm*m
/nopr

/PREP7
! Model and meshing
et,1,PLANE230 ! electric element type
mp,rsvx,1,rho ! resistivity

cyl4,0,0,0,0,a,360 ! circular area


esize,,64

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 235
Electric Field Analysis

msha,1,2-D ! mesh with triangles


amesh,1

! Boundary conditions
csys,1 ! cylindrical coordinate system
d,node(0,0,0),volt,0 ! ground center node

! Nodal current loads


f,node(b,0,0),amps,-I
f,node(b,180,0),amps,I

fini

/solu
antype,static ! steady-state current conduction
solve
fini

/post1
plnsol,volt ! plot electric potential
plnsol,jc,sum ! plot current density vector magnitude

*dim,value,,10,2
*dim,coord,,10,2

*do,i,1,10
! coordinates of solution point
r=a $ phi=(i-1)*10
coord(i,1)=r
coord(i,2)=phi
! ANSYS solution
value(i,1)=volt(node(a,(i-1)*10,0))
*enddo
! Analytical solution
*vfill,value(1,2),data,-0.034969,-0.033923,-0.031098,-0.027163,-0.022709
*vfill,value(6,2),data,-0.018095,-0.013485,-0.008937,-0.004451,0.

/com,---------------- VOLT SOLUTION ----------------


/com,
/com, R | PHI | ANSYS | TARGET
/com,
*vwrite,coord(1,1),coord(1,2),value(1,1),value(1,2),
(1X,' ',F6.1,' ',F6.1,' ',F11.6,' ',F11.6)
/com,-------------------------------------------------

fini

12.7.2. Example: Conductance Calculation


This problem evaluates conductance between parallel plate electrodes. The objective is to calculate the
self and mutual conductance coefficients between two parallel plate electrodes.

The model consists of two parallel plate electrodes, 3 m in length, with a gap of 2 m and a conductivity
of 10. One electrode represents the ground, and 100 volts is applied to the other electrode. The target
conductance is 15.

Figure 12.6: Problem Geometry


Volt
(D,,VOLT,100)

g J,E Conductor Electrodes


(MP,RSVX)

Ground w
(D,,VOLT,0)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
236 of ANSYS, Inc. and its subsidiaries and affiliates.
Example Electric Field Analyses

12.7.2.1. Command Listing


/title,Conductance between parallel plate electrodes using GMATRIX

/com Input data


/com sigma : conductivity
/com g : gap between electrodes
/com w : electrode width
/com l : length
/com
/com Target
/com
/com G = sigma w l / g : conductance between parallel plate electrodes
!
g=2 ! gap between electrodes
w=3 ! electrode width
l=1 ! length
sigma=10 ! conductivity
!
gt=sigma*w*l/g ! target conductance
!
/prep7
et,1,230
mp,rsvx,1,1/sigma
!
n,1,0,0
n,2,w,0
n,3,w,g
n,4,0,g
e,1,2,3,4
!
nsel,s,loc,y,g ! electrode
cm,comp1,node
d,all,volt,100
!
nsel,s,loc,y,0 ! ground
cm,comp2,node
d,all,volt,0
!
nsel,all
!
gmatrix,1,'comp',2,0 ! compute conductance matrix
gc=gmatrix(1,1,1) ! computed conductance
finish

12.7.3. Example: Harmonic Quasistatic Electric Analysis


A time-harmonic voltage of amplitude Vo is applied to a barium titanate parallel plate capacitor with
circular plates of radius a and dielectric thickness d. The dielectric has relative permittivity εr and loss
tangent tanδ. Perform a harmonic analysis to determine the capacitor admittance (Y) in the frequency
(f ) range of 0 to 1 MHz, and find the dissipated power at 1 MHz.

Figure 12.7: Parallel Plate Capacitor with Time-Harmonic Voltage Load


Lossy Dielectric

Vo

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 237
Electric Field Analysis

The geometric and electrical parameters are:

Radius a = 9 cm
Thickness d = 0.1 cm
Relative Permittivity εr = 1143
Loss tangent tanδ = 0.0105
Voltage amplitude Vo = 50 volts
Frequency f = 0 to 1 MHz

The capacitor is modeled using the axisymmetric option of PLANE230 electric elements. Electrodes are
defined by coupling VOLT degrees of freedom on the major surfaces of the capacitor. The bottom
electrode is grounded, and a voltage load Vo is applied to the top electrode.

Figure 12.8: Axisymmetric Model


y

d
V = Vo
x

Electric admittance (Y) is calculated at ten frequencies between 0 and 1 MHz using the reaction current
on the loaded electrode. Results are compared with target values obtained from the following analytical
expression:

Y = 2πfC(tanδ+j)

where:

and j = imaginary unit.

Power dissipation at f = 1 MHz is calculated in /POST1 by summing up the Joule heat rates over the
elements. The result is compared with the following analytical expression for the time-average power
dissipated in the capacitor:

12.7.3.1. Results
As shown in the following table, the ANSYS electric admittance (Y) results agree with those from the
analytical expression given above.

Table 12.20: Electric Admittance (Y)

Frequency (MHz) Admittance Amplitude (S) [1]


0.0 0.1618
0.2 0.3236
0.3 0.4855
0.4 0.6473

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
238 of ANSYS, Inc. and its subsidiaries and affiliates.
Example Electric Field Analyses

Frequency (MHz) Admittance Amplitude (S) [1]


0.5 0.8091
0.6 0.9709
0.7 1.1327
0.8 1.2945
0.9 1.4564
1.0 1.6182

1. The phase angle is 89.4 degrees at all ten frequencies.

The power dissipated at a frequency of 1 MHz is 21.2 watts.

12.7.3.2. Command Listing


You can perform this example harmonic analysis using the ANSYS commands shown below. Text prefaced
by an exclamation point (!) is a comment.

Besides commands to perform this analysis using the PLANE230 electric elements, this command listing
includes the commands to do the same analysis using PLANE121 electrostatic elements.
/batch,list
/title, Harmonic response of a lossy capacitor
/com,
/com, Problem parameters:
a=9.e-2 ! radius, m
d=0.1e-2 ! thickness, m
epsr=1143 ! relative permittivity
tand=0.0105 ! loss tangent
Vo=50 ! voltage amplitude, V
f1=0 ! begin frequency, Hz
f2=1.e6 ! end frequency, Hz
eps0=8.854e-12 ! free space permittivity, F/m
Pi=acos(-1)
C=epsr*eps0*Pi*a**2/d ! capacitance, F
P2d=Pi*f2*Vo**2*C*tand ! power dissipation at freq. f2, watt

/nopr
/PREP7
et,1,PLANE230,,,1 ! axisymmetric electric element
emunit,epzro,eps0 ! specify free-space permittivity
mp,perx,1,epsr ! electric material properties
mp,lsst,1,tand

rect,,a,,d ! model and mesh


esize,d/2
amesh,1

! Boundary conditions and loads


nsel,s,loc,y,0
cp,1,volt,all ! define bottom electrode
*get,n_grd,node,0,num,min ! get master node on bottom electrode
nsel,s,loc,y,d
cp,2,volt,all ! top electrode
*get,n_load,node,0,num,min ! get master node on top electrode
nsel,all
d,n_grd,volt,0 ! ground bottom electrode
d,n_load,volt,Vo ! apply voltage load to top electrode
fini

/solu
antype,harm ! harmonic analysis
harfrq,f1,f2 ! frequency range
nsubs,10 ! number of substeps

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 239
Electric Field Analysis

outres,all,all ! write all solution items to the result file


kbc,1 ! stepped load
solve
fini

/post1
/com,Calculate power dissipation at frequency = %f2%, Hz
set,last ! read last data set
etab,jh,jheat ! fill etable with Joule heat rates per unit volume
etab,vol,volu ! fill etable with element volumes
smult,dpower,jh,vol ! fill etable with element Joule heat rates
ssum ! sum element Joule heat rates
/com,Expected power dissipation = %P2d%, watt
fini

/post26
rfor,2,n_load,amps ! reaction current I
prod,3,2,,,Y_ANSYS,,,1/Vo ! Y_ansys = I/V
prod,4,1,,,,,,2*Pi*C ! 2*Pi*f*C
cfact,tand,,,1
add,5,4,4,,Y_TARGET ! Y_target = 2*Pi*f*C*(tand+j)
prcplx,1
prvar,Y_ANSYS,Y_TARGET
fini

/com,
/com, *** Perform same frequency sweep using electrostatic elements
/com,
/PREP7
et,1,PLANE121,,,1 ! axisymmetric electrostatic element
fini

/solu
antype,harm ! harmonic analysis
harfrq,f1,f2 ! frequency range
nsubs,10 ! number of substeps
outres,all,all ! write all solution items to the result file
kbc,1 ! stepped load
solve
fini

/post1
/com,Calculate power dissipation at frequency = %f2%, Hz
set,last ! read last dataset
etab,jh,jheat ! fill etable with Joule heat rates per unit volume
etab,vol,volu ! fill etable with element volumes
smult,dpower,jh,vol ! fill etable with element Joule heat rates
ssum ! summ up element Joule heat rates
/com,Expected power dissipation = %P2d%, watt
fini

/post26
rfor,2,n_load,chrg ! reaction charge Q
cfact,0,2*Pi
prod,3,1,2,,Y_ANSYS,,,,1/Vo ! Y_ansys = j*2*Pi*Q/Vo
prod,4,1,,,,,,2*Pi*C ! 2*Pi*f*C
cfact,tand,,,1
add,5,4,4,,Y_TARGET ! Y_target = 2*Pi*f*C*(tand+j)
prcplx,1
prvar,Y_ANSYS,Y_TARGET
fini

12.7.4. Example: Transient Quasistatic Electric Analysis


12.7.4.1. Problem Description
A parallel plate capacitor filled with a lossy dielectric, characterized by relative permittivity εr and res-
istivity ρ, is connected, in series with a resistor R, to a source of constant voltage U. The switch closes

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
240 of ANSYS, Inc. and its subsidiaries and affiliates.
Example Electric Field Analyses

at time t = 0. Find the electric field and current density distributions in the capacitor as functions of
time.

Figure 12.9: Parallel Plate Capacitor Connected to a Voltage Source


y

b
R
x
d
z
t=0
-+
U

The capacitor and circuit parameters are:

Length a = 3 cm
Width b = 1 cm
Thickness d = 0.5 cm
Permittivity (relative) = 12
Resistivity = 150 Ωm
Resistance R = 1 kΩ
Voltage U = 12 volts

The lossy capacitor is modeled with SOLID231 electric elements. Electrodes are defined by coupling
VOLT degrees of freedom on the major surfaces of the capacitor. Lumped circuit components are
modeled using CIRCU124 elements and they are connected to the capacitor via the master nodes. A
transient analysis is performed to determine the electric field variation in the capacitor with time.
Computed results for a selected element are compared in /POST26 to the values derived from the fol-
lowing analytical expression for the electric field:

E(t) = Es{1 - exp (-t/τ)}

where:

Es = steady state electric field, Volts/m

S = capacitor plate area, m2

τ = time constant, seconds

and they are defined by:

S = ab

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 241
Electric Field Analysis

12.7.4.2. Results
The following figures display the electric field and current density distributions as functions of time.

Figure 12.10: Computed and Target Electric Fields

Figure 12.11: Current Density (Conduction, Displacement, and Total)

12.7.4.3. Command Listing


You can perform this example transient analysis using the ANSYS commands shown below. Text prefaced
by an exclamation point (!) is a comment.

Besides /POST26 commands to display the electric field and current density, this command listing includes
the commands to print electric field, current density, electric flux density, and Joule heat rate. The current

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
242 of ANSYS, Inc. and its subsidiaries and affiliates.
Example Electric Field Analyses

density and Joule heat rate output quantities are included to illustrate the coupling to magnetic and
thermal analyses using companion magnetic and thermal elements, respectively.
/batch,list
/title, Transient effects in a lossy capacitor
/com,
/com, Problem parameters:
a=3.e-2 ! length, m
b=1.e-2 ! width, m
S=a*b ! area, m**2
d=0.5e-2 ! thickness, m
epsr=12 ! relative permittivity of dielectric
eps0=8.854e-12 ! free space permittivity, F/m
rho=150 ! resistivity of dielectric, Ohm*m,
R=1000 ! resistance, Ohm
U=12 ! voltage, V
Es=U/(S*R/rho+d) ! steady-state electric field, V/m
tau=epsr*eps0*S*R/(S*R/rho+d) ! time constant, s

/nopr
/PREP7
emunit,epzro,eps0 ! Specify free-space permittivity

! Element attributes
et,1,CIRCU124 ! Resistor
et,2,CIRCU124,4 ! Voltage source
et,3,SOLID231 ! 20-node brick electric solid
r,1,R ! Real constants for circuit elements
r,2,U
mp,rsvx,1,rho ! Electric properties
mp,perx,1,epsr

! Modeling and meshing


type,3
mat,1
block,,d,,a,,b
esize,d/2
vmesh,1

nsel,s,loc,x,0
cp,1,volt,all ! Couple nodes to model right electrode
*get,n1,node,0,num,min ! Get master node on right electrode
nsel,s,loc,x,d
cp,2,volt,all ! Couple nodes to model left electrode
*get,n2,node,0,num,min ! Get master node on left electrode
nsel,all

! Circuit mesh
*get,nmax,node,0,num,max
n3=nmax+1
n4=n3+1
n,n3,a/2,-a
n,n4,a/2,-a
type,1 ! resistor
real,1
e,n1,n3
type,2 ! voltage source
real,2
e,n3,n2,n4
d,n2,volt,0 ! ground node
fini

/solu
antype,transient ! transient analysis
t1=6*tau
time,t1 ! set analysis time
deltim,t1/100 ! set time step
outres,all,5 ! write results at every 5th substep
ic,all,volt,0 ! initial conditions for VOLT
solve
fini

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 243
Electric Field Analysis

! Select nodes and elements for postprocessing


n_post=node(d/2,a/2,b/2)
nsel,s,node,,n_post
esln,s
*get,e_post,elem,0,num,min
allsel

/com, *** Results verification


/post26
numvar,20

! Electric field
esol,2,e_post,,EF,x,EF_ANS
exp,3,1,,,,,,-1/tau,-1 ! -exp(-t/tau)
filldata,4,,,,1 ! 1
add,5,4,3,,EF_TAR,,,Es,Es ! E=Es*(1-exp(-t/tau))

! Conduction current
esol,6,e_post,,JC,x,JC_ANS
prod,7,5,,,JC_TAR,,,1/rho ! Jc=E/rho

! Electric flux density


esol,8,e_post,,NMISC,1,D_ANS
prod,9,5,,,D_TAR,,,epsr*eps0 ! D=epsr*eps0*E

! Displacement and total (displacement+conduction) currents


esol,10,e_post,,JS,x,JS_ANS
add,11,10,6,,JD_ANS,,,,-1 ! Jd=Js-Jc
deriv,12,9,1,,JD_TAR ! Jd=dD/dt
add,13,7,12,,JS_TAR

! Joule heat generation rate per unit volume


esol,14,e_post,,JHEAT,,HGEN_ANS
prod,15,5,7,,HGEN_TAR! Jheat=E*Jc

prvar,EF_ANS,EF_TAR,D_ANS,D_TAR
prvar,JC_ANS,JC_TAR,JD_ANS,JD_TAR,JS_ANS,JS_TAR
prvar,HGEN_ANS,HGEN_TAR

/axlab,x, Time, s
/axlab,y, Electric Field, Volt/m
plvar,EF_ANS,EF_TAR ! Plot computed and expected EF
/axlab,y, Current density, A/m**2
plvar,JC_ANS,JD_ANS,JS_ANS ! Plot computed currents
fini

/com, *** Coupling to thermal analysis


/PREP7
et,1,0
et,2,0
et,3,90 ! companion thermal element
esel,s,elem,,e_post
ldread,hgen,,5,,,,rth ! read heat generation from the 5th substep
bfelist,all,hgen
ldread,hgen,,,,,,rth ! read heat generation from the last substep
bfelist,all,hgen
esel,all
fini

/com, *** Coupling to magnetic analysis


/PREP7
et,3,236 ! companion magnetic element
esel,s,elem,,e_post
ldread,js,,5,,,,rth ! read current from the 5th substep
bfelist,all,js
ldread,js,,,,,,rth ! read current from the last substep
bfelist,all,js
esel,all
fini

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
244 of ANSYS, Inc. and its subsidiaries and affiliates.
Example Electric Field Analyses

12.7.5. Other Examples


Another ANSYS, Inc., publication, the Mechanical APDL Verification Manual, contains several examples
of current conduction analysis:

VM117 - Electric Current Flowing in a Network


VM170 - Magnetic Field from a Square Current Loop
VM173 - Centerline Temperature of an Electrical Wire

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 245
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
246 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 13: Electrostatic Field Analysis
Electrostatic field analysis determines the electric field and electric scalar potential (voltage) distribution
caused by charge distributions or applied potential. You can apply two types of loads in this analysis:
voltage and charge densities.

An electrostatic analysis is assumed to be linear. The electric field is proportional to the applied voltage.

This document covers the h-Method electrostatic analysis method.

Electrostatic contact is also available in ANSYS. See Modeling Electric Contact in the Contact Technology
Guide for details.

The following h-Method electrostatic field analysis topics are available:


13.1. Elements Used in h-Method Electrostatic Analysis
13.2. Steps in an h-Method Electrostatic Analysis
13.3. Extracting Capacitance from Multi-conductor Systems
13.4. Example Electrostatic Field Analyses (h-Method)

13.1. Elements Used in h-Method Electrostatic Analysis


Electrostatic analyses use the following ANSYS elements:

Table 13.1: 2-D Solid Elements

Element Dimens. Shape or Characteristic DOFs Notes


PLANE121 2-D Quadrilateral, eight Voltage at each node Supported for cyclic
nodes symmetry (periodic)
analyses, except for
coupled
thermo-electric with
VOLT and TEMP.

Table 13.2: 3-D Solid Elements

Element Dimens. Shape or DOFs Notes


Characteristic
SOLID122 3-D Brick, 20 nodes Voltage at each node Supported for cyclic
symmetry (periodic)
analyses, except for
coupled thermo-electric
with VOLT and TEMP.
SOLID123 3-D Tetrahedral, 10 node Voltage at each node Supported for cyclic
symmetry (periodic)
analyses, except for

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 247
Electrostatic Field Analysis

Element Dimens. Shape or DOFs Notes


Characteristic
coupled thermo-electric
with VOLT and TEMP.

Table 13.3: Specialty Elements

Element Dimens. Shape or Characteristic DOFs


MATRIX50 None (this is Depends on the elements Depends on the included element
a super- that make up this element types
element)
INFIN110 2-D Four or eight nodes One per node; this can be a
magnetic vector potential,
temperature, or electric potential
INFIN111 3-D Hexalateral, 8 or 20 nodes AZ magnetic vector potential,
temperature, electric potential, or
magnetic scalar potential
INFIN47 3-D Quadrilateral, four nodes or AZ magnetic vector potential,
triangle, three nodes temperature

13.2. Steps in an h-Method Electrostatic Analysis


The procedure for doing an electrostatic analysis consists of three main steps:

1. Build the model.

2. Apply loads and obtain the solution.

3. Review the results.

The next few topics discuss what you must do to perform these steps. First, the text presents a general
description of the tasks required to complete each step. An example follows, based on an analysis of
electrostatic forces between charge spheres. The example walks you through doing the analysis by
choosing items from ANSYS' GUI menus, then shows you how to perform the same analysis using ANSYS
commands.

13.2.1. Building the Model


To build the model, you start by specifying the jobname and a title for your analysis, using the following
commands or GUI paths:
Command(s): /FILNAME, /TITLE
GUI: Utility Menu> File> Change Jobname
Utility Menu> File> Change Title

If you are using the ANSYS GUI, the next step is to set preferences for an electric analysis: Main Menu>
Preferences> Electromagnetics: Electric

You must set the preference to Electric to ensure that the elements needed for your analysis will be
available. (The ANSYS GUI filters element types based on the preference you choose.)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
248 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in an h-Method Electrostatic Analysis

Once you have set the Electric preference, use the ANSYS preprocessor (PREP7) to define the element
types, the material properties, and the model geometry. These tasks are common to most analyses. The
Modeling and Meshing Guide explains them in detail.

For an electrostatic analysis, you must define the permittivity (PERX) material property. It can be tem-
perature dependent, as well as isotropic or orthotropic.

In ANSYS, you must make sure that you use a consistent system of units for all the data you enter. See
the EMUNIT command in the Command Reference for additional information regarding appropriate
settings of free-space permeability and permittivity.

For micro-electromechanical systems (MEMS), it is best to set up problems in more convenient units
since components may only be a few microns in size. For convenience, see Table 13.4: Electrical Conver-
sion Factors for MKS to muMKSV (p. 249) and Table 13.5: Electrical Conversion Factors for MKS to
muMSVfA (p. 249).

Table 13.4: Electrical Conversion Factors for MKS to muMKSV

Electrical MKS Dimension Multiply To Obtain Dimension


Parameter Unit by This μMKSV
Number Unit
Voltage V (kg)(m)2/(A)(s)3 1 V (kg)(μm)2/(pA)(s)3
Current A A 1012 pA pA
12
Charge C (A)(s) 10 pC (pA)(s)
2 3 3 6
Conductivity S/m (A) (s) /(kg)(m) 10 pS/μm (pA)2(s)3/(kg)(μm)3
Resistivity Ωm (kg)(m)3/(A)2(s)3 10-6 T Ωμm (kg)(μm)3/(pA)2(s)3
Permittivity[1] F/m (A)2(s)4/(kg)(m)3 106 pF/μm (pA)2(s)2/(kg)(μm)3
Energy J (kg)(m)2/(s)2 1012 pJ (kg)(μm)2/(s)2
Capacitance F (A)2(s)4/(kg)(m)2 1012 pF (pA)2(s)4/(kg)(μm)2
Electric Field V/m (kg)(m)/(s)3(A) 10-6 V/μm (kg)(μm)/(s)3(pA)
Electric Flux C/(m)2 (A)(s)/(m)2 1 pC/(μm)2 (pA)(s)/(μm)2
Density

1. Free-space permittivity is equal to 8.854 x 10-6 pF/μm.

Table 13.5: Electrical Conversion Factors for MKS to muMSVfA

Electrical MKS Dimension Multiply To Obtain Dimension


Parameter Unit by This μMKSVfA
Number Unit
Voltage V (kg)(m)2/(A)(s)3 1 V (g)(μm)2/(fA)(s)3
Current A A 1015 fA fA
15
Charge C (A)(s) 10 fC (fA)(s)
2 3 3 9
Conductivity S/m (A) (s) /(kg)(m) 10 fS/μm (fA)2(s)3/(g)(μm)3
Resistivity Ωm (Kg)(m3/(A)2(s)3 10-9 - (g)(μm)3/(fA)2(s)3
Permittivity[1] F/m (A)2(s)4/(kg)(m)3 109 fF/μm (fA)2(s)2/(g)(μm)3
Energy J (kg)(m)2/(s)2 1015 fJ (g)(μm)2/(s)2
Capacitance F (A)2(s)4/(kg)(m)2 1015 fF (fA)2(s)4/(g)(μm)2

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 249
Electrostatic Field Analysis

Electrical MKS Dimension Multiply To Obtain Dimension


Parameter Unit by This μMKSVfA
Number Unit
Electric Field V/m (kg)(m)/(s)3(A) 10-6 V/μm (g)(μm)/(s)3(fA)
Electric Flux C/(m)2 (A)(s)/(m)2 103 fC/(μm)2 (fA)(s)/(μm)2
Density

1. Free-space permittivity is equal to 8.854 x 10-3 fF/μm.

13.2.2. Applying Loads and Obtaining a Solution


In this step, you define the analysis type and options, apply loads to the model, specify load step options,
and initiate the finite element solution. The next few topics explain how to perform these tasks.

13.2.2.1. Entering the SOLUTION Processor


To enter the SOLUTION processor, use either of the following:
Command(s): /SOLU
GUI: Main Menu> Solution

13.2.2.2. Defining the Analysis Type


To specify the analysis type, do either of the following:

• In the GUI, choose menu path Main Menu> Solution> Analysis Type> New Analysis and choose a
Static analysis.

• If this is a new analysis, issue the command ANTYPE,STATIC,NEW.

• If you want to restart a previous analysis (for example, to specify additional loads), issue the command
ANTYPE,STATIC,REST. You can restart an analysis only if you previously completed an electrostatic
analysis, and the files Jobname.EMAT, Jobname.ESAV, and Jobname.DB from the previous run
are available.

13.2.2.3. Defining Analysis Options


Next, you define which solver you want to use. You can select the sparse solver (default), Preconditioned
Conjugate Gradient (PCG) solver, Jacobi Conjugate Gradient (JCG) solver, or Incomplete Cholesky Con-
jugate Gradient (ICCG) solver.

To select an equation solver, use either of the following:


Command(s): EQSLV
GUI: Main Menu> Solution> Analysis Type> Analysis Options

If you choose either the JCG solver or the PCG solver, you can also specify a solver tolerance value. This
value defaults to 1.0E-8.

13.2.2.4. Apply Boundary Conditions


These loads specify flux-parallel, flux-normal, far-field, and periodic boundary conditions, as well as an
imposed external magnetic field. The following table shows the value of volt required for each type of
boundary condition:

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
250 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in an h-Method Electrostatic Analysis

Boundary Condition Value of VOLT


Flux-parallel None required (naturally occurring).
Flux-normal Specify a constant value of VOLT using the D command (Main
Menu> Solution> Define Loads> Apply> Electric> Boundary>
Voltage> J-Normal> On Nodes (On Lines or On Areas).
Far-field For 2-D analysis, use INFIN110 elements. For 3-D analysis, use
INFIN47 or INFIN111 elements.
Imposed external field Apply nonzero values of VOLT. Use Main Menu> Solution>
Define Loads> Apply> Electric> Boundary> Voltage> On
Keypoints (On Nodes, On Lines or On Areas).

Flux-parallel boundary conditions force the flux to flow parallel to a surface, while flux-normal boundary
conditions force the flux to flow normal to a surface. You do not need to specify far-field zero boundary
conditions if you use far-field elements to represent the "infinite" boundary of the model. For an imposed
external field, specify the appropriate nonzero value of VOLT.

13.2.2.5. Applying Loads


You can apply loads to an electrostatic analysis either on the solid model (keypoints, lines, and areas)
or on the finite element model (nodes and elements). You can specify several types of loads:

13.2.2.5.1. Voltage (VOLT)


These loads are DOF constraints that you usually specify at model boundaries to apply a known voltage.
To apply voltage, use one of the following:
Command(s): D
GUI: Main Menu> Solution> Define Loads> Apply> Electric> Boundary> Voltage

13.2.2.5.2. Charges (CHRG)


These are concentrated nodal force loads. To apply them, use the following command or GUI path:
Command(s): F
GUI: Main Menu> Solution> Define Loads> Apply> Electric> Excitation> Charge> On Nodes

13.2.2.5.3. Surface Charge Densities (CHRGS)


These are surface loads you can apply at nodes or elements. To apply them, use the following command
or GUI path:
Command(s): SF
GUI: Main Menu> Solution> Define Loads> Apply> Electric> Excitation> Surf Chrg Den

13.2.2.5.4. Infinite Surface Flags (INF)


Infinite surface flags are not actual loads, but they are used to indicate which surface of an infinite
element faces toward the open (infinite) domain. Applying the INF label to an element face turns the
flag on for that face. To apply infinite surface flags, choose one of the following:
Command(s): SF
GUI: Main Menu> Solution> Define Loads> Apply> Electric> Flag> Infinite Surf> option

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 251
Electrostatic Field Analysis

13.2.2.5.5. Volume Charge Densities (CHRGD)


These are body loads you can apply at nodes or elements. To apply volume charge densities, use the
commands or GUI path shown below:
Command(s): BF, BFE
GUI: Main Menu> Solution> Define Loads> Apply> Electric> Excitation> Charge Density> option

Alternatively, you can apply volume charge densities to lines, areas, and volumes of the solid model by
using the BFL, BFA, and BFV commands, respectively. You can then transfer the specified volume
charge densities from the solid model to the finite element model by using either the BFTRAN command
or the SBCTRAN command.

13.2.2.6. (Optional): Specifying Load Step Options


For an electrostatic analysis, you can optionally use other commands to apply loads to a current con-
duction analysis, and you also can specify output controls as load step options. For further information,
see Alternative Analysis Options and Solution Methods (p. 289).

13.2.2.7. Saving a Backup Copy of the Database


Use the SAVE_DB button on the ANSYS Toolbar to save a backup copy of the ANSYS database. This
enables you to retrieve your model should your computer fail while the analysis is in progress. To retrieve
a model, re-enter ANSYS and use one of the following:
Command(s): RESUME
GUI: Utility Menu> File> Resume Jobname.db

13.2.2.8. Starting the Solution


In this step, you initiate the solution for all loads steps using one of the following:
Command(s): SOLVE
GUI: Main Menu> Solution> Solve> Current LS

13.2.2.9. Applying Additional Loads


If you wish to apply any additional loading conditions (load steps), repeat the appropriate steps described
in the foregoing.

13.2.2.10. Finishing the Solution


To leave the SOLUTION processor, use either of the following:
Command(s): FINISH
GUI: Main Menu> Finish

13.2.3. Reviewing Results


The program writes results from an electrostatic analysis to the results file, Jobname.RTH. Results include
the data listed below:

Primary data: Nodal voltages (VOLT)

Derived data:

• Nodal and element electric field (EFX, EFY, EFZ, EFSUM)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
252 of ANSYS, Inc. and its subsidiaries and affiliates.
Steps in an h-Method Electrostatic Analysis

• Nodal electric flux density (DX, DY, DZ, DSUM)

• Nodal electrostatic forces (FMAG: components X, Y, Z, SUM)

• Nodal reaction current segments (CSGX, CSGY, CSGZ)

You can review analysis results in POST1, the general postprocessor. To access the postprocessor, choose
one of the following:
Command(s): /POST1
GUI: Main Menu> General Postproc

For a complete description of all postprocessing functions, see the Basic Analysis Guide.

To review results in POST1, the ANSYS database must contain the same model for which the solution
was calculated. Also, the results file (Jobname.RTH) must be available.

To read results at the desired time point into the database, use either of the following:
Command(s): SET,,,,,TIME
GUI: Utility Menu> List> Results> Load Step Summary

If you specify a time value for which no results are available, ANSYS performs linear interpolation to
calculate the results at that time.

To gain access to derived results, you must use one of the following commands or menu paths after
you have read the results into the database:
Command(s): ETABLE
GUI: Main Menu> General Postproc> Element Table> Define Table
Command(s): PLETAB
GUI: Main Menu> General Postproc> Plot Results> Contour Plot> Elem Table
Main Menu> General Postproc> Element Table> Plot Elem Table
Command(s): PRETAB
GUI: Main Menu> General Postproc> List Results> Elem Table Data
Main Menu> General Postproc> List Results> Elem Table Data

To identify the results data you want, use a combination of a label and a sequence number or component
name.

You can now review the results by obtaining graphics displays and tabular listings.

13.2.3.1. Contour Displays


For contour displays, use either of the following methods:
Command(s): PLESOL, PLNSOL
GUI: Main Menu> General Postproc> Plot Results> Contour Plot> Element Solution
Main Menu> General Postproc> Plot Results> Contour Plot> Nodal Solu

13.2.3.2. Vector Displays


For vector (arrow) displays, use either of the following methods:
Command(s): PLVECT
GUI: Main Menu> General Postproc> Plot Results> Vector Plot> Predefined
Main Menu> General Postproc> Plot Results> Vector Plot> User Defined

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 253
Electrostatic Field Analysis

13.2.3.3. Charged Particle Trace Displays


You can find details on how to graphically display a charged particle traveling in a magnetic field in
Particle Flow and Charged Particle Traces and Controlling Particle Flow or Charged Particle Trace Displays
in the Basic Analysis Guide. See Electromagnetic Particle Tracing in the Mechanical APDL Theory Reference
for more details.

13.2.3.4. Tabular Listings


To produce tabular data listings, use any of the following:
Command(s): PRESOL, PRNSOL, PRRSOL
GUI: Main Menu> General Postproc> List Results> Element Solution
Main Menu> General Postproc> List Results> Nodal Solution
Main Menu> General Postproc> List Results> Reaction Solu

POST1 performs many other postprocessing functions, including mapping results onto a path and load
case combinations. For more information, see the Basic Analysis Guide.

13.2.3.5. Electrostatic Forces


You can summarize total electrostatic force and torque on a given set of nodes from the data available
in the database in postprocessing. Use the EMFT macro for these calculations. The EMFT macro is
available only for PLANE121, SOLID122, and SOLID123 elements.

Three types of magnetic forces are usually available:

• Current segment force: Force from the finite element boundary domain. Forces and fields here are typ-
ically normal to the capacitor surface. To list these forces:

1. Select the electrode nodes.

2. Select all elements.

3. Issue EMFT.
Command(s): EMFT
GUI: Main Menu> General Postproc> Elec&Mag Calc> Summarize Force/Torque

• Reluctance force: Force due to a change in material properties. Here, the direction of the field may be
arbitrary with regard to the force. To list this force:

1. Select the nodes at the interface between the body of interest and the adjacent air elements.

2. Select all elements.

3. Issue EMFT.

This method may use a truncated portion of the body of interest if the body extends past the
FE boundary.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
254 of ANSYS, Inc. and its subsidiaries and affiliates.
Extracting Capacitance from Multi-conductor Systems

Figure 13.1: Reluctance Force


- + - +
E
- +

+
+
+
+
+
+
+
+
+
r
- + - +
F - - -
- +
E
- + - + F
r
- +

+
- + - +
- - - - - - - - -
- +
- + - +

area of interest

• Body forces (including Lorentz forces): This method uses the entire body of interest:

1. Select the nodes of the body of interest and all elements.

2. Issue EMFT.

Note

In models that use symmetry, you must select nodes and elements carefully. You need to
select the surface nodes on the surfaces interior to the body and then select the elements
adjacent to those nodes.

Force results will be reported in the coordinate system specified by RSYS. However, if using a coordinate
system other than global Cartesian (RSYS ≠ 0), torque results will take into account the coordinate
system shift and rotation only.

1. Select the electrode nodes.

2. Select the elements adjacent to those nodes.

3. Issue EMFT:
Command(s): EMFT
GUI: Main Menu> General Postproc>

13.3. Extracting Capacitance from Multi-conductor Systems


A key parameter from an electrostatic solution is capacitance. For multiple conductor systems, this in-
volves extracting self and mutual capacitance terms so that equivalent circuit lumped capacitors can
be defined for use in circuit simulators. The CMATRIX command macro has been developed to extract
self and mutual capacitance terms for multiple conductor systems. See the Mechanical APDL Theory
Reference for more details.

13.3.1. Ground Capacitances and Lumped Capacitances


Finite element simulation can readily compute and extract a "Ground" capacitance matrix of capacitance
values that relate the charge on one conductor with the conductor's voltage drop (to ground). Fig-
ure 13.2: Three Conductor System (p. 256) illustrates a three-conductor system (one conductor is ground).
The following two equations relate charges on electrodes 1 and 2, Q1 and Q2, with the voltage drops
for the electrodes, U1 and U2:

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 255
Electrostatic Field Analysis

Q1 = (Cg)11 (U1) + (Cg)12 (U2)

Q2 = (Cg)12 (U1) + (Cg)22 (U2)

Figure 13.2: Three Conductor System

Conductor 3
(ground)

Conductor 1 Conductor 2

where Cg represents a matrix of capacitances referred to as “ground capacitances”. These ground capa-
citances do not represent lumped capacitances typically used in a circuit simulator because they do
not relate the capacitances between conductors. However, the CMATRIX command macro can convert
the ground capacitance matrix to a lumped capacitor matrix which is suitable for use in circuit simulators.
Figure 13.3: Lumped Capacitor Equivalence of Three Conductor System (p. 256) illustrates the lumped
capacitances between the conductors. The following two equations then relate the charges with the
voltage drops:

Q1 = (Cl)11 (U1) + (Cl)12 (U1 - U2)

Q2 = (Cl)12 (U1 - U2) + (Cl)22 (U2)

Figure 13.3: Lumped Capacitor Equivalence of Three Conductor System

where Cl represents a matrix of capacitances referred to as “lumped capacitances”.

13.3.2. Procedure
The CMATRIX command macro will perform multiple simulations and extract both the ground capacitance
matrix values and the lumped capacitance matrix values. To prepare for CMATRIX, you must group the
conductor nodes into node components. Do not apply any loads to the model (voltages, charge, charge
density, etc). The component name applied to the conductor nodes must contain a common prefix,
followed by a numerical suffix progressing from 1 to the highest numbered conductor in the system.
The last numbered conductor in the system must be the ground conductor (the conductor whose po-
tential is assumed to be zero). The procedure for using CMATRIX is as follows:

1. Build and mesh the solid model with electrostatic elements. Conductors are assumed to be perfect con-
ductors and hence do not require a finite element mesh within the conductor domain. Only the surrounding
dielectric regions and air regions require a mesh. The resulting nodes on the boundary of the conductors
represent the nodes that will be grouped into node components.

2. Select the nodes on the surface of the each conductor and group them into node components.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
256 of ANSYS, Inc. and its subsidiaries and affiliates.
Extracting Capacitance from Multi-conductor Systems

Command(s): CM
GUI: Utility Menu> Select> Comp/Assembly> Create Component

Share a command prefix for the component names, and use a numerical value sequencing from 1
to the highest numbered conductor. For example, in Figure 13.3: Lumped Capacitor Equivalence of
Three Conductor System (p. 256), three node components would be defined for each set of conductor
nodes. Using a prefix "cond", the node component names would be "cond1", "cond2", and "cond3".
The last component, "cond3" would be the nodes representing the ground.

3. Enter the SOLUTION processor, using either of the following:


Command(s): SOLU
GUI: Main Menu> Solution

4. Select an equation solver (JCG recommended), using either of the following:


Command(s): EQSLV
GUI: Main Menu> Solution> Analysis Type> Analysis Options

5. Invoke the CMATRIX macro, using one of the following:


Command(s): CMATRIX
GUI: Main Menu> Solution> Solve> Electromagnet> Static Analysis> Capac Matrix

The CMATRIX command macro requires the following input:

• A symmetry factor (SYMFAC). If there is no symmetry in the model, the symmetry factor is 1 (default). If
you wish to model only a portion of the model by taking advantage of symmetry, use the symmetry
factor as a multiplier to obtain the correct capacitance.

• The node component prefix name (Condname). This is the prefix of the node component name's used
to define the conductor node components. In the above example, the prefix name is "cond". The command
macro requires that you put single quotes around the prefix name when entering the character string.
Thus, the input for this example would be 'cond'. In the GUI, the single quotes are automatically handled
by the program.

• The number of conductor node components (NUMCOND). Insert the total number of conductor node
components. In the above example you would use "3".

• Enter the Ground Key option (GRNDKEY). If your model does not contain an open boundary then the
highest numbered node component represents ground. In this case, no special treatment is needed and
you would set the ground key to zero (default). If your model contains an open boundary (modeled with
infinite elements) and the far-field is not considered as a conductor, then you would set the ground key
to zero (default). In some situations it is necessary to consider the far-field (infinity) as the ground con-
ductor (for example, a single charged sphere in air requires the infinity location as ground in order to
preserve a charge balance). When using the INFIN111 element to represent a far-field ground, set the
ground key to "1".

• Enter a name for the stored matrix of capacitance values (Capname). The command macro stores the
computed ground and lumped matrix values in a 3-D array vector where the "i" and "j" columns represent
the conductor indices, the "k" column indicates ground (k = 1) or lumped (k = 2) terms. The default name
is CMATRIX. For example, the command macro stores the ground terms in CMATRIX(i,j,1) and the lumped
terms in CMATRIX(i,j,2). The command macro also creates a text file containing the matrix values and
stores it in a file with the stored matrix name and a .TXT extension.

Do not apply inhomogeneous loads before using the CMATRIX command. Inhomogeneous loads are
those created by:

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 257
Electrostatic Field Analysis

• Degree of freedom commands (D, DA, etc.) specifying nonzero degree of freedom values on nodes or
solid model entities

• Force commands (F, BF, BFE, BFA, etc.) specifying nonzero force values on nodes, elements, or solid
model entities

• Any CE command with a nonzero constant term

CMATRIX executes a series of solutions to compute self and mutual capacitance between conductors.
The solutions, which are stored in the results file, are available for postprocessing, if desired. At the end
of the execution, the command macro presents a summary table.

If infinite elements (INFIN110 and INFIN111) share a common boundary with a conductor (such as a
ground plane), you can consider the ground plane and infinite boundary as a single conductor (group
only the ground plane nodes into a component).

Figure 13.4: Modeling Scenarios (p. 258) illustrates several modeling scenarios for open and closed domain
models along with the appropriate settings for NUMCOND and GRNDKEY.

Figure 13.4: Modeling Scenarios


3 (ground)

NUMCOND = 3

GRNDKEY = 0
1 2

Three Conductors - Closed System

Natural boundary

1 2
NUMCOND = 2

GRNDKEY = 0

ground

Two conductor system, one is ground


Open boundary left as natural boundary condition

See Example: Capacitance Calculation (p. 267) of this manual for an example problem using CMATRIX.

13.4. Example Electrostatic Field Analyses (h-Method)


The following examples are available:
13.4.1. Example: h-Method Electrostatic Analysis
13.4.2. Example: Capacitance Calculation

13.4.1. Example: h-Method Electrostatic Analysis


This section describes how to perform an electrostatic analysis of a shielded microstrip transmission
line consisting of a substrate, microstrip, and a shield. The strip is at a potential V1, and the shield is at
a potential V0. The object of the problem is to determine the capacitance of the transmission line.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
258 of ANSYS, Inc. and its subsidiaries and affiliates.
Example Electrostatic Field Analyses (h-Method)

13.4.1.1. Description
a Y
CL
12 11 15

V0

Shield
Air 3 4

r a
V0

V1 Strip
4 3 7
r Substrate b 1 2
X
V0 1 2 6
w

Problem Sketch Keypoint and Area Model

Material Geometric Loading


Properties Properties V1 = 10 V
Air: εr = 1 a = 10 cm V0 = 1 V
Substrate: εr = 10 b = 1 cm
w = 1 cm

13.4.1.2. Assumptions and Modeling


You can calculate the capacitance of the device from electrostatic energy and the applied potential
difference as We = 1/2 C (V1-Vo)2 where We is the electrostatic energy and C is the capacitance. To obtain
the electrostatic energy, you sum the energies for all the elements in the model in POST1.

Additional postprocessing includes displaying equipotential lines and the electric field as vectors.

13.4.1.3. Expected Results


The target results from this example analysis are capacitance 178.1 pF/m

Step 1: Begin the Analysis

1. Enter the ANSYS program. To do so, use the procedures described in the Operations Guide.

2. Choose menu path Utility Menu> File> Change Title. The Change Title dialog box appears.

3. Enter the title “Microstrip transmission line analysis.”

4. Click OK.

5. Choose Main Menu> Preferences. The Preferences for GUI Filtering dialog box appears.

6. Click Magnetic-Nodal and Electric on.

7. Click OK.

Step 2: Define Parameters

1. Choose Utility Menu> Parameters> Scalar Parameters. A dialog box appears.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 259
Electrostatic Field Analysis

2. Type in the parameter values shown below, following each entry by pressing ENTER. If you make a mistake,
just retype the parameter definition.

V1 = 1.5
V0 = 0.5

3. Click Close to close the dialog box.

Step 3: Define the Element Type

1. Choose Main Menu> Preprocessor> Element Type> Add/Edit/Delete. The Element Types dialog box
appears.

2. Click Add. The Library of Element Types dialog box appears.

3. Highlight (click on) "Electrostatic" and "2D Quad 121."

4. Click OK. The Element Types dialog box shows element type 1 (PLANE121) selected.

5. Click Close.

Step 4: Define Material Properties

1. Choose Main Menu> Preprocessor> Material Props> Material Models. The Define Material Model Be-
havior dialog box appears.

2. In the Material Models Available window, double-click on the following options: Electromagnetics, Relative
Permittivity, Constant. A dialog box appears.

3. Enter 1 for PERX (Relative permittivity), and click on OK. Material Model Number 1 appears in the Material
Models Defined window on the left.

4. Choose menu path Edit>Copy. Click on OK to copy Material number 1 to Material number 2. Material
Model Number 2 appears in the Material Models Defined window on the left.

5. In the Material Models Defined window, double-click on Material Model Number 2, and Permittivity
(constant). A completed dialog box appears.

6. Replace the value in the PERX field with 10, and click on OK.

7. Choose menu path Material>Exit to remove the Define Material Model Behavior dialog box.

8. Click SAVE_DB on the ANSYS Toolbar.

Step 5: Create Model Geometry and Compress Numbers

1. Choose Main Menu> Preprocessor> Modeling> Create> Areas> Rectangle> By Dimensions. The
Create Rectangle by Dimensions dialog box appears.

2. Enter the values shown below. (Use the TAB key to move between fields.)

X1 field: 0 Y1 field: 0
X2 field: .5 Y2 field: 0

3. Click Apply. The ANSYS Graphics Window displays the first rectangle.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
260 of ANSYS, Inc. and its subsidiaries and affiliates.
Example Electrostatic Field Analyses (h-Method)

4. To create a second rectangle, enter the following values:

X1 field: .5 Y1 field: 0
X2 field: 5 Y2 field: 1

5. Click Apply. The ANSYS Graphics Window displays the second rectangle.

6. To create a third rectangle, enter the following values:

X1 field: 0 Y1 field: 1
X2 field: .5 Y2 field: 10

7. Click Apply. The ANSYS Graphics Window displays the third rectangle.

8. To create a fourth rectangle, enter the following values:

X1 field: .5 Y1 field: 1
X2 field: 5 Y2 field: 10

9. Click OK. The ANSYS Graphics Window displays all four rectangles.

10. To glue all areas together, choose Main Menu> Preprocessor> Modeling> Operate> Booleans> Glue>
Areas. A picking menu appears.

11. Click Pick All.

12. Choose Main Menu> Preprocessor> Numbering Ctrls> Compress Numbers. A dialog box appears.

13. Set the "Item to be compressed" field to "Areas."

14. Click OK.

Step 6: Apply Attributes to Model Regions and Prepare for Meshing

1. Choose Utility Menu> Select> Entities. The Select Entities dialog box appears.

2. Change the top button from "Nodes" to "Areas."

3. Change the button just below it to "By Num/Pick."

4. Click OK. A picking menu appears.

5. Pick areas 1 and 2 by clicking on them. (Areas 1 and 2 are the two areas at the bottom of the Graphics
Window.) The picked areas should change color.

6. Click OK.

7. Choose Main Menu> Preprocessor> Meshing> Mesh Attributes> Picked Areas. Click Pick All. The Area
Attributes dialog box appears.

8. Set the "Material number" field to 2.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 261
Electrostatic Field Analysis

9. Click OK.

10. Choose Utility Menu> Select> Entities. The Select Entities dialog box appears.

11. Check that the top two buttons are set to "Areas" and "By Num/Pick."

12. Click Sele All, then click OK. A picking menu appears.

13. Click Pick All.

14. Choose Utility Menu> Select> Entities. The Select Entities dialog box appears.

15. Change the top button from "Areas" to "Lines."

16. Change the button below it to "By Location."

17. Click the Y Coordinates button on.

18. In the "Min, Max" field, enter 1.

19. Click Apply. ANSYS should respond by displaying a message about "2 lines" in the output window.

20. Click the Reselect and X Coordinates buttons on.

21. In the "Min, Max" field, enter .25.

22. Click OK. ANSYS should respond by displaying a message about "1 line" in the output window.

Step 7: Mesh the Model

1. Choose Main Menu> Preprocessor> Meshing> Size Cntrls> Lines> All Lines. The Element Sizes on All
Selected Lines dialog box appears.

2. In the "No. of element divisions" field, enter 8.

3. Click OK.

4. Choose Utility Menu> Select> Entities. The Select Entities dialog box appears.

5. Check that the top button is set to "Lines."

6. Change the second button to "By Num/Pick."

7. Click the From Full button on.

8. Click Sele All, then click OK. A picking menu appears.

9. Click Pick All.

10. Choose Main Menu> Preprocessor> Meshing> MeshTool. The MeshTool appears.

11. Click the Smart Size button on.

12. Set the SmartSizing slider to 3.

13. Click the Tri shape button on.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
262 of ANSYS, Inc. and its subsidiaries and affiliates.
Example Electrostatic Field Analyses (h-Method)

14. Check that the Mesh button is set to "Areas."

15. Click the MESH button. A picking menu appears.

16. Click Pick All. The Graphics Window shows you the meshed model.

17. Click Close to close the MeshTool.

Step 8: Apply Boundary Conditions and Loads

1. Choose Utility Menu> Select> Entities. The Select Entities dialog box appears.

2. Change the top button to "Nodes."

3. Set the button just below it to "By Location."

4. Click the Y Coordinates and From Full buttons on.

5. In the "Min, Max" field, enter 1.

6. Click Apply.

7. Click the X Coordinates and Reselect buttons on.

8. In the "Min, Max" field, enter 0,.5.

9. Click OK.

10. Choose Main Menu> Preprocessor> Loads> Define Loads> Apply> Electric> Boundary> Voltage>
On Nodes. A picking menu appears.

11. Click Pick All. The Apply VOLT on Nodes dialog box appears.

12. In the "Value of voltage (VOLT)" field, enter V1.

13. Click OK.

14. Choose Utility Menu> Select> Entities. The Select Entities dialog box appears.

15. Check that the two top buttons are set to "Nodes" and "By Location."

16. Click the Y Coordinates and From Full buttons on.

17. In the "Min, Max" field, enter 0.

18. Click Apply.

19. Click the Also Sele button on.

20. In the "Min, Max" field, enter 10.

21. Click Apply.

22. Click the X Coordinates button on.

23. In the "Min, Max" field, enter 5.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 263
Electrostatic Field Analysis

24. Click OK.

25. Choose Main Menu> Preprocessor> Loads> Define Loads> Apply> Electric> Boundary> Voltage>
On Nodes. A picking menu appears.

26. Click Pick All. The Apply VOLT on Nodes dialog box appears.

27. In the "Value of voltage (VOLT)" field, enter V0.

28. Click OK.

Step 9: Scale the Areas

1. Choose Utility Menu> Select> Entities. The Select Entities dialog box appears.

2. Check that the top button is set to "Nodes," the next button is set to "By Num/Pick," and the "From Full"
button is set on.

3. Click the Sele All button, then click OK. A picking menu appears. Click Pick All.

4. Choose Main Menu> Preprocessor> Modeling> Operate> Scale> Areas. A picking menu appears.

5. Click Pick All. The Scale Areas dialog box appears.

6. In the "RX, RY, RZ Scale Factors" fields, enter the following values:

RX field: .01
RY field: .01
RZ field: 0

7. In the "Items to be scaled" field, set the button to "Areas and mesh."

8. In the "Existing areas will be" field, set the button to "Moved."

9. Click OK.

10. Choose Main Menu> Finish.

Step 10: Solve the Analysis

1. Choose Main Menu> Solution> Solve> Current LS. The Solve Current Load Step dialog box appears,
along with a pop-up window listing the load step options.

2. Review the pop-up window contents, then click Close.

3. Click OK on the dialog box to start the solution. A pop-up message notifies you when solution is complete.
Click Close.

4. Choose Main Menu> Finish.

Step 11: Store Analysis Results

1. Choose Main Menu> General Postproc> Element Table> Define Table. The Element Table Data dialog
box appears.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
264 of ANSYS, Inc. and its subsidiaries and affiliates.
Example Electrostatic Field Analyses (h-Method)

2. Click Add. The Define Additional Element Table Items dialog box appears.

3. In the "User label for item" field, enter SENE

4. In the scrollable lists in the "Results data item" field, highlight "Energy." (When you highlight “Energy” in
the list on the left,“Elec energy SENE" will be highlighted in the list on the right automatically.)

5. Click OK.

6. Click Add.

7. In the "User label for item" field, enter EFX.

8. In the "Results data item" field, highlight "Flux & gradient" and "Elec field EFX." (You may have to scroll
up to find the correct selections.)

9. Click OK.

10. Click Add.

11. In the "User label for item" field, enter EFY.

12. In the "Results data item" field, highlight "Flux & gradient" and "Elec field EFY."

13. Click OK. The Element Table Data dialog box now shows the SENE, EFX, and EFY items defined.

14. Click Close to close the dialog box.

15. Click SAVE_DB on the ANSYS Toolbar.

Step 12: Plot Analysis Results

1. Choose Utility Menu> PlotCtrls> Numbering. The Plot Numbering Controls dialog box appears.

2. Set the "Numbering shown with" field to "Colors only."

3. Click OK.

4. Choose Main Menu> General Postproc> Plot Results> Contour Plot> Nodal Solu. The Contour Nodal
Solution Data dialog box appears.

5. In the "Item to be contoured" field, highlight "DOF solution" and "Elec poten VOLT."

6. Click OK. The Graphics Window displays a contour plot of equipotential lines.

7. Choose Main Menu> General Postproc> Plot Results> Vector Plot> User-defined. The Vector Plot of
User-defined Vectors dialog box appears.

8. In the "Item" field, enter EFX.

9. In the "Lab2" field, enter EFY

10. Click OK. The Graphics Window displays a vector plot of the electric field.

Step 13: Perform Capacitance Calculations

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 265
Electrostatic Field Analysis

1. Choose Main Menu> General Postproc> Element Table> Sum of Each Item. An informational dialog
box appears.

2. Click OK. A pop-up window shows you all element table entries and their values.

3. Click Close to close the pop-up window.

4. Choose Utility Menu> Parameters> Get Scalar Data. The Get Scalar Data dialog box appears.

5. In the "Type of data to be retrieved" field, highlight "Results data" and "Elem table sums."

6. Click OK. The Get Element Table Sum Results dialog box appears.

7. In the "Name of parameter to be defined," field, enter W.

8. Set the "Element table item" field to "SENE."

9. Click OK.

10. Choose Utility Menu> Parameters> Scalar Parameters. The Scalar Parameters dialog box appears.

11. Type in the following values, pressing ENTER after typing each value:

C = (w*2)/((V1-V0)**2)
C = ((C*2)*1e12)

12. Click Close.

13. Choose Utility Menu> List> Status> Parameters> Named Parameter. The Named Parameter Status
dialog box appears.

14. In the "Name of parameter" field, highlight C.

15. Click OK. A pop-up window displays the value of the C parameter (capacitance).

16. Click Close to close the pop-up window.

Step 14: Finish the Analysis

1. To finish the analysis, choose Main Menu> Finish.

2. Click QUIT on the ANSYS Toolbar.

3. Choose an exit option and click OK.

13.4.1.4. Command Method


You can perform the example analysis of the microstrip transmission line using the ANSYS commands
shown below instead of GUI menu choices. All text prefaced by an exclamation point (!) is a comment.
/BATCH,LIST
/PREP7
/TITLE, MICROSTRIP TRANSMISSION LINE ANALYSIS
ET,1,PLANE121 ! USE 2-D 8-NODE ELECTROSTATIC ELEMENT
V1=1.5 ! DEFINE STRIP POTENTIAL
V0=0.5 ! DEFINE GROUND POTENTIAL
MP,PERX,1,1 ! FREE SPACE RELATIVE PERMITTIVITY
MP,PERX,2,10 ! SUBSTRATE RELATIVE PERMITTIVITY
RECTNG,0,.5,0,1

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
266 of ANSYS, Inc. and its subsidiaries and affiliates.
Example Electrostatic Field Analyses (h-Method)

RECTNG,.5,5,0,1
RECTNG,0,.5,1,10
RECTNG,.5,5,1,10
AGLUE,ALL
NUMCMP,AREA
ASEL,S,AREA,,1,2

AATT,2
ASEL,ALL ! SET AREA ATTRIBUTES FOR AIR
LSEL,S,LOC,Y,1
LSEL,R,LOC,X,.25
LESIZE,ALL,,,8
LSEL,ALL
SMRTSIZE,3
MSHAPE,1 ! Triangle mesh
AMESH,ALL
NSEL,S,LOC,Y,1 ! SELECT NODES ON MICROSTRIP
NSEL,R,LOC,X,0,.5
D,ALL,VOLT,V1 ! APPLY STRIP POTENTIAL
NSEL,S,LOC,Y,0
NSEL,A,LOC,Y,10
NSEL,A,LOC,X,5 ! SELECT EXTERIOR NODES
D,ALL,VOLT,V0 ! APPLY GROUND POTENTIAL
NSEL,ALL
ARSCALE,ALL,,,.01,.01,0,,0,1 ! SCALE MODEL TO METERS
FINISH
/SOLUTION
SOLVE
FINISH
/POST1
ETABLE,SENE,SENE ! STORE ELECTROSTATIC ENERGY
ETABLE,EFX,EF,X ! STORE POTENTIAL FIELD GRADIENTS
ETABLE,EFY,EF,Y
/NUMBER,1
PLNSOL,VOLT ! DISPLAY EQUIPOTENTIAL LINES
PLVECT,EFX,EFY ! DISPLAY VECTOR ELECTRIC FIELD (VECTOR)
SSUM ! SUM ENERGY
*GET,W,SSUM,,ITEM,SENE ! GET ENERGY AS W
C=(W*2)/((V1-V0)**2) ! CALCULATE CAPACITANCE (F/M)

C=((C*2)*1E12) ! FULL GEOMETRY CAPACITANCE (PF/M)


*STATUS,C ! DISPLAY CAPACITANCE
FINISH

13.4.2. Example: Capacitance Calculation


The following is an example of how to perform a capacitance matrix calculation by issuing ANSYS
commands. You can also perform the analysis through the ANSYS GUI menus.

For details on extracting capacitance from multi-conductor systems, see Extracting Capacitance from
Multi-conductor Systems (p. 255) in this manual.

13.4.2.1. Description
Two long cylinders sit above an infinite ground plane. The objective is to compute the self and mutual
capacitance coefficients between the conductors and ground.

13.4.2.2. Modeling
The ground plane and the Infinite elements share a common boundary at the outer radius of the
model. The Infinite elements by nature can only represent a zero potential at the infinite location. Since
the ground plane shares a common boundary with the infinite elements, they together represent the
ground conductor. The nodes of the ground plane are sufficient to represent the ground conductor

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 267
Electrostatic Field Analysis

since the infinite element nodes are internally grounded by the program. By grouping the other two
cylindrical conductor node sets into node components as well, you arrive at a 3-conductor system.

Figure 13.5: Model Areas of Capacitance Example Problem (p. 268) displays the model areas and Fig-
ure 13.6: Elements of Capacitance Example Problem (p. 268) displays the finite elements.

Figure 13.5: Model Areas of Capacitance Example Problem

Figure 13.6: Elements of Capacitance Example Problem

13.4.2.3. Results
The computed ground and lumped capacitance results for this example problem are as follows:

(Cg)11 = 0.454E-4 (Cl)11 = 0.354E-4


pF pF
(Cg)12 = -0.998E-5 (Cl)12 = 0.998E-5
pF pF

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
268 of ANSYS, Inc. and its subsidiaries and affiliates.
Example Electrostatic Field Analyses (h-Method)

(Cg)22 = 0.454E-4 (Cl)22 = 0.354E-4


pF pF

13.4.2.4. Command Listing


You can perform this example capacitance matrix calculation using the ANSYS commands shown below.
Text prefaced by an exclamation point (!) is a comment.
/batch,list
/prep7
/title, Capacitance of two long cylinders above a ground plane

a=100 ! Cylinder inside radius (μm)


d=400 ! Outer radius of air region
ro=800 ! Outer radius of infinite elements

et,1,121 ! 8-node 2-D electrostatic element


et,2,110,1,1 ! 8-node 2-D Infinite element
emunit,epzro,8.854e-6 ! Set free-space permittivity for μMKSV units
mp,perx,1,1

cyl4,d/2,d/2,a,0 ! Create mode in first quadrant


cyl4,0,0,ro,0,,90
cyl4,0,0,2*ro,0,,90

aovlap,all
numcmp,area
smrtsiz,4
mshape,1 ! Mesh air region
amesh,3

lsel,s,loc,x,1.5*ro
lsel,a,loc,y,1.5*ro
lesize,all,,,1
type,2
mshape,0
mshkey,1
amesh,2 ! Mesh infinite region
arsymm,x,all ! Reflect model about y axis
nummrg,node
nummrg,kpoi

csys,1

nsel,s,loc,x,2*ro
sf,all,inf ! Set infinite flag in Infinite elements

local,11,1,d/2,d/2
nsel,s,loc,x,a
cm,cond1,node ! Assign node component to 1st conductor
local,12,1,-d/2,d/2
nsel,s,loc,x,a
cm,cond2,node ! Assign node component to 2nd conductor
csys,0
nsel,s,loc,y,0
cm,cond3,node ! Assign node component to ground conductor
allsel,all
finish
/solu
cmatrix,1,'cond',3,0 ! Compute capacitance matrix coefficients
finish

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 269
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
270 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 14: Electric Circuit Analysis
Electric circuit analysis determines the voltage and current distribution in an electric circuit due to applied
source voltages or currents. The type of source determines the type of analysis you do, as follows:

If the source is ... The analysis type is ...


AC Harmonic
DC Static
Time-varying Transient

Realizing the full potential of FEA simulation in electromagnetics requires complete flexibility in simu-
lating circuit-fed electromagnetic devices. The ANSYS program has the following capabilities for circuit
analysis:

• A modified nodal analysis method for simulating circuits

• Direct coupling of circuits to stranded coils and massive conductors

• Coupling for both 2-D and 3-D models

• Support for DC, AC, and time-transient simulations.

The advanced circuit-coupled simulation available in the ANSYS program allows for accurate simulation
of items such as those listed below:

• Solenoid actuators

• Transformers

• AC machines.

The following electric circuit analysis topics are available:


14.1. Elements Used in Circuit Analysis
14.2. Using the Circuit Builder
14.3. Avoiding Inconsistent Circuits
14.4. Static (DC) Electric Circuit Analysis
14.5. Harmonic (AC) Electric Circuit Analysis
14.6.Transient Electric Circuit Analysis
14.7. Example Electric Circuit Analyses

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 271
Electric Circuit Analysis

14.1. Elements Used in Circuit Analysis


The ANSYS program provides three circuit elements for simulating circuits. For a detailed description
of these elements, see the Element Reference.

Table 14.1: Circuit Elements

Element Type Circuit Options Notes


CIRCU94 Piezoelectric Resistor, Inductor, Capacitor Legacy element
circuit
Independent Current Source

Independent Voltage Source


CIRCU124 General Resistor, Inductor, Capacitor Current-technology
circuit element
Mutual Inductor

Voltage-controlled Current Source

Current-controlled Current Source

Voltage-controlled Voltage Source

Current-controlled Voltage Source

14.2. Using the Circuit Builder


For all circuit analyses, you first need to build a circuit model using the CIRCU124, TRANS126, COMBIN14,
COMBIN39, and MASS21 elements. The preferred method for building the circuit is to use the Circuit
Builder, an interactive builder available in the ANSYS graphical user interface (GUI). The Circuit Builder
performs the tasks listed below:

• Enables you to select circuit components and place them at the desired location in the circuit with the
help of a mouse

• Creates a model of the circuit interactively

• Assigns "real" constants to circuit components and allows you to edit them

• Assigns excitation to independent sources

• Verifies excitation graphically

• Provides an interactive connection to the FEA domain

• Lets you specify source loads for voltage and current source components.

The Circuit Builder establishes the element types, real constants, and node and element definitions. It
sets up multiple element types, one for each circuit element. As with any other GUI feature, the Circuit
Builder writes to the log file all the commands used to create the circuit elements.

The GUI offers a special “wire element” option. This option is provided as a convenience tool to connect
regions of an electrical circuit with a “wire.” The wire represents a short circuit (infinite conductivity)
between the two connection points. A MESH200 element is created for visualization purposes only. The

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
272 of ANSYS, Inc. and its subsidiaries and affiliates.
Using the Circuit Builder

end nodes of the wire are coupled together (using the CP command) to represent the short circuit. If
two or more wire elements are connected together, the nodes of these wire elements are all coupled
together in one node coupling set with the VOLT degree of freedom. Deleting any one of these wire
elements will force an automatic deletion of all the connected wire elements, the node coupling set,
and any node that is not attached to a non-wire element.

14.2.1. Building a Circuit


To build a circuit, activate the ANSYS GUI and use the procedure described below. These additional tips
also may help you:

• To set an initial focus and distance in the GUI consistent with the circuit icon size, issue the Circuit
Builder's "Center WP" option. To do so, choose Main Menu> Preprocessor> Modeling> Create> Circuit>
Center WP. When the “Center WP” option is issued, the WP Settings dialog box will appear as a con-
venience for turning the working plane grid on or off, adjusting the snap increments, etc.

• To scale the circuit icons or change the width of the circuit lines, issue the Circuit Builder's “Scale Icon”
option. To do so, choose Main Menu> Preprocessor> Modeling> Create> Circuit> Scale Icon.

• Consider displaying two windows: one for the circuit and the other for your model.

• Remember to ground the circuit at one node. To do so, either choose Main Menu> Preprocessor>
Loads> Define Loads> Apply> Electric> Boundary> Voltage> On Nodes or issue the D command
with the VOLT label.

1. Choose menu path Main Menu> Preferences. The Preferences dialog box appears.

2. Choose "Electromagnetic" if you are planning to do a circuit-coupled electromagnetic analysis. Choose


"Electric" if you are just running a circuit analysis.

3. Choose Utility Menu> File> Change Jobname. In the dialog box that appears, specify a jobname for
your analysis and click on OK.

4. Choose Utility Menu> File> Change Title. In the dialog box that appears, specify a title for your
analysis and click on OK.

5. Choose Main Menu> Preprocessor> Modeling> Create> Circuit> Builder.

6. If you need to locate the circuit away from an existing finite element model (for instance, if you are
doing a coupled electromagnetic-circuit analysis), use the WorkPlane option on the Utility Menu to
move the working plane origin to the location where you want to start the circuit. (Otherwise, skip this
step.) The location of the circuit can be arbitrary and does not affect the analysis results. For convenience,
you can center the working plane origin in the Graphics Window by choosing Main Menu> Prepro-
cessor> Modeling> Create> Circuit> Center WP.

7. Choose the circuit component you want from the Circuit Menu and follow the prompts shown in the
ANSYS Input Window. Most choices display the "picker" you use to locate the I and J nodes of the
element and then position the circuit component by picking an offset location from the I-J line. The
length of each circuit element, and the element's location relative to other circuit elements, can be
arbitrary and does not affect analysis results. Once you have picked all necessary locations, a dialog
box appears requesting an ID number (element number) and real constants to identify the component.
If the icon size is too small, or the circuit lines to thin, you can make adjustments by choosing Main
Menu> Preprocessor> Modeling> Create> Circuit> Scale Icon.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 273
Electric Circuit Analysis

8. After building the circuit, verify it and modify the data if necessary. The Plot> Src Waveform menu
choice allows you to plot and verify the wave form of any input loads. Another menu choice, Edit Real
Cnst, allows you to check and modify the real constants of any circuit component. To delete specific
circuit components, choose Main Menu> Preprocessor> Modeling> Delete> option.

The Circuit Builder is the most convenient way to construct a circuit. However, you can also build a
circuit by individually defining each node, element type, element, and real constant.

Once you have built the circuit, you are ready to perform a static, harmonic, or transient analysis (the
source determines the type of analysis).

14.3. Avoiding Inconsistent Circuits


You should avoid building electric circuits that are inconsistent. The following section illustrates incon-
sistent circuits.

14.3.1. DC and Harmonic Analyses


14.3.1.1. Voltage Generators Should Not Form a Loop
In Figure 14.1: Voltage Generators Forming a Loop (p. 274) monitoring Kirchhoff's loop equation on the
lower loop, what is the voltage between node 1 and 2? If V1 and V2 are not equal, the voltage forces
are inconsistent. Note in that figure that voltage generators form a loop . Even if V1 and V2 were con-
sistent, numerical solution difficulties would occur.

Figure 14.1: Voltage Generators Forming a Loop

The circuit in Figure 14.2: Voltage Generators in Parallel With Resistors (p. 274) is more complicated than
that shown in Figure 14.1: Voltage Generators Forming a Loop (p. 274), yet the main topological incon-
sistency is still present. The voltage generators form a loop.

Figure 14.2: Voltage Generators in Parallel With Resistors

Figure 14.3: Voltage Generators in Parallel With Other Circuit Components (p. 275) is even more complex.
But you can easily identify the inconsistent loop of voltage generators.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
274 of ANSYS, Inc. and its subsidiaries and affiliates.
Avoiding Inconsistent Circuits

Figure 14.3: Voltage Generators in Parallel With Other Circuit Components

14.3.1.2. Current Generators Should Not Form a Cut


In Figure 14.4: Current Generators in Parallel (p. 275), monitoring Kirchhoff's nodal equation of node 1,
what is the balance? If I1 ≠ I2, then the balance is not zero, the current forces are inconsistent. Even if
I1 = I2 numerical solution difficulties would occur.

Figure 14.4: Current Generators in Parallel

The circuit in Figure 14.5: Circuit Generators and a Supernode (p. 275) is more complex. Here, the current
generators have no common node. Kirchhoff's nodal law is violated on a "super-node" in that figure.
The "super-node" is called a cut. Current generators cannot form cuts; that is, there should be no super-
node such that only current generators are entering it.

Figure 14.5: Circuit Generators and a Supernode

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 275
Electric Circuit Analysis

14.3.2. Transient Analyses


14.3.2.1. Capacitors and Voltage Operators Should Not Form a Loop
In a transient analysis, at t = 0, a capacitor can be represented by a voltage generator having the same
voltage as the initial voltage of the capacitor. See Figure 14.6: Voltage Generator and Capacitor Equival-
ence (p. 276).

Figure 14.6: Voltage Generator and Capacitor Equivalence

In Figure 14.7: Velocity Generators Forming a Loop (p. 276), right after closure of the switch, the initial
current distribution can be computed by the equivalent circuit shown on the right-hand side. This is
an inconsistent circuit (producing infinite current) because the voltage generators form a loop. Thus,
the DC/harmonic rule that voltage generators should not form a loop should be applied such that the
capacitors are considered as voltage generators.

Figure 14.7: Velocity Generators Forming a Loop

14.3.3. Inductors and Current Generators Should Not Form a Cut


In a transient analysis, at t = 0, an inductor can be represented by a current generator having the same
current as the initial current of the inductor. See Figure 14.8: Current Generator and Inductor Equival-
ence (p. 276).

Figure 14.8: Current Generator and Inductor Equivalence

In Figure 14.9: Current Generators Forming a Cut (p. 277), right after the closure of the switch, the initial
voltage distribution can be computed by the equivalent circuit shown on the right-hand side. This is
an inconsistent circuit (producing infinite voltage) because the current generators form a cut. Thus, the
DC/harmonic rule that the current generators should not form a cut should be applied such that the
inductors are considered as current generators.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
276 of ANSYS, Inc. and its subsidiaries and affiliates.
Static (DC) Electric Circuit Analysis

Figure 14.9: Current Generators Forming a Cut

These circuits are contradictory, and they do not have physical meanings. Therefore, the ANSYS program
cannot detect them.

14.4. Static (DC) Electric Circuit Analysis


In a static (DC) electric circuit analysis, you determine the voltage and current distribution in an electric
circuit that is subjected to applied DC source voltages or currents. Static circuit analyses allow all circuit
components.

14.4.1. Building a Circuit for Static Analysis


In a static analysis, the ANSYS program treats capacitors as open circuits and inductors as short circuits.
To represent a short circuit condition, couple the two nodes of the inductor in the VOLT degree of
freedom, using one of the following:
Command(s): CP
GUI: Main Menu> Preprocessor> Coupling/Ceqn> Couple DOFs

Once you have built the circuit, you apply loads and obtain the solution, then view the results.

14.4.2. Applying Loads and Solving the Static Analysis


You need to define the analysis type and options, apply loads, and initiate the finite element solution.
To accomplish these tasks, follow the steps listed below.

14.4.2.1. Enter the SOLUTION Processor


To enter the SOLUTION processor, use either of the following:
Command(s): /SOLU
GUI: Main Menu> Solution

14.4.2.2. Define the Analysis Type


To specify the analysis type, do either of the following:

• In the GUI, choose menu path Main Menu> Solution> Analysis Type> New Analysis and choose a
Static analysis.

• If this is a new analysis, issue the command ANTYPE,STATIC,NEW.

Restarting an analysis usually is required only for continuing a transient circuit analysis.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 277
Electric Circuit Analysis

14.4.2.3. Apply Loads on the Model


Normally, you specify source loads for circuits in the Circuit Builder, as element real constants. Besides
the source loads, the only other "load" is a VOLT = 0 specification at the ground nodes. To specify VOLT
= 0, use either of the following:
Command(s): D
GUI: Main Menu> Solution> Define Loads> Apply> Electric> Boundary> Voltage> On Nodes

Should you need to modify the source loads, use one of the following:
Command(s): R, RMODIF
GUI: Main Menu> Solution> Load Step Opts> Other> Real Constants> Add/Edit/Delete The RMODIF
command has no GUI equivalent.

14.4.2.4. Copy the Database


Use either the SAVE command or the SAVE_DB button on the Toolbar to save a backup copy of the
ANSYS database.

14.4.2.5. Start the Solution


To start calculating the solution, use one of the following:
Command(s): SOLVE
GUI: Main Menu> Solution> Solve> Current LS

14.4.2.6. Apply Additional Loads


If you want to apply additional loads, repeat steps 3 and 4.

14.4.2.7. Finish the Solution


To leave the SOLUTION processor, use one of the following:
Command(s): FINISH
GUI: Main Menu> Finish

14.4.3. Reviewing Results from a Static Circuit Analysis


The ANSYS program writes results from a static (DC) circuit analysis to the results file, Jobname.RTH.
The results are two types of primary data: nodal voltages (VOLT) and nodal currents (CURR). The following
derived data calculated for each element also are available:

• Element voltage drop (VOLTAGE)

• Element current (CURRENT)

• Element control voltage (CONTROL VOLT)

• Element control current (CONTROL CURR)

• Element power (POWER)

• Element applied load (SOURCE)

For more information about the derived results, see the Element Reference.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
278 of ANSYS, Inc. and its subsidiaries and affiliates.
Harmonic (AC) Electric Circuit Analysis

You can review analysis results in POST1, the general postprocessor, by choosing either of the following:
Command(s): /POST1
GUI: Main Menu> General Postproc

To review results in POST1, the ANSYS database must contain the same model for which the solution
was calculated. Also, the results file (Jobname.RTH) must be available.

To read the data from the results file into the database, use either of the following:
Command(s): SET
GUI: Utility Menu> List> Results> Load Step Summary

Once the database contains the desired set of results, use one of the following to list the primary nodal
data (voltages and currents):
Command(s): PRNSOL
GUI: Main Menu> General Postproc> List Results> Nodal Solution

To list the derived element results, use one of the following:


Command(s): PRESOL
GUI: Main Menu> General Postproc> List Results> Element Solution

14.5. Harmonic (AC) Electric Circuit Analysis


In a harmonic (AC) electric circuit analysis, you determine the voltage and current distribution in an
electric circuit that is subjected to applied AC source voltages or currents. Harmonic circuit analyses
allow all circuit components.

14.5.1. Building a Circuit for Harmonic Analysis


To do this, you simply follow the procedure described in Building a Circuit (p. 273).

14.5.2. Applying Loads and Solving the Analysis


You need to define the analysis type and options, apply loads, and initiate the finite element solution.
To accomplish these tasks, follow the steps listed below.

14.5.2.1. Enter the SOLUTION Processor


To enter the SOLUTION processor, use either of the following:
Command(s): /SOLU
GUI: Main Menu> Solution

14.5.2.2. Define the Analysis Type


To specify the analysis type, do either of the following:

• In the GUI, choose menu path Main Menu> Solution> Analysis Type> New Analysis and choose a
Harmonic analysis.

• If this is a new analysis, issue the command ANTYPE,HARMIC,NEW.

14.5.2.3. Specify an Equation Solver


To specify the equation solver to use, use either of the following:

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 279
Electric Circuit Analysis

Command(s): EQSLV
GUI: Main Menu> Preprocessor> Loads> Analysis Type> Analysis Options

Only the sparse solvers is available for problems using the CIRCU124 element.

14.5.2.4. Specify a Solution Listing Format


You need to specify how the harmonic voltage and current are listed in the printed output, Job-
name.OUT. You can choose either real and imaginary parts (default) or amplitudes and phase angles.

To specify the listing format, use one of the following:


Command(s): HROUT
GUI: Main Menu> Solution> Analysis Type> Analysis Options

14.5.2.5. Apply Loads on the Model


Normally, you specify source loads for circuits in the Circuit Builder, as element real constants. Besides
the source loads, the only other "load" is a VOLT = 0 specification at the ground nodes. To specify VOLT
= 0, use either of the following:
Command(s): D
GUI: Main Menu> Solution> Define Loads> Apply> Potential> On Nodes

Should you need to modify the source loads, use one of the following:
Command(s): R, RMODIF
GUI: Main Menu> Solution> Load Step Opts> Other> Real Constants> Add/Edit/Delete

The RMODIF command has no GUI equivalent.

14.5.2.6. Specify Load Step Options


You can specify one dynamics option, the operating frequency (in Hz) of the harmonic loads. To specify
the frequency, use either method shown below:
Command(s): HARFRQ
GUI: Main Menu> Solution> Load Step Opts> Time/Frequenc> Freq and Substps

The only general option you can specify is the number of harmonic solutions. You can requests any
number of solutions to be calculated, and those solutions (or substeps) will be spaced evenly within
the specified operating frequency. For example, if you specify 10 solutions in the range 50 to 60 Hz,
the ANSYS program will calculate the response at 51, 52, 53, ..., 59, and 60 Hz. Mechanical APDL calculates
no response at the lower end of the frequency range.

To specify the number of harmonic solutions, use either of the following:


Command(s): NSUBST
GUI: Main Menu> Solution> Load Step Opts> Time/Frequenc> Freq and Substps

14.5.2.7. Copy the Database


Use either the SAVE command or the SAVE_DB button on the Toolbar to save a backup copy of the
ANSYS database.

14.5.2.8. Start the Solution


To start calculating the solution, use one of the following:
Command(s): SOLVE

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
280 of ANSYS, Inc. and its subsidiaries and affiliates.
Transient Electric Circuit Analysis

GUI: Main Menu> Solution> Solve> Current LS

14.5.2.9. Apply Additional Loads


If you want to apply additional loads, repeat steps 4 through 6.

14.5.2.10. Finish the Solution


To leave the SOLUTION processor, use one of the following:
Command(s): FINISH
GUI: Main Menu> Finish

14.5.3. Reviewing Results from a Harmonic Circuit Analysis


The ANSYS program writes results from a harmonic circuit analysis to the results file, Jobname.RTH.
The results are out-of-phase with the input source loads (that is, they lag the input source loads), so
they are complex in nature. The results are calculated and stored in terms of real and imaginary com-
ponents, and consist of two types of primary data: nodal voltages (VOLT) and nodal currents (CURR).

The derived data for a harmonic circuit analysis are the same as for a static circuit analysis, and you use
the same procedures to review results. However, for harmonic analyses, you can also store results per
element in the element table and list them using one of the following:
Command(s): PRETAB
GUI: Main Menu> General Postproc> List Results> Elem Table Data

14.6. Transient Electric Circuit Analysis


A transient electric circuit analysis analyzes an electric circuit subjected to time-varying source voltage
or currents. The analysis determines the voltage and current distribution in an electric circuit as a
function of time. Transient circuit analyses allow all circuit components.

14.6.1. Building a Circuit for Transient Analysis


To do this, you simply follow the procedure described in Building a Circuit (p. 273). You will need to
specify the following loads in the Circuit Builder as real constants:

• Source loads for independent current and voltage sources.

• Initial conditions, such as the initial current in inductors and the initial charge in capacitors.

• Wave form loads, which can be sinusoidal, pulse, exponential, or piece-wise linear. (For details, see the
CIRCU124 element description in the Element Reference.)

One you have built the circuit, you apply loads to and solve the model and then review the results.
Other points to remember when doing a transient circuit analysis are:

• Circuits in a transient analysis do not use an automatic time-stepping feature. However, you can use
invoking automatic time-stepping to ramp the time step. (Doing this increase the time step by 3X each
time point until the maximum time step is reached.)

• During a transient solution, you can change real constants. Although this is accurate only when used
together with the ANSYS restart procedure, it is useful for simulating a switch with a resistor.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 281
Electric Circuit Analysis

• For processing transient results, the ANSYS GUI has a special section for circuit elements. This enables
you to process nodal voltages and currents and element-specific results.

14.6.2. Applying Loads and Solving the Static Analysis


You need to define the analysis type and options, apply loads, and initiate the finite element solution.
To accomplish these tasks, follow the steps listed below.

14.6.2.1. Enter the SOLUTION Processor


To enter the SOLUTION processor, use either of the following:
Command(s): SOLU
GUI: Main Menu> Solution

14.6.2.2. Define the Analysis Type


To specify the analysis type, do either of the following:

• In the GUI, choose menu path Main Menu> Solution> Analysis Type> New Analysis and choose a
Transient analysis.

• If this is a new analysis, issue the command ANTYPE,TRANSIENT,NEW.

You can restart (continue) a transient analysis from a previously completed transient run, and you can
modify circuit component real constants. However, the Jobname.EMAT, Jobname.ESAV, and Job-
name.DB files must be available to restart an analysis.

14.6.2.3. Choose an Equation Solver


To choose an equation solver, use either of the following:
Command(s): EQSLV
GUI: Main Menu> Preprocessor> Loads> Analysis Type> Analysis Options

Only the sparse solver is available for problems using the CIRCU124 element. Even if you choose a dif-
ferent solver, ANSYS uses the sparse solver when CIRCU124 elements are present.

14.6.2.4. Apply Loads on the Model


Normally, you specify source loads for circuits in the Circuit Builder, as element real constants. Besides
the source loads, the only other "load" is a VOLT = 0 specification at the ground nodes. To specify VOLT
= 0, use either of the following:
Command(s): D
GUI: Main Menu> Solution> Define Loads> Apply> Potential> On Nodes

Should you need to modify the source loads, use one of the following:
Command(s): R, RMODIF
GUI: Main Menu> Solution> Load Step Opts> Other> Real Constants> Add/Edit/Delete The RMODIF
command has no GUI equivalent.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
282 of ANSYS, Inc. and its subsidiaries and affiliates.
Transient Electric Circuit Analysis

14.6.2.5. Specify Load Step Options


To include transient effects in the analysis, you must turn time integration effects on or else a static
solution will be performed. By default, time integration effects are on in a transient analysis, but you
can turn them off to obtain a static solution.

To turn time integration effects on, use one of the following:


Command(s): TIMINT
GUI: Main Menu> Solution> Load Step Opts> Time/Frequenc> Time Integration

14.6.2.5.1. General Options


You can specify three general options: time, the integration time step, and automatic time stepping.

To specify the time at the end of a load step, use one of the following:
Command(s): TIME
GUI: Main Menu> Solution> Load Step Opts> Time/Frequenc> Time and Substps
Main Menu> Solution> Load Step Opts> Time/Frequenc> Time - Time Step

The integration time step is the time increment used in the time integration scheme. The time step size
determines the accuracy of the solution: the smaller the value, the higher the accuracy. To specify time
step size, use either of the following:
Command(s): DELTIM
GUI: Main Menu> Solution> Load Step Opts> Time/Frequenc> Time - Time Step

Use the DTIME field to specify initial time step size, the DTMIN field to specify minimum time step size,
and DTMAX to specify maximum time step size.

Although in circuit analysis you cannot use automatic time stepping to increase or decrease the time
step size automatically, you can use it to increase from an initial time step size to a final time step size.
A factor of 3 is applied each time step to the time increment until the maximum time step size is
reached.

To turn automatic time stepping on, use one of the following:


Command(s): AUTOTS
GUI: Main Menu> Solution> Load Step Opts> Time/Frequenc> Time and Substps
Main Menu> Solution> Load Step Opts> Time/Frequenc> Time -Time Step

In cases where sharp changes exist in the source load wave form, you should break a transient analysis
into several load steps. At the time when these sharp transitions take place, specify a new load step
and re-specify the time step options if necessary to get a small initial time step at the transition point.

14.6.2.5.2. Output Controls


You can include any results data in the printed output file (Jobname.OUT). To use this option, choose
either of the following:
Command(s): OUTPR
GUI: Main Menu> Solution> Load Step Opts> Output Ctrls> Solu Printout

By default, the printed output consists of just summary messages.

To control what data goes to the results file (Jobname.RTH), choose either of the following:
Command(s): OUTRES

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 283
Electric Circuit Analysis

GUI: Main Menu> Solution> Load Step Opts> Output Ctrls> DB/Results File

Note

By default, the ANSYS program writes only the last substep of each load step to the results
file. If you want all substeps included on the results file, set the FREQ field to ALL or 1.

14.6.2.6. Create Load Step Files


You must write the each load step to a load step file. Repeat the loading, load step options, and load
step file writing operations until all load steps have been specified.

To write a load step file, use one of the following:


Command(s): LSWRITE
GUI: Main Menu> Solution> Load Step Opts> Write LS File

14.6.2.7. Copy the Database


Use either the SAVE command or the SAVE_DB button on the Toolbar to save a backup copy of the
ANSYS database.

14.6.2.8. Start the Solution


To start calculating the solution, use one of the following:
Command(s): LSSOLVE
GUI: Main Menu> Solution> Solve> From LS Files

14.6.2.9. Finish the Solution


To leave the SOLUTION processor, use one of the following:
Command(s): FINISH
GUI: Main Menu> Finish

14.6.3. Reviewing Results from a Transient Circuit Analysis


The ANSYS program writes results from a transient circuit analysis to the results file, Jobname.RTH.
The results consist of two types of primary data: nodal voltages (VOLT) and nodal currents (CURR). The
following derived data calculated for each element also are available:

• Element voltage drop (VOLTAGE)

• Element current (CURRENT)

• Element control voltage (CONTROL VOLT)

• Element control current (CONTROL CURR)

• Element power (POWER)

• Element applied load (SOURCE)

For more information about the derived results, see the Element Reference.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
284 of ANSYS, Inc. and its subsidiaries and affiliates.
Transient Electric Circuit Analysis

You can review analysis results in either POST1, the general postprocessor, or POST26, the time-history
postprocessor. POST1 allows you to review results over the entire model at specific time points. POST26
allows you to review results at specific points in the model over the entire transient.

14.6.3.1. Using POST26


To use the time-history postprocessor, use either of the following:
Command(s): /POST26
GUI: Main Menu> TimeHist Postpro

To review results in POST26, the ANSYS database must contain the same model for which the solution
was calculated. Also, the results file (Jobname.RTH) must be available.

To read the data from the results file into the database, use either of the following:
Command(s): SET
GUI: Utility Menu> List> Results> Load Step Summary

POST26 works with tables of result items, known as variables, versus time. Each variable is assigned a
reference number, with variable number 1 reserved for time. The first thing you do, then, is define the
variables using the commands or menu paths shown below.

To define variables for primary data:


Command(s): NSOL
GUI: Main Menu> TimeHist Postpro> Elec&Mag> Circuit> Define Variables

To define variables for element data:


Command(s): ESOL
GUI: Main Menu> TimeHist Postpro> Elec&Mag> Circuit> Define Variables

To define variables for reaction data:


Command(s): RFORCE
GUI: Main Menu> TimeHist Postpro> Elec&Mag> Circuit> Define Variables

Once you have defined the variables, you can graph them versus time or any other variable. To do so,
use either of the following:
Command(s): PLVAR
GUI: Main Menu> TimeHist Postpro> Graph Variables

To list just the extreme variable values, use either of the following:
Command(s): EXTREM
GUI: Main Menu> TimeHist Postpro> List Extremes

By reviewing the time-history results at strategic points throughout the model, you can identify the
critical time points for further postprocessing in POST1.

14.6.3.2. Using POST1


To review results in POST1, the ANSYS database must contain the same model for which the solution
was calculated. Also, the results file (Jobname.RTH) must be available.

The first step in using POST1 is to read in results at the desired time point. To do so, use the TIME field
on the SET command or its equivalent menu path, Utility Menu> List> Results> Load Step Summary.
If you specify a time value for which no results are available, ANSYS does linear interpolation to calculate

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 285
Electric Circuit Analysis

the results at that time. ANSYS uses the last time point if the time specified is beyond the time span of
the transient. (You can also identify the results to be read by their load step and substep numbers.)

Once the database contains the desired set of results, use one of the following to list the primary nodal
data (voltages and currents):
Command(s): PRNSOL
GUI: Main Menu> General Postproc> List Results> Nodal Solution

To list the derived element results, use one of the following:


Command(s): PRESOL
GUI: Main Menu> General Postproc> List Results> Element Solution

14.7. Example Electric Circuit Analyses


The following examples are available:
14.7.1. Example: Harmonic Circuit Analysis
14.7.2. Other Examples

14.7.1. Example: Harmonic Circuit Analysis


A circuit consists of two resistors, and inductor, an independent voltage source, an independent current
source, and a current-controlled current source. Determine the voltage at node 4 in the circuit (Refer
to the figure below).

You can perform the example AC (harmonic) circuit analysis using the ANSYS commands shown below
instead of GUI choices. Items prefaced with an exclamation point (!) are comments.
/BATCH,LIST
/PREP7
/TITLE, AC CIRCUIT ANALYSIS
/COM, SEE SCHAUMS OUTLINE "BASIC CIRCUIT ANALYSIS", 2ND ED, 1992,
/NOPR
ET,1,CIRCU124,4 ! VOLTAGE SOURCE
ET,2,CIRCU124,3 ! CURRENT SOURCE
ET,3,CIRCU124,0 ! RESISTOR
ET,4,CIRCU124,1 ! INDUCTOR
ET,5,CIRCU124,12 ! CURRENT CONTROLLED CURRENT SOURCE

R,1,15,30 ! VOLTAGE SOURCE


R,2,5,-45 ! CURRENT SOURCE
R,3,3 ! R1
R,4,2 ! R2

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
286 of ANSYS, Inc. and its subsidiaries and affiliates.
Example Electric Circuit Analyses

R,5,4 ! L1
R,6,-3 ! CCCS GAIN

N,1
NGEN,10,1,1,1,1

TYPE,1
REAL,1
E,2,1,7 ! V1
TYPE,3
REAL,3
E,2,3 ! R1
TYPE,4
REAL,5
E,3,1 ! L1
TYPE,3
REAL,4
E,3,4 ! R2
TYPE,5
REAL,6
E,3,4,5,2,1,7 ! CCCS
TYPE,2
REAL,2
E,1,4 ! C1

FINISH
/SOLU
ANTYP,HARM
D,1,VOLT,0
PI=4*ATAN(1)
HARFRQ,1/(2*PI)
OUTPR,ALL,ALL
HROUT,OFF
SOLVE
FINISH

/POST1
SET,1,1 ! READ IN REAL SOLUTION
PRESOL,ELEM ! PRINT CIRCUIT SOLUTION PER ELEMENT
SET,1,1,,1 ! READ IN IMAGINARY SOLUTION
PRESOL,ELEM ! PRINT CIRCUIT SOLUTION PER ELEMENT
FINISH

Target Solution, Node 4: V = 14.44 -j 1.41

14.7.2. Other Examples


The Mechanical APDL Verification Manual consists of test case analyses demonstrating the analysis cap-
abilities of the ANSYS, Inc. family of products. While these test cases demonstrate solutions to realistic
analysis problems, the Mechanical APDL Verification Manual does not present them as step-by-step ex-
amples with lengthy data input instructions and printouts. However, most users who have at least limited
finite element experience should be able to fill in the missing details by reviewing each test case's finite
element model and input data with accompanying comments.

The following list shows you some of the test cases that the Mechanical APDL Verification Manual includes:

VM117 - Electric Current Flowing in a Network


VM207 - Stranded Coil Excited by External Circuit

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 287
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
288 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 15: Alternative Analysis Options and Solution Methods
This chapter describes the loading options and alternative solution methods available in the ANSYS
program for electromagnetic, electric field, electrostatic field, and electric current analysis. For all of
these analysis types, you can apply, delete, list, or operate on boundary conditions and loads using
ANSYS commands instead of GUI menu paths; this chapter tells you which commands to issue. This
chapter also explains the load step options available for each type of analysis. Load step options are
options controlling how loads are applied; they include the following:

• Time and time stepping

• The number of substeps

• Stepping or ramping of loads

• Convergence tolerances (for nonlinear analyses)

• Output controls.

In addition, for 2-D and 3-D static magnetic analyses (scalar, edge or vector potential), you have an al-
ternative solution option. That is, you can step manually through the solution sequence instead of
solving the analysis automatically (via either the MAGSOLV command or Main Menu> Solution>
Solve> Electromagnet> Static Analysis> Opt and Solv). This chapter describes the menu paths or
commands required for the alternative solution method.

Information in this chapter is organized by analysis type. For example, information on all loading and
solution options for 2-D static magnetic analysis appears first, followed by information on all loading
and solution options for 3-D scalar magnetic analyses, and so on.

The following alternatives are discussed:


15.1. Loading Options for 2-D Static Magnetic Analysis
15.2. Using the Alternative Solution Option for 2-D Static Magnetic Analysis
15.3. Loading Options for 2-D Harmonic Magnetic Analysis
15.4. Load Step Options for 2-D Harmonic Magnetic Analysis
15.5. Loading Options for 2-D Transient Magnetic Analysis
15.6. Load Step Options for 2-D Nodal-Based Transient Magnetic Analysis (MVP Method)
15.7. Loading Options for 3-D Static Magnetic Analysis (Scalar Method)
15.8. Using the RSP Method for 3-D Static Scalar Magnetic Analysis
15.9. Using the DSP Method for 3-D Static Scalar Magnetic Analysis
15.10. Using the GSP Method for 3-D Static Scalar Magnetic Analysis
15.11. Loading Options for an Electric Field (Current Conduction) Analysis
15.12. Load Step Options for an Electric Field (Current Conduction) Analysis
15.13. Loading Options for an Electrostatic Field Analysis
15.14. Load Step Options for Electrostatic Field Analysis

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 289
Alternative Analysis Options and Solution Methods

15.1. Loading Options for 2-D Static Magnetic Analysis


To apply, delete, list, transfer, or scale loads on a 2-D static magnetic analysis, use the commands shown
below. For details about these commands or their corresponding menu paths, see the Command Reference.

Note

For this type of analysis, constraints are the magnetic vector DOF (AZ), forces are current
segments (CSGX), surface loads are Maxwell surface (MXWF) and infinite surface (INF), and
body loads are source current density (JS), magnetic virtual displacements (MVDI), and voltage
drop (VLTG).

15.1.1. On Keypoints
To perform this task ... Issue this command ...
Apply constraints DK
Delete constraints DKDELE
List constraints DKLIST
Transfer constraints DTRAN
Apply forces FK
Delete forces FKDELE
List forces FKLIST
Transfer forces FTRAN
Apply body loads BFK
Delete body loads BFKDELE
List body loads BFKLIST
Transfer body loads BFTRAN

15.1.2. On Lines
To perform this task ... Issue this command ...
Apply constraints DL
Delete constraints DLDELE
List constraints DLLIST
Transfer constraints DTRAN
Apply surface loads SFL
Delete surface loads SFLDELE
List surface loads SFLLIST
Transfer surface loads SFTRAN
Apply surface load settings SFGRAD
Apply body loads BFL
Delete body loads BFLDELE
List body loads BFLLIST

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
290 of ANSYS, Inc. and its subsidiaries and affiliates.
Loading Options for 2-D Static Magnetic Analysis

15.1.3. On Areas
To perform this task ... Issue this command ...
Apply constraints DA
Delete constraints DADELE
List constraints DALIST
Transfer constraints DTRAN
Apply surface loads SFA
Delete surface loads SFADELE
List surface loads SFALIST
Transfer surface loads SFTRAN
Apply surface load settings SFGRAD
Apply body loads BFA
Delete body loads BFADELE
List body loads BFALIST

15.1.4. On Volumes
To perform this task ... Issue this command ...
Apply body loads BFV
Delete body loads BFVDELE
List body loads BFVLIST

15.1.5. On Nodes
To perform this task ... Issue this command ...
Apply constraints D
Delete constraints DDELE
List constraints DLIST
Scale constraints DSCALE
Apply constraint settings DSYM, DCUM
Apply forces F
Delete forces FDELE
List forces FLIST
Scale forces FSCALE
Apply force settings FCUM
Apply surface loads SF
Delete surface loads SFDELE
List surface loads SFLIST
Scale surface loads SFSCALE
Apply surface load settings SFCUM, SFGRAD
Apply body loads BF

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 291
Alternative Analysis Options and Solution Methods

To perform this task ... Issue this command ...


Delete body loads BFDELE
List body loads BFLIST
Scale body loads BFSCALE

15.1.6. On Elements
To perform this task ... Issue this command ...
Apply surface loads SFE
Delete surface loads SFEDELE
List surface loads SFELIST
Scale surface loads SFSCALE
Apply surface load settings SFCUM, SFFUN, SFGRAD
Apply body loads BFE
Delete body loads BFEDELE
List body loads BFELIST
Scale body loads BFESCAL
Apply body load settings BFECUM

15.2. Using the Alternative Solution Option for 2-D Static Magnetic Ana-
lysis
2-D Static Magnetic Analysis (p. 13) of this document describes the quick way to solve a 2-D static
magnetic analysis using the MAGSOLV command or its equivalent menu path. This section explains
how to step manually through the two-step solution sequence.

15.2.1. Specify Load Step Options for the Initial Solution


You can specify general or nonlinear load step options for a 2-D static magnetic analysis

15.2.1.1. General Options


You use general options mostly in nonlinear static analyses. The options are:

• The number of substeps or the time step size.

A nonlinear analysis requires multiple substeps within each load step, so that ANSYS can apply
the specified loads gradually and obtain an accurate solution. By default, the program uses one
substep per load step.

To specify substeps or time step size, use either of the following:


Command(s): NSUBST
GUI: Main Menu> Solution> Load Step Opts> Time/Frequenc> Time and Substps

• Stepped or ramped loads.

If you step-apply loads, ANSYS applies the entire load value at the first substep and holds it
constant for the remainder of the load step.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
292 of ANSYS, Inc. and its subsidiaries and affiliates.
Using the Alternative Solution Option for 2-D Static Magnetic Analysis

If you ramp loads (the default), ANSYS increments the load values at each substep. To step or
ramp loads, issue the KBC command or use one of the GUI paths shown above for TIME.

15.2.1.2. Nonlinear Options


The only nonlinear load step option for the approximate initial solution is the number of equilibrium
iterations.

This option obtains a converged solution at each substep. The default is up to 25 equilibrium iterations
per substep. However, a converged solution is not needed at each substep in the approximate solution,
so just one equilibrium iteration per substep is recommended.

To specify the number of equilibrium iterations, use one of the following:


Command(s): NEQIT
GUI: Main Menu> Solution> Load Step Opts> Nonlinear> Equilibrium Iter

15.2.2. Write Load Data or Start the Solution


You can either write load data for the initial approximate solution to a load step file or solve the load
step immediately. To write the data to a load step file, use one of the following:
Command(s): LSWRITE
GUI: Main Menu> Solution> Load Step Opts> Write LS File

To solve the load step immediately, use one of the following:


Command(s): SOLVE
GUI: Main Menu> Solution> Solve> Current LS

15.2.3. Specify Load Step Options for the Final Solution


You can specify general options, nonlinear options, or output controls for the final solution.

15.2.3.1. General Options


The only general option to specify is the number of substeps. (Use the NSUBST command or its menu
path equivalent, as described in Step 2). For the final solution step, issue just one substep.

15.2.3.2. Nonlinear Options


Specify the equilibrium iterations option (described in Step 2). However, for the final solution, specify
five to 10 equilibrium iterations over one substep. Other nonlinear load step options you should specify
include:

• Convergence tolerances.

ANSYS considers a nonlinear solution to be converged whenever specified convergence criteria


are met. Convergence checking may be based on magnetic potentials, current segments, or
both. You specify a typical value for the desired item (VALUE field) and a tolerance about the
typical value (TOLER field). The convergence criterion is then given by VALUE*TOLER. For in-
stance, if you specify 5000 as the typical value of current segment and 0.001 as the tolerance,
the convergence criterion for current segment would be 5.0.

For potentials, ANSYS compares the change in nodal potentials between successive equilibrium
iterations (ΔA = Ai - Ai-1) to the convergence criterion. For current segments, ANSYS compares

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 293
Alternative Analysis Options and Solution Methods

the out-of-balance load vector to the convergence criterion. The out-of-balance vector is the
difference between the applied current (segments) and the internal (calculated) current (segments).

ANSYS enables you to graphically track convergence norms via its Graphical Solution Tracking
(GST) feature, available for both interactive and batch runs of the program. For a detailed descrip-
tion of this feature, see Tracking Convergence Graphically (p. 33) and the /GST command de-
scription in the Command Reference.

To specify convergence tolerances, use either of the following:


Command(s): CNVTOL
GUI: Main Menu> Solution> Load Step Opts> Nonlinear> Convergence Crit

• Terminate an unconverged solution.

If ANSYS cannot converge the solution within the specified number of equilibrium iterations,
ANSYS either stops the solution or moves on to the next load step, depending on what you
specify as the stopping criteria. For a 2-D magnetostatic analysis, ANSYS, Inc. recommends con-
vergence based on current segments.

To specify convergence tolerances, use either of the following:


Command(s): NCNV
GUI: Main Menu> Solution> Load Step Opts> Nonlinear> Criteria to Stop

15.2.3.3. Output Controls


The third class of load step options enables you to control output. The options are as follows:

• Control printed output.

This option enables you to include any results data in the printed output file (Jobname.OUT).
To use this option, choose either of the following:

To control printed output, use either of the following:


Command(s): OUTPR
GUI: Main Menu> Solution> Load Step Opts> Output Ctrls> Solu Printout

• Control database and results file output

This option controls what data goes to the results file (Jobname.RMG). To send output to the
database and results file, use either of the following:
Command(s): OUTRES
GUI: Main Menu> Solution> Load Step Opts> Output Ctrls> DB/Results File

• Extrapolate results.

Use this option to review element integration point results by copying them to the nodes instead
of extrapolating them. (Extrapolation is the default.)

To specify convergence tolerances, use either of the following:


Command(s): ERESX
GUI: Main Menu> Solution> Load Step Opts> Output Ctrls> Integration Pt

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
294 of ANSYS, Inc. and its subsidiaries and affiliates.
Load Step Options for 2-D Harmonic Magnetic Analysis

15.2.4. Write Load Data or Start the Solution


To write load data for the final solution to a load step file or to solve the load step immediately, use
the procedures described in Step 2.

15.2.5. Initiate the Solution


You need to perform this step only if you do not solve loads steps immediately via the SOLVE command
or its menu path equivalent. To initiate the solution for all load steps, use either of the following:
Command(s): LSSOLVE
GUI: Main Menu> Solution> Solve> From LS Files

An example command sequence for nonlinear 2-D static magnetic analysis follows:
/solu
nsubst,3 ! Three substeps
neqit,1 ! One equilibrium iteration
outres,all,none ! Do not save results
solve ! Solve the analysis
nsubst,1 ! One substep
neqit,20 ! Up to 20 equilibrium iterations
cnvtol,csg,,le-3 ! Convergence criteria
outres,all,last ! Save converged solution
solve ! Solve
finish

15.3. Loading Options for 2-D Harmonic Magnetic Analysis


For a 2-D harmonic magnetic analysis, you can specify the loads listed below:

• Constraints - vector potential (AZ) or time-integrated scalar potential (VOLT)

• Forces - current segment (CSGX) or current (AMPS)

• Body loads - source current density (JS) or voltage drop (VLTG)

To apply, delete, list, or operate on, these loads or apply load settings, use the commands listed in
Loading Options for 2-D Static Magnetic Analysis (p. 290). The only difference is that you will not use
the SF family of commands; they manipulate surface loads, which do not apply in harmonic analysis).

15.4. Load Step Options for 2-D Harmonic Magnetic Analysis


You can specify dynamic options, general options, and output controls.

15.4.1. Dynamic Options


The only dynamic option for this type of analysis is the operating frequency range (in Hertz) of the
harmonic loads. To specify the frequency range, use one of the following:
Command(s): HARFRQ
GUI: Main Menu> Solution> Load Step Opts> Time/Frequenc> Freq and Substps

15.4.2. General Options


You have two general options: the number of harmonic solutions and whether to use stepped or ramped
loads.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 295
Alternative Analysis Options and Solution Methods

You can request any number of solutions. ANSYS spaces the solutions (or substeps) even within the
specified frequency range. For example, if you specify 10 solutions in the range 50 to 60 Hz, the program
calculates the response at 51, 52, 53, ..., 59, and 60 Hz. Mechanical APDL calculates no response at the
lower end of the frequency range.

By default, loads are ramped; that is, the load value increases gradually with each substep. By stepping
the loads, you can maintain the same load values for all substeps in the frequency range. To specify
stepped or ramped loads, use either method shown below:
Command(s): KBC
GUI: Main Menu> Solution> Load Step Opts> Time/Frequenc> Time - Time Step
Main Menu> Solution> Load Step Opts> Time/Frequenc> Time and Substps

15.4.3. Output Controls


The third class of load step options enables you to control output. The options are controlling printed
output, controlling database and results file output, and extrapolating results. For information about
output controls, see Using the Alternative Solution Option for 2-D Static Magnetic Analysis (p. 292).

15.5. Loading Options for 2-D Transient Magnetic Analysis


You can apply the following loads on a 2-D transient magnetic analysis:

• Constraints - vector potential (AZ) and time-integrated scalar potential (VOLT)

• Forces - current segment (CSGX), current (AMPS)

• Surface loads - Maxwell surfaces (MXWF)

• Body loads - (source current density (JS), virtual displacement (MVDI), voltage drop (VLTG)

To apply these loads, use the commands listed in Loading Options for 2-D Static Magnetic Analysis (p. 290).

15.6. Load Step Options for 2-D Nodal-Based Transient Magnetic Analysis
(MVP Method)
For a transient magnetic analysis, you can specify dynamic options, initial conditions, general options,
nonlinear options, and output controls.

15.6.1. Dynamic Options


Dynamic options for transient magnetic analyses are as follows.

• Time integration effects

These load step options determine whether the analysis includes transient effects such as eddy
current damping effects and inductance.

Important: ANSYS assumes time integration effects to be on in a transient analysis (unless they
were turned off to establish initial conditions). If time integration effects are turned off, Mechan-
ical APDL calculates a static solution.

To specify time integration effects, use one of the methods shown below:
Command(s): TIMINT

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
296 of ANSYS, Inc. and its subsidiaries and affiliates.
Load Step Options for 2-D Nodal-Based Transient Magnetic Analysis (MVP Method)

GUI: Main Menu> Solution> Load Step Opts> Time/Frequenc> Time Integration

• Transient integration parameters

These parameters control the nature of your time integration scheme and specify the criteria for
automatic time stepping. See the Mechanical APDL Theory Reference for details.

To specify transient integration parameters, use either of the following:


Command(s): TINTP
GUI: Main Menu> Solution> Load Step Opts> Time/Frequenc> Time Integration

15.6.1.1. Initial Conditions


When you activate time integration effects, you can specify initial conditions at select nodes of your
model. The initial conditions, which you choose for the valid degrees of freedom for your model, can
be AZ, VOLT, or MAG.

If you do not specify an initial condition for your model's DOFs, the default is an initial condition of
value 0.0.

To set the degree of freedom and initial DOF value, use either of the following:
Command(s): IC
GUI: Main Menu> Solution> Define Loads> Apply> Initial Condit'n> Define

To list initial conditions, use either of the following:


Command(s): ICLIST
GUI: Main Menu> Solution> Define Loads> Apply> Initial Condit'n> List Picked

15.6.1.2. General Options


General options include the following:

• Time option

This option specifies time at the end of the load step. For details on how to specify it, see Using
the Alternative Solution Option for 2-D Static Magnetic Analysis (p. 292).

• Number of substeps or time step size

The integration time step is the time increment used in the time integration scheme. You can
specify it directly via the DELTIM command or its equivalent menu path, or indirectly via NSUBST
or its menu path equivalent.

Time step size determines the accuracy of your solution. The smaller the time step size, the
higher the accuracy. The size of the first integration time step following any large step change
in loading conditions is especially critical. You can reduce inaccuracies such as overshoot by re-
ducing the integration time step size.

Caution

Avoid using extremely small time steps, especially when establishing initial conditions.
Very small numbers can cause calculation errors in ANSYS. For instance, on a problem
time scale of unity, time steps smaller than 1E-10 can cause numerical errors.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 297
Alternative Analysis Options and Solution Methods

If you step-apply loads, ANSYS applies the entire load value at the first substep and holds it
constant for the remainder of the load step. If you ramp loads (default), ANSYS increments the
load values at each substep.

To specify time step size directly, use the following command or menu path:
Command(s): DELTIM
GUI: Main Menu> Solution> Load Step Opts> Time/Frequenc> Time - Time Step

• Automatic Time Stepping

Also called time step optimization in a transient analysis, automatic time stepping allows ANSYS
to determine the size of load increments between substeps. It also increases or decreases the
time step size during solution, depending on how the model responds.

For most problems, you should turn on automatic time stepping and set upper and lower limits
for the integration time step. The limits help to control how much the time step varies. However,
time step optimization is not available for the CURR degree of freedom (voltage-fed conductors)
or the EMF degree of freedom (circuit-fed models).

To specify automatic time stepping, use the following command or menu path:
Command(s): AUTOTS
GUI: Main Menu> Solution> Load Step Opts> Time/Frequenc> Time - Time Step

15.6.1.3. Nonlinear Options


Specify nonlinear load step options only if nonlinearities are present. Nonlinear options include the
following:

• Number of equilibrium iterations

This option obtains a converged solution at each substep. The default is up to 25 equilibrium
iterations, but you may need to increase the number depending on the degree of nonlinearity.
For linear transient analysis, specify one iteration.

For details on specifying the number of substeps, see Using the Alternative Solution Option for
2-D Static Magnetic Analysis (p. 292).

• Convergence tolerances

ANSYS considers a nonlinear solution to be converged whenever specified convergence criteria


are met. Convergence checking may be based on magnetic potential (A), magnetic current seg-
ment (CSG), or both. You specify a typical value for the desired item (VALUE field) and a tolerance
about the typical value (TOLER field). ANSYS then calculates the convergence criterion via VALUE
* TOLER. For example, if you specify 5000 as the typical value for magnetic current segment
and 0.001 as the tolerance, the convergence criterion for magnetic flux would be 5.0.

ANSYS, Inc. recommends that VALUE be left to the default (program-calculated) and that TOLER
be set to 1.0E-3.

For potentials, ANSYS compares the change in nodal potentials between successive equilibrium
iterations (ΔA = Ai - Ai-1) to the convergence criterion.

For magnetic current segment, ANSYS compares the out-of-balance load vector to the convergence
criterion. If the solution does not converge within the specified number of equilibrium iterations,

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
298 of ANSYS, Inc. and its subsidiaries and affiliates.
Loading Options for 3-D Static Magnetic Analysis (Scalar Method)

the program either stops or moves on to the next load step, depending on whether you activated
the option to terminate an unconverged solution (see below).

ANSYS enables you to graphically track convergence norms via its Graphical Solution Tracking
(GST) feature, available for both interactive and batch runs of the program. For a detailed descrip-
tion of this feature, see the /GST command description in the Command Reference.

For details on specifying convergence tolerances, see Using the Alternative Solution Option for
2-D Static Magnetic Analysis (p. 292).

• Terminate an unconverged solution

If ANSYS cannot converge the solution within the specified number of equilibrium iterations,
ANSYS either stops the solution or moves on to the next load step, depending on what you
specify as the stopping criteria.

For details on terminating unconverged solutions, see Using the Alternative Solution Option for
2-D Static Magnetic Analysis (p. 292).

15.6.1.4. Output Controls


This class of load step options enables you to control output. For details on specifying any of the output
controls, see Using the Alternative Solution Option for 2-D Static Magnetic Analysis (p. 292). Output
controls options are as follows:

• Control printed output

This option enables you to include any results data in the printed output file (Jobname.OUT).

• Control database and results file output

This option controls what data goes to the results file (Jobname.RMG).

By default, ANSYS writes only the last substep of each load step to the results file. If you want
all substeps (that is, the solution at all frequencies) on the results file, specify a frequency or ALL
or 1.

• Extrapolate results

This option allows you to review element integration point results by copying them to the nodes
instead of extrapolating them. (Extrapolation is the default.)

15.7. Loading Options for 3-D Static Magnetic Analysis (Scalar Method)
For a 3-D static magnetic analysis using the scalar formulation, you can apply the following loads:

• Constraints - Scalar potential (MAG)

• Forces - Magnetic flux (FLUX)

• Surface loads - Maxwell surfaces (MXWF)

• Body loads - Virtual displacement

• Current (via SOURC36 element type)

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 299
Alternative Analysis Options and Solution Methods

To apply constraint-body loads, use the commands listed in Loading Options for 2-D Static Magnetic
Analysis (p. 290). You prescribe current sources by defining SOURC36 elements.

15.8. Using the RSP Method for 3-D Static Scalar Magnetic Analysis
This section explains how to step manually through the solution sequence.

15.8.1. Specify Load Step Options


You can specify five types of load step options for RSP method analyses.

15.8.1.1. Newton-Raphson Options


These options specify how often the tangent matrix is updated during solution. Available options are:

• Program-chosen (default)

• Full

• Modified

• Initial-stiffness.

For a 3-D analysis, the full Newton-Raphson option is recommended with adaptive descent. To specify
Newton-Raphson options, use either of the following:
Command(s): NROPT
GUI: Main Menu> Solution> Analysis Type> Analysis Options

15.8.1.2. Biot-Savart Options


In addition to defining SOURC36 elements to describe the currents in a model, you have a symmetry
reflection option. If you have a current source that exhibits circular symmetry about the global Cartesian
Z axis (such as a coil), you can define just one sector of it with SOURC36 elements, using the following:
Command(s): E
GUI: Main Menu> Preprocessor> Modeling> Create> Elements> Auto Numbered> Thru Nodes
Command(s): EGEN
GUI: Main Menu> Preprocessor> Modeling> Copy> Elements> Auto Numbered

Then, you can duplicate the current source via the EMSYM command or Main Menu> Solution> Load
Step Opts> Magnetics> Options Only> Copy Sources. You specify Biot-Savart calculations using either
of the following:
Command(s): BIOT
GUI: Main Menu> Solution> Load Step Opts> Magnetics> Options Only> Biot-Savart

By default (that is, if you do not specify Biot-Savart calculations), the HS contribution from all selected
source elements to all selected nodes is calculated when you initiate the solution process. ANSYS does
no further HS calculation during solution.

15.8.1.3. General Options


You use general options mostly in nonlinear static analyses. For a 3-D static magnetic analysis, the only
general option is the number of substeps (the time step size). See Using the Alternative Solution Option
for 2-D Static Magnetic Analysis (p. 292) for details on specifying the number of substeps.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
300 of ANSYS, Inc. and its subsidiaries and affiliates.
Using the RSP Method for 3-D Static Scalar Magnetic Analysis

A nonlinear analysis requires multiple substeps within each load step, so that ANSYS can apply the
specified loads gradually and obtain an accurate solution. By default, the program uses one substep
per load step. For the RSP method, one substep (default) is recommended.

15.8.1.4. Nonlinear Options


The nonlinear load step options are:

• Number of equilibrium iterations.

This option obtains a converged solution at each substep. The default is up to 25 equilibrium
iterations per substep. However, you may have to increase the number, depending on the degree
of nonlinearity.

• Convergence tolerance.

The ANSYS program considers a nonlinear solution to be converged when specified convergence
criteria are met.

You specify a convergence criterion by specifying a value and a tolerance for that value. Thus,
value * tolerance gives the convergence criterion, for example, if you specify 5000 as the typical
value of magnetic flux and 0.001 as the tolerance, the convergence criterion for magnetic flux
would be 5.0. ANSYS, Inc. recommends that you leave the value to default (program-calculated)
and set the tolerance to 1.0E-3 for flux-based convergence.

You can base convergence checking on magnetic potential (MAG), magnetic flux (FLUX), or both.
For potentials, the ANSYS program compares the change in nodal potentials between successive
iterations Δ Φ = Φ1 - Φi-1 to the convergence criterion.

For magnetic flux, ANSYS compares the out-of-balance load vector to the convergence criterion.
In the model does not converge within the specified number of equilibrium iterations, ANSYS
either stops or moves on to the next load step, depending on whether you have specified the
option to halt an unconverged solution. Convergence based on magnetic flux is recommended
for a 3-D, scalar potential, magnetostatic analysis.

ANSYS enables you to graphically track convergence norms via its Graphical Solution Tracking
(GST) feature, available for both interactive and batch runs of the program. For a detailed descrip-
tion of this feature, see Tracking Convergence Graphically (p. 33) and the /GST command de-
scription in the Command Reference.

For details on specifying nonlinear options, see Using the Alternative Solution Option for 2-D
Static Magnetic Analysis (p. 292).

15.8.2. Start the Solution


To solve the load step, use one of the following:
Command(s): SOLVE
GUI: Main Menu> Solution> Solve> Current LS

15.8.2.1. Specify Additional Loading Conditions (Optional)


Repeat Steps 1 through 3 to specify additional load steps, if any.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 301
Alternative Analysis Options and Solution Methods

15.8.2.2. Review Results


See 3-D Static Magnetic Analysis (Scalar Method) (p. 89) for a discussion of postprocessing results from
a 3-D static magnetic analysis (scalar potential formulation).

An example command sequence for a nonlinear 3-D RSP method static analysis follows:
/solu
nropt,full,,on ! Full Newton-Raphson, adaptive descent
cnvtol,flux,,le-3 ! Convergence criteria
solve ! Solve
finish

15.9. Using the DSP Method for 3-D Static Scalar Magnetic Analysis
You can step manually through the two-step solution sequence for a DSP analysis. To do so, follow this
procedure:

1. Specify the magnetic solution sequence and the number of substeps as options for the first load step.
This will yield an approximate air-only solution. To do so, use either of the following menu paths or
commands:
Command(s): MAGOPT (Set the VALUE field to 2.)
GUI: Main Menu> Solution> Load Step Opts> Magnetics> Options Only> DSP Method
Command(s): NSUBST (Specify one substep.)
GUI: Main Menu> Solution> Load Step Opts> Time/Frequenc> Freq and Substps

2. Specify that you do not want to save results, using one of the following:
Command(s): OUTRES,ALL,NONE
GUI: Main Menu> Solution> Load Step Opts> Output Ctrls> DB/Results File

3. Write the load data to a load step file, via one of these methods:
Command(s): LSWRITE or SOLVE
GUI: Main Menu> Solution> Load Step Opts> Write LS File
Main Menu> Solution> Solve> option

4. Specify load step options for the second load step (which produces the final solution). This time, set
the VALUE field to 3 on the MAGOPT command.

5. Set the convergence criteria using one of the following:


Command(s): CNVTOL
GUI: Main Menu> Solution> Load Step Opts> Nonlinear> Convergence Crit

6. Set the full Newton-Raphson option with adaptive descent. To do so, use either method shown below:
Command(s): NROPT
GUI: Main Menu> Solution> Analysis Type> Analysis Options

7. Store the converged solution, using the OUTRES command or its GUI equivalent.

8. Use the LSWRITE command or the Write LS File menu option to write load data to a load step, as
discussed in step 2 above.

9. Start calculating the solution by using one of the following:


Command(s): LSSOLVE
GUI: Main Menu> Solution> Solve> From LS Files

10. Once you have solved the model, review the results as described for the RSP method.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
302 of ANSYS, Inc. and its subsidiaries and affiliates.
Using the GSP Method for 3-D Static Scalar Magnetic Analysis

An example command sequence for a nonlinear 3-D DSP analysis follows:


/solu
magopt,2 ! Partial solution in air
outres,all,none ! Do not store results
solve ! Solve the analysis
magopt,3 ! Final solution
cnvtol,flux,,1e-3 ! Set convergence criteria
nropt,full,,on ! Full Newton-Raphson with adaptive descent
outres,all,last ! Store final results
solve

GUI:
Main Menu> Solution> Load Step Opts> Nonlinear> Convergence Crit

15.10. Using the GSP Method for 3-D Static Scalar Magnetic Analysis
You can step manually through the three-step solution sequence for a GSP analysis. To do so, follow
this procedure:

1. Specify options for the first load step. This will yield an approximate iron-only solution. To do so, set
VALUE = 1 for the MAGOPT command or choose Main Menu> Solution> Load Step Opts> Magnet-
ics> Options Only> GSP Method.
Command(s): MAGOPT
GUI: Main Menu> Solution> Load Step Opts> Magnetics> Options Only> GSP Method

2. Set the convergence criteria using the CNVTOL command or its GUI equivalent.

3. Specify that results are not saved, using either of the following:
Command(s): OUTRES,ALL,NONE
GUI: Main Menu> Solution> Load Step Opts> Output Ctrls> DB/Results File

4. Set the full Newton-Raphson option with adaptive descent. To do so, use either method shown below:
Command(s): NROPT
GUI: Main Menu> Solution> Analysis Type> Analysis Options

5. Write the load data to a load step file, via one of these methods:
Command(s): LSWRITE or SOLVE
GUI: Main Menu> Solution> Load Step Opts> Write LS File
Main Menu> Solution> Solve

6. Specify load step options for the second load step (which produces an approximate air-only solution).
This time, set the VALUE field to 2 on the MAGOPT command or its GUI equivalent and again, specify
one substep.

7. Use the LSWRITE command or the Write LS File menu option to write load data to a load step, as
discussed in step 2 above.

8. Specify load step options for the third load step (which gives the final solution). To do so, set VALUE
= 3 on the MAGOPT command or its GUI equivalent.

9. Store the final results using the OUTRES,ALL,LAST command or its GUI equivalent.

10. Start calculating the solution by using one of the following:


Command(s): LSSOLVE or SOLVE
GUI: Main Menu> Solution> Solve> From LS Files
Main Menu> Solution> Solve

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 303
Alternative Analysis Options and Solution Methods

11. Once you have solved the model, review the results as described for the RSP method.

An example command sequence for a nonlinear GSP method static analysis follows:
/solu
magopt,1 ! Partial solution in iron
cnvtol,flux,,le-3 ! Set convergence criteria
outres,all,none ! Do not store results
nropt,full,,on ! Full Newton-Raphson, adaptive descent
solve ! Solve
magopt,2 ! Partial solution in air
solve ! Solve
magopt,3 ! Final solution
outres,all,last ! Store converged solution
solve

15.11. Loading Options for an Electric Field (Current Conduction) Analysis


For an electric field (current conduction) analysis, you can specify these loads:

• Constraints - Voltage (VOLT)

• Forces - Current (AMPS)

To apply these loads, use the D family and F family commands listed in Loading Options for 2-D Static
Magnetic Analysis (p. 290).

15.12. Load Step Options for an Electric Field (Current Conduction) Ana-
lysis
For this type of analysis the only load step options you can specify are the output control options listed
in Using the Alternative Solution Option for 2-D Static Magnetic Analysis (p. 292).

15.13. Loading Options for an Electrostatic Field Analysis


For an electrostatic analysis, you can specify these loads:

• Constraints - Voltage (VOLT)

• Forces - Charge (CHRG)

• Surface loads - Surface charge density (CHRGS), Maxwell force flag (MXWF), infinite surface flag (INF)

• Body loads - Volume charge density (CHRGD)

To apply these loads, use the commands listed in Loading Options for 2-D Static Magnetic Analysis (p. 290).

15.14. Load Step Options for Electrostatic Field Analysis


For an electrostatic analysis, you can specify only output controls as load step options. See Using the
Alternative Solution Option for 2-D Static Magnetic Analysis (p. 292) for more information about output
controls.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
304 of ANSYS, Inc. and its subsidiaries and affiliates.
conducting block, 176
Index contact
electric contact, 209
Symbols electrostatic contact, 247
2-D harmonic magnetic analysis, 51 convergence criteria, 62, 172
2-D static magnetic analysis, 13 convergence tracking, 33
2-D versus 3-D analysis, 8 current
3-D harmonic magnetic analysis, 141 densities, 215
3-D static magnetic analysis, 9, 89, 113 current conduction analysis
3-D transient magnetic analysis, 169 steady-state, 215
current conduction regions, 8, 97
current density load, 30, 59
A current load, 59, 78
air regions, 17, 23, 54
current segments, 31
alternative options, 289
current-fed massive conductor, 54, 59
amplitude, 59
current-fed stranded coil, 17, 54
analysis
2-D harmonic magnetic, 51
2-D static magnetic, 13
D
2-D vs. 3-D, 8 defining
3-D harmonic magnetic, 141 analysis title, 17
3-D static magnetic, 89 element coordinate system, 20
3-D transient magnetic, 169 real constants, 21
edge-based, 9, 113, 141, 169 solver, 32, 62, 103
electric circuit, 271 difference scalar potential method, 104
electric field, 209 domains, 91
electrostatic, 247
nodal-based, 9 E
types of magnetic, 7 edge-based analysis, 9
analysis options 3-D harmonic analysis, 141
2-D harmonic magnetic, 61 3-D static analysis, 113
automatic time stepping, 171 3-D transient analysis, 169
AZ option, 54 typical uses, 113
AZ-VOLT option, 54 electric analysis
harmonic quasistatic, 222
B transient quasistatic, 229
B-H curve, 23, 26, 94 electric circuit analysis, 271
BIOT command, 300 harmonic, 279
Biot-Savart options, 300 static, 277
boundary conditions transient, 281
2-D harmonic magnetic analysis, 58 electric field analysis, 209
2-D static magnetic analysis, 28 electromagnetic elements, 11
3-D static magnetic analysis, 101 electromagnetic macros, 193
far-field, 29 modeling aids, 194
periodic, 29, 58, 78 postprocessing calculations, 197
boundary elements, 201 solution aids, 196
electrostatic analysis, 247
element compatibility, 212
C elements
charge loads, 251
2-D harmonic magnetic analysis, 52
CIRCU124 element, 272
2-D static magnetic analysis, 13
circuit builder, 272
3-D static scalar magnetic analysis, 89
circuit-fed massive conductor, 54
coordinate system, 20
circuit-fed stranded coil, 54

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 305
Index

edge-based analysis, 114 J


electric field analysis, 210 Joule heating losses, 25
general circuit, 210, 272
EMSYM command, 300 L
EMUNIT command, 92
laminated iron, 54
equilibrium iterations, 33, 63, 172
load step options, 289
example problems
loading options
2-D harmonic magnetic, 72
2-D or 3-D harmonic magnetic analysis, 295
2-D static magnetic, 39
2-D or 3-D transient magnetic analysis, 296
2-D transient magnetic, 85
2-D static magnetic analysis, 290
3-D harmonic magnetic (edge-based), 147
3-D static magnetic analysis, 299
3-D magnetostatic and edge-based , 125
electric field analysis, 304
3-D static magnetic (scalar method), 108
electrostatic field analysis, 304
3-D transient magnetic edge-based, 176
loads
electric circuit, 286
2-D harmonic magnetic analysis, 58
electric field, 233
2-D static magnetic analysis, 28
electrostatic field (h-Method), 258
3-D static magnetic analysis, 101
far-field, 205
Lorentz forces, 36, 69
linear perturbation (electromagnetic), 188
Lorentz torque, 36, 70
F M
far-field elements, 201
macros, 193
files, 34
magnetic analysis
flags
applications, 1
force, 31
magnetic energy, 197
infinite surface, 30, 60, 102
magnetic forces, 36, 69, 107
Maxwell surface, 30, 60, 102
magnetic scalar potential formulation, 8
flux-normal, 29
magnetic scalar potentials, 102
flux-parallel, 29
magnetic torque, 36, 70
frequency setting, 62
magnetic vector potential formulation, 9, 13
magnetic vector potentials, 29
G magnetic virtual displacements, 31, 60, 102
GAUGE command, 117, 141, 174 MAGOPT command, 302-303
generalized scalar potential method, 105, 303 MAGSOLV command, 33
GMATRIX command, 220 material properties, 21, 92
/GST command, 33 Maxwell forces, 36, 69, 107
GUI, 17 Maxwell surface flag, 30, 60, 102
Maxwell torque, 36, 70
H micro-electromechanical systems, 248
harmonic magnetic analysis, 51 modeling
harmonic quasistatic current conduction regions, 97
electric analysis, 222 racetrack coil, 100
moving conductors, 25, 54
I multiple massive conductors, 54
INFIN110 element, 13, 52, 202 multiply connected domain, 91
INFIN111 element, 89, 202
INFIN47 element, 89, 202 N
infinite elements, 201 Newton-Raphson options, 172, 300
infinite surface flags, 251 nodal-based analysis, 9
iron regions, 17 nonlinear analysis, 33, 51, 61
nonlinear magnetic material, 23

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
306 of ANSYS, Inc. and its subsidiaries and affiliates.
O 3-D static magnetic analysis, 103
open circuit conductors, 54 SOURC36 element, 89, 97
operating frequency, 59 source conductor regions, 25
output controls, 63 static magnetic analysis
2-D, 13
P 3-D, 9, 89, 113
steady-state
PERBC2D command, 29, 58, 78
current conduction analysis, 215
permanent magnet regions, 17, 26
stranded coils, 38, 122
permeability, 23, 94, 117
stranded conductors, 59
permeable material regions, 23
substeps, 33, 63
permittivity, 248
surface charge densities, 251
phase angle, 59
physical regions
2-D magnetic analysis, 54 T
3-D harmonic edge-based analysis, 115 time steps
assigning attributes, 28 optimizing, 171
physics environment size, 171
2-D harmonic magnetic analysis, 53 transient magnetic analysis, 75, 169
2-D static magnetic analysis, 16 transient quasistatic
3-D static magnetic analysis, 92 electric analysis, 229
PLANE13 element, 13, 52
PLF2D command, 35 U
POST1, 34 units, 21, 248
postprocessing, 34, 66
V
R velocity effects, 25, 57
RACE command, 100 virtual work force, 36, 69, 107
racetrack coil, 100 virtual work torque, 36, 70
real constants voltage load, 251
defining, 21 voltage-fed stranded coil, 17
reduced scalar potential method, 103, 300 volume charge densities, 252
relative permeability, 23, 94, 117
relative permittivity, 248
resistivity, 25
restarting, 32
results file, 34

S
scalar potential formulation, 90
short circuit conductors, 54
singly connected domain, 91
skin depth considerations, 58
SOLID5 element, 89
SOLID96 element, 89
SOLID98 element, 89
solution options, 289
solvers
choosing, 32, 62, 103
edge-based analysis, 169
solving
2-D harmonic magnetic analysis, 61
2-D static magnetic analysis, 32

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 307
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
308 of ANSYS, Inc. and its subsidiaries and affiliates.

S-ar putea să vă placă și