文档库 最新最全的文档下载
当前位置:文档库 › Maxwell 脚本应用

Maxwell 脚本应用

Maxwell 脚本应用
Maxwell 脚本应用

Maxwell 脚本应用一例-仿真结果的导出导入

Maxwell, 脚本, 仿真, 结果, 应用Maxwell, 脚本, 仿真, 结果, 应用

本帖最后由 hottomson 于 2009-3-12 11:29 编辑

问题提出,如果做了多个模型,输出相同位置的Bz值,想在同一个图中比较,可以导出后用其它诸如excel、matlab等重新绘图,只用maxwell可以吗?当然可以,这里仅提供一

种方案,仅作参考。

比如建立了Model1,Model2.....Model6,6个Design在同一个project中,如果用脚本一

次性求解输出,可以使用如下脚本:

1.For n = 1 to 6

2.sDesignName="Model" & n

3.Set oDesign = oProject.SetActiveDesign(sDesignName)

4.oDesign.Analyze "Setup1"

5.Set oModule = oDesign.GetModule("ReportSetup")

6.oModule.ExportToFile "Bz At Line1("&sDesignName&")", sProjDir & "\" &

ProjectName & "-" & sDesignName &".csv"

7.Next

复制代码

输出完成后,可以在最后一个Design中随便建一个report,名字为All Bz Result,然后

导入前面的输出,可以使用如下的脚本:

1.For n = 1 to 6

2.sDesignName="Model" & n

3.oModule.ImportIntoReport "All Bz Result", sProjDir & "\" & ProjectName

& "-" & sDesignName &".csv"

4.oModule.RenameTrace "All Bz Result", "Bz", "Bz-" & sDesignName

5.Next

复制代码

然后删除建report时的trace,就只剩下导入的几根曲线了。

以上操作均可以手工操作,脚本适合于仿真整个过程的自动完成。

下载 (21.99 KB)

2009-3-12 11:28

1

评分次数

关于瞬态分析时取一固定点磁密的问题的解决方案(2D v11)

固定点, 方案固定点, 方案

曾经有人提出如何取一固定点磁密的问题,见帖子关于取一固定点磁密的问题

1、建立宏文件

建立如下的宏文件,并保存

1.DefinePoint "Pt1" [15, 10, 0]

2.Enter "B"

3.Mag

4.EnterPoint "Pt1"

5.Value

6.Evaluate

7.RenameEntry "Pt1B"

8.AppendSolutions "../tmpfiles/Pt1B.tmp"

9.Clear

10.DeleteGeometry "Pt1"

复制代码

关于计算器的操作你可以自己录制修改,但最终计算结果应为一个值

2、设置求解选项

Setup Solution -> Option...

勾选 Use Macro,点击后面的setup选择宏文件和执行时间间隔

下载 (6.91 KB)

2008-7-31 11:43

3、进行求解

4、求解后,直接点击solution -> Transient Data即可看到Plots列表里面有Pt1B,点

击,右边就可以显示曲线

查询BH曲线

最近也是查询BH曲线,得到了版上的帮助。自己也经历了一些酸甜苦辣。

有下面几点收获。共享。

1----参考书

(1)《电机常用材料手册》

(2)《变压器铁心制造》沈阳变压器研究所编1983

(3)《互感器电抗器的理论与计算》陈乔夫李湘生华中理工大学出版社

1992

(4)大量的电工手册如:《新编电工材料手册》广东科技出版社1994

(5)《常用钢材磁特性曲线速查手册》机械工业出版社2004

(6)《各国电工钢手册》介绍各国电工钢的特性,也包括一些BH曲线。

日本很多型号的材料特性挺全。

(7)《磁性材料手册》介绍全面,曲线多。数据全。

2---如何查询

以前也查询过BH曲线,可是只是局限在电工手册上去查找。结果自然可想而知。现在找到这些参考书有的是版上的xdjm帮忙,有些是qq群里面的xdjm帮忙。自己的一个感悟就是:要查询铁心的BH曲线。那么应该到铁心应用的一些领域去查找。那么铁心应用在电流互感器/电压互感器/变压器/电机等,那么这些方面相关的书籍上可能就会有介绍。不要局限在当前所作的这个题目上。要广开思路。因为毕竟很多学科是包含很多方面的,他们写书的时候会针对这个领域用到的一些特性来介绍。因此,要主动去这

些方面去查找。

3----BH 曲线的种类

以前是总找不到对应型号的BH 曲线。现在有了上面的经历,找到很多书。也找到很多BH 曲线。可是这些曲线之间有很多不符的现象。那么现在对BH 曲线也有了进一步的了解,有直流磁化曲线/交流不同频率的磁化曲线,对于轧制的钢材,如冷轧硅钢片,当轧制方向与磁化方向不同的时候对应的不同磁化曲线。对应不同场合,要查找不同的磁化曲线。具体可参考《变压器铁心制造》第81页。判断自己找到的BH 曲线是哪一类,应该用哪一

类。

hottom

son

版主 帖子 1

5

8

积分 1# 打印

字体大小:

t T

发表于 2006-12-19 09:08 | 只看该作者

在一个图中显示多条曲线并导出(命令方式)

曲线, 命令曲线, 命令 LinePlot2D 可以实现同一直线上不同的量共同显示,关键是最后一个参数,以下

是文档中的介绍:

Creates a 2D line plot from the contents of the top two registers of the stack. The top of the stack must be a line geometry followed by a scalar

quantity. Command: Plot/Field, Field Calculator

Syntax: lineplot “Plot name” COLOR WIDTH MARKER_STYLE

3

2

仿真币

8

4

4

阅读权限

1

LINE_STYLE DRAW_MARKER? DRAW_LINE? NEW_WINDOW?

Note: color: Select a value between 0 and 255.

width: The higher the number the thicker the line.

marker_style: Select from the following types.

Type Marker

0 no marker

6 Triangle

1 .

7 Circle

2x

8 Solid Square

3 +

9 Solid Diamond

4 Square

10 Solid Triangle

5 Diamond

11 Solid Circle

line_style: Select from the following types.

Style Line Form

1 Solid line.

2 Dashed line.

3 Dotted line.

4 Dash-dot line.

5 Dash-dot-dot line.

draw_marker?: 0=No Markers, 1=Draw Markers

draw_line?: 0=No lines, 1=Draw lines

new_window?: 0=Add to current window, 1=New window

————————————————————————————

第一次输出图形最后一个参数为1,后面输出图形最后一个参数为0就可以了,此时再用Save2DPlot就可以将所有图形中的曲线数据保存在一个文件中了。

如果是统计每一步的某个计算结果,可以采用如下的方法:

指定,后处理宏,内容如下:

DefinePoint "ptProbe" [38, 0, 0]

Enter "B"

Scalar_Z

EnterPoint "ptProbe"

Value

Evaluate

Assign ptProbeBz GetTopEntryValue

Assign sFileName "..\ProbeZ.txt"

FileWrite sFileName "a" "$$, " {ptProbeBz}

DeletePoint "ptProbe"

分析完成后将在*.pjt目录中看到一个ProbeZ.txt文件,里面是以','(逗号,你可以指定别的)隔开的每一步结果,后面你可以将结果导入excel,matlab等都可

以。

1

评分次数

perch88

收藏分享评分

回复引用

订阅报告道具 TOP

perch8

8

2

#

发表于 2006-12-19 09:26 | 只看该作者

原问题:

https://www.wendangku.net/doc/a510915818.html,/forum/thread-756597-1-1.html

我做的瞬态分析。

在后处理的计算器中,可以操作在一个图中暂时Preview几条曲线。

但不知道该如何导出?

请大家指点迷津。

博客精华.多个电磁软件比

较:https://www.wendangku.net/doc/a510915818.html,/?uid-34599-action-viewspace-itemid-2637 ansys:https://www.wendangku.net/doc/a510915818.html,/?uid-34599-action-viewspace-itemid-14

帖子

3

7

2

3

积分

5

1

仿真币

4

4

1

阅读权限

1

2

94 [抱怨]编写MagNet的人思维跟普通人不大一样

https://www.wendangku.net/doc/a510915818.html,/?uid-34599-action-viewspace-itemid-13649 comsol:https://www.wendangku.net/doc/a510915818.html,/?uid-34599-action-viewspace-itemid-1 2791JMAG:https://www.wendangku.net/doc/a510915818.html,/?uid-34599-action-viewspace-itemid

-5501ANSYS

文:https://www.wendangku.net/doc/a510915818.html,/?uid-34599-action-viewspace-itemid-4754

Ansoft和Simplore联合仿真注意事项

1.Ansoft和Simplore联合仿真时,如果Ansoft中的模型类型是Transient,则必 须勾选Maxwell 2D -> Design Settings -> Advanced Product Coupling菜单中的Enable transient-transient link with Sim,否则在检查时会产生Cannot find the matching inductor in the imported file 这个错误。 2.Ansoft和Simplore联合仿真时,Simplore软件控制着仿真步长,也控制着 Ansoft模型的旋转速度(或者称线速度)。 3.Ansoft和Simplore联合仿真的必要前提: 1)Ansoft模型必须可以求解(即可以进行运算)。 2)Ansoft模型必须含有机械运动(原文: must have mechanical motion) 3)Ansoft模型必须至少含有一个外部类型(external类型)的绕组。 4)Ansoft模型名不能含有非法字符(如空格) 5)建议:在与Simplore联合仿真之前,最好保证Ansoft模型可以单独进行 运算(即可以Solve without external windings) 4.Ansoft和Simplore联合仿真时,Ansoft软件内部设定的开始和停止时间会发 生变化(即由Simplore控制) 5.Ansoft的仿真停止时间必须大于或等于Simplore的仿真停止时间。 6.Ansoft和Simplore联合仿真,Ansoft模型必须含有:几何图形,运动的Band (moving band),材料,边界条件,external 类型的绕组,剖分。

Maxwell与Simplorer联合仿真方法及注意问题

三相鼠笼式异步电动机的协同仿真模型实验分析 本文所采用的电机是参照《Ansoft 12在工程电磁场中的应用》一书所给的使用RMxprt输入机械参数所生成的三相鼠笼式异步电动机,并且由RMxprt的电机模型直接导出2D模型。由于个人需要,对电机的参数有一定的修改,但是使用Y160M--4的电机并不影响联合仿真的过程与结果。 1.1 Maxwell与Simplorer联合仿真的设置 1.1.1Maxwell端的设置 在Maxwell 2D模型中进行一下几步设置: 第一步,设置Maxwell和Simplorer端口连接功能。右键单击Model项,选择Set Symmetry Multiplier项,如图1.1所示,单击后弹出图1.2的对话框。 图1.1 查找过程示意图

图1.2 设计设置对话框 在对话框中,选择Advanced Product Coupling项,勾选其下的Enable tr-tr link with Sim 。至此,完成第一步操作。 第二步,2D模型的激励源设置。单击Excitation项的加号,显示Phase A、Phase B、Phase C各项。双击Phase A项,弹出如图1.3所示的对话框。 图1.3 A相激励源设置 在上图的对话框中,将激励源的Type项设置为External,并勾选其后的Strander,并且设置初始电流Initial Current项为0。Number of parallel branch项按照电机的设置要求,其值为1。参数设置完成后,点击确定退出。 需要说明的一点是,建议在设置Maxwell与Simplorer连接功能即第一步之前,记录电压激励源下的电阻和电感。事实上,这里的电组和电感就是Maxwell 2D计算出的电机的定子电阻与定子电感。这两个数据在外电路的连接中会使用到,在后面会详细说明。 至此,Maxwell端的设置完毕。 1.1.2 Simplorer端的设置 Simplorer端的设置,主要是对电机外电路的设置,具体的电路会在空载实验和额定负载实验中详细给出,这里不再赘述。

simplorer-maxwell联合仿真实例

T1T2T3T4

Co-simulation with Maxwell Technical Background The co-simulation is the most accurate way of coupling the drive and the motor model. The advantage of this method is the high accuraty, having the real inverter currents as source in Maxwell and the back emf of the motor on the inverter currents as source in Maxwell, and the back-emf of the motor on the inverter side. The transient-transient link enables the use to pass data between Simplorer and Maxwell during the simulation: Maxwell2D and Maxwell3D can be used Simplorer and Maxwell will run altogether Simplorer is the Master, Maxwell is the slave At a given time step, the Winding currents and the Rotor angle are passed from Simplorer to Maxwell, the Back EMF and the Torque are passed from Maxwell to Simplorer The complexity of the drive system and of the mechanical system is not The complexity of the drive system and of the mechanical system is not limited Insights on the coupling Method The Simplorer time steps and the Maxwell time steps don’t have to be the same. Usually, Simplorer requires much more time steps than Maxwell. Assume the current simulation time is t Simplorer, based on the previous time steps, gives a forward meeting time t1to Maxwell where both simulators will exchange data. Between t0and t1, both code run by themselves. At t 1, both codes exchange data. If during the t0-t1period, some event appears on Simplorer side (state graph transition, large change of the pp p(g p,g g dynamic of the circuit), Simplorer will roll back to t0and set a new forward meeting time t1’, t1’< t1.

sim-sim-maxwell联合仿真遇到的问题及解决方法

sim-sim-maxwell联合仿真遇到的问题及解决方法

Maxwell、Simplorer与Simulink联合仿真 [请输入文档摘要,摘要通常是对文档内容的简短总结。输入文档摘要,摘要通常 是对文档内容的简短总结。] 错误!未找到引用源。

目录 前言 (3) 一、在Maxwell里建立仿真模型,并设置联合仿真参数 (4) 二、Simplorer (7) 三、Simplorer与Maxwell的联合 (8) 三、Simplorer与Simulink (9) 1、在Simplorer里的操作 (10) 2、在Simulink里的操作 (13) 五、求解器参数的设置 (18) 常见的问题 (20) 前言

本文主要介绍Maxwell、Simplorer和Simulink如何实现联合仿真,已经出现的问题和解决方法。以直线开关磁阻电机为仿真模型,对电机模型的参数进行辨识,控制算法采用PID和极点配置自适应控制算法。用到的软件版本分别为:Maxwell 13、Simplorer 9.0和MATLAB R2007b。三个软件里建立的工程或模型文件必须放在同一个文件夹里,仿真中需要建立的和分析后生成的文件如图1所示。 图 1 在Maxwell里建立有限元仿真模型;Simplorer 提供功率电路部分,是将Maxwell和Simulink连接起来的桥梁;Simulink 为联合仿真提供控制算法,输入为期望的位置信号和实际的位置信号(从Simplorer里输入)输出为三相电流信号。 一、在Maxwell里建立仿真模型,并设置联合仿真参数 1、根据实际电机的尺寸和材料建立直线开关磁阻电机的磁场瞬态分析模型,如图2所示。

Ansoft与Workbench协同仿真实现双向耦合的方法

Ansoft与Workbench协同仿真实现双向耦合的方法在科研或者做研究生毕设的过程中,经常会遇到多个物理场的耦合问题,诸如流固耦合、热电耦合、磁热耦合以及磁热结构耦合等等。而且往往还会遇到各种非线性问题:磁导率是随温度变化的或者电阻率也与温度成非线性关系,这时为了保证计算结果的准确性,有必要也必须是多物理场实现双向耦合。 在Ansoft与Workbench实现磁热耦合的过程中,就需要保证他们耦合式双向的。下面介绍两种方法: 方案一:利用Workbench组件系统中的“Feedback Iterator”模块,如下图 然后设置Feedback Iterator属性,也可添加脚本。 使用这种方法,通常3-4次耦合迭代即可达到稳定(Ansys官方说法)

方案二:Ansoft Help文档—“Coupling Maxwell Designs with ANSYS Thermal via Workbench” 19. To export the thermal result to Maxwell, right-click on the Imported Load (Maxwell2DSolution), or Imported Load(Maxwell3DSolution) and select Export Results. 20. To fully utilize the automation capabilities provided in ANSYS Workbench, select Imported Load (Maxwell2DSolution), or Imported Load(Maxwell3DSolution); and in its Detail window, select Yes for Export after Solve. With this option selected, users can continue the iteration between Maxwell/Thermal simulations from the Workbench schematic. To “push” the exported thermal results back to Maxwell, right-click on Maxwell's Solution cell on the Workbench schematic and select Enable Update. Then, right-click again on Maxwell's Solution cell and select Update. This will trigger Maxwell to re-simulate its solution with thermal results. To continue the solve iterations, repeat the following steps as needed: a. Right-click on Thermal's Setup cell and select Refresh. b. Right-click on Thermal's Setup cell and select Update. c. Right-click on Maxwell's Solution cell and select Enable Update. d. Right-click on Maxwell's Solution cell and select Updat e.

maxwell和workbench的联合仿真

Coupling Maxwell Designs with ANSYS Thermal via Workbench Coupling Maxwell2D/3D V15 with ANSYS R14 is supported via the Workbench schematic. Thermal feedback is supported for Maxwell magnetostatic, eddy current, and transient types. Users also need to setup the design and geometry appropriately. An appropriate design should be temperature-dependent, and have one or more solve setups that are enabled for thermal feedback. 1. The easiest way to add a Maxwell 2D or 3D design to a Workbench schematic is to import a working design via Workbench File>Import. The imported design is placed in the Workbench schematic after it is successfully imported. 2. Next, insert a Steady-State Thermal system and change its Analysis Type to 2D or 3D, (depending on the Maxwell design type) by right clicking on the Geometry cell and selecting Properties. It is important to change the Steady-State Thermal system's analysis type before setting up its geometry. 3. To setup the Steady-State Thermal system's geometry, you must first export the Maxwell geometry using sat or step format as follows: a. Select the Modeler>Export menu item. b. Select the desired model geometry format (sat or step), and the save location in the dialog box and save the file for use by ANSYS Workbench. 4. Import the file via the Geometry module of the Steady-State Thermal system.

RMXPRT&maxwell&simplorer联合仿真——实例

题目: RMXPRT / MAXWELL和SIMPLORER的联合仿真 作者: ENZO 软件:MAXWELL 11.1.1 , SIMPLORER 7.05 1. 建立RMXPRT模型 电机为4极9槽稀土永磁无刷电机,这里不讨论电机的实际设计,所以具体参数不列出了,只当作操作步骤演示。 2. 设置好电机的各项参数后,计算电机的性能,得到电机的特性参数,后面将对RMXPRT 的数据和SIMPLORER的数据做比较,所以这里列出了电机的力矩和电流曲线。 力矩-转速曲线

电流-转速曲线 请注意6000RPM时的力矩和电流数值,分别为124mNm , 4.18A. 请注意在这个例子里设置了限流值5.0A ,后面SIMPLORER里同样有这个设置。 3. 输出RMXPRT的SIMPLORER模型,步骤见下图 4. 到这里RMXPRT的操作就结束了,输出的模型A相绕组的中心对准磁极的中心. 这个很重要,在RMXPRT中,对准是自动进行的,在MAXWELL里就要使用者自己来做。 5. 在SIMPLORER中导入前面建立的RMXPRT模型,

6. 将上图中的RMX-LINK图标拖到SIMPLORER SCHEMATIC的窗口中,双击图标 电机IMPORT MODEL, 在路径中指定RMXPRT 的SIMPLORER模型的路径,这样,电机的SIMPLORER 模型就导入了, RMX-LINK图标变成了电机的实际外形。下面是逆变器模型。 7. 逆变器用MOSFET构成,这里为了简化, MOSFET用了系统级的元件模型。

8. MOSFET 驱动电路

sim_sim maxwell联合仿真遇到的问题及解决方法

Maxwell、Simplorer与Simulink联合仿真 [请输入文档摘要,摘要通常是对文档内容的简短总结。输入文档摘要,摘要通常 是对文档内容的简短总结。] 错误!未找到引用源。

目录 前言 (2) 一、在Maxwell里建立仿真模型,并设置联合仿真参数 (3) 二、Simplorer (6) 三、Simplorer与Maxwell的联合 (7) 三、Simplorer与Simulink (8) 1、在Simplorer里的操作 (9) 2、在Simulink里的操作 (12) 五、求解器参数的设置 (16) 常见的问题 (18) 前言

本文主要介绍Maxwell、Simplorer和Simulink如何实现联合仿真,已经出现的问题和解决方法。以直线开关磁阻电机为仿真模型,对电机模型的参数进行辨识,控制算法采用PID和极点配置自适应控制算法。用到的软件版本分别为:Maxwell 13、Simplorer 9.0和MATLAB R2007b。三个软件里建立的工程或模型文件必须放在同一个文件夹里,仿真中需要建立的和分析后生成的文件如图1所示。 图 1 在Maxwell里建立有限元仿真模型;Simplorer 提供功率电路部分,是将Maxwell和Simulink连接起来的桥梁;Simulink 为联合仿真提供控制算法,输入为期望的位置信号和实际的位置信号(从Simplorer里输入)输出为三相电流信号。 一、在Maxwell里建立仿真模型,并设置联合仿真参数 1、根据实际电机的尺寸和材料建立直线开关磁阻电机的磁场瞬态分析模型,如图2所示。

图 2 2、对电磁瞬态分析的一些仿真参数进行设置(如图3所示)。包括运动区域,求解边界条件,激励,力矩,网格剖分(理论上说网格剖分越细求解越精确,但是剖分越细求解时间越长,所以可以根据实际情况综合考虑)、分析设置(后面会讲到)。 图 3 3、联合仿真中激励的添加:激励类型选择“External”,初始值为0A,如图4所示。

相关文档
相关文档 最新文档