JMAG-Designer provides a function to define the properties of superconductor materials as custom materials and use them in analysis.
For superconductor materials, electrical properties such as critical current density characteristics can be defined.
This script creates custom material as an I-V model of a superconductor and sets the critical current density and n value as a point array table.
Preconditions
- The units of the setting values follow the unit system set at [Tools]-[Preferences].
- Material properties for superconductor can be specified in JMAG-Designer v24.2 and later, while properties dependent on magnetic flux density, temperature and angle can be specified in JMAG-Designer v25.0 and later.
Script Function
- Create custom material and set the electric conductivity type to superconductor and the superconductor model to I-V model.
- Set the critical current density type to magnetic flux density, temperature, and angle dependent, and create and set a point array table of critical current density for magnetic flux density at each angle and temperature.
- Set the n-value type to magnetic flux density, temperature, and angle dependent, and create and set a point array table of n-value for magnetic flux density at each angle and temperature.
# Copyright (c) 2026 JSOL CORPORATION
#
# This script is released under the MIT License.
# See the full license text at:
# https://www.jmag-international.com/scriptlibrary/jmag_script_library_mit/
def createCustomMaterialWithElectric(materialLibrary, materialName):
"""Create a new custom material and define it as a superconductor in its electrical properties."""
materialLibrary.CreateCustomMaterial(materialName)
material = materialLibrary.GetUserMaterial(materialName)
# [Conductivity Type]: [Superconductor]
material.SetValue(u"ConductivityType", u"Superconductor")
# [Superconductor Model]: [I-V Model]
material.SetValue(u"SuperconductorModelType", u"IV")
material.SetValue(u"CriticalCurrentDensityType", "MagneticFluxDensityAndTemperatureAngleDependency")
material.SetTableListName(u"CriticalCurrentDensityAnglePointArray", u"PointArrayOfCriticalCurrentDensity")
refarray = [
[0, 8.4e+09], # magnetic flux density 0, critical current density 8.4e+09
[1, 9e+8]
]
material.SetTableListWithDualKey(u"CriticalCurrentDensityAnglePointArray", 0, u"deg", -196, u"deg C", refarray)
refarray = [[0, 1.008e+10], [1.2, 1e+9]]
material.SetTableListWithDualKey(u"CriticalCurrentDensityAnglePointArray", 0, u"deg", -186, u"deg C", refarray)
refarray = [[0, 8.4e+9], [1, 2e+9]]
material.SetTableListWithDualKey(u"CriticalCurrentDensityAnglePointArray", 90, u"deg", -196, u"deg C", refarray)
refarray = [[0, 1.008e+10], [1.2, 2e+9]]
material.SetTableListWithDualKey(u"CriticalCurrentDensityAnglePointArray", 90, u"deg", -186, u"deg C", refarray)
material.SetValue(u"nValueType", "MagneticFluxDensityAndTemperatureAngleDependency")
material.SetTableListName(u"nValueAnglePointArray", u"PointArrayOfnValue")
refarray = [
[0, 30], # magnetic flux density 0, n value 30
[1, 10]
]
material.SetTableListWithDualKey(u"nValueAnglePointArray", 0, u"deg", -196, u"deg C", refarray)
refarray = [[0, 35], [1.2, 15]]
material.SetTableListWithDualKey(u"nValueAnglePointArray", 0, u"deg", -186, u"deg C", refarray)
refarray = [[0, 30], [1, 15]]
material.SetTableListWithDualKey(u"nValueAnglePointArray", 90, u"deg", -196, u"deg C", refarray)
app = designer.GetApplication()
materialName = u"MySuperConductor"
materialLibrary = app.GetMaterialLibrary()
createCustomMaterialWithElectric(materialLibrary, materialName)


