HFSS的近场仿真_第1页
HFSS的近场仿真_第2页
HFSS的近场仿真_第3页
HFSS的近场仿真_第4页
HFSS的近场仿真_第5页
已阅读5页,还剩15页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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-general options-webupdate options

2、-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 oAnsoftAppDim oDesktopDim oProjectDim oDesignDim oEditorDim oModuleSet oAnsoftApp = CreateObject("AnsoftHf

3、ss.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, dx, dy,posDim Units, indexDim y()Dim

4、 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(&qu

5、ot;Input X sampling span:","Nearfield", 4000,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 num

6、ber in Y direction:","Nearfield", 15,pos,pos)Redim y(Ynum)dx=xspan/(Xnum-1)dy=yspan/(Ynum-1)y(0)="Position of y"For n=1 To Ynumy(n)=-yspan/2 + (n-1)*dy'将X向点坐标存入数组ZValue=cstr(zpos) & UnitsYValue=cstr(y(n) & UnitsXValuemin=cstr(-xspan/2) & UnitsXValuemmax=cstr(

7、xspan/2) & Unitsindex="lin3mx" & cstr(n)oEditor.CreatePolyline Array("NAME:PolylineParameters", "IsPolylineCovered:=", true, "IsPolylineClosed:=", _ false, Array("NAME:PolylinePoints", Array("NAME:PLPoint", "X:=", XValuemi

8、n, "Y:=", YValue, "Z:=", _ ZValue), Array("NAME:PLPoint", "X:=", XValuemmax, "Y:=", YValue, "Z:=", ZValue), _ Array("NAME:PolylineSegments", Array("NAME:PLSegment", "SegmentType:=", _ "Line", "St

9、artIndex:=", 0, "NoOfPoints:=", 2), Array("NAME:PolylineXSection", "XSectionType:=", _ "None", "XSectionOrient:=", "Auto", "XSectionWidth:=", "0mm", "XSectionTopWidth:=", _ "0mm", "XSectionH

10、eight:=", "0mm", "XSectionNumSegments:=", "0", "XSectionBendType:=", _ "Corner"), Array("NAME:Attributes", "Name:=", index, "Flags:=", "", "Color:=", _ "(132 132 193)", "Transparen

11、cy:=", 0, "PartCoordinateSystem:=", "Global", "UDMId:=", _ "", "MaterialValue:=", "" & Chr(34) & "vacuum" & Chr(34) & "", "SolveInside:=", _ true) namepara="NAME:" & index Set

12、 oModule = oDesign.GetModule("RadField")oModule.InsertNearFieldLineSetup Array(namepara, "UseCustomRadiationSurface:=", _ false, "Line:=", index, "NumPts:=", cstr(Xnum) Next'-3米y面-Units = InputBox("Select the units:"&Chr(13)& _"(cm,m

13、m,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", 2100,pos,pos) yspan = InputBox("Input Y sampling span:",

14、"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=xspan/(Xnum-1)dy=yspan/(Ynum-1)x(0)="Pos

15、ition of x"For n=1 To Xnumx(n)=-xspan/2 + (n-1)*dx'将X向点坐标存入数组ZValue=cstr(zpos) & UnitsXValue=cstr(x(n) & UnitsYValuemin=cstr(-yspan/2) & UnitsYValuemmax=cstr(yspan/2) & Unitsindex="lin3my" & cstr(n)oEditor.CreatePolyline Array("NAME:PolylineParameters"

16、;, "IsPolylineCovered:=", true, "IsPolylineClosed:=", _ false, Array("NAME:PolylinePoints", Array("NAME:PLPoint", "Y:=", YValuemin, "X:=", XValue, "Z:=", _ ZValue), Array("NAME:PLPoint", "Y:=", YValuemmax, &quo

17、t;X:=", XValue, "Z:=", ZValue), _ Array("NAME:PolylineSegments", Array("NAME:PLSegment", "SegmentType:=", _ "Line", "StartIndex:=", 0, "NoOfPoints:=", 2), Array("NAME:PolylineYSection", "YSectionType:=", _

18、 "None", "YSectionOrient:=", "Auto", "YSectionWidth:=", "0mm", "YSectionTopWidth:=", _ "0mm", "YSectionHeight:=", "0mm", "YSectionNumSegments:=", "0", "YSectionBendType:=", _ "

19、;Corner"), Array("NAME:Attributes", "Name:=", index, "Flags:=", "", "Color:=", _ "(132 132 193)", "Transparency:=", 0, "PartCoordinateSystem:=", "Global", "UDMId:=", _ "", "Materia

20、lValue:=", "" & Chr(34) & "vacuum" & Chr(34) & "", "SolveInside:=", _ true) namepara="NAME:" & index Set oModule = oDesign.GetModule("RadField")oModule.InsertNearFieldLineSetup Array(namepara, "UseCustomRadiati

21、onSurface:=", _ false, "Line:=", index, "NumPts:=", cstr(Ynum) Next5、 用脚本导出近场数据Dim oAnsoftAppDim oDesktopDim oProjectDim oDesignDim oEditorDim oModuleSet oAnsoftApp = CreateObject("AnsoftHfss.HfssScriptInterface")Set oDesktop = oAnsoftApp.GetAppDesktop()oDesktop.Re

22、storeWindowSet 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&

23、quot;, _ "Setup1 : Sweep", Array("Context:=", "lin3mx1"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance"

24、, "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3mx2"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "

25、Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3mx3"), Array("

26、NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 2

27、7", "Setup1 : Sweep", Array("Context:=", "lin3mx4"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance"

28、, "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3mx5"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "

29、Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3mx6"), Array("

30、NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 2

31、7", "Setup1 : Sweep", Array("Context:=", "lin3mx7"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance"

32、, "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3mx8"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "

33、Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3mx9"), Array("

34、NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 2

35、7", "Setup1 : Sweep", Array("Context:=", "lin3mx10"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance"

36、;, "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3mx11"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", &quo

37、t;Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3mx12"), Array(&qu

38、ot;NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plo

39、t 27", "Setup1 : Sweep", Array("Context:=", "lin3mx13"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance&q

40、uot;, "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3mx14"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", &

41、quot;Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3mx15"), Array(

42、"NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.ExportToFile "

43、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", "Near Fields", "Rectangular Plot", _ "Setup1 : Sweep", Array("Context:=", "l

44、in3my1"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModul

45、e.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3my2"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ &qu

46、ot;NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3my3"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:V

47、ariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "l

48、in3my4"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModul

49、e.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3my5"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ &qu

50、ot;NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3my6"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:V

51、ariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "l

52、in3my7"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModul

53、e.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3my8"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ &qu

54、ot;NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3my9"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:V

55、ariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "l

56、in3my10"), 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:=", "lin3my11"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论