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
-
[S0073] Set material synchronization for an analysis group
Create sync. material settings to ensure that the materials for specified parts are identical across multiple studies within the analysis group.
-
[S0072] Update thermal model parameters from geometry
Set the initial values for the thermal model parameters based on the geometry and then retrieve the values that have been set.
-
[S0071] Create thermal model settings
Create a thermal model configuration for a cooling path that combines a cooling jacket and a hollow-shaft spray system using the thermal model feature.
-
[S0070] Check for unassigned thermal model regions
Identify and display items for which no region has been set in the thermal model region settings.
-
[S0069] Create thermal model region settings to a 2D model
Create a thermal model region setting required for generating a thermal model using the thermal modeling function.
-
[S0068] Create a multiple face reference target and set it as the reference for the surface normal direction of a superconducting material
Create a multi faces selection reference target to specify the reference surface for material properties where the reference direction changes along a curved surface.
-
[S0067] Create mesh channel conditions and set heat transfer boundaries
Create channel conditions specifying the cross-sectional shape and placement to be applied during mesh generation, and set the heat transfer boundary conditions.
-
[S0066] Create a 2D geometry of an I-shaped IPM outer rotor
Create a 2D shape of the I-shaped IPM outer rotor as a 1/4 model with 8 poles.
-
[S0065] Create a 2D geometry of a stator with tapered slots
Create a 2D shape of the tapered-slot stator with 24 slots as a 1/4 model.
-
[S0064] Calculate a per depth average within the specified time range
Create a probe for the result of the lamination at each depth and calculate the average for each depth.
-
[S0063] Create a custom macro component
Group multiple circuit components in the circuit editor into a single circuit block and register it as a macro component.
-
[S0062] Export results for each element or node to a file
Select elements or nodes to output the values of the distribution results to a file in table format.
-
[S0061] Define cut planes of the model
Create a cut plane to view the results interior of the model.
-
[S0060] Create a flux line for a 3D result by specifying a face as a rendering start
Create a flux line passing through a specified plane for a 3D analysis result.
-
[S0059] Create a scaling factor
Create a scaling factor to adjust the display of the analysis results' displacement and show the displacement vector plot.
-
[S0058] Create an ellipse shape in the Geometry Editor
Create an elliptical region with its center position, major radius, minor radius and major angle relative to the X-axis defined by equation variables.
-
[S0057] Define a user component and create the result item using it
Create an expression of a user component and then create a result item that uses the user component.
-
[S0056] Create a vector expression
Create a vector expression data from the table results and define a vector expression using that variable.
-
[S0055] Create a beam in the Geometry Editor
Create a beam part with its start position and length defined by equation variables.
-
[S0054] Create a shell in the Geometry Editor
Create a shell solid part with its start position, width and height defined by equation variables.


