版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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(AnsoftHfss.Hfs
3、sScriptInterface)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 x()Units = mmpos=6000-3米x面-Un
4、its = 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, 4000,pos,pos) yspan = InputBox(Input Y sampling span:,Nearfield, 2100,pos,pos) Xnum = InputBox(I
5、nput 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)=Position of yFor n=1 To Ynumy(n)=-yspan/2 + (n-1)*dy将X向点坐标存入数组ZValue=cstr(zpos) & UnitsYValue=cstr(y(n) & Units
6、XValuemin=cstr(-xspan/2) & UnitsXValuemmax=cstr(xspan/2) & Unitsindex=lin3mx & cstr(n)oEditor.CreatePolyline Array(NAME:PolylineParameters, IsPolylineCovered:=, true, IsPolylineClosed:=, _ false, Array(NAME:PolylinePoints, Array(NAME:PLPoint, X:=, XValuemin, Y:=, YValue, Z:=, _ ZValue), Array(NAME:P
7、LPoint, X:=, XValuemmax, Y:=, YValue, Z:=, ZValue), _ Array(NAME:PolylineSegments, Array(NAME:PLSegment, SegmentType:=, _ Line, StartIndex:=, 0, NoOfPoints:=, 2), Array(NAME:PolylineXSection, XSectionType:=, _ None, XSectionOrient:=, Auto, XSectionWidth:=, 0mm, XSectionTopWidth:=, _ 0mm, XSectionHei
8、ght:=, 0mm, XSectionNumSegments:=, 0, XSectionBendType:=, _ Corner), Array(NAME:Attributes, Name:=, index, Flags:=, , Color:=, _ (132 132 193), Transparency:=, 0, PartCoordinateSystem:=, Global, UDMId:=, _ , MaterialValue:=, & Chr(34) & vacuum & Chr(34) & , SolveInside:=, _ true) namepara=NAME: & in
9、dex Set 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,um,in,mil), Nearfield,mm,pos,pos) zpos = InputBox(Input the Z plane po
10、sition:,Nearfield, 3200,pos,pos) xspan = InputBox(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:,Nearfi
11、eld, 100,pos,pos)Redim x(Xnum)dx=xspan/(Xnum-1)dy=yspan/(Ynum-1)x(0)=Position of xFor 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:
12、PolylineParameters, 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, SegmentType:=,
13、_ Line, StartIndex:=, 0, NoOfPoints:=, 2), Array(NAME:PolylineYSection, YSectionType:=, _ None, YSectionOrient:=, Auto, YSectionWidth:=, 0mm, YSectionTopWidth:=, _ 0mm, YSectionHeight:=, 0mm, YSectionNumSegments:=, 0, YSectionBendType:=, _ Corner), Array(NAME:Attributes, Name:=, index, Flags:=, , Co
14、lor:=, _ (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.InsertNearFieldLineSetup Array(namepara, UseCustomRadiationSurface:
15、=, _ false, Line:=, index, NumPts:=, cstr(Ynum) Next5、 用脚本导出近场数据Dim oAnsoftAppDim oDesktopDim oProjectDim oDesignDim oEditorDim oModuleSet oAnsoftApp = CreateObject(AnsoftHfss.HfssScriptInterface)Set oDesktop = oAnsoftApp.GetAppDesktop()oDesktop.RestoreWindowSet oProject = oDesktop.SetActiveProject(
16、Project6)Set oDesign = oProject.SetActiveDesign(HFSSDesign1)Set oModule = oDesign.GetModule(ReportSetup)-3mx-0.8G-oModule.CreateReport XY Plot 27, Near Fields, Rectangular Plot, _ Setup1 : Sweep, Array(Context:=, lin3mx1), Array(NormalizedDistance:=, Array( _ All), Array(NAME:VariableValues, Freq:=,
17、 0.8GHz), Array(X Component:=, _ NormalizedDistance, Y Component:=, Array(NearETotal), Array()oModule.AddTraces XY Plot 27, Setup1 : Sweep, Array(Context:=, lin3mx2), Array(NormalizedDistance:=, Array( _ All), Array(NAME:VariableValues, Freq:=, 0.8GHz), Array(X Component:=, _ NormalizedDistance, Y C
18、omponent:=, Array(NearETotal), Array()oModule.AddTraces XY Plot 27, Setup1 : Sweep, Array(Context:=, lin3mx3), Array(NormalizedDistance:=, Array( _ All), Array(NAME:VariableValues, Freq:=, 0.8GHz), Array(X Component:=, _ NormalizedDistance, Y Component:=, Array(NearETotal), Array()oModule.AddTraces
19、XY Plot 27, Setup1 : Sweep, Array(Context:=, lin3mx4), 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:=, lin3mx5), A
20、rray(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:=, lin3mx6), Array(NormalizedDistance:=, Array( _ All), Array(NAME:Var
21、iableValues, Freq:=, 0.8GHz), 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
22、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 Component:=, Array(NearETotal), Array
23、()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), Array()oModule.AddTraces XY Plot 27, Setup1 : Sweep, Array(Co
24、ntext:=, lin3mx10), 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:=, lin3mx11), Array(NormalizedDistance:=, Array(
25、_ 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:=, lin3mx12), Array(NormalizedDistance:=, Array( _ All), Array(NAME:VariableValues, Freq:=, 0.8GHz), Arr
26、ay(X Component:=, _ NormalizedDistance, Y Component:=, Array(NearETotal), Array()oModule.AddTraces XY Plot 27, Setup1 : Sweep, Array(Context:=, lin3mx13), Array(NormalizedDistance:=, Array( _ All), Array(NAME:VariableValues, Freq:=, 0.8GHz), Array(X Component:=, _ NormalizedDistance, Y Component:=,
27、Array(NearETotal), Array()oModule.AddTraces XY Plot 27, Setup1 : Sweep, Array(Context:=, lin3mx14), Array(NormalizedDistance:=, Array( _ All), Array(NAME:VariableValues, Freq:=, 0.8GHz), Array(X Component:=, _ NormalizedDistance, Y Component:=, Array(NearETotal), Array()oModule.AddTraces XY Plot 27,
28、 Setup1 : Sweep, Array(Context:=, lin3mx15), 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/3mx-0.8G.csvoModule.Delet
29、eReports Array(XY Plot 27)-3my-0.8G-oModule.CreateReport XY Plot 27, 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(Near
30、ETotal), Array()oModule.AddTraces XY 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 : S
31、weep, Array(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), Array(NormalizedDistanc
32、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:=, lin3my5), Array(NormalizedDistance:=, Array( _ All), Array(NAME:VariableValues, Freq:=, 0
33、.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(NAME:VariableValues, Freq:=, 0.8GHz), Array(X Component:=, _ NormalizedDistance, Y Com
34、ponent:=, Array(NearETotal), Array()oModule.AddTraces XY Plot 27, Setup1 : Sweep, Array(Context:=, lin3my7), Array(NormalizedDistance:=, Array( _ All), Array(NAME:VariableValues, Freq:=, 0.8GHz), Array(X Component:=, _ NormalizedDistance, Y Component:=, Array(NearETotal), Array()oModule.AddTraces XY
35、 Plot 27, Setup1 : Sweep, Array(Context:=, lin3my8), 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:=, lin3my9), Arr
36、ay(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:=, lin3my10), 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( _
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- GB/T 20042.5-2024质子交换膜燃料电池第5部分:膜电极测试方法
- 二零二五版瓷砖行业展会赞助合同3篇
- 2024泰州旅游行业员工劳动合同标准范本2篇
- 2024标的为800万元的物流服务合同
- 2025年度绿色节能产品展销会参展服务合同书3篇
- 二零二五年度高层管理人才派遣服务合同2篇
- 2025年度集装箱金融服务合同含融资与结算3篇
- 2024版纱窗订购合同范本
- 2025年度钢材企业兼并收购合同2篇
- 2024版担保个人借款协议
- 新能源行业市场分析报告
- 2025年高考历史复习之小题狂练300题(选择题):秦汉时期(20题)
- 钻机安全操作规程(3篇)
- 2025年产业园区运营与管理企业组织结构及部门职责
- 岩土工程勘察.课件
- 第五章 无土育苗技术
- 2022年7月2日江苏事业单位统考《综合知识和能力素质》(管理岗)
- 福建省福州三牧中学2024-2025学年七年级上学期期中生物试题(无答案)
- 2024统战工作总结
- 银行营业网点诈骗、冒领等突发事件应急预案
- 初一英语语法练习
评论
0/150
提交评论