版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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(&quo
5、t;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 numb
6、er 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(x
7、span/2) & Unitsindex="lin3mx" & cstr(n)oEditor.CreatePolyline Array("NAME:PolylineParameters", "IsPolylineCovered:=", true, "IsPolylineClosed:=", _ false, Array("NAME:PolylinePoints", Array("NAME:PLPoint", "X:=", XValuemin
8、, "Y:=", YValue, "Z:=", _ ZValue), Array("NAME:PLPoint", "X:=", XValuemmax, "Y:=", YValue, "Z:=", ZValue), _ Array("NAME:PolylineSegments", Array("NAME:PLSegment", "SegmentType:=", _ "Line", "Sta
9、rtIndex:=", 0, "NoOfPoints:=", 2), Array("NAME:PolylineXSection", "XSectionType:=", _ "None", "XSectionOrient:=", "Auto", "XSectionWidth:=", "0mm", "XSectionTopWidth:=", _ "0mm", "XSectionHe
10、ight:=", "0mm", "XSectionNumSegments:=", "0", "XSectionBendType:=", _ "Corner"), Array("NAME:Attributes", "Name:=", index, "Flags:=", "", "Color:=", _ "(132 132 193)", "Transparenc
11、y:=", 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,mm,
13、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:",&q
14、uot;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)="Posit
15、ion 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, "
17、X:=", XValue, "Z:=", ZValue), _ Array("NAME:PolylineSegments", Array("NAME:PLSegment", "SegmentType:=", _ "Line", "StartIndex:=", 0, "NoOfPoints:=", 2), Array("NAME:PolylineYSection", "YSectionType:=", _ &
18、quot;None", "YSectionOrient:=", "Auto", "YSectionWidth:=", "0mm", "YSectionTopWidth:=", _ "0mm", "YSectionHeight:=", "0mm", "YSectionNumSegments:=", "0", "YSectionBendType:=", _ "C
19、orner"), Array("NAME:Attributes", "Name:=", index, "Flags:=", "", "Color:=", _ "(132 132 193)", "Transparency:=", 0, "PartCoordinateSystem:=", "Global", "UDMId:=", _ "", "MaterialV
20、alue:=", "" & Chr(34) & "vacuum" & Chr(34) & "", "SolveInside:=", _ true) namepara="NAME:" & index Set oModule = oDesign.GetModule("RadField")oModule.InsertNearFieldLineSetup Array(namepara, "UseCustomRadiation
21、Surface:=", _ false, "Line:=", index, "NumPts:=", cstr(Ynum)Next5、 用脚本导出近场数据Dim oAnsoftAppDim oDesktopDim oProjectDim oDesignDim oEditorDim oModuleSet oAnsoftApp = CreateObject("AnsoftHfss.HfssScriptInterface")Set oDesktop = oAnsoftApp.GetAppDesktop()oDesktop.Resto
22、reWindowSet 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&quo
23、t;, _ "Setup1 : Sweep", Array("Context:=", "lin3mx1"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", &
24、quot;Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3mx2"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Fre
25、q:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3mx3"), Array("Nor
26、malizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27&q
27、uot;, "Setup1 : Sweep", Array("Context:=", "lin3mx4"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", &
28、quot;Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3mx5"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Fre
29、q:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3mx6"), Array("Nor
30、malizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27&q
31、uot;, "Setup1 : Sweep", Array("Context:=", "lin3mx7"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", &
32、quot;Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3mx8"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Fre
33、q:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3mx9"), Array("Nor
34、malizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27&q
35、uot;, "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", "F
37、req:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3mx12"), Array("
38、NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 2
39、7", "Setup1 : Sweep", Array("Context:=", "lin3mx13"), 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:=", "lin3mx14"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", &quo
41、t;Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3mx15"), Array(&qu
42、ot;NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.ExportToFile "XY
43、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:=", "lin3
44、my1"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.A
45、ddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3my2"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "
46、NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3my3"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:Vari
47、ableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3
48、my4"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.A
49、ddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3my5"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "
50、NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3my6"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:Vari
51、ableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3
52、my7"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.A
53、ddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3my8"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:VariableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "
54、NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3my9"), Array("NormalizedDistance:=", Array( _ "All"), Array("NAME:Vari
55、ableValues", "Freq:=", "0.8GHz"), Array("X Component:=", _ "NormalizedDistance", "Y Component:=", Array("NearETotal"), Array()oModule.AddTraces "XY Plot 27", "Setup1 : Sweep", Array("Context:=", "lin3
56、my10"), 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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 赣西科技职业学院《中学科技作品创作》2023-2024学年第一学期期末试卷
- 《护理管理制度培训》课件
- 劳动小学生课件六上浙教版
- 赣东学院《管理研究方法》2023-2024学年第一学期期末试卷
- 甘肃中医药大学《线描人物》2023-2024学年第一学期期末试卷
- 入矿培训课件
- 手指流血安全教育课件
- 安全理念课件标题撰写
- 2021一建考试《建设工程项目管理》题库试卷考点题库及答案解析五
- 《企业并购管理》课件
- 《廉政讲堂格言》课件
- 2024年03月中国农业发展银行内蒙古分行校园招考拟招录人员笔试历年参考题库附带答案详解
- 2024年盾构操作工职业技能竞赛理论考试题库(含答案)
- 浙江省绍兴市越城区2023-2024学年四年级上学期数学期末考试试卷
- 广东省广州市海珠区2023-2024学年九年级上学期期末英语试题(答案)
- ISO 56001-2024《创新管理体系-要求》专业解读与应用实践指导材料之8:“5领导作用-5.2创新方针”(雷泽佳编制-2025B0)
- (西北卷)名校教研联盟2025届高三12月联考英语试卷(含答案解析)
- 金科新未来大联考2025届高三12月质量检测语文试题(含答案解析)
- 江苏省2025年高中学业水平合格考历史试卷试题(含答案详解)
- 《地下水环境背景值统计表征技术指南(试行)》
- 大学试卷(示范)
评论
0/150
提交评论