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.
JMAG Script Library
-
[S0032] Create a rectangular prism in the Geometry Editor
Create a solid part of a rectangular prism by specifying the length, width and height.
-
[S0031] Perform a 2D Fourier transform in time and space axes
Perform a 2D Fourier transform on a dataset of calculation results defined by the time axis and the spatial axis.
-
[S0030] Create a custom superconductor material
Create a custom superconductor material with properties that depend on angle, temperature, and magnetic flux density.
-
[S0029] Set a point array property to the analysis condition
Create and set a point array to the table type parameter in the analysis condition.
-
[S0028] Retrieve the values of winding parameters calculated based on the input parameters.
Get the values of coil parameters in the winding setting calculated from the input and the slot area on the model.
-
[S0027] Register a user-defined response value
Register the user-defined response values using a proprietary calculation method from the analysis results output by JMAG.
-
[S0026] Check the warnings and error messages in the study
Get the number of errors and warnings occurring in the study, along with their message content.
-
[S0025] Generate a multi-layer coating mesh for the specified part
Set multi-layer coating mesh that generates layered mesh automatically on the surface of a region in the 2D analysis.
-
[S0024] Set to use subroutines and its user variables
Set the electric potential of the electric potential source to be supplied by a user subroutine, and set user variables for this subroutine.
-
[S0023] Performs a Fourier transform on the specified dataset
Performs a Fourier transform on the time history result obtained from a transient response analysis.
-
[S0022] Submit batch execution job of specified studies within an analysis group
When submitting a job of an analysis group, run only the selected studies within the group instead of all of them.
-
[S0021] Setup coil end cooling and set CSV output for terminal temperature
Create and link a coil end cooling component and an equivalent temperature boundary pattern (rotation) condition to model the cooling of the coils of a rotating machine.
-
[S0020] Create a parts set by specifying the part names
Create a part set for multiple parts specified by names.
-
[S0019] Export an RTT file from the results of an efficiency map study
Export the RTT file with information such as the author and winding conductor information from the results of the efficiency map analysis study in speed-priority mode.
-
[S0018] Set topology optimization option settings
Set parameters and evaluation options for a genetic-algorithm-based topology optimization.
-
[S0017] Create a 3-phase coil winding setting to a magnetic field analysis study using the coil winding function
Setup coil winding settings to a rotating machine model using the coil winding function. Add a winding component to the circuit, set winding areas, and set winding parameters.
-
[S0016] Define response values from a result in table format
Create response values from a result in table format as a indicator representing the analysis results for comparing multiple analysis results.
-
[S0015] Create the probe, vector and contour
Create contour, vector and probe definitions to visualize distributed analysis results.
-
[S0014] Create a custom material with electric properties
Create an insulation material by defining only the electric properties required for the electric field analysis.
-
[S0013] Change the setting of items in [Tools]-[Preferences]
Change the setting of items in JMAG-Designer's [Tools]-[Preferences]. Here is an example of changing the background color, font etc. of the graphics window.


