Ansys MotorCAD and Maxwell – Model Export

Categories:

Introduction

Ansys MotorCAD is an electric machine design tool built for doing fast Multiphysics simulations across the full torque-speed operating range. Ansys Maxwell is a low-frequency electromagnetic fields solver primarily used for simulating transformers, electric machines, and other electric-mechanical devices. Individually both tools are quite capable, but they are even more powerful when used together. This tutorial blog post is going to go through the process of exporting a MotorCAD design into Ansys Maxwell and performing an electromagnetic analysis on it in a 2D Maxwell simulation.

MotorCAD Interface

For this example, we’re going to be using a template that is built into MotorCAD – you can access this and other templates via Files -> Open Template from within the MotorCAD window. The template we’re using is called “e10” and is an example a PM (permanent magnet) machine. Figure 1 shows the MotorCAD interface with the example model loaded in.

A screenshot of the main interface of MotorCAD after loading in the e10 template
Figure 1 – MotorCAD Interface

From the calculations tab, we solve the E-Magnetic Model and save the results; we’ll use them later to compare with our Maxwell model. After solving, we will then export the model from MotorCAD to Maxwell.

Export Script Generation

To create the export script to bring the model into Maxwell, we need to navigate to Tools -> Ansys Electronics Desktop – there is a default keyboard shortcut for this as well, Alt+Ctrl+M. From within the Model Export window, there are a variety of options available to control the script generation process, which controls how the Maxwell project is created. Figure 2 shows what the model export window looks like as of the 2025R2 version of MotorCAD.

A screenshot of the model export window in MotorCAD
Figure 2 – MotorCAD Model Export Window

Some of the options should be self-explanatory – Model Type determines whether to export to a 2D or 3D Maxwell project, Solving determines whether we want the script to start a Maxwell solve as part of the script process, and Script Format determines what programming language the script is generated in. For this example, we will go with the default options for each of these (2D, Not Solved, and Python respectively). For the remaining options, see Table 1 for explanations into what they control – items in parentheses are the options chosen for this example.

Geometry Format (Templates)Templates will have Maxwell use User-Defined Primitive (UDP) objects to create the motor geometry, where outlines will draw every line individually.
Rotation Direction (Clockwise)This sets the direction of the motor’s rotation within Maxwell
Arc Segments (Automatic)It is recommended to leave this setting as Automatic unless the Motor-CAD model contains arc entities which connect at a tangent to the end point of the arc. This controls the number of arc line segments generated by setting the degrees per segment
Drive Type (Current)Controls whether the Maxwell coil excitation is Voltage or Current based
Airgap Cylindrical Mesh (Used)Applies the 2D band mapping angle option in Maxwell to improve airgap mesh quality by using a band mesh. The mesh density is controlled by the parameter Airgap surface points (under Input Data -> Settings -> Calculation).
Demagnetisation Curve (Intrinsic)Controls whether the magnet models are exported using the intrinsic (J-H) or the normal (B-H) demagnetisation curves. Intrinsic is recommended when Thermal Modifiers are used.
Winding Groups per Phase (Single)Determines whether to use the Parallel Paths option in Maxwell or create a different winding for every parallel path.
Magnet Temperature Data (Fixed Temperature)Determines whether to use the magnet temperature data at a specified temperature or to include thermal modifier for the material properties.
Hairpin Coil Type (HairPinCoil UDP)Determines the type of UDP used to generate the coils, Hairpin or Lap.
Hairpin Coil UDP End Tips (Included)Determines whether to apply End Tips to the Hairpin Coil UDP. Only shows up if the Hairpin UDP is used and only affects 3D models. If they are excluded, all coils in a 3D model will be open-ended.
Table 1 – Export Options

Once all the options have been selected, the script will be exported to the location selected in the “File” path, which can then be ran in Maxwell in the next step.

Importing into Maxwell

After generating our Python script from MotorCAD, we need to run it in Maxwell to generate the project. From within Ansys Electronics Desktop, go to the Automation tab in the ribbon, and then select “Run Script.” Navigate to the location of your recently exported script, and then open it. Figure 3 shows the Run Script window from within Ansys Electronics Desktop.

A screenshot from Ansys Electronics Desktop highlighting the Run Script button and the file selection window that is opened when that button is pressed.
Figure 3 – Running the Python Script in Maxwell

The program will then begin executing the script, building out the geometry and setting up all the boundary conditions. It will also generate reports for the various quantities of interest from a simulation, such as Voltage and Current, Flux Linkage between windings, and the torque of the motor. When we run the simulation, these reports will be filled in with the results that we can then compare to our MotorCAD data from earlier. In Figure 4 we can see the exported model in the Maxwell window – the script has automatically sliced the motor to a 1/8 model and applied symmetry boundary conditions. This takes advantage of the intrinsic symmetry of most motors to improve simulation speeds.

A 2D Maxwell model of a motor model from MotorCAD
Figure 4 – Exported Model in Maxwell 2D

Results Comparison

By this point in the example, we’ve ran an electromagnetic simulation in MotorCAD as well as one in Maxwell 2D and we’d like to compare the results from each simulation to each other. For this example, since we chose a current driven export option when going from MotorCAD to Maxwell, we will be comparing the Terminal voltages and the back EMF voltages from each simulation.

For our first comparison of Terminal voltages, in MotorCAD we will navigate to the “Graphs” tab and then select the Terminal Voltages option. In Maxwell, the script has generated the plots for us and named them “Induced Voltage Plots.” Figures 5 and 6 show the MotorCAD and Maxwell results, respectively, and we can see good agreement between the results with both having peaks of around 375 V on the phase voltages.

A screenshot of the terminal voltages plot from within Ansys MotorCAD
Figure 5 – MotorCAD Terminal Voltages
A plot of the terminal voltages from a motor model in Ansys Maxwell
Figure 6 – Maxwell Terminal Voltages

The next thing we’d like to compare is the back EMF voltages between the two versions of our motor model. In MotorCAD, this is as simple as navigating over to the “Back EMF” tab next to the “Terminal Voltages” tab in the Graph view. For Maxwell, however, there are a few additional steps necessary to get this information.

First, we need to make a copy of our Maxwell design – we can do this by dragging and dropping the design name onto the project name, or by right-clicking the design and selecting “Copy” and then right-clicking the project and selecting “Paste.” Once we have our second Maxwell project, we need to set up our model to be an open-circuit by setting the current in the windings to 0 amps. There are two ways to do this if we used the Python script from MotorCAD – we can edit the expressions for each of the windings to simply be 0, or we can change the value of the amplitude variable, Ipeak.

A screenshot of the Winding excitation window from Ansys Maxwell.
Figure 7 – Maxwell Winding Excitation Properties

By right-clicking on the design name of our copied design and selecting Design Properties (or navigating to Maxwell 2D -> Design Properties from the file bar) we can get to the list of variables that were set up by the export script from MotorCAD. Find Ipeak in that list and change its value from the default 650 A to 0 A, then run the new open circuit model. We can then compare the calculated back EMF from the two tools – in Maxwell, this will be the same Induced Voltages plot as before, but from our new open-circuit model. We can once again see that they align between the two tools, with peaks around 260 V.

PADT Ansys
Figure 8 – MotorCAD Back EMF Plot
PADT Ansys MotorCAD Maxwell Export F09
Figure 9 – Maxwell Back EMF Plot

Conclusion

Now, we have reached the end of our tutorial demonstrating the process of generating a model in Ansys Maxwell using the model export feature of Ansys MotorCAD. The Python script generation process is quick and accurately builds a model that aligns with the MotorCAD data, which we can see from the comparison of results for the terminal voltages and back EMF of our motor design. The combination of these two tools will greatly enhance your motor design capabilities, starting from initial motor design in MotorCAD before bringing that model into a full FEA simulation in Maxwell through the integrated export options, allowing for robust and user-friendly motor design validation.

Get Your Ansys Products & Support from the Engineers who Contribute to this Blog.

Technical Expertise to Enable your Additive Manufacturing Success.

Share this post:

Upcoming Events

Jun 10
, 2026
From Component to System: Scaling Photonic Designs - Webinar
Jun 11
, 2026
Harnessing the Power of Workstation GPUs for CFD Studies - Webinar
Jun 18
, 2026
Best Practices for Running Ansys Fluent on GPUs - Webinar
Jun 18
, 2026
E-Mobility and Clean Energy Summit
Jun 30
, 2026
Ansys 2026 R1: Aeroacoustic Modeling with the Fluent GPU Solver - Webinar
Jul 15
, 2026
Arizona Aerospace Summit
Aug 10
- Aug 11
, 2026
2026 CEO Leadership Retreat + Golf Tournament
Sep 14
- Sep 19
, 2026
IMTS 2026
Oct 21
, 2026
2026 Southern Arizona Tech + Business Expo
Nov 18
, 2026
2026 Governor’s Celebration of Innovation

Contact Us

Most of our customers receive their support over the phone or via email. Customers who are close by can also set up a face-to-face appointment with one of our engineers.

For most locations, simply contact us: