




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
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,連續(xù)patch六個dll。6)打開hfss,彈出框框,無視繼續(xù)。依次點擊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、 數(shù)據(jù)的導出用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") ' 聲明變量與常數(shù).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向點坐標存入數(shù)組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向點坐標存入數(shù)組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、 用腳本導出近場數(shù)據(jù)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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 校園文化課件設計
- 2025蘇州購房合同樣本
- 車輛維修保修合同協(xié)議書
- 主題班會課件用語
- 分期新車合同協(xié)議書模板
- 線路占用合同協(xié)議書模板
- 發(fā)霉了說課課件
- 低出生體重兒的護理診斷
- 聯(lián)考機電試題及答案
- 主題班會課件分析
- 2025吉林省農村信用社員工招聘考試正式筆試歷年典型考題及考點剖析附帶答案詳解
- 電動車企業(yè)創(chuàng)業(yè)計劃書范文
- 2025年法律法規(guī)考試高分攻略試題及答案
- 2024-2025新入員工安全培訓考試試題及參考答案(達標題)
- 2025屆百師聯(lián)盟高三下學期二輪復習聯(lián)考(三)化學試題(含答案)
- 2025年內蒙古包頭市中考數(shù)學一模試卷
- 《鼻腔止血材料研究》課件
- 2025年上海市徐匯區(qū)初三二模語文試卷(含答案)
- 公司事故隱患內部報告獎勵機制
- 小升初語文真題專項訓練專題6+文學常識與名著閱讀(有解析)
- 物質安全數(shù)據(jù)表(MSDS)84消毒液
評論
0/150
提交評論