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 2D 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, SOLID123 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 2D 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

Magnetic Macros PREP 7 Sol POST 1 POST 26 MVP Dom MSP Dom 2D Pla- nar 2D Axi- sym 3D Edge Form Static Harm Trans Elec- tro- stat
CMATRIX YY----YYY----Y
CURR2D --Y-Y-YYY-YYY-
EMAGERR --Y-YYYYYYYYY-
EMF[1]- -Y-------- Y-Y
EMFT[1]- -Y- ----YYY- -Y
EMTGEN Y-----YYY-YYYY
FLUXV -- Y-Y-YYY-YYY-
MAGSOLV YY- -YYYYYYY-Y-
MMF -- Y-YYYYYYYYY-
PERBC2D Y---Y-Y---YYY-
PLF2D -- Y-Y-YY-- YYY-
PMGTRAN -- -YYYYYYY--Y-
POWERH -- Y-Y-YYYY-Y- -
RACE Y----Y- -Y-Y---
SENERGY -- Y-YYYYY-YYY-

  1. Macros also apply to electrostatic field problems.