pyedb
Advanced tools
+1
-1
| Metadata-Version: 2.4 | ||
| Name: pyedb | ||
| Version: 0.68.1 | ||
| Version: 0.68.2 | ||
| Summary: Higher-Level Pythonic Ansys Electronics Data Base | ||
@@ -5,0 +5,0 @@ Author-email: "ANSYS, Inc." <pyansys.core@ansys.com> |
@@ -62,3 +62,3 @@ # Copyright (C) 2023 - 2026 ANSYS, Inc. and/or its affiliates. | ||
| pyedb_path = os.path.dirname(__file__) | ||
| __version__ = "0.68.1" | ||
| __version__ = "0.68.2" | ||
| version = __version__ | ||
@@ -65,0 +65,0 @@ |
@@ -34,7 +34,2 @@ # Copyright (C) 2023 - 2026 ANSYS, Inc. and/or its affiliates. | ||
| class PaddingData(CfgBase): | ||
| size: Union[float, str] | ||
| is_multiple: bool | ||
| from typing import Any, Optional | ||
@@ -46,2 +41,6 @@ | ||
| class CfgBoundaries(CfgBase): | ||
| class PaddingData(CfgBase): | ||
| size: Union[float, str] | ||
| is_multiple: bool | ||
| use_open_region: Optional[bool] = Field(default=None, description="Whether to enable the use of an open region") | ||
@@ -65,3 +64,3 @@ open_region_type: Optional[str] = Field( | ||
| ) | ||
| radiation_level: Optional[int] = Field( | ||
| radiation_level: Optional[float] = Field( | ||
| default=None, | ||
@@ -68,0 +67,0 @@ description=( |
@@ -30,5 +30,5 @@ # Copyright (C) 2023 - 2026 ANSYS, Inc. and/or its affiliates. | ||
| stop: float | str = Field(..., description="Stop frequency in Hz") | ||
| increment: int | str = Field("50Hz", validation_alias=AliasChoices("points", "samples", "step")) | ||
| increment: int | str = Field(..., validation_alias=AliasChoices("increment", "points", "samples", "step")) | ||
| distribution: Literal[ | ||
| "linear_step", "log_step", "single", "linear_count", "log_count", "linear scale", "log scale", "linear count" | ||
| "linear_scale", "log_scale", "single", "linear_count", "log_count", "linear scale", "log scale", "linear count" | ||
| ] = Field( | ||
@@ -39,22 +39,21 @@ ..., description="Frequency distribution type, e.g., linear_step, log_step, single, linear_count, log_count" | ||
| class CfgFrequencySweep(BaseModel): | ||
| class CfgSetupDC(BaseModel): | ||
| name: str | ||
| type: Literal["discrete", "interpolation"] | ||
| frequencies: list[CfgFrequencies | str] = Field(list(), description="List of frequency definitions or strings") | ||
| use_q3d_for_dc: bool = Field(False, description="Use Q3D for DC analysis. Only applicable for HFSS setup.") | ||
| compute_dc_point: bool = Field(False, description="AC/DC Merge checkbox in GUI.") | ||
| enforce_causality: bool = False | ||
| enforce_passivity: bool = True | ||
| adv_dc_extrapolation: bool = False | ||
| def add_frequencies(self, freq: CfgFrequencies): | ||
| self.frequencies.append(freq) | ||
| class CfgSetupAC(CfgSetupDC): | ||
| class CfgFrequencySweep(BaseModel): | ||
| name: str | ||
| type: Literal["discrete", "interpolation"] | ||
| frequencies: list[CfgFrequencies | str] = Field(list(), description="List of frequency definitions or strings") | ||
| use_q3d_for_dc: bool = Field(False, description="Use Q3D for DC analysis. Only applicable for HFSS setup.") | ||
| compute_dc_point: bool = Field(False, description="AC/DC Merge checkbox in GUI.") | ||
| enforce_causality: bool = False | ||
| enforce_passivity: bool = True | ||
| adv_dc_extrapolation: bool = False | ||
| class CfgSetupDC(BaseModel): | ||
| name: str | ||
| def add_frequencies(self, freq: CfgFrequencies): | ||
| self.frequencies.append(freq) | ||
| class CfgSetupAC(CfgSetupDC): | ||
| freq_sweep: list[CfgFrequencySweep] | None = list() | ||
@@ -61,0 +60,0 @@ |
@@ -241,2 +241,3 @@ # Copyright (C) 2023 - 2026 ANSYS, Inc. and/or its affiliates. | ||
| sweep.use_q3d_for_dc = sw.use_q3d_for_dc | ||
| sweep.compute_dc_point = sw.compute_dc_point | ||
@@ -279,3 +280,3 @@ sweep.enforce_causality = sw.enforce_causality | ||
| ) | ||
| else: # siwave ac | ||
| elif setup.type == "siwave_ac": # siwave ac | ||
| cfg_ac_setup = self.cfg_data.add_siwave_ac_setup( | ||
@@ -287,14 +288,17 @@ name=setup.name, | ||
| ) | ||
| else: | ||
| self._pedb.logger.warning(f"Unsupported setup type '{setup.type}'.") | ||
| continue | ||
| for name, sw in setup.sweeps.items(): | ||
| cfg_ac_setup.add_frequency_sweep( | ||
| { | ||
| "name": name, | ||
| "type": sw.type, | ||
| "frequencies": sw.frequency_string, | ||
| "compute_dc_point": sw.compute_dc_point, | ||
| "enforce_causality": sw.enforce_causality, | ||
| "enforce_passivity": sw.enforce_passivity, | ||
| "adv_dc_extrapolation": sw.adv_dc_extrapolation, | ||
| } | ||
| cfg_ac_setup.CfgFrequencySweep( | ||
| name=name, | ||
| type=sw.type, | ||
| frequencies=sw.frequency_string, | ||
| compute_dc_point=sw.compute_dc_point, | ||
| enforce_causality=sw.enforce_causality, | ||
| enforce_passivity=sw.enforce_passivity, | ||
| adv_dc_extrapolation=sw.adv_dc_extrapolation, | ||
| ) | ||
| ) | ||
@@ -354,3 +358,3 @@ | ||
| size, is_multiple = edb_hfss_extent_info.get_dielectric_extent() | ||
| boundaries.dielectric_extent_size = {"size": size, "is_multiple": is_multiple} | ||
| boundaries.dielectric_extent_size = boundaries.PaddingData(size=size, is_multiple=is_multiple) | ||
| boundaries.honor_user_dielectric = edb_hfss_extent_info.honor_user_dielectric | ||
@@ -360,7 +364,7 @@ boundaries.extent_type = edb_hfss_extent_info.extent_type | ||
| size, is_multiple = edb_hfss_extent_info.get_air_box_horizontal_extent() | ||
| boundaries.air_box_horizontal_extent = {"size": size, "is_multiple": is_multiple} | ||
| boundaries.air_box_horizontal_extent = boundaries.PaddingData(size=size, is_multiple=is_multiple) | ||
| size, is_multiple = edb_hfss_extent_info.get_air_box_positive_vertical_extent() | ||
| boundaries.air_box_positive_vertical_extent = {"size": size, "is_multiple": is_multiple} | ||
| boundaries.air_box_positive_vertical_extent = boundaries.PaddingData(size=size, is_multiple=is_multiple) | ||
| size, is_multiple = edb_hfss_extent_info.get_air_box_negative_vertical_extent() | ||
| boundaries.air_box_negative_vertical_extent = {"size": size, "is_multiple": is_multiple} | ||
| boundaries.air_box_negative_vertical_extent = boundaries.PaddingData(size=size, is_multiple=is_multiple) | ||
| boundaries.base_polygon = edb_hfss_extent_info.base_polygon | ||
@@ -367,0 +371,0 @@ boundaries.dielectric_base_polygon = edb_hfss_extent_info.dielectric_base_polygon |
@@ -682,2 +682,9 @@ # Copyright (C) 2023 - 2026 ANSYS, Inc. and/or its affiliates. | ||
| @dc_min_void_area_to_mesh.setter | ||
| def dc_min_void_area_to_mesh(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.DcMinVoidAreaToMesh = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @property | ||
@@ -693,2 +700,9 @@ def dc_min_plane_area_to_mesh(self): | ||
| @dc_min_plane_area_to_mesh.setter | ||
| def dc_min_plane_area_to_mesh(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.DcMinPlaneAreaToMesh = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @property | ||
@@ -704,2 +718,9 @@ def energy_error(self): | ||
| @energy_error.setter | ||
| def energy_error(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.EnergyError = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @property | ||
@@ -715,2 +736,9 @@ def max_init_mesh_edge_length(self): | ||
| @max_init_mesh_edge_length.setter | ||
| def max_init_mesh_edge_length(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.MaxInitMeshEdgeLength = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @property | ||
@@ -729,2 +757,6 @@ def max_num_pass(self): | ||
| @max_num_pass.setter | ||
| def max_num_pass(self, value): | ||
| self.max_num_passes = value | ||
| @property | ||
@@ -740,2 +772,9 @@ def max_num_passes(self): | ||
| @max_num_passes.setter | ||
| def max_num_passes(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.MaxNumPasses = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @property | ||
@@ -752,4 +791,8 @@ def min_num_pass(self): | ||
| warnings.warn("`min_num_pass` is deprecated. Use `min_num_passes` instead.", DeprecationWarning) | ||
| return self.sim_setup_info | ||
| return self.min_num_passes | ||
| @min_num_pass.setter | ||
| def min_num_pass(self, value): | ||
| self.min_num_passes = value | ||
| @property | ||
@@ -765,2 +808,9 @@ def min_num_passes(self): | ||
| @min_num_passes.setter | ||
| def min_num_passes(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.MinNumPasses = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @property | ||
@@ -776,2 +826,9 @@ def mesh_bondwires(self): | ||
| @mesh_bondwires.setter | ||
| def mesh_bondwires(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.MeshBws = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @property | ||
@@ -787,2 +844,9 @@ def mesh_vias(self): | ||
| @mesh_vias.setter | ||
| def mesh_vias(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.MeshVias = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @property | ||
@@ -801,2 +865,6 @@ def num_bondwire_sides(self): | ||
| @num_bondwire_sides.setter | ||
| def num_bondwire_sides(self, value): | ||
| self.num_bw_sides = value | ||
| @property | ||
@@ -812,2 +880,9 @@ def num_bw_sides(self): | ||
| @num_bw_sides.setter | ||
| def num_bw_sides(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.NumBwSides = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @property | ||
@@ -823,2 +898,9 @@ def num_via_sides(self): | ||
| @num_via_sides.setter | ||
| def num_via_sides(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.NumViaSides = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @property | ||
@@ -834,2 +916,9 @@ def percent_local_refinement(self): | ||
| @percent_local_refinement.setter | ||
| def percent_local_refinement(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.PercentLocalRefinement = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @property | ||
@@ -846,2 +935,9 @@ def perform_adaptive_refinement(self): | ||
| @perform_adaptive_refinement.setter | ||
| def perform_adaptive_refinement(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.PerformAdaptiveRefinement = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @property | ||
@@ -861,2 +957,6 @@ def refine_bondwires(self): | ||
| @refine_bondwires.setter | ||
| def refine_bondwires(self, value): | ||
| self.refine_bws = value | ||
| @property | ||
@@ -873,2 +973,9 @@ def refine_bws(self): | ||
| @refine_bws.setter | ||
| def refine_bws(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.RefineBws = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @property | ||
@@ -886,100 +993,2 @@ def refine_vias(self): | ||
| @dc_min_void_area_to_mesh.setter | ||
| def dc_min_void_area_to_mesh(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.DcMinVoidAreaToMesh = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @dc_min_plane_area_to_mesh.setter | ||
| def dc_min_plane_area_to_mesh(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.DcMinPlaneAreaToMesh = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @energy_error.setter | ||
| def energy_error(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.EnergyError = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @max_init_mesh_edge_length.setter | ||
| def max_init_mesh_edge_length(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.MaxInitMeshEdgeLength = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @max_num_pass.setter | ||
| def max_num_pass(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.MaxNumPasses = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @min_num_pass.setter | ||
| def min_num_pass(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.MinNumPasses = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @mesh_bondwires.setter | ||
| def mesh_bondwires(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.MeshBws = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @mesh_vias.setter | ||
| def mesh_vias(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.MeshVias = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @num_bondwire_sides.setter | ||
| def num_bondwire_sides(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.NumBwSides = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @num_via_sides.setter | ||
| def num_via_sides(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.NumViaSides = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @percent_local_refinement.setter | ||
| def percent_local_refinement(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.PercentLocalRefinement = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @perform_adaptive_refinement.setter | ||
| def perform_adaptive_refinement(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.PerformAdaptiveRefinement = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @refine_bondwires.setter | ||
| def refine_bondwires(self, value): | ||
| edb_setup_info = self.sim_setup_info | ||
| edb_setup_info.simulation_settings.DCAdvancedSettings.RefineBws = value | ||
| self._parent._edb_object = self._parent._set_edb_setup_info(edb_setup_info) | ||
| self._parent._update_setup() | ||
| @refine_vias.setter | ||
@@ -986,0 +995,0 @@ def refine_vias(self, value): |
@@ -31,7 +31,27 @@ # Copyright (C) 2023 - 2026 ANSYS, Inc. and/or its affiliates. | ||
| _setup_type_mapping = { | ||
| "kHFSS": "hfss", | ||
| "KPEM": "pem", | ||
| "KSiwave": "siwave", | ||
| "kSIWave": "siwave", | ||
| "kLNA": "lna", | ||
| "kTransient": "transient", | ||
| "kQEye": "quick_eye", | ||
| "kVEye": "verif_eye", | ||
| "kAMI": "ami", | ||
| "kAnalysisOption": "analysis_option", | ||
| "kSIWaveDCIR": "siwave_dc", | ||
| "kSIWaveEMI": "siwave_emi", | ||
| "kHFSSPI": "hfss_pi", | ||
| "kDDRwizard": "ddrwizard", | ||
| "kQ3D": "q3d", | ||
| } | ||
| class SimulationSetupType(Enum): | ||
| kHFSS = "hfss" | ||
| hfss = "hfss" | ||
| kPEM = None | ||
| kSIwave = "siwave_ac" | ||
| siwave = "siwave_ac" | ||
| kLNA = "lna" | ||
@@ -44,2 +64,3 @@ kTransient = "transient" | ||
| kSIwaveDCIR = "siwave_dc" | ||
| siwave_dc = "siwave_dc" | ||
| kSIwaveEMI = "siwave_emi" | ||
@@ -49,2 +70,3 @@ kHFSSPI = "hfss_pi" | ||
| kQ3D = "q3d" | ||
| unknown = "unknown" | ||
@@ -104,3 +126,6 @@ | ||
| def sim_setup_info(self): | ||
| return SimSetupInfo(self._pedb, sim_setup=self, edb_object=self._edb_object.GetSimSetupInfo()) | ||
| if hasattr(self._edb_object, "GetSimSetupInfo"): | ||
| return SimSetupInfo(self._pedb, sim_setup=self, edb_object=self._edb_object.GetSimSetupInfo()) | ||
| else: | ||
| return None | ||
@@ -138,6 +163,2 @@ def set_sim_setup_info(self, sim_setup_info): | ||
| @property | ||
| def setup_type(self): | ||
| return self.sim_setup_info.sim_setup_type | ||
| @property | ||
| def type(self): | ||
@@ -238,3 +259,3 @@ return SimulationSetupType[self.setup_type].value | ||
| """Type of the setup.""" | ||
| return self.sim_setup_info.sim_setup_type | ||
| return _setup_type_mapping.get(str(self._edb_object.GetType()), "unknown") | ||
@@ -249,3 +270,6 @@ @property | ||
| """List of frequency sweeps.""" | ||
| return {i.name: i for i in self.sim_setup_info.sweep_data_list} | ||
| if self.sim_setup_info: | ||
| return {i.name: i for i in self.sim_setup_info.sweep_data_list} | ||
| else: | ||
| return {} | ||
@@ -255,3 +279,6 @@ @property | ||
| """Adding property for compatibility with grpc.""" | ||
| return list(self.sweeps.values()) | ||
| if self.sim_setup_info: | ||
| return list(self.sweeps.values()) | ||
| else: | ||
| return [] | ||
@@ -258,0 +285,0 @@ @sweep_data.setter |
@@ -296,2 +296,3 @@ # Copyright (C) 2023 - 2026 ANSYS, Inc. and/or its affiliates. | ||
| use_ppe=use_ppe, | ||
| map_file=map_file, | ||
| technology_file=technology_file, | ||
@@ -298,0 +299,0 @@ control_file=control_file, |
@@ -602,3 +602,3 @@ # Copyright (C) 2023 - 2026 ANSYS, Inc. and/or its affiliates. | ||
| def multi_frequency_adaptive_solution(self) -> MultiFrequencyAdaptiveSolution: | ||
| return MultiFrequencyAdaptiveSolution(self._pedb, self.core) | ||
| return MultiFrequencyAdaptiveSolution(self._pedb, self.core.multi_frequency_adaptive_solution) | ||
@@ -605,0 +605,0 @@ @property |
@@ -190,3 +190,3 @@ # Copyright (C) 2023 - 2026 ANSYS, Inc. and/or its affiliates. | ||
| solver : str, optional | ||
| Simulation setup type ("hfss", "siwave", "siwave_dcir", "raptorx", "q3d"). | ||
| Simulation setup type ("hfss", "siwave", "siwave_dcir", "raptor_x", "q3d"). | ||
| distribution : str, optional | ||
@@ -193,0 +193,0 @@ Sweep distribution type ("linear", "linear_count", "decade_count", "octave_count", "exponential"). |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
4383325
0.04%103677
0.05%