找回密码
 立即注册

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

Flux电机有限元分析教程西莫团购入口 | 奖励入口当当网购物入口 | 奖励入口欢迎使用!西莫论坛App开放下载Motor-CAD电机多物理域设计教材购买入口 | 奖励入口
★新会员论坛须知★《西莫电机技术》第39期发售火热进行中Flux电机电磁阀有限元分析教程团购入口 | 奖励入口论坛微信公众平台欢迎入驻
西莫电机及相关产品供需交流群开放邀请★ 论坛VIP会员申请 ★Motor-CAD.MANATEE电磁热振动噪声教程 | 奖励入口西莫团队欢迎您的加盟!
宣传推广合作请联系QQ:25941174西莫电机论坛微信群正式开放Flux变压器与电抗器有限元分析团购入口 | 奖励入口西莫电机论坛技术版区QQ群汇总
查看: 3210|回复: 6

[原创] JMAG脚本文件

[复制链接]

该用户从未签到

发表于 2009-3-11 21:28 | 显示全部楼层 |阅读模式 来自: 中国广东珠海

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
本帖最后由 JMAG 于 2009-3-11 22:05 编辑

大家在使用JMAG的时候,可以使用脚本文件。您可以自己编写,或者把计算步骤计算一下,JMAG会自动生成脚本文件。以后只要对同类模型,只要修改脚本即可运行了
下面是个案例
'+++++ JMAG-STUDIO SCRIPT FILE
Version(9.12008063)
'ReadVariableFile("C:\Documents and Settings\cdtest\My Documents\JMAG-Studio\variable.var")
SolverType(-3)
SolverVersion(80)
Policy("006_2d-transient.txt")
DATABASE("D:\cal\1.jsp")
SetDocument("1.jsp")
UnitSetting(2,   1,0)
Tolerance(0.001)
RectAngleDialog(-6.000000000000000e+001, 6.000000000000000e+001, 0.000000000000000e+000, 1.200000000000000e+002, -1.200000000000000e+002)
RectAngleDialog(-5.000000000000000e+001, 5.000000000000000e+001, 0.000000000000000e+000, 1.000000000000000e+002, -1.000000000000000e+002)
RectAngleDialog(-8.500000000000000e+001, 2.620000000000000e+001, 0.000000000000000e+000, 2.000000000000000e+001, -5.240000000000000e+001)
RectAngleDialog(8.500000000000000e+001, 2.620000000000000e+001, 0.000000000000000e+000, -2.000000000000000e+001, -5.240000000000000e+001)
RectAngleDialog(4.500000000000000e+001, 2.620000000000000e+001, 0.000000000000000e+000, 2.000000000000000e+001, -5.240000000000000e+001)
Undo()
RectAngleDialog(-4.500000000000000e+001, 2.620000000000000e+001, 0.000000000000000e+000, 2.000000000000000e+001, -5.240000000000000e+001)
RectAngleDialog(4.500000000000000e+001, 2.620000000000000e+001, 0.000000000000000e+000, -2.000000000000000e+001, -5.240000000000000e+001)
LineDialog(29,-8.500000000000000e+001,0.000000000000000e+000,0.000000000000000e+000,0,1.700000000000000e+002,0.000000000000000e+000,0.000000000000000e+000,0.000000000000000e+000,0.000000000000000e+000)
SelectAllEntity()
CrossDivide()
UpdateWindowSize(1647,738)
UpdateJglMatrix(_
   1,   0,   0,   0,_
   0,   1,   0,   0,_
   0,   0,   1,   0,_
-5.0484619140625,-1.97050285339355,   0,   1,_
0.00516227493062615,   0,   0,   0,_
   0,0.0115206874907017,   0,   0,_
   0,   0,-0.0023809524718672,   0,_
   0,   0,   0,   1)
SelectByRectangle(487,375,487,375,30)
ClearSelectEntity()
UpdateJglMatrix(_
   1,   0,   0,   0,_
   0,   1,   0,   0,_
   0,   0,   1,   0,_
17.175724029541,11.8795642852783,   0,   1,_
0.00830826535820961,   0,   0,   0,_
   0,0.0185416173189878,   0,   0,_
   0,   0,-0.0023809524718672,   0,_
   0,   0,   0,   1)
SelectByRectangle(510,285,510,285,30)
SelectByRectangle(619,288,619,288,30)
SelectByRectangle(913,285,913,285,30)
SelectByRectangle(1267,286,1267,286,30)
SelectByRectangle(1368,287,1368,287,30)
DeleteSelectEntity()
UpdateJglMatrix(_
   1,   0,   0,   0,_
   0,   1,   0,   0,_
   0,   0,   1,   0,_
17.175724029541,11.8795642852783,   0,   1,_
0.00830826535820961,   0,   0,   0,_
   0,0.0185416173189878,   0,   0,_
   0,   0,-0.0023809524718672,   0,_
   0,   0,   0,   1)
SelectByRectangle(1449,282,1449,282,30)
SelectByRectangle(1172,283,1172,283,30)
SelectByRectangle(685,292,685,292,30)
SelectByRectangle(444,287,444,287,30)
DeleteSelectEntity()
SetHighlightModeFreeVertex(1)
SelectAllEntity()
CrossDivide()
SelectAllEntity()
AutoCreateRegion()
DupulicateRegionCheck(1)
DupulicateRegionCheck(0)
SetSelectMode(1)
UpdateJglMatrix(_
   1,   0,   0,   0,_
   0,   1,   0,   0,_
   0,   0,   1,   0,_
-15.0408020019531,1.7133674621582,   0,   1,_
0.00516227493062615,   0,   0,   0,_
   0,0.0115206874907017,   0,   0,_
   0,   0,-0.0023809524718672,   0,_
   0,   0,   0,   1)
SelectByRectangle(730,225,730,225,30)
DeleteSelectRegion()
AddMat80(2,"Main Coil",1,0,_
1,0,0.00000000000e+000,_
0,0,_
0,0,1,1.00000000000e+002,_
0,0,2.00000000000e+001,_
0.00000000000e+000,0,_
0.00000000000e+000,1,0,0,1)
UpdateJglMatrix(_
   1,   0,   0,   0,_
   0,   1,   0,   0,_
   0,   0,   1,   0,_
-15.0408020019531,1.7133674621582,   0,   1,_
0.00516227493062615,   0,   0,   0,_
   0,0.0115206874907017,   0,   0,_
   0,   0,-0.0023809524718672,   0,_
   0,   0,   0,   1)
SelectByRectangle(438,307,438,307,30)
SelectByRectangle(610,314,610,314,30)
AddSelectRegionToMat(2)
AddMat80(3,"Aux Coil",1,0,_
1,0,0.00000000000e+000,_
0,0,_
0,0,1,1.00000000000e+002,_
0,0,2.00000000000e+001,_
0.00000000000e+000,0,_
0.00000000000e+000,1,0,0,1)
UpdateJglMatrix(_
   1,   0,   0,   0,_
   0,   1,   0,   0,_
   0,   0,   1,   0,_
-15.0408020019531,1.7133674621582,   0,   1,_
0.00516227493062615,   0,   0,   0,_
   0,0.0115206874907017,   0,   0,_
   0,   0,-0.0023809524718672,   0,_
   0,   0,   0,   1)
SelectByRectangle(902,359,902,359,30)
SelectByRectangle(1091,355,1091,355,30)
AddSelectRegionToMat(3)
AddMat80(4,"Frame",5,0,_
1,0,0.00000000000e+000,_
0,0,_
0,0,1,9.60000000000e+001,_
0,0,2.00000000000e+001,_
7,_
1.00000000000e+000,0.00000000000e+000,1,_
14,1,"JFE_Steel/JN_Core/35JN210.hb",-1,_
0.00000000000e+000,0,_
0.00000000000e+000,0,-1,_
0.00000000000e+000,0.00000000000e+000,0.00000000000e+000,0.00000000000e+000,0,0,0,0,0.00000000000e+000,0.00000000000e+000,0.00000000000e+000,_
0,0,0.00000000000e+000,_
0,0,0.00000000000e+000,_
0,0,0.00000000000e+000,_
0,_
0,0,1.69500000000e+006,_
0,0,1.69500000000e+006,1,0,0,_
0,0,0,1.00000000000e+000,0.00000000000e+000,0,_
0.00000000000e+000,1,0,0,1)
UpdateJglMatrix(_
   1,   0,   0,   0,_
   0,   1,   0,   0,_
   0,   0,   1,   0,_
-15.0408020019531,1.7133674621582,   0,   1,_
0.00516227493062615,   0,   0,   0,_
   0,0.0115206874907017,   0,   0,_
   0,   0,-0.0023809524718672,   0,_
   0,   0,   0,   1)
SelectByRectangle(525,223,525,223,30)
SelectByRectangle(520,432,520,432,30)
AddSelectRegionToMat(4)
ClearAllSelect()
SetCond("Analysis Control",10000," ",_
0,0,0,0,3,81,3,1,15,1.00000000000e-003,_
0,0,0,0,0,4,1.05000000000e+000,1.00000000000e-008,1.00000000000e+020,_
5000,0,1,1,1,1,1,1,1,1,1,1,1,1,1,_
1.00000000000e+001,0,0,0,1,0,0,0,0_
,0,1,1,1,0,1,1,1,5,5.00000000000e+000,1.00000000000e+001,0,0,0,0,0,0,0.00000000000e+000,0,2,1,_
"",0,0,0,0,0,0,0,0,_
0,"",0,"",0,_
100,0,_
0,_
1,0,2.00000000000e-002,1.00000000000e+000,1.00000000000e+000,_
1,0,1.00000000000e+000,_
0,_
1,0,0,5,0,2,_
0,1,0,1,_
1,1.00000000000e-006,1.00000000000e-008,0,_
0,1.00000000000e-002,0,1,_
1.00000000000e+000,1.00000000000e+000)
ClearAllSelect()
SetSelectMode(1)
UpdateJglMatrix(_
   1,   0,   0,   0,_
   0,   1,   0,   0,_
   0,   0,   1,   0,_
-15.0408020019531,1.7133674621582,   0,   1,_
0.00516227493062615,   0,   0,   0,_
   0,0.0115206874907017,   0,   0,_
   0,   0,-0.0023809524718672,   0,_
   0,   0,   0,   1)
SelectByRectangle(621,328,621,328,30)
AddGroup("FEM Coil Region1", 1)
Select(G1)
ClearAllSelect()
SetSelectMode(1)
UpdateJglMatrix(_
   1,   0,   0,   0,_
   0,   1,   0,   0,_
   0,   0,   1,   0,_
-15.0408020019531,1.7133674621582,   0,   1,_
0.00516227493062615,   0,   0,   0,_
   0,0.0115206874907017,   0,   0,_
   0,   0,-0.0023809524718672,   0,_
   0,   0,   0,   1)
SelectByRectangle(444,306,444,306,30)
AddGroup("FEM Coil Region2", 2)
Select(G2)
AddCond("FEM Coil",10021,1,2,_
"Undefined",1,1,0,_
0,0,_
0.00000000000e+000,0.00000000000e+000,0.00000000000e+000,_
0.00000000000e+000,0.00000000000e+000,1.00000000000e+000,_
"Undefined",2,1,0,_
1,0,_
0.00000000000e+000,0.00000000000e+000,0.00000000000e+000,_
0.00000000000e+000,0.00000000000e+000,1.00000000000e+000,_
"main coil")
ClearAllSelect()
SetSelectMode(1)
UpdateJglMatrix(_
   1,   0,   0,   0,_
   0,   1,   0,   0,_
   0,   0,   1,   0,_
-15.0408020019531,1.7133674621582,   0,   1,_
0.00516227493062615,   0,   0,   0,_
   0,0.0115206874907017,   0,   0,_
   0,   0,-0.0023809524718672,   0,_
   0,   0,   0,   1)
SelectByRectangle(931,327,931,327,30)
AddGroup("FEM Coil Region3", 3)
Select(G3)
ClearAllSelect()
SetSelectMode(1)
UpdateJglMatrix(_
   1,   0,   0,   0,_
   0,   1,   0,   0,_
   0,   0,   1,   0,_
-15.0408020019531,1.7133674621582,   0,   1,_
0.00516227493062615,   0,   0,   0,_
   0,0.0115206874907017,   0,   0,_
   0,   0,-0.0023809524718672,   0,_
   0,   0,   0,   1)
SelectByRectangle(1101,343,1101,343,30)
AddGroup("FEM Coil Region4", 4)
Select(G4)
SetSelectMode(1)
AddCond("FEM Coil",10021,2,2,_
"Undefined",3,1,0,_
0,0,_
0.00000000000e+000,0.00000000000e+000,0.00000000000e+000,_
0.00000000000e+000,0.00000000000e+000,1.00000000000e+000,_
"Undefined",4,1,0,_
1,0,_
0.00000000000e+000,0.00000000000e+000,0.00000000000e+000,_
0.00000000000e+000,0.00000000000e+000,1.00000000000e+000,_
"Aux Coil")
NewDocument("PRECIRCUIT")
SetDocument("Hunan university.cctPRE")
AddTerm(1, -1.100000, 0.700000, 0.000000)
AddTerm(2, -0.700000, 0.700000, 0.000000)
AddPrim(2, 1, 1, 2, 0.000000e+000)
AddPrim(16, 2, 2, 0, 0.000000e+000)
AddPrim(12, 3, 1, 0, 1.800000e+002)
AddCircuitType("VoltageFunction",-600,2,1,0,0,0,_
1,_
1,1.000000000000000e+003,5.000000000000000e+001,0.000000000000000e+000,0,0,0.000000000000000e+000,0.000000000000000e+000,0.000000000000000e+000,0.000000000000000e+000,_
)
CircuitSelect(P3)
SetCircuitType(2)
AddCircuitType("FEMcoil",100,3,1,1.000000000000000e+001,1.000000000000000e+000,0,0,2.000000000000000e+001,0,0,1,"")
CircuitSelect(P1)
SetCircuitType(3)
AddTerm(3, -0.900000, 0.100000, 0.000000)
AddTerm(4, -0.500000, 0.100000, 0.000000)
AddPrim(2, 4, 3, 4, 0.000000e+000)
AddTerm(5, -0.900000, -0.200000, 0.000000)
AddTerm(6, -0.500000, -0.200000, 0.000000)
AddPrim(4, 5, 5, 6, 0.000000e+000)
AddTerm(7, -1.200000, 0.100000, 0.000000)
AddPrim(1, 6, 3, 7, 0.000000e+000)
AddTerm(8, -1.200000, -0.200000, 0.000000)
AddPrim(1, 7, 7, 8, 0.000000e+000)
AddPrim(1, 8, 8, 5, 0.000000e+000)
AddTerm(9, -0.300000, 0.100000, 0.000000)
AddPrim(1, 9, 4, 9, 0.000000e+000)
AddTerm(10, -0.300000, -0.200000, 0.000000)
AddPrim(1, 10, 9, 10, 0.000000e+000)
AddPrim(1, 11, 10, 6, 0.000000e+000)
AddCircuitType("FEMcoil",100,4,2,1.000000000000000e+002,1.000000000000000e-001,0,0,2.000000000000000e+001,0,0,1,"")
CircuitSelect(P4)
SetCircuitType(4)
AddCircuitType("RESISTANCE",-100,5,1.000000000000000e+000,0,0,0,0,0,0,2.000000000000000e+001,0,1,"")
CircuitSelect(P5)
SetCircuitType(5)
SetDocument("Hunan university.jsp")
UnitSetting(2,   1,1)
MG2DData(    1,2.00000e+000,    0,    0,    0,    1)
MG2DData(    2,2.00000e+000,    0,    0,    0,    1)
MG2DData(    6,2.00000e+000,    0,    0,    0,    1)
MG2DData(    7,2.00000e+000,    0,    0,    0,    1)
MG2DData(    4,2.00000e+000,    0,    0,    0,    1)
MG2DData(    5,2.00000e+000,    0,    0,    0,    1)
MG3DData(    1,0.00000e+000,    0,0.00000e+000,0.00000e+000,    1,    0)
MG3DData(    2,0.00000e+000,    0,0.00000e+000,0.00000e+000,    1,    0)
MG3DData(    3,0.00000e+000,    0,0.00000e+000,0.00000e+000,    1,    0)
MG3DData(    4,0.00000e+000,    0,0.00000e+000,0.00000e+000,    1,    0)
SelectType(0)
SelectType(1)
AutoMeshGenerate(1,_
0,2,0,0,0,0,1,0,1,_
1,5.000000e+000,3,0,0,0,_
2.500000e+000,0.000000e+000,0,0,0)
MG2DData(    1,2.00000e+000,    0,    0,    0,    0)
MG2DData(    2,2.00000e+000,    0,    0,    0,    0)
MG2DData(    6,2.00000e+000,    0,    0,    0,    0)
MG2DData(    7,2.00000e+000,    0,    0,    0,    0)
MG2DData(    4,2.00000e+000,    0,    0,    0,    0)
MG2DData(    5,2.00000e+000,    0,    0,    0,    0)
MG3DData(    1,0.00000e+000,    0,0.00000e+000,0.00000e+000,    1,    0)
MG3DData(    2,0.00000e+000,    0,0.00000e+000,0.00000e+000,    1,    0)
MG3DData(    3,0.00000e+000,    0,0.00000e+000,0.00000e+000,    1,    0)
MG3DData(    4,0.00000e+000,    0,0.00000e+000,0.00000e+000,    1,    0)
SelectType(0)
SelectType(1)
AutoMeshGenerate(1,_
0,2,0,1,0,0,1,0,1,_
1,5.000000e+000,3,0,0,0,_
1.050000e+000,0.000000e+000,0,0,0)
MG2DData(    1,2.00000e+000,    0,    0,    0,    0)
MG2DData(    2,2.00000e+000,    0,    0,    0,    0)
MG2DData(    6,2.00000e+000,    0,    0,    0,    0)
MG2DData(    7,2.00000e+000,    0,    0,    0,    0)
MG2DData(    4,2.00000e+000,    0,    0,    0,    0)
MG2DData(    5,2.00000e+000,    0,    0,    0,    0)
MG3DData(    1,0.00000e+000,    0,0.00000e+000,0.00000e+000,    1,    0)
MG3DData(    2,0.00000e+000,    0,0.00000e+000,0.00000e+000,    1,    0)
MG3DData(    3,0.00000e+000,    0,0.00000e+000,0.00000e+000,    1,    0)
MG3DData(    4,0.00000e+000,    0,0.00000e+000,0.00000e+000,    1,    0)
AutoMeshGenerate(0,_
0,2,0,1,0,0,1,0,1,_
1,5.000000e+000,3,0,0,0,_
1.050000e+000,0.000000e+000,0,0,0)
SetCond("Step",10019,0,1,0.00000000000e+000,1.00000000000e-004,0,0.00000000000e+000,0.00000000000e+000,0,_
201,0.00000000000e+000,1.00000000000e+003)
ExecuteSolver("D:\cal\cal.jcf",0,1)
OpenDocument("D:\cal\cal.plot")
SetDocument("cal.plot")
ContourEx(16001,"amp",)
SetStep(2)
SetStep(3)
SetStep(4)
SetStep(5)
SetStep(6)
SetStep(7)
SetStep(8)
SetStep(9)
SetStep(10)
SetStep(11)
SetStep(12)
SetStep(13)
SetStep(14)
SetStep(15)
SetStep(16)
SetStep(17)
SetStep(18)
SetStep(19)
SetStep(20)
SetStep(21)
SetStep(22)
SetStep(23)
SetStep(24)
SetStep(25)
SetStep(26)
SetStep(27)
SetStep(28)
SetStep(29)
NewDocument("POSTCIRCUIT")
SetDocument("cal.cctPOST")
CircuitSelect(P3)
HistoryEx(18101,"amp")
CloseDocument()
SetDocument("cal.cctPOST")
ClearAllSelect()
CircuitSelect(P1)
HistoryEx(18101,"amp")
CloseDocument()
SetDocument("cal.cctPOST")
CloseDocument()
SetDocument("cal.plot")
CloseDocument()
SetDocument("1.jsp/Model1")
CloseDocument()
SetDocument("1.jsp")
CloseDocument()
西莫电机论坛微信公众平台正式上线!★详情请点击★ 西莫电机论坛会员交流专用群欢迎您西莫电机论坛加群请注明论坛用户名及所从事专业,否则不予通过

签到天数: 72 天

连续签到: 29 天

[LV.6]常住居民II

发表于 2009-3-13 08:51 | 显示全部楼层 来自: 中国河北保定
看的眼都花了
西莫电机论坛微信公众平台正式上线!★详情请点击★ 西莫电机论坛会员交流专用群欢迎您西莫电机论坛加群请注明论坛用户名及所从事专业,否则不予通过
回复

使用道具 举报

该用户从未签到

发表于 2009-6-9 11:25 | 显示全部楼层 来自: 中国北京
这是什么文件格式的 然后怎么导入啊?
西莫电机论坛微信公众平台正式上线!★详情请点击★ 西莫电机论坛会员交流专用群欢迎您西莫电机论坛加群请注明论坛用户名及所从事专业,否则不予通过
回复

使用道具 举报

该用户从未签到

发表于 2013-8-6 22:57 | 显示全部楼层 来自: 中国上海
应该是VB或者JAVA,语言不是很懂。抛砖引玉
西莫电机论坛微信公众平台正式上线!★详情请点击★ 西莫电机论坛会员交流专用群欢迎您西莫电机论坛加群请注明论坛用户名及所从事专业,否则不予通过
回复

使用道具 举报

该用户从未签到

发表于 2013-8-13 20:52 | 显示全部楼层 来自: 中国浙江宁波
真正可以写程序的软件才是好软件
西莫电机论坛微信公众平台正式上线!★详情请点击★ 西莫电机论坛会员交流专用群欢迎您西莫电机论坛加群请注明论坛用户名及所从事专业,否则不予通过
回复

使用道具 举报

该用户从未签到

发表于 2014-3-24 23:47 | 显示全部楼层 来自: 中国河南洛阳
能解释一下是自动生成的还是自己编写的?如果是自动生成的,操作步骤是什么?
西莫电机论坛微信公众平台正式上线!★详情请点击★ 西莫电机论坛会员交流专用群欢迎您西莫电机论坛加群请注明论坛用户名及所从事专业,否则不予通过
回复

使用道具 举报

该用户从未签到

发表于 2020-9-8 21:11 | 显示全部楼层 来自: 中国江苏南京
您好,请问jmag如何自动生成脚本语言,可以提供一下步骤吗,谢谢
西莫电机论坛微信公众平台正式上线!★详情请点击★ 西莫电机论坛会员交流专用群欢迎您西莫电机论坛加群请注明论坛用户名及所从事专业,否则不予通过
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

西莫电机论坛微信公众平台欢迎您的关注!

QQ|Archiver|手机版|小黑屋|西莫电机圈 ( 浙ICP备10025899号-3|浙公网安备:33028202000436号 )

GMT+8, 2024-12-28 17:39 , Processed in 0.130574 second(s), 27 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表