pyedb 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pyedb might be problematic. Click here for more details.
- pyedb/__init__.py +17 -0
- pyedb/dotnet/__init__.py +0 -0
- pyedb/dotnet/application/Variables.py +2261 -0
- pyedb/dotnet/application/__init__.py +0 -0
- pyedb/dotnet/clr_module.py +103 -0
- pyedb/dotnet/edb.py +4237 -0
- pyedb/dotnet/edb_core/__init__.py +1 -0
- pyedb/dotnet/edb_core/cell/__init__.py +0 -0
- pyedb/dotnet/edb_core/cell/hierarchy/__init__.py +0 -0
- pyedb/dotnet/edb_core/cell/hierarchy/model.py +66 -0
- pyedb/dotnet/edb_core/components.py +2669 -0
- pyedb/dotnet/edb_core/configuration.py +423 -0
- pyedb/dotnet/edb_core/definition/__init__.py +0 -0
- pyedb/dotnet/edb_core/definition/component_def.py +166 -0
- pyedb/dotnet/edb_core/definition/component_model.py +30 -0
- pyedb/dotnet/edb_core/definition/definition_obj.py +18 -0
- pyedb/dotnet/edb_core/definition/definitions.py +12 -0
- pyedb/dotnet/edb_core/dotnet/__init__.py +0 -0
- pyedb/dotnet/edb_core/dotnet/database.py +1218 -0
- pyedb/dotnet/edb_core/dotnet/layout.py +238 -0
- pyedb/dotnet/edb_core/dotnet/primitive.py +1517 -0
- pyedb/dotnet/edb_core/edb_data/__init__.py +0 -0
- pyedb/dotnet/edb_core/edb_data/components_data.py +938 -0
- pyedb/dotnet/edb_core/edb_data/connectable.py +113 -0
- pyedb/dotnet/edb_core/edb_data/control_file.py +1268 -0
- pyedb/dotnet/edb_core/edb_data/design_options.py +35 -0
- pyedb/dotnet/edb_core/edb_data/edbvalue.py +45 -0
- pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +330 -0
- pyedb/dotnet/edb_core/edb_data/hfss_simulation_setup_data.py +1607 -0
- pyedb/dotnet/edb_core/edb_data/layer_data.py +576 -0
- pyedb/dotnet/edb_core/edb_data/nets_data.py +281 -0
- pyedb/dotnet/edb_core/edb_data/obj_base.py +19 -0
- pyedb/dotnet/edb_core/edb_data/padstacks_data.py +2080 -0
- pyedb/dotnet/edb_core/edb_data/ports.py +287 -0
- pyedb/dotnet/edb_core/edb_data/primitives_data.py +1397 -0
- pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +2914 -0
- pyedb/dotnet/edb_core/edb_data/simulation_setup.py +716 -0
- pyedb/dotnet/edb_core/edb_data/siwave_simulation_setup_data.py +1205 -0
- pyedb/dotnet/edb_core/edb_data/sources.py +514 -0
- pyedb/dotnet/edb_core/edb_data/terminals.py +632 -0
- pyedb/dotnet/edb_core/edb_data/utilities.py +148 -0
- pyedb/dotnet/edb_core/edb_data/variables.py +91 -0
- pyedb/dotnet/edb_core/general.py +181 -0
- pyedb/dotnet/edb_core/hfss.py +1646 -0
- pyedb/dotnet/edb_core/layout.py +1244 -0
- pyedb/dotnet/edb_core/layout_validation.py +272 -0
- pyedb/dotnet/edb_core/materials.py +939 -0
- pyedb/dotnet/edb_core/net_class.py +335 -0
- pyedb/dotnet/edb_core/nets.py +1215 -0
- pyedb/dotnet/edb_core/padstack.py +1389 -0
- pyedb/dotnet/edb_core/siwave.py +1427 -0
- pyedb/dotnet/edb_core/stackup.py +2703 -0
- pyedb/edb_logger.py +396 -0
- pyedb/generic/__init__.py +0 -0
- pyedb/generic/constants.py +1063 -0
- pyedb/generic/data_handlers.py +320 -0
- pyedb/generic/design_types.py +104 -0
- pyedb/generic/filesystem.py +150 -0
- pyedb/generic/general_methods.py +1535 -0
- pyedb/generic/plot.py +1840 -0
- pyedb/generic/process.py +285 -0
- pyedb/generic/settings.py +224 -0
- pyedb/ipc2581/__init__.py +0 -0
- pyedb/ipc2581/bom/__init__.py +0 -0
- pyedb/ipc2581/bom/bom.py +21 -0
- pyedb/ipc2581/bom/bom_item.py +32 -0
- pyedb/ipc2581/bom/characteristics.py +37 -0
- pyedb/ipc2581/bom/refdes.py +16 -0
- pyedb/ipc2581/content/__init__.py +0 -0
- pyedb/ipc2581/content/color.py +38 -0
- pyedb/ipc2581/content/content.py +55 -0
- pyedb/ipc2581/content/dictionary_color.py +29 -0
- pyedb/ipc2581/content/dictionary_fill.py +28 -0
- pyedb/ipc2581/content/dictionary_line.py +30 -0
- pyedb/ipc2581/content/entry_color.py +13 -0
- pyedb/ipc2581/content/entry_line.py +14 -0
- pyedb/ipc2581/content/fill.py +15 -0
- pyedb/ipc2581/content/layer_ref.py +10 -0
- pyedb/ipc2581/content/standard_geometries_dictionary.py +72 -0
- pyedb/ipc2581/ecad/__init__.py +0 -0
- pyedb/ipc2581/ecad/cad_data/__init__.py +0 -0
- pyedb/ipc2581/ecad/cad_data/assembly_drawing.py +26 -0
- pyedb/ipc2581/ecad/cad_data/cad_data.py +37 -0
- pyedb/ipc2581/ecad/cad_data/component.py +41 -0
- pyedb/ipc2581/ecad/cad_data/drill.py +30 -0
- pyedb/ipc2581/ecad/cad_data/feature.py +54 -0
- pyedb/ipc2581/ecad/cad_data/layer.py +41 -0
- pyedb/ipc2581/ecad/cad_data/layer_feature.py +151 -0
- pyedb/ipc2581/ecad/cad_data/logical_net.py +32 -0
- pyedb/ipc2581/ecad/cad_data/outline.py +25 -0
- pyedb/ipc2581/ecad/cad_data/package.py +104 -0
- pyedb/ipc2581/ecad/cad_data/padstack_def.py +38 -0
- pyedb/ipc2581/ecad/cad_data/padstack_hole_def.py +24 -0
- pyedb/ipc2581/ecad/cad_data/padstack_instance.py +62 -0
- pyedb/ipc2581/ecad/cad_data/padstack_pad_def.py +26 -0
- pyedb/ipc2581/ecad/cad_data/path.py +89 -0
- pyedb/ipc2581/ecad/cad_data/phy_net.py +80 -0
- pyedb/ipc2581/ecad/cad_data/pin.py +31 -0
- pyedb/ipc2581/ecad/cad_data/polygon.py +169 -0
- pyedb/ipc2581/ecad/cad_data/profile.py +40 -0
- pyedb/ipc2581/ecad/cad_data/stackup.py +31 -0
- pyedb/ipc2581/ecad/cad_data/stackup_group.py +42 -0
- pyedb/ipc2581/ecad/cad_data/stackup_layer.py +21 -0
- pyedb/ipc2581/ecad/cad_data/step.py +275 -0
- pyedb/ipc2581/ecad/cad_header.py +33 -0
- pyedb/ipc2581/ecad/ecad.py +19 -0
- pyedb/ipc2581/ecad/spec.py +46 -0
- pyedb/ipc2581/history_record.py +37 -0
- pyedb/ipc2581/ipc2581.py +387 -0
- pyedb/ipc2581/logistic_header.py +25 -0
- pyedb/misc/__init__.py +0 -0
- pyedb/misc/aedtlib_personalib_install.py +14 -0
- pyedb/misc/downloads.py +322 -0
- pyedb/misc/misc.py +67 -0
- pyedb/misc/pyedb.runtimeconfig.json +13 -0
- pyedb/misc/siw_feature_config/__init__.py +0 -0
- pyedb/misc/siw_feature_config/emc/__init__.py +0 -0
- pyedb/misc/siw_feature_config/emc/component_tags.py +46 -0
- pyedb/misc/siw_feature_config/emc/net_tags.py +37 -0
- pyedb/misc/siw_feature_config/emc/tag_library.py +62 -0
- pyedb/misc/siw_feature_config/emc/xml_generic.py +78 -0
- pyedb/misc/siw_feature_config/emc_rule_checker_settings.py +179 -0
- pyedb/misc/utilities.py +27 -0
- pyedb/modeler/geometry_operators.py +2082 -0
- pyedb-0.2.0.dist-info/LICENSE +21 -0
- pyedb-0.2.0.dist-info/METADATA +208 -0
- pyedb-0.2.0.dist-info/RECORD +128 -0
- pyedb-0.2.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,1607 @@
|
|
|
1
|
+
from pyedb.dotnet.clr_module import Tuple
|
|
2
|
+
from pyedb.dotnet.edb_core.edb_data.simulation_setup import (
|
|
3
|
+
BaseSimulationSetup,
|
|
4
|
+
EdbFrequencySweep,
|
|
5
|
+
)
|
|
6
|
+
from pyedb.dotnet.edb_core.general import convert_py_list_to_net_list
|
|
7
|
+
from pyedb.generic.general_methods import generate_unique_name, pyedb_function_handler
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MeshOperation(object):
|
|
11
|
+
"""Mesh Operation Class."""
|
|
12
|
+
|
|
13
|
+
def __init__(self, parent, mesh_operation):
|
|
14
|
+
self._parent = parent
|
|
15
|
+
self.mesh_operation = mesh_operation
|
|
16
|
+
self._mesh_op_mapping = {
|
|
17
|
+
"kMeshSetupBase": mesh_operation.TMeshOpType.kMeshSetupBase,
|
|
18
|
+
"kMeshSetupLength": mesh_operation.TMeshOpType.kMeshSetupLength,
|
|
19
|
+
"kMeshSetupSkinDepth": mesh_operation.TMeshOpType.kMeshSetupSkinDepth,
|
|
20
|
+
"kNumMeshOpTypes": mesh_operation.TMeshOpType.kNumMeshOpTypes,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@property
|
|
24
|
+
def enabled(self):
|
|
25
|
+
"""Whether if mesh operation is enabled.
|
|
26
|
+
|
|
27
|
+
Returns
|
|
28
|
+
-------
|
|
29
|
+
bool
|
|
30
|
+
``True`` if mesh operation is used, ``False`` otherwise.
|
|
31
|
+
"""
|
|
32
|
+
return self.mesh_operation.Enabled
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
def mesh_operation_type(self):
|
|
36
|
+
"""Mesh operation type.
|
|
37
|
+
Options:
|
|
38
|
+
0- ``kMeshSetupBase``
|
|
39
|
+
1- ``kMeshSetupLength``
|
|
40
|
+
2- ``kMeshSetupSkinDepth``
|
|
41
|
+
3- ``kNumMeshOpTypes``.
|
|
42
|
+
|
|
43
|
+
Returns
|
|
44
|
+
-------
|
|
45
|
+
int
|
|
46
|
+
"""
|
|
47
|
+
return self.mesh_operation.MeshOpType.ToString()
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def mesh_region(self):
|
|
51
|
+
"""Mesh region name.
|
|
52
|
+
|
|
53
|
+
Returns
|
|
54
|
+
-------
|
|
55
|
+
str
|
|
56
|
+
Name of the mesh region.
|
|
57
|
+
"""
|
|
58
|
+
return self.mesh_operation.MeshRegion
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def name(self):
|
|
62
|
+
"""Mesh operation name.
|
|
63
|
+
|
|
64
|
+
Returns
|
|
65
|
+
-------
|
|
66
|
+
str
|
|
67
|
+
"""
|
|
68
|
+
return self.mesh_operation.Name
|
|
69
|
+
|
|
70
|
+
@property
|
|
71
|
+
def nets_layers_list(self):
|
|
72
|
+
"""List of nets and layers.
|
|
73
|
+
|
|
74
|
+
Returns
|
|
75
|
+
-------
|
|
76
|
+
list
|
|
77
|
+
List of lists with three elements. Each list must contain:
|
|
78
|
+
1- net name
|
|
79
|
+
2- layer name
|
|
80
|
+
3- bool.
|
|
81
|
+
Third element is represents whether if the mesh operation is enabled or disabled.
|
|
82
|
+
|
|
83
|
+
"""
|
|
84
|
+
return self.mesh_operation.NetsLayersList
|
|
85
|
+
|
|
86
|
+
@nets_layers_list.setter
|
|
87
|
+
def nets_layers_list(self, values):
|
|
88
|
+
temp = []
|
|
89
|
+
for net, layers in values.items():
|
|
90
|
+
for layer in layers:
|
|
91
|
+
temp.append(Tuple[str, str, bool](net, layer, True))
|
|
92
|
+
self.mesh_operation.NetsLayersList = convert_py_list_to_net_list(temp)
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def refine_inside(self):
|
|
96
|
+
"""Whether to turn on refine inside objects.
|
|
97
|
+
|
|
98
|
+
Returns
|
|
99
|
+
-------
|
|
100
|
+
bool
|
|
101
|
+
``True`` if refine inside objects is used, ``False`` otherwise.
|
|
102
|
+
|
|
103
|
+
"""
|
|
104
|
+
return self.mesh_operation.RefineInside
|
|
105
|
+
|
|
106
|
+
@enabled.setter
|
|
107
|
+
def enabled(self, value):
|
|
108
|
+
self.mesh_operation.Enabled = value
|
|
109
|
+
self._parent._update_setup()
|
|
110
|
+
|
|
111
|
+
@mesh_region.setter
|
|
112
|
+
def mesh_region(self, value):
|
|
113
|
+
self.mesh_operation.MeshRegion = value
|
|
114
|
+
self._parent._update_setup()
|
|
115
|
+
|
|
116
|
+
@name.setter
|
|
117
|
+
def name(self, value):
|
|
118
|
+
self.mesh_operation.Name = value
|
|
119
|
+
self._parent._update_setup()
|
|
120
|
+
|
|
121
|
+
@refine_inside.setter
|
|
122
|
+
def refine_inside(self, value):
|
|
123
|
+
self.mesh_operation.RefineInside = value
|
|
124
|
+
self._parent._update_setup()
|
|
125
|
+
|
|
126
|
+
@property
|
|
127
|
+
def max_elements(self):
|
|
128
|
+
"""Maximum number of elements.
|
|
129
|
+
|
|
130
|
+
Returns
|
|
131
|
+
-------
|
|
132
|
+
str
|
|
133
|
+
"""
|
|
134
|
+
return self.mesh_operation.MaxElems
|
|
135
|
+
|
|
136
|
+
@property
|
|
137
|
+
def restrict_max_elements(self):
|
|
138
|
+
"""Whether to restrict maximum number of elements.
|
|
139
|
+
|
|
140
|
+
Returns
|
|
141
|
+
-------
|
|
142
|
+
bool
|
|
143
|
+
"""
|
|
144
|
+
return self.mesh_operation.RestrictMaxElem
|
|
145
|
+
|
|
146
|
+
@max_elements.setter
|
|
147
|
+
def max_elements(self, value):
|
|
148
|
+
self.mesh_operation.MaxElems = str(value)
|
|
149
|
+
self._parent._update_setup()
|
|
150
|
+
|
|
151
|
+
@restrict_max_elements.setter
|
|
152
|
+
def restrict_max_elements(self, value):
|
|
153
|
+
"""Whether to restrict maximum number of elements.
|
|
154
|
+
|
|
155
|
+
Returns
|
|
156
|
+
-------
|
|
157
|
+
bool
|
|
158
|
+
"""
|
|
159
|
+
self.mesh_operation.RestrictMaxElem = value
|
|
160
|
+
self._parent._update_setup()
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
class MeshOperationLength(MeshOperation, object):
|
|
164
|
+
"""Mesh operation Length class.
|
|
165
|
+
This class is accessible from Hfss Setup in EDB and add_length_mesh_operation method.
|
|
166
|
+
|
|
167
|
+
Examples
|
|
168
|
+
--------
|
|
169
|
+
>>> mop = edbapp.setups["setup1a"].add_length_mesh_operation({"GND": ["TOP", "BOTTOM"]})
|
|
170
|
+
>>> mop.max_elements = 3000
|
|
171
|
+
"""
|
|
172
|
+
|
|
173
|
+
def __init__(self, parent, mesh_operation):
|
|
174
|
+
MeshOperation.__init__(self, parent, mesh_operation)
|
|
175
|
+
|
|
176
|
+
@property
|
|
177
|
+
def max_length(self):
|
|
178
|
+
"""Maximum length of elements.
|
|
179
|
+
|
|
180
|
+
Returns
|
|
181
|
+
-------
|
|
182
|
+
str
|
|
183
|
+
"""
|
|
184
|
+
return self.mesh_operation.MaxLength
|
|
185
|
+
|
|
186
|
+
@property
|
|
187
|
+
def restrict_length(self):
|
|
188
|
+
"""Whether to restrict length of elements.
|
|
189
|
+
|
|
190
|
+
Returns
|
|
191
|
+
-------
|
|
192
|
+
bool
|
|
193
|
+
"""
|
|
194
|
+
return self.mesh_operation.RestrictLength
|
|
195
|
+
|
|
196
|
+
@max_length.setter
|
|
197
|
+
def max_length(self, value):
|
|
198
|
+
self.mesh_operation.MaxLength = value
|
|
199
|
+
self._parent._update_setup()
|
|
200
|
+
|
|
201
|
+
@restrict_length.setter
|
|
202
|
+
def restrict_length(self, value):
|
|
203
|
+
"""Whether to restrict length of elements.
|
|
204
|
+
|
|
205
|
+
Returns
|
|
206
|
+
-------
|
|
207
|
+
bool
|
|
208
|
+
"""
|
|
209
|
+
self.mesh_operation.RestrictLength = value
|
|
210
|
+
self._parent._update_setup()
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
class MeshOperationSkinDepth(MeshOperation, object):
|
|
214
|
+
"""Mesh operation Skin Depth class.
|
|
215
|
+
This class is accessible from Hfss Setup in EDB and assign_skin_depth_mesh_operation method.
|
|
216
|
+
|
|
217
|
+
Examples
|
|
218
|
+
--------
|
|
219
|
+
>>> mop = edbapp.setups["setup1a"].add_skin_depth_mesh_operation({"GND": ["TOP", "BOTTOM"]})
|
|
220
|
+
>>> mop.max_elements = 3000
|
|
221
|
+
"""
|
|
222
|
+
|
|
223
|
+
def __init__(self, parent, mesh_operation):
|
|
224
|
+
MeshOperation.__init__(self, parent, mesh_operation)
|
|
225
|
+
|
|
226
|
+
@property
|
|
227
|
+
def skin_depth(self):
|
|
228
|
+
"""Skin depth value.
|
|
229
|
+
|
|
230
|
+
Returns
|
|
231
|
+
-------
|
|
232
|
+
str
|
|
233
|
+
"""
|
|
234
|
+
return self.mesh_operation.SkinDepth
|
|
235
|
+
|
|
236
|
+
@skin_depth.setter
|
|
237
|
+
def skin_depth(self, value):
|
|
238
|
+
self.mesh_operation.SkinDepth = value
|
|
239
|
+
self._parent._update_setup()
|
|
240
|
+
|
|
241
|
+
@property
|
|
242
|
+
def surface_triangle_length(self):
|
|
243
|
+
"""Surface triangle length value.
|
|
244
|
+
|
|
245
|
+
Returns
|
|
246
|
+
-------
|
|
247
|
+
str
|
|
248
|
+
"""
|
|
249
|
+
return self.mesh_operation.SurfTriLength
|
|
250
|
+
|
|
251
|
+
@surface_triangle_length.setter
|
|
252
|
+
def surface_triangle_length(self, value):
|
|
253
|
+
self.mesh_operation.SurfTriLength = value
|
|
254
|
+
self._parent._update_setup()
|
|
255
|
+
|
|
256
|
+
@property
|
|
257
|
+
def number_of_layer_elements(self):
|
|
258
|
+
"""Number of layer elements.
|
|
259
|
+
|
|
260
|
+
Returns
|
|
261
|
+
-------
|
|
262
|
+
str
|
|
263
|
+
"""
|
|
264
|
+
return self.mesh_operation.NumLayers
|
|
265
|
+
|
|
266
|
+
@number_of_layer_elements.setter
|
|
267
|
+
def number_of_layer_elements(self, value):
|
|
268
|
+
self.mesh_operation.NumLayers = str(value)
|
|
269
|
+
self._parent._update_setup()
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
class HfssPortSettings(object):
|
|
273
|
+
"""Manages EDB methods for HFSS port settings."""
|
|
274
|
+
|
|
275
|
+
def __init__(self, parent):
|
|
276
|
+
self._parent = parent
|
|
277
|
+
|
|
278
|
+
@property
|
|
279
|
+
def _hfss_port_settings(self):
|
|
280
|
+
return self._parent.get_sim_setup_info.SimulationSettings.HFSSPortSettings
|
|
281
|
+
|
|
282
|
+
@property
|
|
283
|
+
def max_delta_z0(self):
|
|
284
|
+
"""Maximum change to Z0 in successive passes.
|
|
285
|
+
|
|
286
|
+
Returns
|
|
287
|
+
-------
|
|
288
|
+
float
|
|
289
|
+
"""
|
|
290
|
+
return self._hfss_port_settings.MaxDeltaZ0
|
|
291
|
+
|
|
292
|
+
@max_delta_z0.setter
|
|
293
|
+
def max_delta_z0(self, value):
|
|
294
|
+
self._hfss_port_settings.MaxDeltaZ0 = value
|
|
295
|
+
self._parent._update_setup()
|
|
296
|
+
|
|
297
|
+
@property
|
|
298
|
+
def max_triangles_wave_port(self):
|
|
299
|
+
"""Maximum number of triangles allowed for wave ports.
|
|
300
|
+
|
|
301
|
+
Returns
|
|
302
|
+
-------
|
|
303
|
+
int
|
|
304
|
+
"""
|
|
305
|
+
return self._hfss_port_settings.MaxTrianglesWavePort
|
|
306
|
+
|
|
307
|
+
@max_triangles_wave_port.setter
|
|
308
|
+
def max_triangles_wave_port(self, value):
|
|
309
|
+
self._hfss_port_settings.MaxTrianglesWavePort = value
|
|
310
|
+
self._parent._update_setup()
|
|
311
|
+
|
|
312
|
+
@property
|
|
313
|
+
def min_triangles_wave_port(self):
|
|
314
|
+
"""Minimum number of triangles allowed for wave ports.
|
|
315
|
+
|
|
316
|
+
Returns
|
|
317
|
+
-------
|
|
318
|
+
int
|
|
319
|
+
"""
|
|
320
|
+
return self._hfss_port_settings.MinTrianglesWavePort
|
|
321
|
+
|
|
322
|
+
@min_triangles_wave_port.setter
|
|
323
|
+
def min_triangles_wave_port(self, value):
|
|
324
|
+
self._hfss_port_settings.MinTrianglesWavePort = value
|
|
325
|
+
self._parent._update_setup()
|
|
326
|
+
|
|
327
|
+
@property
|
|
328
|
+
def enable_set_triangles_wave_port(self):
|
|
329
|
+
"""Whether to enable setting of minimum and maximum mesh limits for wave ports.
|
|
330
|
+
|
|
331
|
+
Returns
|
|
332
|
+
-------
|
|
333
|
+
bool
|
|
334
|
+
``True`` if triangles wave port is used, ``False`` otherwise.
|
|
335
|
+
"""
|
|
336
|
+
return self._hfss_port_settings.SetTrianglesWavePort
|
|
337
|
+
|
|
338
|
+
@enable_set_triangles_wave_port.setter
|
|
339
|
+
def enable_set_triangles_wave_port(self, value):
|
|
340
|
+
self._hfss_port_settings.SetTrianglesWavePort = value
|
|
341
|
+
self._parent._update_setup()
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
class HfssSolverSettings(object):
|
|
345
|
+
"""Manages EDB methods for HFSS solver settings."""
|
|
346
|
+
|
|
347
|
+
def __init__(self, sim_setup):
|
|
348
|
+
self._parent = sim_setup
|
|
349
|
+
|
|
350
|
+
@property
|
|
351
|
+
def _hfss_solver_settings(self):
|
|
352
|
+
return self._parent.get_sim_setup_info.SimulationSettings.HFSSSolverSettings
|
|
353
|
+
|
|
354
|
+
@property
|
|
355
|
+
def enhanced_low_freq_accuracy(self):
|
|
356
|
+
"""Whether to enable legacy low-frequency sampling.
|
|
357
|
+
|
|
358
|
+
Returns
|
|
359
|
+
-------
|
|
360
|
+
bool
|
|
361
|
+
``True`` if low frequency accuracy is used, ``False`` otherwise.
|
|
362
|
+
"""
|
|
363
|
+
return self._hfss_solver_settings.EnhancedLowFreqAccuracy
|
|
364
|
+
|
|
365
|
+
@enhanced_low_freq_accuracy.setter
|
|
366
|
+
def enhanced_low_freq_accuracy(self, value):
|
|
367
|
+
self._hfss_solver_settings.EnhancedLowFreqAccuracy = value
|
|
368
|
+
self._parent._update_setup()
|
|
369
|
+
|
|
370
|
+
@property
|
|
371
|
+
def order_basis(self):
|
|
372
|
+
"""Order of the basic functions for HFSS.
|
|
373
|
+
- 0=Zero.
|
|
374
|
+
- 1=1st order.
|
|
375
|
+
- 2=2nd order.
|
|
376
|
+
- 3=Mixed.
|
|
377
|
+
|
|
378
|
+
Returns
|
|
379
|
+
-------
|
|
380
|
+
int
|
|
381
|
+
Integer value according to the description."""
|
|
382
|
+
mapping = {0: "zero", 1: "first", 2: "second", 3: "mixed"}
|
|
383
|
+
return mapping[self._hfss_solver_settings.OrderBasis]
|
|
384
|
+
|
|
385
|
+
@order_basis.setter
|
|
386
|
+
def order_basis(self, value):
|
|
387
|
+
mapping = {"zero": 0, "first": 1, "second": 2, "mixed": 3}
|
|
388
|
+
self._hfss_solver_settings.OrderBasis = mapping[value]
|
|
389
|
+
self._parent._update_setup()
|
|
390
|
+
|
|
391
|
+
@property
|
|
392
|
+
def relative_residual(self):
|
|
393
|
+
"""Residual for use by the iterative solver.
|
|
394
|
+
|
|
395
|
+
Returns
|
|
396
|
+
-------
|
|
397
|
+
float
|
|
398
|
+
"""
|
|
399
|
+
return self._hfss_solver_settings.RelativeResidual
|
|
400
|
+
|
|
401
|
+
@relative_residual.setter
|
|
402
|
+
def relative_residual(self, value):
|
|
403
|
+
self._hfss_solver_settings.RelativeResidual = value
|
|
404
|
+
self._parent._update_setup()
|
|
405
|
+
|
|
406
|
+
@property
|
|
407
|
+
def solver_type(self):
|
|
408
|
+
"""Get solver type to use (Direct/Iterative/Auto) for HFSS.
|
|
409
|
+
Options:
|
|
410
|
+
1- ``kAutoSolver``.
|
|
411
|
+
2- ``kDirectSolver``.
|
|
412
|
+
3- ``kIterativeSolver``.
|
|
413
|
+
4- ``kNumSolverTypes``.
|
|
414
|
+
|
|
415
|
+
Returns
|
|
416
|
+
-------
|
|
417
|
+
str
|
|
418
|
+
"""
|
|
419
|
+
mapping = {"kAutoSolver": "auto", "kDirectSolver": "direct", "kIterativeSolver": "iterative"}
|
|
420
|
+
solver_type = self._hfss_solver_settings.SolverType.ToString()
|
|
421
|
+
return mapping[solver_type]
|
|
422
|
+
|
|
423
|
+
@solver_type.setter
|
|
424
|
+
def solver_type(self, value):
|
|
425
|
+
mapping = {
|
|
426
|
+
"auto": self._hfss_solver_settings.SolverType.kAutoSolver,
|
|
427
|
+
"direct": self._hfss_solver_settings.SolverType.kDirectSolver,
|
|
428
|
+
"iterative": self._hfss_solver_settings.SolverType.kIterativeSolver,
|
|
429
|
+
}
|
|
430
|
+
self._hfss_solver_settings.SolverType = mapping[value]
|
|
431
|
+
self._parent._update_setup()
|
|
432
|
+
|
|
433
|
+
@property
|
|
434
|
+
def use_shell_elements(self):
|
|
435
|
+
"""Whether to enable use of shell elements.
|
|
436
|
+
|
|
437
|
+
Returns
|
|
438
|
+
-------
|
|
439
|
+
bool
|
|
440
|
+
``True`` if shall elements are used, ``False`` otherwise.
|
|
441
|
+
"""
|
|
442
|
+
return self._hfss_solver_settings.UseShellElements
|
|
443
|
+
|
|
444
|
+
@use_shell_elements.setter
|
|
445
|
+
def use_shell_elements(self, value):
|
|
446
|
+
self._hfss_solver_settings.UseShellElements = value
|
|
447
|
+
self._parent._update_setup()
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
class AdaptiveFrequencyData(object):
|
|
451
|
+
"""Manages EDB methods for adaptive frequency data."""
|
|
452
|
+
|
|
453
|
+
def __init__(self, adaptive_frequency_data):
|
|
454
|
+
self._adaptive_frequency_data = adaptive_frequency_data
|
|
455
|
+
|
|
456
|
+
@property
|
|
457
|
+
def adaptive_frequency(self):
|
|
458
|
+
"""Adaptive frequency for the setup.
|
|
459
|
+
|
|
460
|
+
Returns
|
|
461
|
+
-------
|
|
462
|
+
str
|
|
463
|
+
Frequency with units.
|
|
464
|
+
"""
|
|
465
|
+
return self._adaptive_frequency_data.AdaptiveFrequency
|
|
466
|
+
|
|
467
|
+
@adaptive_frequency.setter
|
|
468
|
+
def adaptive_frequency(self, value):
|
|
469
|
+
self._adaptive_frequency_data.AdaptiveFrequency = value
|
|
470
|
+
|
|
471
|
+
@property
|
|
472
|
+
def max_delta(self):
|
|
473
|
+
"""Maximum change of S-parameters between two consecutive passes, which serves as
|
|
474
|
+
a stopping criterion.
|
|
475
|
+
|
|
476
|
+
Returns
|
|
477
|
+
-------
|
|
478
|
+
str
|
|
479
|
+
"""
|
|
480
|
+
return self._adaptive_frequency_data.MaxDelta
|
|
481
|
+
|
|
482
|
+
@max_delta.setter
|
|
483
|
+
def max_delta(self, value):
|
|
484
|
+
self._adaptive_frequency_data.MaxDelta = str(value)
|
|
485
|
+
|
|
486
|
+
@property
|
|
487
|
+
def max_passes(self):
|
|
488
|
+
"""Maximum allowed number of mesh refinement cycles.
|
|
489
|
+
|
|
490
|
+
Returns
|
|
491
|
+
-------
|
|
492
|
+
int
|
|
493
|
+
"""
|
|
494
|
+
return self._adaptive_frequency_data.MaxPasses
|
|
495
|
+
|
|
496
|
+
@max_passes.setter
|
|
497
|
+
def max_passes(self, value):
|
|
498
|
+
self._adaptive_frequency_data.MaxPasses = value
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
class AdaptiveSettings(object):
|
|
502
|
+
"""Manages EDB methods for adaptive settings."""
|
|
503
|
+
|
|
504
|
+
def __init__(self, parent):
|
|
505
|
+
self._parent = parent
|
|
506
|
+
self._adapt_type_mapping = {
|
|
507
|
+
"kSingle": self.adaptive_settings.AdaptType.kSingle,
|
|
508
|
+
"kMultiFrequencies": self.adaptive_settings.AdaptType.kMultiFrequencies,
|
|
509
|
+
"kBroadband": self.adaptive_settings.AdaptType.kBroadband,
|
|
510
|
+
"kNumAdaptTypes": self.adaptive_settings.AdaptType.kNumAdaptTypes,
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
@property
|
|
514
|
+
def adaptive_settings(self):
|
|
515
|
+
"""Adaptive EDB settings.
|
|
516
|
+
|
|
517
|
+
Returns
|
|
518
|
+
-------
|
|
519
|
+
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.AdaptiveSettings`
|
|
520
|
+
"""
|
|
521
|
+
return self._parent.get_sim_setup_info.SimulationSettings.AdaptiveSettings
|
|
522
|
+
|
|
523
|
+
@property
|
|
524
|
+
def adaptive_frequency_data_list(self):
|
|
525
|
+
"""List of all adaptive frequency data.
|
|
526
|
+
|
|
527
|
+
Returns
|
|
528
|
+
-------
|
|
529
|
+
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.AdaptiveFrequencyData`
|
|
530
|
+
"""
|
|
531
|
+
return [AdaptiveFrequencyData(i) for i in list(self.adaptive_settings.AdaptiveFrequencyDataList)]
|
|
532
|
+
|
|
533
|
+
@property
|
|
534
|
+
def adapt_type(self):
|
|
535
|
+
"""Adaptive type.
|
|
536
|
+
Options:
|
|
537
|
+
1- ``kSingle``.
|
|
538
|
+
2- ``kMultiFrequencies``.
|
|
539
|
+
3- ``kBroadband``.
|
|
540
|
+
4- ``kNumAdaptTypes``.
|
|
541
|
+
|
|
542
|
+
Returns
|
|
543
|
+
-------
|
|
544
|
+
str
|
|
545
|
+
"""
|
|
546
|
+
return self.adaptive_settings.AdaptType.ToString()
|
|
547
|
+
|
|
548
|
+
@adapt_type.setter
|
|
549
|
+
def adapt_type(self, value):
|
|
550
|
+
self.adaptive_settings.AdaptType = self._adapt_type_mapping[value]
|
|
551
|
+
self._parent._update_setup()
|
|
552
|
+
|
|
553
|
+
@property
|
|
554
|
+
def basic(self):
|
|
555
|
+
"""Whether if turn on basic adaptive.
|
|
556
|
+
|
|
557
|
+
Returns
|
|
558
|
+
-------
|
|
559
|
+
``True`` if basic adaptive is used, ``False`` otherwise.
|
|
560
|
+
"""
|
|
561
|
+
return self.adaptive_settings.Basic
|
|
562
|
+
|
|
563
|
+
@basic.setter
|
|
564
|
+
def basic(self, value):
|
|
565
|
+
self.adaptive_settings.Basic = value
|
|
566
|
+
self._parent._update_setup()
|
|
567
|
+
|
|
568
|
+
@property
|
|
569
|
+
def do_adaptive(self):
|
|
570
|
+
"""Whether if adaptive mesh is on.
|
|
571
|
+
|
|
572
|
+
Returns
|
|
573
|
+
-------
|
|
574
|
+
bool
|
|
575
|
+
``True`` if adaptive is used, ``False`` otherwise.
|
|
576
|
+
|
|
577
|
+
"""
|
|
578
|
+
return self.adaptive_settings.DoAdaptive
|
|
579
|
+
|
|
580
|
+
@property
|
|
581
|
+
def max_refinement(self):
|
|
582
|
+
"""Maximum number of mesh elements to be added per pass.
|
|
583
|
+
|
|
584
|
+
Returns
|
|
585
|
+
-------
|
|
586
|
+
int
|
|
587
|
+
"""
|
|
588
|
+
return self.adaptive_settings.MaxRefinement
|
|
589
|
+
|
|
590
|
+
@max_refinement.setter
|
|
591
|
+
def max_refinement(self, value):
|
|
592
|
+
self.adaptive_settings.MaxRefinement = value
|
|
593
|
+
self._parent._update_setup()
|
|
594
|
+
|
|
595
|
+
@property
|
|
596
|
+
def max_refine_per_pass(self):
|
|
597
|
+
"""Maximum number of mesh elementat that can be added during an adaptive pass.
|
|
598
|
+
|
|
599
|
+
Returns
|
|
600
|
+
-------
|
|
601
|
+
int
|
|
602
|
+
"""
|
|
603
|
+
return self.adaptive_settings.MaxRefinePerPass
|
|
604
|
+
|
|
605
|
+
@max_refine_per_pass.setter
|
|
606
|
+
def max_refine_per_pass(self, value):
|
|
607
|
+
self.adaptive_settings.MaxRefinePerPass = value
|
|
608
|
+
self._parent._update_setup()
|
|
609
|
+
|
|
610
|
+
@property
|
|
611
|
+
def min_passes(self):
|
|
612
|
+
"""Minimum number of passes.
|
|
613
|
+
|
|
614
|
+
Returns
|
|
615
|
+
-------
|
|
616
|
+
int
|
|
617
|
+
"""
|
|
618
|
+
return self.adaptive_settings.MinPasses
|
|
619
|
+
|
|
620
|
+
@min_passes.setter
|
|
621
|
+
def min_passes(self, value):
|
|
622
|
+
self.adaptive_settings.MinPasses = value
|
|
623
|
+
self._parent._update_setup()
|
|
624
|
+
|
|
625
|
+
@property
|
|
626
|
+
def save_fields(self):
|
|
627
|
+
"""Whether to turn on save fields.
|
|
628
|
+
|
|
629
|
+
Returns
|
|
630
|
+
-------
|
|
631
|
+
bool
|
|
632
|
+
``True`` if save fields is used, ``False`` otherwise.
|
|
633
|
+
"""
|
|
634
|
+
return self.adaptive_settings.SaveFields
|
|
635
|
+
|
|
636
|
+
@save_fields.setter
|
|
637
|
+
def save_fields(self, value):
|
|
638
|
+
self.adaptive_settings.SaveFields = value
|
|
639
|
+
self._parent._update_setup()
|
|
640
|
+
|
|
641
|
+
@property
|
|
642
|
+
def save_rad_field_only(self):
|
|
643
|
+
"""Flag indicating if the saving of only radiated fields is turned on.
|
|
644
|
+
|
|
645
|
+
Returns
|
|
646
|
+
-------
|
|
647
|
+
bool
|
|
648
|
+
``True`` if save radiated field only is used, ``False`` otherwise.
|
|
649
|
+
|
|
650
|
+
"""
|
|
651
|
+
return self.adaptive_settings.SaveRadFieldsOnly
|
|
652
|
+
|
|
653
|
+
@save_rad_field_only.setter
|
|
654
|
+
def save_rad_field_only(self, value):
|
|
655
|
+
self.adaptive_settings.SaveRadFieldsOnly = value
|
|
656
|
+
self._parent._update_setup()
|
|
657
|
+
|
|
658
|
+
@property
|
|
659
|
+
def use_convergence_matrix(self):
|
|
660
|
+
"""Whether to turn on the convergence matrix.
|
|
661
|
+
|
|
662
|
+
Returns
|
|
663
|
+
-------
|
|
664
|
+
bool
|
|
665
|
+
``True`` if convergence matrix is used, ``False`` otherwise.
|
|
666
|
+
|
|
667
|
+
"""
|
|
668
|
+
return self.adaptive_settings.UseConvergenceMatrix
|
|
669
|
+
|
|
670
|
+
@use_convergence_matrix.setter
|
|
671
|
+
def use_convergence_matrix(self, value):
|
|
672
|
+
self.adaptive_settings.UseConvergenceMatrix = value
|
|
673
|
+
self._parent._update_setup()
|
|
674
|
+
|
|
675
|
+
@property
|
|
676
|
+
def use_max_refinement(self):
|
|
677
|
+
"""Whether to turn on maximum refinement.
|
|
678
|
+
|
|
679
|
+
Returns
|
|
680
|
+
-------
|
|
681
|
+
bool
|
|
682
|
+
``True`` if maximum refinement is used, ``False`` otherwise.
|
|
683
|
+
"""
|
|
684
|
+
return self.adaptive_settings.UseMaxRefinement
|
|
685
|
+
|
|
686
|
+
@use_max_refinement.setter
|
|
687
|
+
def use_max_refinement(self, value):
|
|
688
|
+
self.adaptive_settings.UseMaxRefinement = value
|
|
689
|
+
self._parent._update_setup()
|
|
690
|
+
|
|
691
|
+
@pyedb_function_handler()
|
|
692
|
+
def add_adaptive_frequency_data(self, frequency=0, max_num_passes=10, max_delta_s=0.02):
|
|
693
|
+
"""Add a setup for frequency data.
|
|
694
|
+
|
|
695
|
+
Parameters
|
|
696
|
+
----------
|
|
697
|
+
frequency : str, float
|
|
698
|
+
Frequency with units or float frequency (in Hz).
|
|
699
|
+
max_num_passes : int, optional
|
|
700
|
+
Maximum number of passes. The default is ``10``.
|
|
701
|
+
max_delta_s : float, optional
|
|
702
|
+
Maximum delta S. The default is ``0.02``.
|
|
703
|
+
|
|
704
|
+
Returns
|
|
705
|
+
-------
|
|
706
|
+
bool
|
|
707
|
+
``True`` if method is successful, ``False`` otherwise.
|
|
708
|
+
"""
|
|
709
|
+
low_freq_adapt_data = self._parent._pedb.simsetupdata.AdaptiveFrequencyData()
|
|
710
|
+
low_freq_adapt_data.MaxDelta = self._parent._pedb.edb_value(max_delta_s).ToString()
|
|
711
|
+
low_freq_adapt_data.MaxPasses = max_num_passes
|
|
712
|
+
low_freq_adapt_data.AdaptiveFrequency = self._parent._pedb.edb_value(frequency).ToString()
|
|
713
|
+
self.adaptive_settings.AdaptiveFrequencyDataList.Clear()
|
|
714
|
+
self.adaptive_settings.AdaptiveFrequencyDataList.Add(low_freq_adapt_data)
|
|
715
|
+
return self._parent._update_setup()
|
|
716
|
+
|
|
717
|
+
@pyedb_function_handler()
|
|
718
|
+
def add_broadband_adaptive_frequency_data(
|
|
719
|
+
self, low_frequency=0, high_frequency=10e9, max_num_passes=10, max_delta_s=0.02
|
|
720
|
+
):
|
|
721
|
+
"""Add a setup for frequency data.
|
|
722
|
+
|
|
723
|
+
Parameters
|
|
724
|
+
----------
|
|
725
|
+
low_frequency : str, float
|
|
726
|
+
Frequency with units or float frequency (in Hz).
|
|
727
|
+
high_frequency : str, float
|
|
728
|
+
Frequency with units or float frequency (in Hz).
|
|
729
|
+
max_num_passes : int, optional
|
|
730
|
+
Maximum number of passes. The default is ``10``.
|
|
731
|
+
max_delta_s : float, optional
|
|
732
|
+
Maximum delta S. The default is ``0.02``.
|
|
733
|
+
|
|
734
|
+
Returns
|
|
735
|
+
-------
|
|
736
|
+
bool
|
|
737
|
+
``True`` if method is successful, ``False`` otherwise.
|
|
738
|
+
"""
|
|
739
|
+
low_freq_adapt_data = self._parent._pedb.simsetupdata.AdaptiveFrequencyData()
|
|
740
|
+
low_freq_adapt_data.MaxDelta = self._parent._pedb.edb_value(max_delta_s).ToString()
|
|
741
|
+
low_freq_adapt_data.MaxPasses = max_num_passes
|
|
742
|
+
low_freq_adapt_data.AdaptiveFrequency = self._parent._pedb.edb_value(low_frequency).ToString()
|
|
743
|
+
high_freq_adapt_data = self._parent._pedb.simsetupdata.AdaptiveFrequencyData()
|
|
744
|
+
high_freq_adapt_data.MaxDelta = self._parent._pedb.edb_value(max_delta_s).ToString()
|
|
745
|
+
high_freq_adapt_data.MaxPasses = max_num_passes
|
|
746
|
+
high_freq_adapt_data.AdaptiveFrequency = self._parent._pedb.edb_value(high_frequency).ToString()
|
|
747
|
+
self.adaptive_settings.AdaptiveFrequencyDataList.Clear()
|
|
748
|
+
self.adaptive_settings.AdaptiveFrequencyDataList.Add(low_freq_adapt_data)
|
|
749
|
+
self.adaptive_settings.AdaptiveFrequencyDataList.Add(high_freq_adapt_data)
|
|
750
|
+
return self._parent._update_setup()
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
class DefeatureSettings(object):
|
|
754
|
+
"""Manages EDB methods for defeature settings."""
|
|
755
|
+
|
|
756
|
+
def __init__(self, parent):
|
|
757
|
+
self._parent = parent
|
|
758
|
+
|
|
759
|
+
@property
|
|
760
|
+
def _defeature_settings(self):
|
|
761
|
+
return self._parent.get_sim_setup_info.SimulationSettings.DefeatureSettings
|
|
762
|
+
|
|
763
|
+
@property
|
|
764
|
+
def defeature_abs_length(self):
|
|
765
|
+
"""Absolute length for polygon defeaturing.
|
|
766
|
+
|
|
767
|
+
Returns
|
|
768
|
+
-------
|
|
769
|
+
str
|
|
770
|
+
"""
|
|
771
|
+
return self._defeature_settings.DefeatureAbsLength
|
|
772
|
+
|
|
773
|
+
@defeature_abs_length.setter
|
|
774
|
+
def defeature_abs_length(self, value):
|
|
775
|
+
self._defeature_settings.DefeatureAbsLength = value
|
|
776
|
+
self._parent._update_setup()
|
|
777
|
+
|
|
778
|
+
@property
|
|
779
|
+
def defeature_ratio(self):
|
|
780
|
+
"""Defeature ratio.
|
|
781
|
+
|
|
782
|
+
Returns
|
|
783
|
+
-------
|
|
784
|
+
float
|
|
785
|
+
"""
|
|
786
|
+
return self._defeature_settings.DefeatureRatio
|
|
787
|
+
|
|
788
|
+
@defeature_ratio.setter
|
|
789
|
+
def defeature_ratio(self, value):
|
|
790
|
+
self._defeature_settings.DefeatureRatio = value
|
|
791
|
+
self._parent._update_setup()
|
|
792
|
+
|
|
793
|
+
@property
|
|
794
|
+
def healing_option(self):
|
|
795
|
+
"""Whether to turn on healing of mis-aligned points and edges.
|
|
796
|
+
Options are:
|
|
797
|
+
0- Turn off.
|
|
798
|
+
1- Turn on.
|
|
799
|
+
|
|
800
|
+
Returns
|
|
801
|
+
-------
|
|
802
|
+
int
|
|
803
|
+
"""
|
|
804
|
+
return self._defeature_settings.HealingOption
|
|
805
|
+
|
|
806
|
+
@healing_option.setter
|
|
807
|
+
def healing_option(self, value):
|
|
808
|
+
self._defeature_settings.HealingOption = value
|
|
809
|
+
self._parent._update_setup()
|
|
810
|
+
|
|
811
|
+
@property
|
|
812
|
+
def model_type(self):
|
|
813
|
+
"""Model type.
|
|
814
|
+
Options:
|
|
815
|
+
0- General.
|
|
816
|
+
1- IC.
|
|
817
|
+
|
|
818
|
+
Returns
|
|
819
|
+
-------
|
|
820
|
+
int
|
|
821
|
+
"""
|
|
822
|
+
return self._defeature_settings.ModelType
|
|
823
|
+
|
|
824
|
+
@model_type.setter
|
|
825
|
+
def model_type(self, value):
|
|
826
|
+
"""Model type (General 0 or IC 1)."""
|
|
827
|
+
self._defeature_settings.ModelType = value
|
|
828
|
+
self._parent._update_setup()
|
|
829
|
+
|
|
830
|
+
@property
|
|
831
|
+
def remove_floating_geometry(self):
|
|
832
|
+
"""Whether to remove floating geometries.
|
|
833
|
+
|
|
834
|
+
Returns
|
|
835
|
+
-------
|
|
836
|
+
bool
|
|
837
|
+
``True`` if floating geometry removal is used, ``False`` otherwise.
|
|
838
|
+
"""
|
|
839
|
+
return self._defeature_settings.RemoveFloatingGeometry
|
|
840
|
+
|
|
841
|
+
@remove_floating_geometry.setter
|
|
842
|
+
def remove_floating_geometry(self, value):
|
|
843
|
+
self._defeature_settings.RemoveFloatingGeometry = value
|
|
844
|
+
self._parent._update_setup()
|
|
845
|
+
|
|
846
|
+
@property
|
|
847
|
+
def small_void_area(self):
|
|
848
|
+
"""Small voids to remove area.
|
|
849
|
+
|
|
850
|
+
Returns
|
|
851
|
+
-------
|
|
852
|
+
float
|
|
853
|
+
"""
|
|
854
|
+
return self._defeature_settings.SmallVoidArea
|
|
855
|
+
|
|
856
|
+
@small_void_area.setter
|
|
857
|
+
def small_void_area(self, value):
|
|
858
|
+
self._defeature_settings.SmallVoidArea = value
|
|
859
|
+
self._parent._update_setup()
|
|
860
|
+
|
|
861
|
+
@property
|
|
862
|
+
def union_polygons(self):
|
|
863
|
+
"""Whether to turn on the union of polygons before meshing.
|
|
864
|
+
|
|
865
|
+
Returns
|
|
866
|
+
-------
|
|
867
|
+
bool
|
|
868
|
+
``True`` if union polygons is used, ``False`` otherwise.
|
|
869
|
+
"""
|
|
870
|
+
return self._defeature_settings.UnionPolygons
|
|
871
|
+
|
|
872
|
+
@union_polygons.setter
|
|
873
|
+
def union_polygons(self, value):
|
|
874
|
+
self._defeature_settings.UnionPolygons = value
|
|
875
|
+
self._parent._update_setup()
|
|
876
|
+
|
|
877
|
+
@property
|
|
878
|
+
def use_defeature(self):
|
|
879
|
+
"""Whether to turn on the defeature.
|
|
880
|
+
|
|
881
|
+
Returns
|
|
882
|
+
-------
|
|
883
|
+
bool
|
|
884
|
+
``True`` if defeature is used, ``False`` otherwise.
|
|
885
|
+
"""
|
|
886
|
+
return self._defeature_settings.UseDefeature
|
|
887
|
+
|
|
888
|
+
@use_defeature.setter
|
|
889
|
+
def use_defeature(self, value):
|
|
890
|
+
self._defeature_settings.UseDefeature = value
|
|
891
|
+
self._parent._update_setup()
|
|
892
|
+
|
|
893
|
+
@property
|
|
894
|
+
def use_defeature_abs_length(self):
|
|
895
|
+
"""Whether to turn on the defeature absolute length.
|
|
896
|
+
|
|
897
|
+
Returns
|
|
898
|
+
-------
|
|
899
|
+
bool
|
|
900
|
+
``True`` if defeature absolute length is used, ``False`` otherwise.
|
|
901
|
+
|
|
902
|
+
"""
|
|
903
|
+
return self._defeature_settings.UseDefeatureAbsLength
|
|
904
|
+
|
|
905
|
+
@use_defeature_abs_length.setter
|
|
906
|
+
def use_defeature_abs_length(self, value):
|
|
907
|
+
self._defeature_settings.UseDefeatureAbsLength = value
|
|
908
|
+
self._parent._update_setup()
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
class ViaSettings(object):
|
|
912
|
+
"""Manages EDB methods for via settings."""
|
|
913
|
+
|
|
914
|
+
def __init__(
|
|
915
|
+
self,
|
|
916
|
+
parent,
|
|
917
|
+
):
|
|
918
|
+
self._parent = parent
|
|
919
|
+
self._via_style_mapping = {
|
|
920
|
+
"k25DViaWirebond": self._via_settings.T25DViaStyle.k25DViaWirebond,
|
|
921
|
+
"k25DViaRibbon": self._via_settings.T25DViaStyle.k25DViaRibbon,
|
|
922
|
+
"k25DViaMesh": self._via_settings.T25DViaStyle.k25DViaMesh,
|
|
923
|
+
"k25DViaField": self._via_settings.T25DViaStyle.k25DViaField,
|
|
924
|
+
"kNum25DViaStyle": self._via_settings.T25DViaStyle.kNum25DViaStyle,
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
@property
|
|
928
|
+
def _via_settings(self):
|
|
929
|
+
return self._parent.get_sim_setup_info.SimulationSettings.ViaSettings
|
|
930
|
+
|
|
931
|
+
@property
|
|
932
|
+
def via_density(self):
|
|
933
|
+
"""Via density.
|
|
934
|
+
|
|
935
|
+
Returns
|
|
936
|
+
-------
|
|
937
|
+
float
|
|
938
|
+
"""
|
|
939
|
+
return self._via_settings.ViaDensity
|
|
940
|
+
|
|
941
|
+
@via_density.setter
|
|
942
|
+
def via_density(self, value):
|
|
943
|
+
self._via_settings.ViaDensity = value
|
|
944
|
+
self._parent._update_setup()
|
|
945
|
+
|
|
946
|
+
@property
|
|
947
|
+
def via_material(self):
|
|
948
|
+
"""Via material.
|
|
949
|
+
|
|
950
|
+
Returns
|
|
951
|
+
-------
|
|
952
|
+
str
|
|
953
|
+
"""
|
|
954
|
+
return self._via_settings.ViaMaterial
|
|
955
|
+
|
|
956
|
+
@via_material.setter
|
|
957
|
+
def via_material(self, value):
|
|
958
|
+
self._via_settings.ViaMaterial = value
|
|
959
|
+
self._parent._update_setup()
|
|
960
|
+
|
|
961
|
+
@property
|
|
962
|
+
def via_num_sides(self):
|
|
963
|
+
"""Via number of sides.
|
|
964
|
+
|
|
965
|
+
Returns
|
|
966
|
+
-------
|
|
967
|
+
int
|
|
968
|
+
"""
|
|
969
|
+
return self._via_settings.ViaNumSides
|
|
970
|
+
|
|
971
|
+
@via_num_sides.setter
|
|
972
|
+
def via_num_sides(self, value):
|
|
973
|
+
self._via_settings.ViaNumSides = value
|
|
974
|
+
self._parent._update_setup()
|
|
975
|
+
|
|
976
|
+
@property
|
|
977
|
+
def via_style(self):
|
|
978
|
+
"""Via style.
|
|
979
|
+
Options:
|
|
980
|
+
1- ``k25DViaWirebond``.
|
|
981
|
+
2- ``k25DViaRibbon``.
|
|
982
|
+
3- ``k25DViaMesh``.
|
|
983
|
+
4- ``k25DViaField``.
|
|
984
|
+
5- ``kNum25DViaStyle``.
|
|
985
|
+
|
|
986
|
+
Returns
|
|
987
|
+
-------
|
|
988
|
+
str
|
|
989
|
+
"""
|
|
990
|
+
return self._via_settings.ViaStyle.ToString()
|
|
991
|
+
|
|
992
|
+
@via_style.setter
|
|
993
|
+
def via_style(self, value):
|
|
994
|
+
self._via_settings.ViaStyle = self._via_style_mapping[value]
|
|
995
|
+
self._parent._update_setup()
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
class AdvancedMeshSettings(object):
|
|
999
|
+
"""Manages EDB methods for advanced mesh settings."""
|
|
1000
|
+
|
|
1001
|
+
def __init__(self, parent):
|
|
1002
|
+
self._parent = parent
|
|
1003
|
+
|
|
1004
|
+
@property
|
|
1005
|
+
def _advanced_mesh_settings(self):
|
|
1006
|
+
return self._parent.get_sim_setup_info.SimulationSettings.AdvancedMeshSettings
|
|
1007
|
+
|
|
1008
|
+
@property
|
|
1009
|
+
def layer_snap_tol(self):
|
|
1010
|
+
"""Layer snap tolerance. Attempt to align independent stackups in the mesher.
|
|
1011
|
+
|
|
1012
|
+
Returns
|
|
1013
|
+
-------
|
|
1014
|
+
str
|
|
1015
|
+
|
|
1016
|
+
"""
|
|
1017
|
+
return self._advanced_mesh_settings.LayerSnapTol
|
|
1018
|
+
|
|
1019
|
+
@layer_snap_tol.setter
|
|
1020
|
+
def layer_snap_tol(self, value):
|
|
1021
|
+
self._advanced_mesh_settings.LayerSnapTol = value
|
|
1022
|
+
self._parent._update_setup()
|
|
1023
|
+
|
|
1024
|
+
@property
|
|
1025
|
+
def mesh_display_attributes(self):
|
|
1026
|
+
"""Mesh display attributes. Set color for mesh display (i.e. ``"#000000"``).
|
|
1027
|
+
|
|
1028
|
+
Returns
|
|
1029
|
+
-------
|
|
1030
|
+
str
|
|
1031
|
+
"""
|
|
1032
|
+
return self._advanced_mesh_settings.MeshDisplayAttributes
|
|
1033
|
+
|
|
1034
|
+
@mesh_display_attributes.setter
|
|
1035
|
+
def mesh_display_attributes(self, value):
|
|
1036
|
+
self._advanced_mesh_settings.MeshDisplayAttributes = value
|
|
1037
|
+
self._parent._update_setup()
|
|
1038
|
+
|
|
1039
|
+
@property
|
|
1040
|
+
def replace_3d_triangles(self):
|
|
1041
|
+
"""Whether to turn on replace 3D triangles.
|
|
1042
|
+
|
|
1043
|
+
Returns
|
|
1044
|
+
-------
|
|
1045
|
+
bool
|
|
1046
|
+
``True`` if replace 3D triangles is used, ``False`` otherwise.
|
|
1047
|
+
|
|
1048
|
+
"""
|
|
1049
|
+
return self._advanced_mesh_settings.Replace3DTriangles
|
|
1050
|
+
|
|
1051
|
+
@replace_3d_triangles.setter
|
|
1052
|
+
def replace_3d_triangles(self, value):
|
|
1053
|
+
self._advanced_mesh_settings.Replace3DTriangles = value
|
|
1054
|
+
self._parent._update_setup()
|
|
1055
|
+
|
|
1056
|
+
|
|
1057
|
+
class CurveApproxSettings(object):
|
|
1058
|
+
"""Manages EDB methods for curve approximate settings."""
|
|
1059
|
+
|
|
1060
|
+
def __init__(self, parent):
|
|
1061
|
+
self._parent = parent
|
|
1062
|
+
|
|
1063
|
+
@property
|
|
1064
|
+
def _curve_approx_settings(self):
|
|
1065
|
+
return self._parent.get_sim_setup_info.SimulationSettings.CurveApproxSettings
|
|
1066
|
+
|
|
1067
|
+
@property
|
|
1068
|
+
def arc_angle(self):
|
|
1069
|
+
"""Step-size to be used for arc faceting.
|
|
1070
|
+
|
|
1071
|
+
Returns
|
|
1072
|
+
-------
|
|
1073
|
+
str
|
|
1074
|
+
"""
|
|
1075
|
+
return self._curve_approx_settings.ArcAngle
|
|
1076
|
+
|
|
1077
|
+
@arc_angle.setter
|
|
1078
|
+
def arc_angle(self, value):
|
|
1079
|
+
self._curve_approx_settings.ArcAngle = value
|
|
1080
|
+
self._parent._update_setup()
|
|
1081
|
+
|
|
1082
|
+
@property
|
|
1083
|
+
def arc_to_chord_error(self):
|
|
1084
|
+
"""Maximum tolerated error between straight edge (chord) and faceted arc.
|
|
1085
|
+
|
|
1086
|
+
Returns
|
|
1087
|
+
-------
|
|
1088
|
+
str
|
|
1089
|
+
"""
|
|
1090
|
+
return self._curve_approx_settings.ArcToChordError
|
|
1091
|
+
|
|
1092
|
+
@arc_to_chord_error.setter
|
|
1093
|
+
def arc_to_chord_error(self, value):
|
|
1094
|
+
self._curve_approx_settings.ArcToChordError = value
|
|
1095
|
+
self._parent._update_setup()
|
|
1096
|
+
|
|
1097
|
+
@property
|
|
1098
|
+
def max_arc_points(self):
|
|
1099
|
+
"""Maximum number of mesh points for arc segments.
|
|
1100
|
+
|
|
1101
|
+
Returns
|
|
1102
|
+
-------
|
|
1103
|
+
int
|
|
1104
|
+
"""
|
|
1105
|
+
return self._curve_approx_settings.MaxArcPoints
|
|
1106
|
+
|
|
1107
|
+
@max_arc_points.setter
|
|
1108
|
+
def max_arc_points(self, value):
|
|
1109
|
+
self._curve_approx_settings.MaxArcPoints = value
|
|
1110
|
+
self._parent._update_setup()
|
|
1111
|
+
|
|
1112
|
+
@property
|
|
1113
|
+
def start_azimuth(self):
|
|
1114
|
+
"""Azimuth angle for first mesh point of the arc.
|
|
1115
|
+
|
|
1116
|
+
Returns
|
|
1117
|
+
-------
|
|
1118
|
+
str
|
|
1119
|
+
"""
|
|
1120
|
+
return self._curve_approx_settings.StartAzimuth
|
|
1121
|
+
|
|
1122
|
+
@start_azimuth.setter
|
|
1123
|
+
def start_azimuth(self, value):
|
|
1124
|
+
self._curve_approx_settings.StartAzimuth = value
|
|
1125
|
+
self._parent._update_setup()
|
|
1126
|
+
|
|
1127
|
+
@property
|
|
1128
|
+
def use_arc_to_chord_error(self):
|
|
1129
|
+
"""Whether to turn on the arc-to-chord error setting for arc faceting.
|
|
1130
|
+
|
|
1131
|
+
Returns
|
|
1132
|
+
-------
|
|
1133
|
+
``True`` if arc-to-chord error is used, ``False`` otherwise.
|
|
1134
|
+
"""
|
|
1135
|
+
return self._curve_approx_settings.UseArcToChordError
|
|
1136
|
+
|
|
1137
|
+
@use_arc_to_chord_error.setter
|
|
1138
|
+
def use_arc_to_chord_error(self, value):
|
|
1139
|
+
self._curve_approx_settings.UseArcToChordError = value
|
|
1140
|
+
self._parent._update_setup()
|
|
1141
|
+
|
|
1142
|
+
|
|
1143
|
+
class DcrSettings(object):
|
|
1144
|
+
"""Manages EDB methods for DCR settings."""
|
|
1145
|
+
|
|
1146
|
+
def __init__(self, parent):
|
|
1147
|
+
self._parent = parent
|
|
1148
|
+
|
|
1149
|
+
@property
|
|
1150
|
+
def _dcr_settings(self):
|
|
1151
|
+
return self._parent.get_sim_setup_info.SimulationSettings.DCRSettings
|
|
1152
|
+
|
|
1153
|
+
@property
|
|
1154
|
+
def conduction_max_passes(self):
|
|
1155
|
+
"""Conduction maximum number of passes.
|
|
1156
|
+
|
|
1157
|
+
Returns
|
|
1158
|
+
-------
|
|
1159
|
+
int
|
|
1160
|
+
"""
|
|
1161
|
+
return self._dcr_settings.ConductionMaxPasses
|
|
1162
|
+
|
|
1163
|
+
@conduction_max_passes.setter
|
|
1164
|
+
def conduction_max_passes(self, value):
|
|
1165
|
+
self._dcr_settings.ConductionMaxPasses = value
|
|
1166
|
+
self._parent._update_setup()
|
|
1167
|
+
|
|
1168
|
+
@property
|
|
1169
|
+
def conduction_min_converged_passes(self):
|
|
1170
|
+
"""Conduction minimum number of converged passes.
|
|
1171
|
+
|
|
1172
|
+
Returns
|
|
1173
|
+
-------
|
|
1174
|
+
int
|
|
1175
|
+
"""
|
|
1176
|
+
return self._dcr_settings.ConductionMinConvergedPasses
|
|
1177
|
+
|
|
1178
|
+
@conduction_min_converged_passes.setter
|
|
1179
|
+
def conduction_min_converged_passes(self, value):
|
|
1180
|
+
self._dcr_settings.ConductionMinConvergedPasses = value
|
|
1181
|
+
self._parent._update_setup()
|
|
1182
|
+
|
|
1183
|
+
@property
|
|
1184
|
+
def conduction_min_passes(self):
|
|
1185
|
+
"""Conduction minimum number of passes.
|
|
1186
|
+
|
|
1187
|
+
Returns
|
|
1188
|
+
-------
|
|
1189
|
+
int
|
|
1190
|
+
"""
|
|
1191
|
+
return self._dcr_settings.ConductionMinPasses
|
|
1192
|
+
|
|
1193
|
+
@conduction_min_passes.setter
|
|
1194
|
+
def conduction_min_passes(self, value):
|
|
1195
|
+
self._dcr_settings.ConductionMinPasses = value
|
|
1196
|
+
self._parent._update_setup()
|
|
1197
|
+
|
|
1198
|
+
@property
|
|
1199
|
+
def conduction_per_error(self):
|
|
1200
|
+
"""WConduction error percentage.
|
|
1201
|
+
|
|
1202
|
+
Returns
|
|
1203
|
+
-------
|
|
1204
|
+
float
|
|
1205
|
+
"""
|
|
1206
|
+
return self._dcr_settings.ConductionPerError
|
|
1207
|
+
|
|
1208
|
+
@conduction_per_error.setter
|
|
1209
|
+
def conduction_per_error(self, value):
|
|
1210
|
+
self._dcr_settings.ConductionPerError = value
|
|
1211
|
+
self._parent._update_setup()
|
|
1212
|
+
|
|
1213
|
+
@property
|
|
1214
|
+
def conduction_per_refine(self):
|
|
1215
|
+
"""Conduction refinement.
|
|
1216
|
+
|
|
1217
|
+
Returns
|
|
1218
|
+
-------
|
|
1219
|
+
float
|
|
1220
|
+
"""
|
|
1221
|
+
return self._dcr_settings.ConductionPerRefine
|
|
1222
|
+
|
|
1223
|
+
@conduction_per_refine.setter
|
|
1224
|
+
def conduction_per_refine(self, value):
|
|
1225
|
+
self._dcr_settings.ConductionPerRefine = value
|
|
1226
|
+
self._parent._update_setup()
|
|
1227
|
+
|
|
1228
|
+
|
|
1229
|
+
class HfssSimulationSetup(BaseSimulationSetup):
|
|
1230
|
+
"""Manages EDB methods for HFSS simulation setup."""
|
|
1231
|
+
|
|
1232
|
+
def __init__(self, pedb, edb_object=None):
|
|
1233
|
+
super().__init__(pedb, edb_object)
|
|
1234
|
+
self._setup_type = "kHFSS"
|
|
1235
|
+
self._mesh_operations = {}
|
|
1236
|
+
|
|
1237
|
+
@pyedb_function_handler
|
|
1238
|
+
def create(self, name=None):
|
|
1239
|
+
"""Create an HFSS setup."""
|
|
1240
|
+
self._name = name
|
|
1241
|
+
self._create(name)
|
|
1242
|
+
return self
|
|
1243
|
+
|
|
1244
|
+
@property
|
|
1245
|
+
def get_sim_setup_info(self):
|
|
1246
|
+
"""Get simulation setup information."""
|
|
1247
|
+
return self._edb_object.GetSimSetupInfo()
|
|
1248
|
+
|
|
1249
|
+
@property
|
|
1250
|
+
def solver_slider_type(self):
|
|
1251
|
+
"""Solver slider type.
|
|
1252
|
+
Options are:
|
|
1253
|
+
1 - ``kFast``.
|
|
1254
|
+
2 - ``kMedium``.
|
|
1255
|
+
3 - ``kAccurate``.
|
|
1256
|
+
4 - ``kNumSliderTypes``.
|
|
1257
|
+
|
|
1258
|
+
Returns
|
|
1259
|
+
-------
|
|
1260
|
+
str
|
|
1261
|
+
"""
|
|
1262
|
+
return self.get_sim_setup_info.SimulationSettings.TSolveSliderType.ToString()
|
|
1263
|
+
|
|
1264
|
+
@solver_slider_type.setter
|
|
1265
|
+
def solver_slider_type(self, value):
|
|
1266
|
+
"""Set solver slider type."""
|
|
1267
|
+
solver_types = {
|
|
1268
|
+
"kFast": self.get_sim_setup_info.SimulationSettings.TSolveSliderType.k25DViaWirebond,
|
|
1269
|
+
"kMedium": self.get_sim_setup_info.SimulationSettings.TSolveSliderType.k25DViaRibbon,
|
|
1270
|
+
"kAccurate": self.get_sim_setup_info.SimulationSettings.TSolveSliderType.k25DViaMesh,
|
|
1271
|
+
"kNumSliderTypes": self.get_sim_setup_info.SimulationSettings.TSolveSliderType.k25DViaField,
|
|
1272
|
+
}
|
|
1273
|
+
self.get_sim_setup_info.SimulationSettings.TSolveSliderType = solver_types[value]
|
|
1274
|
+
self._update_setup()
|
|
1275
|
+
|
|
1276
|
+
@property
|
|
1277
|
+
def is_auto_setup(self):
|
|
1278
|
+
"""Flag indicating if automatic setup is enabled."""
|
|
1279
|
+
return self.get_sim_setup_info.SimulationSettings.IsAutoSetup
|
|
1280
|
+
|
|
1281
|
+
@is_auto_setup.setter
|
|
1282
|
+
def is_auto_setup(self, value):
|
|
1283
|
+
self.get_sim_setup_info.SimulationSettings.IsAutoSetup = value
|
|
1284
|
+
self._update_setup()
|
|
1285
|
+
|
|
1286
|
+
@property
|
|
1287
|
+
def hfss_solver_settings(self):
|
|
1288
|
+
"""Manages EDB methods for HFSS solver settings.
|
|
1289
|
+
|
|
1290
|
+
Returns
|
|
1291
|
+
-------
|
|
1292
|
+
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.HfssSolverSettings`
|
|
1293
|
+
|
|
1294
|
+
"""
|
|
1295
|
+
return HfssSolverSettings(self)
|
|
1296
|
+
|
|
1297
|
+
@property
|
|
1298
|
+
def adaptive_settings(self):
|
|
1299
|
+
"""Adaptive Settings Class.
|
|
1300
|
+
|
|
1301
|
+
Returns
|
|
1302
|
+
-------
|
|
1303
|
+
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.AdaptiveSettings`
|
|
1304
|
+
|
|
1305
|
+
"""
|
|
1306
|
+
return AdaptiveSettings(self)
|
|
1307
|
+
|
|
1308
|
+
@property
|
|
1309
|
+
def defeature_settings(self):
|
|
1310
|
+
"""Defeature settings Class.
|
|
1311
|
+
|
|
1312
|
+
Returns
|
|
1313
|
+
-------
|
|
1314
|
+
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.DefeatureSettings`
|
|
1315
|
+
|
|
1316
|
+
"""
|
|
1317
|
+
return DefeatureSettings(self)
|
|
1318
|
+
|
|
1319
|
+
@property
|
|
1320
|
+
def via_settings(self):
|
|
1321
|
+
"""Via settings Class.
|
|
1322
|
+
|
|
1323
|
+
Returns
|
|
1324
|
+
-------
|
|
1325
|
+
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.ViaSettings`
|
|
1326
|
+
|
|
1327
|
+
"""
|
|
1328
|
+
return ViaSettings(self)
|
|
1329
|
+
|
|
1330
|
+
@property
|
|
1331
|
+
def advanced_mesh_settings(self):
|
|
1332
|
+
"""Advanced mesh settings Class.
|
|
1333
|
+
|
|
1334
|
+
Returns
|
|
1335
|
+
-------
|
|
1336
|
+
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.AdvancedMeshSettings`
|
|
1337
|
+
|
|
1338
|
+
"""
|
|
1339
|
+
return AdvancedMeshSettings(self)
|
|
1340
|
+
|
|
1341
|
+
@property
|
|
1342
|
+
def curve_approx_settings(self):
|
|
1343
|
+
"""Curve approximation settings Class.
|
|
1344
|
+
|
|
1345
|
+
Returns
|
|
1346
|
+
-------
|
|
1347
|
+
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.CurveApproxSettings`
|
|
1348
|
+
|
|
1349
|
+
"""
|
|
1350
|
+
return CurveApproxSettings(self)
|
|
1351
|
+
|
|
1352
|
+
@property
|
|
1353
|
+
def dcr_settings(self):
|
|
1354
|
+
"""Dcr settings Class.
|
|
1355
|
+
|
|
1356
|
+
Returns
|
|
1357
|
+
-------
|
|
1358
|
+
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.DcrSettings`
|
|
1359
|
+
|
|
1360
|
+
"""
|
|
1361
|
+
return DcrSettings(self)
|
|
1362
|
+
|
|
1363
|
+
@property
|
|
1364
|
+
def hfss_port_settings(self):
|
|
1365
|
+
"""HFSS port settings Class.
|
|
1366
|
+
|
|
1367
|
+
Returns
|
|
1368
|
+
-------
|
|
1369
|
+
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.HfssPortSettings`
|
|
1370
|
+
|
|
1371
|
+
"""
|
|
1372
|
+
return HfssPortSettings(self)
|
|
1373
|
+
|
|
1374
|
+
@property
|
|
1375
|
+
def mesh_operations(self):
|
|
1376
|
+
"""Mesh operations settings Class.
|
|
1377
|
+
|
|
1378
|
+
Returns
|
|
1379
|
+
-------
|
|
1380
|
+
List of :class:`dotnet.edb_core.edb_data.hfss_simulation_setup_data.MeshOperation`
|
|
1381
|
+
|
|
1382
|
+
"""
|
|
1383
|
+
if self._mesh_operations:
|
|
1384
|
+
return self._mesh_operations
|
|
1385
|
+
settings = self.get_sim_setup_info.SimulationSettings.MeshOperations
|
|
1386
|
+
self._mesh_operations = {}
|
|
1387
|
+
for i in list(settings):
|
|
1388
|
+
if i.MeshOpType == i.TMeshOpType.kMeshSetupLength:
|
|
1389
|
+
self._mesh_operations[i.Name] = MeshOperationLength(self, i)
|
|
1390
|
+
elif i.MeshOpType == i.TMeshOpType.kMeshSetupSkinDepth:
|
|
1391
|
+
self._mesh_operations[i.Name] = MeshOperationSkinDepth(self, i)
|
|
1392
|
+
elif i.MeshOpType == i.TMeshOpType.kMeshSetupBase:
|
|
1393
|
+
self._mesh_operations[i.Name] = MeshOperationSkinDepth(self, i)
|
|
1394
|
+
|
|
1395
|
+
return self._mesh_operations
|
|
1396
|
+
|
|
1397
|
+
@pyedb_function_handler()
|
|
1398
|
+
def add_length_mesh_operation(
|
|
1399
|
+
self,
|
|
1400
|
+
net_layer_list,
|
|
1401
|
+
name=None,
|
|
1402
|
+
max_elements=1000,
|
|
1403
|
+
max_length="1mm",
|
|
1404
|
+
restrict_elements=True,
|
|
1405
|
+
restrict_length=True,
|
|
1406
|
+
refine_inside=False,
|
|
1407
|
+
mesh_region=None,
|
|
1408
|
+
):
|
|
1409
|
+
"""Add a mesh operation to the setup.
|
|
1410
|
+
|
|
1411
|
+
Parameters
|
|
1412
|
+
----------
|
|
1413
|
+
net_layer_list : dict
|
|
1414
|
+
Dictionary containing nets and layers on which enable Mesh operation. Example ``{"A0_N": ["TOP", "PWR"]}``.
|
|
1415
|
+
name : str, optional
|
|
1416
|
+
Mesh operation name.
|
|
1417
|
+
max_elements : int, optional
|
|
1418
|
+
Maximum number of elements. Default is ``1000``.
|
|
1419
|
+
max_length : str, optional
|
|
1420
|
+
Maximum length of elements. Default is ``1mm``.
|
|
1421
|
+
restrict_elements : bool, optional
|
|
1422
|
+
Whether to restrict number of elements. Default is ``True``.
|
|
1423
|
+
restrict_length : bool, optional
|
|
1424
|
+
Whether to restrict length of elements. Default is ``True``.
|
|
1425
|
+
mesh_region : str, optional
|
|
1426
|
+
Mesh region name.
|
|
1427
|
+
refine_inside : bool, optional
|
|
1428
|
+
Whether to refine inside or not. Default is ``False``.
|
|
1429
|
+
|
|
1430
|
+
Returns
|
|
1431
|
+
-------
|
|
1432
|
+
:class:`dotnet.edb_core.edb_data.hfss_simulation_setup_data.LengthMeshOperation`
|
|
1433
|
+
"""
|
|
1434
|
+
if not name:
|
|
1435
|
+
name = generate_unique_name("skin")
|
|
1436
|
+
mesh_operation = MeshOperationLength(self, self._pedb.simsetupdata.LengthMeshOperation())
|
|
1437
|
+
mesh_operation.mesh_region = mesh_region
|
|
1438
|
+
mesh_operation.name = name
|
|
1439
|
+
mesh_operation.nets_layers_list = net_layer_list
|
|
1440
|
+
mesh_operation.refine_inside = refine_inside
|
|
1441
|
+
mesh_operation.max_elements = str(max_elements)
|
|
1442
|
+
mesh_operation.max_length = max_length
|
|
1443
|
+
mesh_operation.restrict_length = restrict_length
|
|
1444
|
+
mesh_operation.restrict_max_elements = restrict_elements
|
|
1445
|
+
self.mesh_operations[name] = mesh_operation
|
|
1446
|
+
return mesh_operation if self._update_setup() else False
|
|
1447
|
+
|
|
1448
|
+
@pyedb_function_handler()
|
|
1449
|
+
def add_skin_depth_mesh_operation(
|
|
1450
|
+
self,
|
|
1451
|
+
net_layer_list,
|
|
1452
|
+
name=None,
|
|
1453
|
+
max_elements=1000,
|
|
1454
|
+
skin_depth="1um",
|
|
1455
|
+
restrict_elements=True,
|
|
1456
|
+
surface_triangle_length="1mm",
|
|
1457
|
+
number_of_layers=2,
|
|
1458
|
+
refine_inside=False,
|
|
1459
|
+
mesh_region=None,
|
|
1460
|
+
):
|
|
1461
|
+
"""Add a mesh operation to the setup.
|
|
1462
|
+
|
|
1463
|
+
Parameters
|
|
1464
|
+
----------
|
|
1465
|
+
net_layer_list : dict
|
|
1466
|
+
Dictionary containing nets and layers on which enable Mesh operation. Example ``{"A0_N": ["TOP", "PWR"]}``.
|
|
1467
|
+
name : str, optional
|
|
1468
|
+
Mesh operation name.
|
|
1469
|
+
max_elements : int, optional
|
|
1470
|
+
Maximum number of elements. Default is ``1000``.
|
|
1471
|
+
skin_depth : str, optional
|
|
1472
|
+
Skin Depth. Default is ``1um``.
|
|
1473
|
+
restrict_elements : bool, optional
|
|
1474
|
+
Whether to restrict number of elements. Default is ``True``.
|
|
1475
|
+
surface_triangle_length : bool, optional
|
|
1476
|
+
Surface Triangle length. Default is ``1mm``.
|
|
1477
|
+
number_of_layers : int, str, optional
|
|
1478
|
+
Number of layers. Default is ``2``.
|
|
1479
|
+
mesh_region : str, optional
|
|
1480
|
+
Mesh region name.
|
|
1481
|
+
refine_inside : bool, optional
|
|
1482
|
+
Whether to refine inside or not. Default is ``False``.
|
|
1483
|
+
|
|
1484
|
+
Returns
|
|
1485
|
+
-------
|
|
1486
|
+
:class:`dotnet.edb_core.edb_data.hfss_simulation_setup_data.LengthMeshOperation`
|
|
1487
|
+
"""
|
|
1488
|
+
if not name:
|
|
1489
|
+
name = generate_unique_name("length")
|
|
1490
|
+
mesh_operation = MeshOperationSkinDepth(self, self._pedb.simsetupdata.SkinDepthMeshOperation())
|
|
1491
|
+
mesh_operation.mesh_region = mesh_region
|
|
1492
|
+
mesh_operation.name = name
|
|
1493
|
+
mesh_operation.nets_layers_list = net_layer_list
|
|
1494
|
+
mesh_operation.refine_inside = refine_inside
|
|
1495
|
+
mesh_operation.max_elements = max_elements
|
|
1496
|
+
mesh_operation.skin_depth = skin_depth
|
|
1497
|
+
mesh_operation.number_of_layer_elements = number_of_layers
|
|
1498
|
+
mesh_operation.surface_triangle_length = surface_triangle_length
|
|
1499
|
+
mesh_operation.restrict_max_elements = restrict_elements
|
|
1500
|
+
self.mesh_operations[name] = mesh_operation
|
|
1501
|
+
return mesh_operation if self._update_setup() else False
|
|
1502
|
+
|
|
1503
|
+
@pyedb_function_handler()
|
|
1504
|
+
def add_frequency_sweep(self, name=None, frequency_sweep=None):
|
|
1505
|
+
"""Add frequency sweep.
|
|
1506
|
+
|
|
1507
|
+
Parameters
|
|
1508
|
+
----------
|
|
1509
|
+
name : str, optional
|
|
1510
|
+
Name of the frequency sweep.
|
|
1511
|
+
frequency_sweep : list, optional
|
|
1512
|
+
List of frequency points.
|
|
1513
|
+
|
|
1514
|
+
Returns
|
|
1515
|
+
-------
|
|
1516
|
+
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.EdbFrequencySweep`
|
|
1517
|
+
|
|
1518
|
+
Examples
|
|
1519
|
+
--------
|
|
1520
|
+
>>> setup1 = edbapp.create_hfss_setup("setup1")
|
|
1521
|
+
>>> setup1.add_frequency_sweep(frequency_sweep=[
|
|
1522
|
+
... ["linear count", "0", "1kHz", 1],
|
|
1523
|
+
... ["log scale", "1kHz", "0.1GHz", 10],
|
|
1524
|
+
... ["linear scale", "0.1GHz", "10GHz", "0.1GHz"],
|
|
1525
|
+
... ])
|
|
1526
|
+
"""
|
|
1527
|
+
if name in self.frequency_sweeps:
|
|
1528
|
+
return False
|
|
1529
|
+
if not name:
|
|
1530
|
+
name = generate_unique_name("sweep")
|
|
1531
|
+
return EdbFrequencySweep(self, frequency_sweep, name)
|
|
1532
|
+
|
|
1533
|
+
@pyedb_function_handler()
|
|
1534
|
+
def set_solution_single_frequency(self, frequency="5GHz", max_num_passes=10, max_delta_s=0.02):
|
|
1535
|
+
"""Set single-frequency solution.
|
|
1536
|
+
|
|
1537
|
+
Parameters
|
|
1538
|
+
----------
|
|
1539
|
+
frequency : str, float, optional
|
|
1540
|
+
Adaptive frequency. The default is ``5GHz``.
|
|
1541
|
+
max_num_passes : int, optional
|
|
1542
|
+
Maximum number of passes. The default is ``10``.
|
|
1543
|
+
max_delta_s : float, optional
|
|
1544
|
+
Maximum delta S. The default is ``0.02``.
|
|
1545
|
+
|
|
1546
|
+
Returns
|
|
1547
|
+
-------
|
|
1548
|
+
bool
|
|
1549
|
+
|
|
1550
|
+
"""
|
|
1551
|
+
self.adaptive_settings.adapt_type = "kSingle"
|
|
1552
|
+
self.adaptive_settings.adaptive_settings.AdaptiveFrequencyDataList.Clear()
|
|
1553
|
+
return self.adaptive_settings.add_adaptive_frequency_data(frequency, max_num_passes, max_delta_s)
|
|
1554
|
+
|
|
1555
|
+
@pyedb_function_handler()
|
|
1556
|
+
def set_solution_multi_frequencies(self, frequencies=("5GHz", "10GHz"), max_num_passes=10, max_delta_s="0.02"):
|
|
1557
|
+
"""Set multi-frequency solution.
|
|
1558
|
+
|
|
1559
|
+
Parameters
|
|
1560
|
+
----------
|
|
1561
|
+
frequencies : list, tuple, optional
|
|
1562
|
+
List or tuple of adaptive frequencies. The default is ``5GHz``.
|
|
1563
|
+
max_num_passes : int, optional
|
|
1564
|
+
Maximum number of passes. Default is ``10``.
|
|
1565
|
+
max_delta_s : float, optional
|
|
1566
|
+
Maximum delta S. The default is ``0.02``.
|
|
1567
|
+
|
|
1568
|
+
Returns
|
|
1569
|
+
-------
|
|
1570
|
+
bool
|
|
1571
|
+
|
|
1572
|
+
"""
|
|
1573
|
+
self.adaptive_settings.adapt_type = "kMultiFrequencies"
|
|
1574
|
+
self.adaptive_settings.adaptive_settings.AdaptiveFrequencyDataList.Clear()
|
|
1575
|
+
for i in frequencies:
|
|
1576
|
+
if not self.adaptive_settings.add_adaptive_frequency_data(i, max_num_passes, max_delta_s):
|
|
1577
|
+
return False
|
|
1578
|
+
return True
|
|
1579
|
+
|
|
1580
|
+
@pyedb_function_handler()
|
|
1581
|
+
def set_solution_broadband(
|
|
1582
|
+
self, low_frequency="5GHz", high_frequency="10GHz", max_num_passes=10, max_delta_s="0.02"
|
|
1583
|
+
):
|
|
1584
|
+
"""Set broadband solution.
|
|
1585
|
+
|
|
1586
|
+
Parameters
|
|
1587
|
+
----------
|
|
1588
|
+
low_frequency : str, float, optional
|
|
1589
|
+
Low frequency. The default is ``5GHz``.
|
|
1590
|
+
high_frequency : str, float, optional
|
|
1591
|
+
High frequency. The default is ``10GHz``.
|
|
1592
|
+
max_num_passes : int, optional
|
|
1593
|
+
Maximum number of passes. The default is ``10``.
|
|
1594
|
+
max_delta_s : float, optional
|
|
1595
|
+
Maximum Delta S. Default is ``0.02``.
|
|
1596
|
+
|
|
1597
|
+
Returns
|
|
1598
|
+
-------
|
|
1599
|
+
bool
|
|
1600
|
+
"""
|
|
1601
|
+
self.adaptive_settings.adapt_type = "kBroadband"
|
|
1602
|
+
self.adaptive_settings.adaptive_settings.AdaptiveFrequencyDataList.Clear()
|
|
1603
|
+
if not self.adaptive_settings.add_broadband_adaptive_frequency_data(
|
|
1604
|
+
low_frequency, high_frequency, max_num_passes, max_delta_s
|
|
1605
|
+
): # pragma no cover
|
|
1606
|
+
return False
|
|
1607
|
+
return True
|