Skip to content

JMAG Direct Coupling

Symbol

Description

The JMAG direct coupling block executes a JMAG finite element analysis (FEA) model specified in the properties panel, exchanging physical values such as voltage, current, and torque with power electronics circuits in SIMBA. JMAG is FEA software developed by JSOL Corporation for designing and simulating electromagnetic components, including motors and transformers (https://www.jmag-international.com/). Both JMAG and JMAG-Designer are registered trademarks of JSOL Corporation.

To use the JMAG direct coupling block, JMAG-Designer must be installed on your computer. For operation and licensing information regarding JMAG, please contact a JMAG distributor in your region, which can be found at this link: (https://www.jmag-international.com/aboutus/members/)

Note that the JMAG direct coupling block will not display pins until the port information XML file is specified in the properties panel. Once the port information XML is loaded, the pins will be displayed accordingly.

Important

JMAG requires an environment variable named "InsDir" to be defined in your machine. This variable must be set to the path of the JMAG installation folder. For instance, if you have installed JMAG v24.1 in the default directory, you should set the variable as follows: InsDir=C:\Program Files\JMAG-Designer24.1

Information

When using the JMAG direct coupling block with the inverter circuit, it is recommended to specify the initial terminal voltage of the block as 0 at t = 0. This is to ensure the same result as when running JMAG alone without coupling with SIMBA. By doing this, the same initial value definition will be used in the JMAG solver and SIMBA solver.

The initial terminal voltage can be set by following either one of the approaches.

  • In SIMBA, insert a C-language block between the inverter switch and the PWM generator. In the C-language block, configure the switch to be open at t = 0.

  • In JMAG, insert a switch between the FEM coil and the voltage source with the external circuit condition Configure the switch to be open at t = 0.

Subcycling, a simulation technique that assigns different time steps to subsystems within a simulation, is supported in the JMAG Direct Coupling block. This feature becomes active when the subcycling rate N is set to a value greater than 1. You can configure the subcycling rate in the Direct Coupling Block Property Panel. For example, if N = 5, SIMBA invokes the JMAG solver once every five SIMBA steps. To maintain accuracy near discontinuities, SIMBA also triggers a JMAG solver call whenever a switch changes state, in addition to the periodic calls defined by the subcycling rate N.

Timeout is a parameter that defines the maximum allowed communication time between SIMBA and JMAG. The default value is 5.0 seconds. If JMAG does not return data within this time limit, SIMBA assumes that JMAG is not responding and generates an error. If the input FEA model contains a large number of elements, the model‑loading time or the per‑step calculation time may exceed 5 seconds.In such cases, increase the timeout value accordingly.

Library

Electrical > Motors

Parameters

Property Display Name Parameter Type Description
InputFilePath JCF File Path FilePathParameter Path to the JMAG input file (String)
XmlFilePath XML File Path FilePathParameter Path to the port XML File (String)
DllPath Library File Path FilePathParameter Path to the JMAG library, jbdll.dll. (String)
SubcyclingRate Subcycling rate IntParameter Subcycling rate (integer)
InterfaceExecutablePath InterfaceExecutablePath FilePathParameter Path to the interface executable path
J0 J0 DoubleParameter J0
B0 B0 DoubleParameter B0
TimeOut Time out DoubleParameter Time limit in seconds for the communication between SIMBA and JMAG (double)

Pins

Property Pin Name Type Description

Default Size

Width Height
8 8