JMAG Script Library

Users can operate almost every feature in JMAG through scripts. Although the JMAG website previously restricted access to sample scripts to authenticated users, we would now like to make this library available to everyone.

Most of the sample scripts written in Python are easy to use with some general programming knowledge. In addition, we are also releasing instructional materials that describe various scripting methods alongside usage examples. These materials should give even those new to JMAG confidence to use the scripting tools to easily automate and streamline analyses and design processes. Going forward, we will continue to enhance this library so that everyone can realize more flexible workflows through scripts.

  1. [D0009] Recommended settings for 3D FEM conductor conditions

    Apply recommended settings for 3D FEM conductor conditions.

  2. [D0016] Extract anomalous eddy current loss coefficient

    Make anomalous eddy current loss coefficient table from a Custom material.

  3. [D0032] Setup study for transfer function creation

    Set up a frequency analysis study for transfer function creation.

  4. [D0037] Set Cooling (Forced Convection)

    Set Cooling by Forced Convection

  5. [D0004] Set the coil material

    Sets the material for parts in the current study named "Coil" to copper.

  6. [D0014] Calculate Efficiency from Drive Mode

    Uses results of the efficiency map analysis study to calculate efficiency of electric vehicles in a specified drive mode.

  7. [D0028] Search Size Range in Optimization Table

    Search for the maximum value and the minimum value of the parametric variable range of optimization.

  8. [D0007] Electrostatic Capacitance Coefficient Calculation

    Outputs the capacitance coefficient of a system consisting of multiple conductors in CSV file format.

  9. [D0030] Allow Eddy Current for selected parts

    This script sets the "Allow Eddy Current" flag for selected parts.

  10. [S8447] Script to add a case with modified design parameters including geometry dimensions.

    I want to add a case and change design parameters including geometry dimensions with a script.

  11. [S8441] Script for performing FFT on torque waveforms and extracting the maximum amplitude from each frequency component

    The following is an example of a script that performs FFT on torque waveforms and extracts the maximum amplitude from each frequency component. 

  12. [S8493] Script to calculate the induced voltage constant Ke from the analysis results and register it in the response value

    The following is an example of a script that calculates the induced voltage constant Ke from the analysis results and registers it in the response value.

  13. [S8369] Script for performing Boolean operations by specifying part names in the Geometry Editor

    The following is an example of a script that performs Boolean operations on specified parts using the Geometry Editor.

  14. [S9390] Script for setting the switching timing of the PAM inverter

    The following is an example of a script for setting the switching timing of a PAM inverter.

  15. [S8401] Script for specifying parts by coordinates and setting conditions

    The following is an example of a script that specifies parts by coordinates and sets conditions.

  16. [S8626] Script for setting skin depth based on material and frequency

    The following is an example of a script for setting the skin depth based on material and frequency.

How to use script file

Use the JMAG Script Library after reading and agreeing to the following terms of use.