oAnsoftApp = win32com.client.Dispatch('AnsoftHfss.HfssScriptInterface')oProject = oDesktop.GetActiveProject()oProject.InsertDesign("HFSS", "HFSSDesign2", "DrivenModal", "" )oDesign = oProject.SetActiveDesign("HFSSDesign2")oEditor = oDesign.SetActiveEditor("3D Modeler") "NAME:NativeBodyParameters", "FileType:=" , "UnRecognized", "ImportFreeSurfaces:=" , False, "GroupByAssembly:=" , True, "SourceFile:=" , "F:\\LPDA.stp" "Selections:=" , "top_element,top_element_1" "MaterialValue:=" , "\"pec\"", "IsMaterialEditable:=" , True, "UseMaterialAppearance:=", False "Selections:=" , "substrate" "MaterialValue:=" , "\"FR4_epoxy\"", "IsMaterialEditable:=" , True, "UseMaterialAppearance:=", FalseoEditor = oDesign.SetActiveEditor("3D Modeler") "NAME:RectangleParameters", "XStart:=" , "-1.67001336815218mm", "ZStart:=" , "915.17837372953mm", "Width:=" , "3.34002673630436mm", "Color:=" , "(143 175 143)", "PartCoordinateSystem:=", "Global", "MaterialValue:=" , "\"vacuum\"", "SurfaceMaterialValue:=", "\"\"", "IsMaterialEditable:=" , True, "UseMaterialAppearance:=", False "NAME:RectangleParameters", "XStart:=" , "1.67001336815218mm", "ZStart:=" , "10.0200802089131mm", "Width:=" , "-3.34002673630436mm", "Color:=" , "(143 175 143)", "PartCoordinateSystem:=", "Global", "MaterialValue:=" , "\"vacuum\"", "SurfaceMaterialValue:=", "\"\"", "IsMaterialEditable:=" , True, "UseMaterialAppearance:=", FalseoModule = oDesign.GetModule("BoundarySetup") "Objects:=" , ["Rectangle2"], "InfGroundPlane:=" , FalseoModule.AssignLumpedPort( "Objects:=" , ["Rectangle1"], "RenormalizeAllTerminals:=", True, "Start:=" , ["0mm","-3mm","915.17837372953mm"], "End:=" , ["0mm","3mm","915.17837372953mm"] "ShowReporterFilter:=" , False, "ReporterFilter:=" , [True], "Selections:=" , "mesh_assist"oModule = oDesign.GetModule("AnalysisSetup")oModule.InsertSetup("HfssDriven", "AdaptMultipleFreqs:=" , False, "Frequency:=" , "1.2GHz", "UseMatrixConv:=" , False, "MinimumConvergedPasses:=", 1, "PercentRefinement:=" , 30, "DoLambdaRefine:=" , True, "DoMaterialLambda:=" , True, "SetLambdaTarget:=" , False, "UseMaxTetIncrease:=" , False, "UseABCOnPort:=" , False, "SetPortMinMaxTri:=" , False, "UseIterativeSolver:=" , False, "SaveRadFieldsOnly:=" , False, "SaveAnyFields:=" , True, "IESolverType:=" , "Auto", "LambdaTargetForIESolver:=", 0.15, "UseDefaultLambdaTgtForIESolver:=", True, "RayDensityPerWavelength:=", 4, "MaxNumberOfBounces:=" , 5, "InfiniteSphereSetup:=" , -1, "SkipSBRSolveDuringAdaptivePasses:=", TrueoModule.InsertFrequencySweep("Setup1", "RangeType:=" , "LinearCount", "Type:=" , "Interpolating", "SaveRadFields:=" , False, "InterpTolerance:=" , 0.5, "InterpMaxSolns:=" , 250, "InterpMinSubranges:=" , 1, "InterpUsePortImped:=" , False, "InterpUsePropConst:=" , True, "UseDerivativeConvergence:=", False, "InterpDerivTolerance:=", 0.2, "EnforcePassivity:=" , True, "PassivityErrorTolerance:=", 0.0001oProject.SaveAs("F:\\PLPDA\\Project3.aedt", True) |