HFSS的近场仿真要点.pdf

上传人:tbuqq 文档编号:5197096 上传时间:2020-02-19 格式:PDF 页数:20 大小:1.77MB
返回 下载 相关 举报
HFSS的近场仿真要点.pdf_第1页
第1页 / 共20页
HFSS的近场仿真要点.pdf_第2页
第2页 / 共20页
HFSS的近场仿真要点.pdf_第3页
第3页 / 共20页
HFSS的近场仿真要点.pdf_第4页
第4页 / 共20页
HFSS的近场仿真要点.pdf_第5页
第5页 / 共20页
点击查看更多>>
资源描述

《HFSS的近场仿真要点.pdf》由会员分享,可在线阅读,更多相关《HFSS的近场仿真要点.pdf(20页珍藏版)》请在三一文库上搜索。

1、HFSS 的近场仿真 1、 软件安装和破解 1)Hfss13 只能安装在C 盘。 2)破解时先在控制面板里关闭Windows defender 并且退出360 杀毒软件。否则 Ansoft2008fix.exe 会被当病毒杀掉。 3)将 Ansoft2008fix.exe 和 hfss12fix.exe 和 license.lic 拷贝到 HFSS13.0 目录下。 4)以管理员身份运行Ansoft2008fix.exe 。 5)以管理员身份运行hfss12fix.exe ,连续 patch 六个 dll。 6)打开 hfss,弹出框框,无视继续。依次点击TOOls-options-gener

2、al options-webupdate options-never 2、 模型的建立 2.1 设计变量 2.2 画模型 2.3 边界条件 、 2.4激励源 因为 hfss 算出的场强为正弦波波峰,所以输入功率有一个1/2 的因子。 2.5加运算器 2.6 画近场线 近场线要一一对应。 3、 数据的导出 用 Add Trace 添加曲线到同一页面,用 Apply Trace 改变频点。 导出为 csv 格式。 将横坐标反归一化。 画出三维曲面图。 4、 用脚本画近场线 Dim oAnsoftApp Dim oDesktop Dim oProject Dim oDesign Dim oEdito

3、r Dim oModule Set oAnsoftApp = CreateObject(“AnsoftHfss.HfssScriptInterface“) Set oDesktop = oAnsoftApp.GetAppDesktop() Set oProject = oDesktop.GetActiveProject() Set oDesign = oProject.GetActiveDesign() Set oEditor = oDesign.SetActiveEditor(“3D Modeler“) 声明变量与常数. Dim zpos, Xnum, Ynum, xspan, yspan,

4、 dx, dy,pos Dim Units, index Dim y() Dim x() Units = “mm“ pos=6000 -3米 x 面- Units = InputBox(“Select the units:“&Chr(13)& _ “(cm,mm,um,in,mil)“, “Nearfield“,“mm“,pos,pos) zpos = InputBox(“Input the Z plane position:“,“Nearfield“, 3200,pos,pos) xspan = InputBox(“Input X sampling span:“,“Nearfield“, 4

5、000,pos,pos) yspan = InputBox(“Input Y sampling span:“,“Nearfield“, 2100,pos,pos) Xnum = InputBox(“Input sampling number in X direction:“,“Nearfield“, 100,pos,pos) Ynum = InputBox(“Input sampling number in Y direction:“,“Nearfield“, 15,pos,pos) Redim y(Ynum) dx=xspan/(Xnum-1) dy=yspan/(Ynum-1) y(0)=

6、“Position of y“ For n=1 To Ynum y(n)=-yspan/2 + (n-1)*dy 将 X 向点坐标存入数组 ZValue=cstr(zpos) & Units YValue=cstr(y(n) & Units XValuemin=cstr(-xspan/2) & Units XValuemmax=cstr(xspan/2) & Units index=“lin3mx“ & cstr(n) oEditor.CreatePolyline Array(“NAME:PolylineParameters“, “IsPolylineCovered:=“, true, “Is

7、PolylineClosed:=“, _ false, Array(“NAME:PolylinePoints“, Array(“NAME:PLPoint“, “X:=“, XValuemin, “Y:=“, YValue, “Z:=“, _ ZValue), Array(“NAME:PLPoint“, “X:=“, XValuemmax, “Y:=“, YValue, “Z:=“, ZValue), _ Array(“NAME:PolylineSegments“, Array(“NAME:PLSegment“, “SegmentType:=“, _ “Line“, “StartIndex:=“

8、, 0, “NoOfPoints:=“, 2), Array(“NAME:PolylineXSection“, “XSectionType:=“, _ “None“, “XSectionOrient:=“, “Auto“, “XSectionWidth:=“, “0mm“, “XSectionTopWidth:=“, _ “0mm“, “XSectionHeight:=“, “0mm“, “XSectionNumSegments:=“, “0“, “XSectionBendType:=“, _ “Corner“), Array(“NAME:Attributes“, “Name:=“, inde

9、x, “Flags:=“, “, “Color:=“, _ “(132 132 193)“, “Transparency:=“, 0, “PartCoordinateSystem:=“, “Global“, “UDMId:=“, _ “, “MaterialValue:=“, “ & Chr(34) & “vacuum“ & Chr(34) & “, “SolveInside:=“, _ true) namepara=“NAME:“ & index Set oModule = oDesign.GetModule(“RadField“) oModule.InsertNearFieldLineSe

10、tup Array(namepara, “UseCustomRadiationSurface:=“, _ false, “Line:=“, index, “NumPts:=“, cstr(Xnum) Next -3米 y 面- Units = InputBox(“Select the units:“&Chr(13)& _ “(cm,mm,um,in,mil)“, “Nearfield“,“mm“,pos,pos) zpos = InputBox(“Input the Z plane position:“,“Nearfield“, 3200,pos,pos) xspan = InputBox(“

11、Input X sampling span:“,“Nearfield“, 2100,pos,pos) yspan = InputBox(“Input Y sampling span:“,“Nearfield“, 4000,pos,pos) Xnum = InputBox(“Input sampling number in X direction:“,“Nearfield“, 15,pos,pos) Ynum = InputBox(“Input sampling number in Y direction:“,“Nearfield“, 100,pos,pos) Redim x(Xnum) dx=

12、xspan/(Xnum-1) dy=yspan/(Ynum-1) x(0)=“Position of x“ For n=1 To Xnum x(n)=-xspan/2 + (n-1)*dx 将 X 向点坐标存入数组 ZValue=cstr(zpos) & Units XValue=cstr(x(n) & Units YValuemin=cstr(-yspan/2) & Units YValuemmax=cstr(yspan/2) & Units index=“lin3my“ & cstr(n) oEditor.CreatePolyline Array(“NAME:PolylineParamet

13、ers“, “IsPolylineCovered:=“, true, “IsPolylineClosed:=“, _ false, Array(“NAME:PolylinePoints“, Array(“NAME:PLPoint“, “Y:=“, YValuemin, “X:=“, XValue, “Z:=“, _ ZValue), Array(“NAME:PLPoint“, “Y:=“, YValuemmax, “X:=“, XValue, “Z:=“, ZValue), _ Array(“NAME:PolylineSegments“, Array(“NAME:PLSegment“, “Se

14、gmentType:=“, _ “Line“, “StartIndex:=“, 0, “NoOfPoints:=“, 2), Array(“NAME:PolylineYSection“, “YSectionType:=“, _ “None“, “YSectionOrient:=“, “Auto“, “YSectionWidth:=“, “0mm“, “YSectionTopWidth:=“, _ “0mm“, “YSectionHeight:=“, “0mm“, “YSectionNumSegments:=“, “0“, “YSectionBendType:=“, _ “Corner“), A

15、rray(“NAME:Attributes“, “Name:=“, index, “Flags:=“, “, “Color:=“, _ “(132 132 193)“, “Transparency:=“, 0, “PartCoordinateSystem:=“, “Global“, “UDMId:=“, _ “, “MaterialValue:=“, “ & Chr(34) & “vacuum“ & Chr(34) & “, “SolveInside:=“, _ true) namepara=“NAME:“ & index Set oModule = oDesign.GetModule(“Ra

16、dField“) oModule.InsertNearFieldLineSetup Array(namepara, “UseCustomRadiationSurface:=“, _ false, “Line:=“, index, “NumPts:=“, cstr(Ynum) Next 5、 用脚本导出近场数据 Dim oAnsoftApp Dim oDesktop Dim oProject Dim oDesign Dim oEditor Dim oModule Set oAnsoftApp = CreateObject(“AnsoftHfss.HfssScriptInterface“) Set

17、 oDesktop = oAnsoftApp.GetAppDesktop() oDesktop.RestoreWindow Set oProject = oDesktop.SetActiveProject(“Project6“) Set oDesign = oProject.SetActiveDesign(“HFSSDesign1“) Set oModule = oDesign.GetModule(“ReportSetup“) -3mx-0.8G- oModule.CreateReport “XY Plot 27“, “Near Fields“, “Rectangular Plot“, _ “

18、Setup1 : Sweep“, Array(“Context:=“, “lin3mx1“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Conte

19、xt:=“, “lin3mx2“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3mx3“), Array(“Nor

20、malizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3mx4“), Array(“NormalizedDistance:=“, Array( _

21、“All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3mx5“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableV

22、alues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3mx6“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“),

23、Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3mx7“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “Nor

24、malizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3mx8“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Componen

25、t:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3mx9“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Ar

26、ray() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3mx10“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY

27、Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3mx11“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“,

28、Array(“Context:=“, “lin3mx12“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3mx13

29、“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3mx14“), Array(“NormalizedDistanc

30、e:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3mx15“), Array(“NormalizedDistance:=“, Array( _ “All“), Array

31、(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.ExportToFile “XY Plot 27“, “C:/Users/xiaoen/Documents/3mx-0.8G.csv“ oModule.DeleteReports Array(“XY Plot 27“) -3my-0.8G- oModule.CreateReport “XY Plot 27“

32、, “Near Fields“, “Rectangular Plot“, _ “Setup1 : Sweep“, Array(“Context:=“, “lin3my1“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY

33、Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3my2“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, A

34、rray(“Context:=“, “lin3my3“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3my4“),

35、 Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3my5“), Array(“NormalizedDistance:=“

36、, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3my6“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAM

37、E:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3my7“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“,

38、“0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3my8“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component

39、:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3my9“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“,

40、“Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3my10“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“Near

41、ETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3my11“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.Ad

42、dTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3my12“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup

43、1 : Sweep“, Array(“Context:=“, “lin3my13“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=

44、“, “lin3my14“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.AddTraces “XY Plot 27“, “Setup1 : Sweep“, Array(“Context:=“, “lin3my15“), Array(“NormalizedDistance:=“, Array( _ “All“), Array(“NAME:VariableValues“, “Freq:=“, “0.8GHz“), Array(“X Component:=“, _ “NormalizedDistance“, “Y Component:=“, Array(“NearETotal“), Array() oModule.ExportToFile “XY Plot 27“, “C:/Users/xiaoen/Documents/3my-0.8G.csv“ oModule.DeleteReports Array(“XY Plot 27“)

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 其他


经营许可证编号:宁ICP备18001539号-1