pyedb 0.13.dev0__py3-none-any.whl → 0.15.dev0__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 +1 -1
- pyedb/configuration/cfg_common.py +0 -5
- pyedb/configuration/cfg_components.py +0 -2
- pyedb/configuration/cfg_operations.py +0 -2
- pyedb/configuration/cfg_package_definition.py +0 -2
- pyedb/configuration/cfg_ports_sources.py +14 -11
- pyedb/configuration/cfg_stackup.py +0 -7
- pyedb/configuration/configuration.py +0 -6
- pyedb/dotnet/application/Variables.py +4 -40
- pyedb/dotnet/edb.py +27 -82
- pyedb/dotnet/edb_core/{edb_data/components_data.py → cell/hierarchy/component.py} +13 -133
- pyedb/dotnet/edb_core/cell/hierarchy/model.py +0 -3
- pyedb/dotnet/edb_core/cell/hierarchy/netlist_model.py +30 -0
- pyedb/dotnet/edb_core/cell/hierarchy/pin_pair_model.py +105 -0
- pyedb/dotnet/edb_core/cell/hierarchy/s_parameter_model.py +34 -0
- pyedb/dotnet/edb_core/cell/hierarchy/spice_model.py +34 -0
- pyedb/dotnet/edb_core/cell/layout.py +137 -0
- pyedb/dotnet/edb_core/cell/layout_obj.py +2 -4
- pyedb/dotnet/edb_core/cell/primitive.py +199 -1
- pyedb/dotnet/edb_core/cell/terminal/bundle_terminal.py +52 -0
- pyedb/dotnet/edb_core/cell/terminal/edge_terminal.py +50 -0
- pyedb/dotnet/edb_core/cell/terminal/padstack_instance_terminal.py +88 -0
- pyedb/dotnet/edb_core/cell/terminal/pingroup_terminal.py +59 -0
- pyedb/dotnet/edb_core/cell/terminal/point_terminal.py +73 -0
- pyedb/dotnet/edb_core/{edb_data/terminals.py → cell/terminal/terminal.py} +33 -242
- pyedb/dotnet/edb_core/components.py +10 -56
- pyedb/dotnet/edb_core/definition/component_def.py +1 -8
- pyedb/dotnet/edb_core/definition/component_model.py +0 -2
- pyedb/dotnet/edb_core/definition/definitions.py +0 -2
- pyedb/dotnet/edb_core/definition/package_def.py +7 -5
- pyedb/dotnet/edb_core/edb_data/control_file.py +0 -3
- pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +0 -5
- pyedb/dotnet/edb_core/edb_data/hfss_pi_simulation_setup_data.py +4 -9
- pyedb/dotnet/edb_core/edb_data/layer_data.py +0 -7
- pyedb/dotnet/edb_core/edb_data/nets_data.py +2 -5
- pyedb/dotnet/edb_core/edb_data/padstacks_data.py +11 -29
- pyedb/dotnet/edb_core/edb_data/ports.py +4 -4
- pyedb/dotnet/edb_core/edb_data/primitives_data.py +3 -26
- pyedb/dotnet/edb_core/edb_data/raptor_x_simulation_setup_data.py +13 -20
- pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +3 -11
- pyedb/dotnet/edb_core/edb_data/sources.py +12 -17
- pyedb/dotnet/edb_core/general.py +1 -6
- pyedb/dotnet/edb_core/geometry/polygon_data.py +0 -3
- pyedb/dotnet/edb_core/hfss.py +1 -33
- pyedb/dotnet/edb_core/layout.py +0 -35
- pyedb/dotnet/edb_core/layout_validation.py +1 -3
- pyedb/dotnet/edb_core/materials.py +1 -22
- pyedb/dotnet/edb_core/net_class.py +0 -8
- pyedb/dotnet/edb_core/nets.py +4 -29
- pyedb/dotnet/edb_core/padstack.py +76 -30
- pyedb/dotnet/edb_core/sim_setup_data/data/adaptive_frequency_data.py +72 -0
- pyedb/dotnet/edb_core/sim_setup_data/data/mesh_operation.py +287 -0
- pyedb/dotnet/edb_core/{edb_data/hfss_simulation_setup_data.py → sim_setup_data/data/settings.py} +174 -878
- pyedb/dotnet/edb_core/sim_setup_data/data/sweep_data.py +509 -0
- pyedb/dotnet/edb_core/sim_setup_data/io/__init__.py +0 -0
- pyedb/dotnet/edb_core/{edb_data/siwave_simulation_setup_data.py → sim_setup_data/io/siwave.py} +0 -341
- pyedb/dotnet/edb_core/siwave.py +5 -33
- pyedb/dotnet/edb_core/stackup.py +4 -51
- pyedb/dotnet/edb_core/utilities/simulation_setup.py +613 -366
- pyedb/generic/data_handlers.py +1 -9
- pyedb/generic/general_methods.py +3 -53
- pyedb/generic/plot.py +1 -2
- pyedb/ipc2581/ecad/cad_data/layer_feature.py +1 -7
- pyedb/ipc2581/ecad/cad_data/package.py +1 -4
- pyedb/ipc2581/ecad/cad_data/path.py +1 -3
- pyedb/ipc2581/ecad/cad_data/polygon.py +1 -6
- pyedb/ipc2581/ecad/cad_data/step.py +1 -10
- pyedb/ipc2581/ipc2581.py +8 -15
- pyedb/modeler/geometry_operators.py +164 -67
- pyedb/siwave.py +25 -32
- {pyedb-0.13.dev0.dist-info → pyedb-0.15.dev0.dist-info}/METADATA +2 -2
- {pyedb-0.13.dev0.dist-info → pyedb-0.15.dev0.dist-info}/RECORD +75 -61
- /pyedb/dotnet/edb_core/cell/{__init__.py → terminal/__init__.py} +0 -0
- {pyedb-0.13.dev0.dist-info → pyedb-0.15.dev0.dist-info}/LICENSE +0 -0
- {pyedb-0.13.dev0.dist-info → pyedb-0.15.dev0.dist-info}/WHEEL +0 -0
pyedb/dotnet/edb_core/{edb_data/hfss_simulation_setup_data.py → sim_setup_data/data/settings.py}
RENAMED
|
@@ -20,508 +20,9 @@
|
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
|
-
from pyedb.dotnet.
|
|
24
|
-
|
|
25
|
-
from pyedb.dotnet.edb_core.utilities.simulation_setup import (
|
|
26
|
-
BaseSimulationSetup,
|
|
27
|
-
EdbFrequencySweep,
|
|
23
|
+
from pyedb.dotnet.edb_core.sim_setup_data.data.adaptive_frequency_data import (
|
|
24
|
+
AdaptiveFrequencyData,
|
|
28
25
|
)
|
|
29
|
-
from pyedb.generic.general_methods import generate_unique_name, pyedb_function_handler
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class AdaptiveType(object):
|
|
33
|
-
(SingleFrequency, MultiFrequency, BroadBand) = range(0, 3)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class MeshOperation(object):
|
|
37
|
-
"""Mesh Operation Class."""
|
|
38
|
-
|
|
39
|
-
def __init__(self, parent, mesh_operation):
|
|
40
|
-
self._parent = parent
|
|
41
|
-
self.mesh_operation = mesh_operation
|
|
42
|
-
self._mesh_op_mapping = {
|
|
43
|
-
"kMeshSetupBase": mesh_operation.TMeshOpType.kMeshSetupBase,
|
|
44
|
-
"kMeshSetupLength": mesh_operation.TMeshOpType.kMeshSetupLength,
|
|
45
|
-
"kMeshSetupSkinDepth": mesh_operation.TMeshOpType.kMeshSetupSkinDepth,
|
|
46
|
-
"kNumMeshOpTypes": mesh_operation.TMeshOpType.kNumMeshOpTypes,
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@property
|
|
50
|
-
def enabled(self):
|
|
51
|
-
"""Whether if mesh operation is enabled.
|
|
52
|
-
|
|
53
|
-
Returns
|
|
54
|
-
-------
|
|
55
|
-
bool
|
|
56
|
-
``True`` if mesh operation is used, ``False`` otherwise.
|
|
57
|
-
"""
|
|
58
|
-
return self.mesh_operation.Enabled
|
|
59
|
-
|
|
60
|
-
@property
|
|
61
|
-
def mesh_operation_type(self):
|
|
62
|
-
"""Mesh operation type.
|
|
63
|
-
Options:
|
|
64
|
-
0- ``kMeshSetupBase``
|
|
65
|
-
1- ``kMeshSetupLength``
|
|
66
|
-
2- ``kMeshSetupSkinDepth``
|
|
67
|
-
3- ``kNumMeshOpTypes``.
|
|
68
|
-
|
|
69
|
-
Returns
|
|
70
|
-
-------
|
|
71
|
-
int
|
|
72
|
-
"""
|
|
73
|
-
return self.mesh_operation.MeshOpType.ToString()
|
|
74
|
-
|
|
75
|
-
@property
|
|
76
|
-
def mesh_region(self):
|
|
77
|
-
"""Mesh region name.
|
|
78
|
-
|
|
79
|
-
Returns
|
|
80
|
-
-------
|
|
81
|
-
str
|
|
82
|
-
Name of the mesh region.
|
|
83
|
-
"""
|
|
84
|
-
return self.mesh_operation.MeshRegion
|
|
85
|
-
|
|
86
|
-
@property
|
|
87
|
-
def name(self):
|
|
88
|
-
"""Mesh operation name.
|
|
89
|
-
|
|
90
|
-
Returns
|
|
91
|
-
-------
|
|
92
|
-
str
|
|
93
|
-
"""
|
|
94
|
-
return self.mesh_operation.Name
|
|
95
|
-
|
|
96
|
-
@property
|
|
97
|
-
def nets_layers_list(self):
|
|
98
|
-
"""List of nets and layers.
|
|
99
|
-
|
|
100
|
-
Returns
|
|
101
|
-
-------
|
|
102
|
-
list
|
|
103
|
-
List of lists with three elements. Each list must contain:
|
|
104
|
-
1- net name
|
|
105
|
-
2- layer name
|
|
106
|
-
3- bool.
|
|
107
|
-
Third element is represents whether if the mesh operation is enabled or disabled.
|
|
108
|
-
|
|
109
|
-
"""
|
|
110
|
-
return self.mesh_operation.NetsLayersList
|
|
111
|
-
|
|
112
|
-
@nets_layers_list.setter
|
|
113
|
-
def nets_layers_list(self, values):
|
|
114
|
-
temp = []
|
|
115
|
-
for net, layers in values.items():
|
|
116
|
-
for layer in layers:
|
|
117
|
-
temp.append(Tuple[str, str, bool](net, layer, True))
|
|
118
|
-
self.mesh_operation.NetsLayersList = convert_py_list_to_net_list(temp)
|
|
119
|
-
|
|
120
|
-
@property
|
|
121
|
-
def refine_inside(self):
|
|
122
|
-
"""Whether to turn on refine inside objects.
|
|
123
|
-
|
|
124
|
-
Returns
|
|
125
|
-
-------
|
|
126
|
-
bool
|
|
127
|
-
``True`` if refine inside objects is used, ``False`` otherwise.
|
|
128
|
-
|
|
129
|
-
"""
|
|
130
|
-
return self.mesh_operation.RefineInside
|
|
131
|
-
|
|
132
|
-
@enabled.setter
|
|
133
|
-
def enabled(self, value):
|
|
134
|
-
self.mesh_operation.Enabled = value
|
|
135
|
-
self._parent._update_setup()
|
|
136
|
-
|
|
137
|
-
@mesh_region.setter
|
|
138
|
-
def mesh_region(self, value):
|
|
139
|
-
self.mesh_operation.MeshRegion = value
|
|
140
|
-
self._parent._update_setup()
|
|
141
|
-
|
|
142
|
-
@name.setter
|
|
143
|
-
def name(self, value):
|
|
144
|
-
self.mesh_operation.Name = value
|
|
145
|
-
self._parent._update_setup()
|
|
146
|
-
|
|
147
|
-
@refine_inside.setter
|
|
148
|
-
def refine_inside(self, value):
|
|
149
|
-
self.mesh_operation.RefineInside = value
|
|
150
|
-
self._parent._update_setup()
|
|
151
|
-
|
|
152
|
-
@property
|
|
153
|
-
def max_elements(self):
|
|
154
|
-
"""Maximum number of elements.
|
|
155
|
-
|
|
156
|
-
Returns
|
|
157
|
-
-------
|
|
158
|
-
str
|
|
159
|
-
"""
|
|
160
|
-
return self.mesh_operation.MaxElems
|
|
161
|
-
|
|
162
|
-
@property
|
|
163
|
-
def restrict_max_elements(self):
|
|
164
|
-
"""Whether to restrict maximum number of elements.
|
|
165
|
-
|
|
166
|
-
Returns
|
|
167
|
-
-------
|
|
168
|
-
bool
|
|
169
|
-
"""
|
|
170
|
-
return self.mesh_operation.RestrictMaxElem
|
|
171
|
-
|
|
172
|
-
@max_elements.setter
|
|
173
|
-
def max_elements(self, value):
|
|
174
|
-
self.mesh_operation.MaxElems = str(value)
|
|
175
|
-
self._parent._update_setup()
|
|
176
|
-
|
|
177
|
-
@restrict_max_elements.setter
|
|
178
|
-
def restrict_max_elements(self, value):
|
|
179
|
-
"""Whether to restrict maximum number of elements.
|
|
180
|
-
|
|
181
|
-
Returns
|
|
182
|
-
-------
|
|
183
|
-
bool
|
|
184
|
-
"""
|
|
185
|
-
self.mesh_operation.RestrictMaxElem = value
|
|
186
|
-
self._parent._update_setup()
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
class MeshOperationLength(MeshOperation, object):
|
|
190
|
-
"""Mesh operation Length class.
|
|
191
|
-
This class is accessible from Hfss Setup in EDB and add_length_mesh_operation method.
|
|
192
|
-
|
|
193
|
-
Examples
|
|
194
|
-
--------
|
|
195
|
-
>>> mop = edbapp.setups["setup1a"].add_length_mesh_operation({"GND": ["TOP", "BOTTOM"]})
|
|
196
|
-
>>> mop.max_elements = 3000
|
|
197
|
-
"""
|
|
198
|
-
|
|
199
|
-
def __init__(self, parent, mesh_operation):
|
|
200
|
-
MeshOperation.__init__(self, parent, mesh_operation)
|
|
201
|
-
|
|
202
|
-
@property
|
|
203
|
-
def max_length(self):
|
|
204
|
-
"""Maximum length of elements.
|
|
205
|
-
|
|
206
|
-
Returns
|
|
207
|
-
-------
|
|
208
|
-
str
|
|
209
|
-
"""
|
|
210
|
-
return self.mesh_operation.MaxLength
|
|
211
|
-
|
|
212
|
-
@property
|
|
213
|
-
def restrict_length(self):
|
|
214
|
-
"""Whether to restrict length of elements.
|
|
215
|
-
|
|
216
|
-
Returns
|
|
217
|
-
-------
|
|
218
|
-
bool
|
|
219
|
-
"""
|
|
220
|
-
return self.mesh_operation.RestrictLength
|
|
221
|
-
|
|
222
|
-
@max_length.setter
|
|
223
|
-
def max_length(self, value):
|
|
224
|
-
self.mesh_operation.MaxLength = value
|
|
225
|
-
self._parent._update_setup()
|
|
226
|
-
|
|
227
|
-
@restrict_length.setter
|
|
228
|
-
def restrict_length(self, value):
|
|
229
|
-
"""Whether to restrict length of elements.
|
|
230
|
-
|
|
231
|
-
Returns
|
|
232
|
-
-------
|
|
233
|
-
bool
|
|
234
|
-
"""
|
|
235
|
-
self.mesh_operation.RestrictLength = value
|
|
236
|
-
self._parent._update_setup()
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
class MeshOperationSkinDepth(MeshOperation, object):
|
|
240
|
-
"""Mesh operation Skin Depth class.
|
|
241
|
-
This class is accessible from Hfss Setup in EDB and assign_skin_depth_mesh_operation method.
|
|
242
|
-
|
|
243
|
-
Examples
|
|
244
|
-
--------
|
|
245
|
-
>>> mop = edbapp.setups["setup1a"].add_skin_depth_mesh_operation({"GND": ["TOP", "BOTTOM"]})
|
|
246
|
-
>>> mop.max_elements = 3000
|
|
247
|
-
"""
|
|
248
|
-
|
|
249
|
-
def __init__(self, parent, mesh_operation):
|
|
250
|
-
MeshOperation.__init__(self, parent, mesh_operation)
|
|
251
|
-
|
|
252
|
-
@property
|
|
253
|
-
def skin_depth(self):
|
|
254
|
-
"""Skin depth value.
|
|
255
|
-
|
|
256
|
-
Returns
|
|
257
|
-
-------
|
|
258
|
-
str
|
|
259
|
-
"""
|
|
260
|
-
return self.mesh_operation.SkinDepth
|
|
261
|
-
|
|
262
|
-
@skin_depth.setter
|
|
263
|
-
def skin_depth(self, value):
|
|
264
|
-
self.mesh_operation.SkinDepth = value
|
|
265
|
-
self._parent._update_setup()
|
|
266
|
-
|
|
267
|
-
@property
|
|
268
|
-
def surface_triangle_length(self):
|
|
269
|
-
"""Surface triangle length value.
|
|
270
|
-
|
|
271
|
-
Returns
|
|
272
|
-
-------
|
|
273
|
-
str
|
|
274
|
-
"""
|
|
275
|
-
return self.mesh_operation.SurfTriLength
|
|
276
|
-
|
|
277
|
-
@surface_triangle_length.setter
|
|
278
|
-
def surface_triangle_length(self, value):
|
|
279
|
-
self.mesh_operation.SurfTriLength = value
|
|
280
|
-
self._parent._update_setup()
|
|
281
|
-
|
|
282
|
-
@property
|
|
283
|
-
def number_of_layer_elements(self):
|
|
284
|
-
"""Number of layer elements.
|
|
285
|
-
|
|
286
|
-
Returns
|
|
287
|
-
-------
|
|
288
|
-
str
|
|
289
|
-
"""
|
|
290
|
-
return self.mesh_operation.NumLayers
|
|
291
|
-
|
|
292
|
-
@number_of_layer_elements.setter
|
|
293
|
-
def number_of_layer_elements(self, value):
|
|
294
|
-
self.mesh_operation.NumLayers = str(value)
|
|
295
|
-
self._parent._update_setup()
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
class HfssPortSettings(object):
|
|
299
|
-
"""Manages EDB methods for HFSS port settings."""
|
|
300
|
-
|
|
301
|
-
def __init__(self, parent):
|
|
302
|
-
self._parent = parent
|
|
303
|
-
|
|
304
|
-
@property
|
|
305
|
-
def _hfss_port_settings(self):
|
|
306
|
-
return self._parent.get_sim_setup_info.SimulationSettings.HFSSPortSettings
|
|
307
|
-
|
|
308
|
-
@property
|
|
309
|
-
def max_delta_z0(self):
|
|
310
|
-
"""Maximum change to Z0 in successive passes.
|
|
311
|
-
|
|
312
|
-
Returns
|
|
313
|
-
-------
|
|
314
|
-
float
|
|
315
|
-
"""
|
|
316
|
-
return self._hfss_port_settings.MaxDeltaZ0
|
|
317
|
-
|
|
318
|
-
@max_delta_z0.setter
|
|
319
|
-
def max_delta_z0(self, value):
|
|
320
|
-
self._hfss_port_settings.MaxDeltaZ0 = value
|
|
321
|
-
self._parent._update_setup()
|
|
322
|
-
|
|
323
|
-
@property
|
|
324
|
-
def max_triangles_wave_port(self):
|
|
325
|
-
"""Maximum number of triangles allowed for wave ports.
|
|
326
|
-
|
|
327
|
-
Returns
|
|
328
|
-
-------
|
|
329
|
-
int
|
|
330
|
-
"""
|
|
331
|
-
return self._hfss_port_settings.MaxTrianglesWavePort
|
|
332
|
-
|
|
333
|
-
@max_triangles_wave_port.setter
|
|
334
|
-
def max_triangles_wave_port(self, value):
|
|
335
|
-
self._hfss_port_settings.MaxTrianglesWavePort = value
|
|
336
|
-
self._parent._update_setup()
|
|
337
|
-
|
|
338
|
-
@property
|
|
339
|
-
def min_triangles_wave_port(self):
|
|
340
|
-
"""Minimum number of triangles allowed for wave ports.
|
|
341
|
-
|
|
342
|
-
Returns
|
|
343
|
-
-------
|
|
344
|
-
int
|
|
345
|
-
"""
|
|
346
|
-
return self._hfss_port_settings.MinTrianglesWavePort
|
|
347
|
-
|
|
348
|
-
@min_triangles_wave_port.setter
|
|
349
|
-
def min_triangles_wave_port(self, value):
|
|
350
|
-
self._hfss_port_settings.MinTrianglesWavePort = value
|
|
351
|
-
self._parent._update_setup()
|
|
352
|
-
|
|
353
|
-
@property
|
|
354
|
-
def enable_set_triangles_wave_port(self):
|
|
355
|
-
"""Whether to enable setting of minimum and maximum mesh limits for wave ports.
|
|
356
|
-
|
|
357
|
-
Returns
|
|
358
|
-
-------
|
|
359
|
-
bool
|
|
360
|
-
``True`` if triangles wave port is used, ``False`` otherwise.
|
|
361
|
-
"""
|
|
362
|
-
return self._hfss_port_settings.SetTrianglesWavePort
|
|
363
|
-
|
|
364
|
-
@enable_set_triangles_wave_port.setter
|
|
365
|
-
def enable_set_triangles_wave_port(self, value):
|
|
366
|
-
self._hfss_port_settings.SetTrianglesWavePort = value
|
|
367
|
-
self._parent._update_setup()
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
class HfssSolverSettings(object):
|
|
371
|
-
"""Manages EDB methods for HFSS solver settings."""
|
|
372
|
-
|
|
373
|
-
def __init__(self, sim_setup):
|
|
374
|
-
self._parent = sim_setup
|
|
375
|
-
|
|
376
|
-
@property
|
|
377
|
-
def _hfss_solver_settings(self):
|
|
378
|
-
return self._parent.get_sim_setup_info.SimulationSettings.HFSSSolverSettings
|
|
379
|
-
|
|
380
|
-
@property
|
|
381
|
-
def enhanced_low_freq_accuracy(self):
|
|
382
|
-
"""Whether to enable legacy low-frequency sampling.
|
|
383
|
-
|
|
384
|
-
Returns
|
|
385
|
-
-------
|
|
386
|
-
bool
|
|
387
|
-
``True`` if low frequency accuracy is used, ``False`` otherwise.
|
|
388
|
-
"""
|
|
389
|
-
return self._hfss_solver_settings.EnhancedLowFreqAccuracy
|
|
390
|
-
|
|
391
|
-
@enhanced_low_freq_accuracy.setter
|
|
392
|
-
def enhanced_low_freq_accuracy(self, value):
|
|
393
|
-
self._hfss_solver_settings.EnhancedLowFreqAccuracy = value
|
|
394
|
-
self._parent._update_setup()
|
|
395
|
-
|
|
396
|
-
@property
|
|
397
|
-
def order_basis(self):
|
|
398
|
-
"""Order of the basic functions for HFSS.
|
|
399
|
-
- 0=Zero.
|
|
400
|
-
- 1=1st order.
|
|
401
|
-
- 2=2nd order.
|
|
402
|
-
- 3=Mixed.
|
|
403
|
-
|
|
404
|
-
Returns
|
|
405
|
-
-------
|
|
406
|
-
int
|
|
407
|
-
Integer value according to the description."""
|
|
408
|
-
mapping = {0: "zero", 1: "first", 2: "second", 3: "mixed"}
|
|
409
|
-
return mapping[self._hfss_solver_settings.OrderBasis]
|
|
410
|
-
|
|
411
|
-
@order_basis.setter
|
|
412
|
-
def order_basis(self, value):
|
|
413
|
-
mapping = {"zero": 0, "first": 1, "second": 2, "mixed": 3}
|
|
414
|
-
self._hfss_solver_settings.OrderBasis = mapping[value]
|
|
415
|
-
self._parent._update_setup()
|
|
416
|
-
|
|
417
|
-
@property
|
|
418
|
-
def relative_residual(self):
|
|
419
|
-
"""Residual for use by the iterative solver.
|
|
420
|
-
|
|
421
|
-
Returns
|
|
422
|
-
-------
|
|
423
|
-
float
|
|
424
|
-
"""
|
|
425
|
-
return self._hfss_solver_settings.RelativeResidual
|
|
426
|
-
|
|
427
|
-
@relative_residual.setter
|
|
428
|
-
def relative_residual(self, value):
|
|
429
|
-
self._hfss_solver_settings.RelativeResidual = value
|
|
430
|
-
self._parent._update_setup()
|
|
431
|
-
|
|
432
|
-
@property
|
|
433
|
-
def solver_type(self):
|
|
434
|
-
"""Get solver type to use (Direct/Iterative/Auto) for HFSS.
|
|
435
|
-
Options:
|
|
436
|
-
1- ``kAutoSolver``.
|
|
437
|
-
2- ``kDirectSolver``.
|
|
438
|
-
3- ``kIterativeSolver``.
|
|
439
|
-
4- ``kNumSolverTypes``.
|
|
440
|
-
|
|
441
|
-
Returns
|
|
442
|
-
-------
|
|
443
|
-
str
|
|
444
|
-
"""
|
|
445
|
-
mapping = {"kAutoSolver": "auto", "kDirectSolver": "direct", "kIterativeSolver": "iterative"}
|
|
446
|
-
solver_type = self._hfss_solver_settings.SolverType.ToString()
|
|
447
|
-
return mapping[solver_type]
|
|
448
|
-
|
|
449
|
-
@solver_type.setter
|
|
450
|
-
def solver_type(self, value):
|
|
451
|
-
mapping = {
|
|
452
|
-
"auto": self._hfss_solver_settings.SolverType.kAutoSolver,
|
|
453
|
-
"direct": self._hfss_solver_settings.SolverType.kDirectSolver,
|
|
454
|
-
"iterative": self._hfss_solver_settings.SolverType.kIterativeSolver,
|
|
455
|
-
}
|
|
456
|
-
self._hfss_solver_settings.SolverType = mapping[value]
|
|
457
|
-
self._parent._update_setup()
|
|
458
|
-
|
|
459
|
-
@property
|
|
460
|
-
def use_shell_elements(self):
|
|
461
|
-
"""Whether to enable use of shell elements.
|
|
462
|
-
|
|
463
|
-
Returns
|
|
464
|
-
-------
|
|
465
|
-
bool
|
|
466
|
-
``True`` if shall elements are used, ``False`` otherwise.
|
|
467
|
-
"""
|
|
468
|
-
return self._hfss_solver_settings.UseShellElements
|
|
469
|
-
|
|
470
|
-
@use_shell_elements.setter
|
|
471
|
-
def use_shell_elements(self, value):
|
|
472
|
-
self._hfss_solver_settings.UseShellElements = value
|
|
473
|
-
self._parent._update_setup()
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
class AdaptiveFrequencyData(object):
|
|
477
|
-
"""Manages EDB methods for adaptive frequency data."""
|
|
478
|
-
|
|
479
|
-
def __init__(self, adaptive_frequency_data):
|
|
480
|
-
self._adaptive_frequency_data = adaptive_frequency_data
|
|
481
|
-
|
|
482
|
-
@property
|
|
483
|
-
def adaptive_frequency(self):
|
|
484
|
-
"""Adaptive frequency for the setup.
|
|
485
|
-
|
|
486
|
-
Returns
|
|
487
|
-
-------
|
|
488
|
-
str
|
|
489
|
-
Frequency with units.
|
|
490
|
-
"""
|
|
491
|
-
return self._adaptive_frequency_data.AdaptiveFrequency
|
|
492
|
-
|
|
493
|
-
@adaptive_frequency.setter
|
|
494
|
-
def adaptive_frequency(self, value):
|
|
495
|
-
self._adaptive_frequency_data.AdaptiveFrequency = value
|
|
496
|
-
|
|
497
|
-
@property
|
|
498
|
-
def max_delta(self):
|
|
499
|
-
"""Maximum change of S-parameters between two consecutive passes, which serves as
|
|
500
|
-
a stopping criterion.
|
|
501
|
-
|
|
502
|
-
Returns
|
|
503
|
-
-------
|
|
504
|
-
str
|
|
505
|
-
"""
|
|
506
|
-
return self._adaptive_frequency_data.MaxDelta
|
|
507
|
-
|
|
508
|
-
@max_delta.setter
|
|
509
|
-
def max_delta(self, value):
|
|
510
|
-
self._adaptive_frequency_data.MaxDelta = str(value)
|
|
511
|
-
|
|
512
|
-
@property
|
|
513
|
-
def max_passes(self):
|
|
514
|
-
"""Maximum allowed number of mesh refinement cycles.
|
|
515
|
-
|
|
516
|
-
Returns
|
|
517
|
-
-------
|
|
518
|
-
int
|
|
519
|
-
"""
|
|
520
|
-
return self._adaptive_frequency_data.MaxPasses
|
|
521
|
-
|
|
522
|
-
@max_passes.setter
|
|
523
|
-
def max_passes(self, value):
|
|
524
|
-
self._adaptive_frequency_data.MaxPasses = value
|
|
525
26
|
|
|
526
27
|
|
|
527
28
|
class AdaptiveSettings(object):
|
|
@@ -714,7 +215,6 @@ class AdaptiveSettings(object):
|
|
|
714
215
|
self.adaptive_settings.UseMaxRefinement = value
|
|
715
216
|
self._parent._update_setup()
|
|
716
217
|
|
|
717
|
-
@pyedb_function_handler()
|
|
718
218
|
def add_adaptive_frequency_data(self, frequency=0, max_num_passes=10, max_delta_s=0.02):
|
|
719
219
|
"""Add a setup for frequency data.
|
|
720
220
|
|
|
@@ -740,7 +240,6 @@ class AdaptiveSettings(object):
|
|
|
740
240
|
self.adaptive_settings.AdaptiveFrequencyDataList.Add(low_freq_adapt_data)
|
|
741
241
|
return self._parent._update_setup()
|
|
742
242
|
|
|
743
|
-
@pyedb_function_handler()
|
|
744
243
|
def add_broadband_adaptive_frequency_data(
|
|
745
244
|
self, low_frequency=0, high_frequency=10e9, max_num_passes=10, max_delta_s=0.02
|
|
746
245
|
):
|
|
@@ -928,9 +427,68 @@ class DefeatureSettings(object):
|
|
|
928
427
|
"""
|
|
929
428
|
return self._defeature_settings.UseDefeatureAbsLength
|
|
930
429
|
|
|
931
|
-
@use_defeature_abs_length.setter
|
|
932
|
-
def use_defeature_abs_length(self, value):
|
|
933
|
-
self._defeature_settings.UseDefeatureAbsLength = value
|
|
430
|
+
@use_defeature_abs_length.setter
|
|
431
|
+
def use_defeature_abs_length(self, value):
|
|
432
|
+
self._defeature_settings.UseDefeatureAbsLength = value
|
|
433
|
+
self._parent._update_setup()
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
class AdvancedMeshSettings(object):
|
|
437
|
+
"""Manages EDB methods for advanced mesh settings."""
|
|
438
|
+
|
|
439
|
+
def __init__(self, parent):
|
|
440
|
+
self._parent = parent
|
|
441
|
+
|
|
442
|
+
@property
|
|
443
|
+
def _advanced_mesh_settings(self):
|
|
444
|
+
return self._parent.get_sim_setup_info.SimulationSettings.AdvancedMeshSettings
|
|
445
|
+
|
|
446
|
+
@property
|
|
447
|
+
def layer_snap_tol(self):
|
|
448
|
+
"""Layer snap tolerance. Attempt to align independent stackups in the mesher.
|
|
449
|
+
|
|
450
|
+
Returns
|
|
451
|
+
-------
|
|
452
|
+
str
|
|
453
|
+
|
|
454
|
+
"""
|
|
455
|
+
return self._advanced_mesh_settings.LayerSnapTol
|
|
456
|
+
|
|
457
|
+
@layer_snap_tol.setter
|
|
458
|
+
def layer_snap_tol(self, value):
|
|
459
|
+
self._advanced_mesh_settings.LayerSnapTol = value
|
|
460
|
+
self._parent._update_setup()
|
|
461
|
+
|
|
462
|
+
@property
|
|
463
|
+
def mesh_display_attributes(self):
|
|
464
|
+
"""Mesh display attributes. Set color for mesh display (i.e. ``"#000000"``).
|
|
465
|
+
|
|
466
|
+
Returns
|
|
467
|
+
-------
|
|
468
|
+
str
|
|
469
|
+
"""
|
|
470
|
+
return self._advanced_mesh_settings.MeshDisplayAttributes
|
|
471
|
+
|
|
472
|
+
@mesh_display_attributes.setter
|
|
473
|
+
def mesh_display_attributes(self, value):
|
|
474
|
+
self._advanced_mesh_settings.MeshDisplayAttributes = value
|
|
475
|
+
self._parent._update_setup()
|
|
476
|
+
|
|
477
|
+
@property
|
|
478
|
+
def replace_3d_triangles(self):
|
|
479
|
+
"""Whether to turn on replace 3D triangles.
|
|
480
|
+
|
|
481
|
+
Returns
|
|
482
|
+
-------
|
|
483
|
+
bool
|
|
484
|
+
``True`` if replace 3D triangles is used, ``False`` otherwise.
|
|
485
|
+
|
|
486
|
+
"""
|
|
487
|
+
return self._advanced_mesh_settings.Replace3DTriangles
|
|
488
|
+
|
|
489
|
+
@replace_3d_triangles.setter
|
|
490
|
+
def replace_3d_triangles(self, value):
|
|
491
|
+
self._advanced_mesh_settings.Replace3DTriangles = value
|
|
934
492
|
self._parent._update_setup()
|
|
935
493
|
|
|
936
494
|
|
|
@@ -1042,65 +600,6 @@ class ViaSettings(object):
|
|
|
1042
600
|
self._parent._update_setup()
|
|
1043
601
|
|
|
1044
602
|
|
|
1045
|
-
class AdvancedMeshSettings(object):
|
|
1046
|
-
"""Manages EDB methods for advanced mesh settings."""
|
|
1047
|
-
|
|
1048
|
-
def __init__(self, parent):
|
|
1049
|
-
self._parent = parent
|
|
1050
|
-
|
|
1051
|
-
@property
|
|
1052
|
-
def _advanced_mesh_settings(self):
|
|
1053
|
-
return self._parent.get_sim_setup_info.SimulationSettings.AdvancedMeshSettings
|
|
1054
|
-
|
|
1055
|
-
@property
|
|
1056
|
-
def layer_snap_tol(self):
|
|
1057
|
-
"""Layer snap tolerance. Attempt to align independent stackups in the mesher.
|
|
1058
|
-
|
|
1059
|
-
Returns
|
|
1060
|
-
-------
|
|
1061
|
-
str
|
|
1062
|
-
|
|
1063
|
-
"""
|
|
1064
|
-
return self._advanced_mesh_settings.LayerSnapTol
|
|
1065
|
-
|
|
1066
|
-
@layer_snap_tol.setter
|
|
1067
|
-
def layer_snap_tol(self, value):
|
|
1068
|
-
self._advanced_mesh_settings.LayerSnapTol = value
|
|
1069
|
-
self._parent._update_setup()
|
|
1070
|
-
|
|
1071
|
-
@property
|
|
1072
|
-
def mesh_display_attributes(self):
|
|
1073
|
-
"""Mesh display attributes. Set color for mesh display (i.e. ``"#000000"``).
|
|
1074
|
-
|
|
1075
|
-
Returns
|
|
1076
|
-
-------
|
|
1077
|
-
str
|
|
1078
|
-
"""
|
|
1079
|
-
return self._advanced_mesh_settings.MeshDisplayAttributes
|
|
1080
|
-
|
|
1081
|
-
@mesh_display_attributes.setter
|
|
1082
|
-
def mesh_display_attributes(self, value):
|
|
1083
|
-
self._advanced_mesh_settings.MeshDisplayAttributes = value
|
|
1084
|
-
self._parent._update_setup()
|
|
1085
|
-
|
|
1086
|
-
@property
|
|
1087
|
-
def replace_3d_triangles(self):
|
|
1088
|
-
"""Whether to turn on replace 3D triangles.
|
|
1089
|
-
|
|
1090
|
-
Returns
|
|
1091
|
-
-------
|
|
1092
|
-
bool
|
|
1093
|
-
``True`` if replace 3D triangles is used, ``False`` otherwise.
|
|
1094
|
-
|
|
1095
|
-
"""
|
|
1096
|
-
return self._advanced_mesh_settings.Replace3DTriangles
|
|
1097
|
-
|
|
1098
|
-
@replace_3d_triangles.setter
|
|
1099
|
-
def replace_3d_triangles(self, value):
|
|
1100
|
-
self._advanced_mesh_settings.Replace3DTriangles = value
|
|
1101
|
-
self._parent._update_setup()
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
603
|
class CurveApproxSettings(object):
|
|
1105
604
|
"""Manages EDB methods for curve approximate settings."""
|
|
1106
605
|
|
|
@@ -1273,382 +772,179 @@ class DcrSettings(object):
|
|
|
1273
772
|
self._parent._update_setup()
|
|
1274
773
|
|
|
1275
774
|
|
|
1276
|
-
class
|
|
1277
|
-
"""Manages EDB methods for HFSS
|
|
1278
|
-
|
|
1279
|
-
def __init__(self, pedb, edb_object=None):
|
|
1280
|
-
super().__init__(pedb, edb_object)
|
|
1281
|
-
self._setup_type = "kHFSS"
|
|
1282
|
-
self._mesh_operations = {}
|
|
775
|
+
class HfssPortSettings(object):
|
|
776
|
+
"""Manages EDB methods for HFSS port settings."""
|
|
1283
777
|
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
"""Create an HFSS setup."""
|
|
1287
|
-
self._name = name
|
|
1288
|
-
self._create(name)
|
|
1289
|
-
return self
|
|
778
|
+
def __init__(self, parent):
|
|
779
|
+
self._parent = parent
|
|
1290
780
|
|
|
1291
781
|
@property
|
|
1292
|
-
def
|
|
1293
|
-
|
|
1294
|
-
return self._edb_object.GetSimSetupInfo()
|
|
782
|
+
def _hfss_port_settings(self):
|
|
783
|
+
return self._parent.get_sim_setup_info.SimulationSettings.HFSSPortSettings
|
|
1295
784
|
|
|
1296
785
|
@property
|
|
1297
|
-
def
|
|
1298
|
-
"""
|
|
1299
|
-
Options are:
|
|
1300
|
-
1 - ``kFast``.
|
|
1301
|
-
2 - ``kMedium``.
|
|
1302
|
-
3 - ``kAccurate``.
|
|
1303
|
-
4 - ``kNumSliderTypes``.
|
|
786
|
+
def max_delta_z0(self):
|
|
787
|
+
"""Maximum change to Z0 in successive passes.
|
|
1304
788
|
|
|
1305
789
|
Returns
|
|
1306
790
|
-------
|
|
1307
|
-
|
|
791
|
+
float
|
|
1308
792
|
"""
|
|
1309
|
-
return self.
|
|
1310
|
-
|
|
1311
|
-
@solver_slider_type.setter
|
|
1312
|
-
def solver_slider_type(self, value):
|
|
1313
|
-
"""Set solver slider type."""
|
|
1314
|
-
solver_types = {
|
|
1315
|
-
"kFast": self.get_sim_setup_info.SimulationSettings.TSolveSliderType.k25DViaWirebond,
|
|
1316
|
-
"kMedium": self.get_sim_setup_info.SimulationSettings.TSolveSliderType.k25DViaRibbon,
|
|
1317
|
-
"kAccurate": self.get_sim_setup_info.SimulationSettings.TSolveSliderType.k25DViaMesh,
|
|
1318
|
-
"kNumSliderTypes": self.get_sim_setup_info.SimulationSettings.TSolveSliderType.k25DViaField,
|
|
1319
|
-
}
|
|
1320
|
-
self.get_sim_setup_info.SimulationSettings.TSolveSliderType = solver_types[value]
|
|
1321
|
-
self._update_setup()
|
|
1322
|
-
|
|
1323
|
-
@property
|
|
1324
|
-
def is_auto_setup(self):
|
|
1325
|
-
"""Flag indicating if automatic setup is enabled."""
|
|
1326
|
-
return self.get_sim_setup_info.SimulationSettings.IsAutoSetup
|
|
793
|
+
return self._hfss_port_settings.MaxDeltaZ0
|
|
1327
794
|
|
|
1328
|
-
@
|
|
1329
|
-
def
|
|
1330
|
-
self.
|
|
1331
|
-
self._update_setup()
|
|
795
|
+
@max_delta_z0.setter
|
|
796
|
+
def max_delta_z0(self, value):
|
|
797
|
+
self._hfss_port_settings.MaxDeltaZ0 = value
|
|
798
|
+
self._parent._update_setup()
|
|
1332
799
|
|
|
1333
800
|
@property
|
|
1334
|
-
def
|
|
1335
|
-
"""
|
|
801
|
+
def max_triangles_wave_port(self):
|
|
802
|
+
"""Maximum number of triangles allowed for wave ports.
|
|
1336
803
|
|
|
1337
804
|
Returns
|
|
1338
805
|
-------
|
|
1339
|
-
|
|
1340
|
-
|
|
806
|
+
int
|
|
1341
807
|
"""
|
|
1342
|
-
return
|
|
1343
|
-
|
|
1344
|
-
@property
|
|
1345
|
-
def adaptive_settings(self):
|
|
1346
|
-
"""Adaptive Settings Class.
|
|
1347
|
-
|
|
1348
|
-
Returns
|
|
1349
|
-
-------
|
|
1350
|
-
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.AdaptiveSettings`
|
|
808
|
+
return self._hfss_port_settings.MaxTrianglesWavePort
|
|
1351
809
|
|
|
1352
|
-
|
|
1353
|
-
|
|
810
|
+
@max_triangles_wave_port.setter
|
|
811
|
+
def max_triangles_wave_port(self, value):
|
|
812
|
+
self._hfss_port_settings.MaxTrianglesWavePort = value
|
|
813
|
+
self._parent._update_setup()
|
|
1354
814
|
|
|
1355
815
|
@property
|
|
1356
|
-
def
|
|
1357
|
-
"""
|
|
816
|
+
def min_triangles_wave_port(self):
|
|
817
|
+
"""Minimum number of triangles allowed for wave ports.
|
|
1358
818
|
|
|
1359
819
|
Returns
|
|
1360
820
|
-------
|
|
1361
|
-
|
|
1362
|
-
|
|
821
|
+
int
|
|
1363
822
|
"""
|
|
1364
|
-
return
|
|
1365
|
-
|
|
1366
|
-
@property
|
|
1367
|
-
def via_settings(self):
|
|
1368
|
-
"""Via settings Class.
|
|
1369
|
-
|
|
1370
|
-
Returns
|
|
1371
|
-
-------
|
|
1372
|
-
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.ViaSettings`
|
|
823
|
+
return self._hfss_port_settings.MinTrianglesWavePort
|
|
1373
824
|
|
|
1374
|
-
|
|
1375
|
-
|
|
825
|
+
@min_triangles_wave_port.setter
|
|
826
|
+
def min_triangles_wave_port(self, value):
|
|
827
|
+
self._hfss_port_settings.MinTrianglesWavePort = value
|
|
828
|
+
self._parent._update_setup()
|
|
1376
829
|
|
|
1377
830
|
@property
|
|
1378
|
-
def
|
|
1379
|
-
"""
|
|
831
|
+
def enable_set_triangles_wave_port(self):
|
|
832
|
+
"""Whether to enable setting of minimum and maximum mesh limits for wave ports.
|
|
1380
833
|
|
|
1381
834
|
Returns
|
|
1382
835
|
-------
|
|
1383
|
-
|
|
1384
|
-
|
|
836
|
+
bool
|
|
837
|
+
``True`` if triangles wave port is used, ``False`` otherwise.
|
|
1385
838
|
"""
|
|
1386
|
-
return
|
|
1387
|
-
|
|
1388
|
-
@property
|
|
1389
|
-
def curve_approx_settings(self):
|
|
1390
|
-
"""Curve approximation settings Class.
|
|
1391
|
-
|
|
1392
|
-
Returns
|
|
1393
|
-
-------
|
|
1394
|
-
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.CurveApproxSettings`
|
|
839
|
+
return self._hfss_port_settings.SetTrianglesWavePort
|
|
1395
840
|
|
|
1396
|
-
|
|
1397
|
-
|
|
841
|
+
@enable_set_triangles_wave_port.setter
|
|
842
|
+
def enable_set_triangles_wave_port(self, value):
|
|
843
|
+
self._hfss_port_settings.SetTrianglesWavePort = value
|
|
844
|
+
self._parent._update_setup()
|
|
1398
845
|
|
|
1399
|
-
@property
|
|
1400
|
-
def dcr_settings(self):
|
|
1401
|
-
"""Dcr settings Class.
|
|
1402
846
|
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.DcrSettings`
|
|
847
|
+
class HfssSolverSettings(object):
|
|
848
|
+
"""Manages EDB methods for HFSS solver settings."""
|
|
1406
849
|
|
|
1407
|
-
|
|
1408
|
-
|
|
850
|
+
def __init__(self, sim_setup):
|
|
851
|
+
self._parent = sim_setup
|
|
1409
852
|
|
|
1410
853
|
@property
|
|
1411
|
-
def
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
Returns
|
|
1415
|
-
-------
|
|
1416
|
-
:class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.HfssPortSettings`
|
|
1417
|
-
|
|
1418
|
-
"""
|
|
1419
|
-
return HfssPortSettings(self)
|
|
854
|
+
def _hfss_solver_settings(self):
|
|
855
|
+
return self._parent.get_sim_setup_info.SimulationSettings.HFSSSolverSettings
|
|
1420
856
|
|
|
1421
857
|
@property
|
|
1422
|
-
def
|
|
1423
|
-
"""
|
|
858
|
+
def enhanced_low_freq_accuracy(self):
|
|
859
|
+
"""Whether to enable legacy low-frequency sampling.
|
|
1424
860
|
|
|
1425
861
|
Returns
|
|
1426
862
|
-------
|
|
1427
|
-
|
|
1428
|
-
|
|
863
|
+
bool
|
|
864
|
+
``True`` if low frequency accuracy is used, ``False`` otherwise.
|
|
1429
865
|
"""
|
|
1430
|
-
|
|
1431
|
-
return self._mesh_operations
|
|
1432
|
-
settings = self.get_sim_setup_info.SimulationSettings.MeshOperations
|
|
1433
|
-
self._mesh_operations = {}
|
|
1434
|
-
for i in list(settings):
|
|
1435
|
-
if i.MeshOpType == i.TMeshOpType.kMeshSetupLength:
|
|
1436
|
-
self._mesh_operations[i.Name] = MeshOperationLength(self, i)
|
|
1437
|
-
elif i.MeshOpType == i.TMeshOpType.kMeshSetupSkinDepth:
|
|
1438
|
-
self._mesh_operations[i.Name] = MeshOperationSkinDepth(self, i)
|
|
1439
|
-
elif i.MeshOpType == i.TMeshOpType.kMeshSetupBase:
|
|
1440
|
-
self._mesh_operations[i.Name] = MeshOperationSkinDepth(self, i)
|
|
1441
|
-
|
|
1442
|
-
return self._mesh_operations
|
|
1443
|
-
|
|
1444
|
-
@pyedb_function_handler()
|
|
1445
|
-
def add_length_mesh_operation(
|
|
1446
|
-
self,
|
|
1447
|
-
net_layer_list,
|
|
1448
|
-
name=None,
|
|
1449
|
-
max_elements=1000,
|
|
1450
|
-
max_length="1mm",
|
|
1451
|
-
restrict_elements=True,
|
|
1452
|
-
restrict_length=True,
|
|
1453
|
-
refine_inside=False,
|
|
1454
|
-
mesh_region=None,
|
|
1455
|
-
):
|
|
1456
|
-
"""Add a mesh operation to the setup.
|
|
1457
|
-
|
|
1458
|
-
Parameters
|
|
1459
|
-
----------
|
|
1460
|
-
net_layer_list : dict
|
|
1461
|
-
Dictionary containing nets and layers on which enable Mesh operation. Example ``{"A0_N": ["TOP", "PWR"]}``.
|
|
1462
|
-
name : str, optional
|
|
1463
|
-
Mesh operation name.
|
|
1464
|
-
max_elements : int, optional
|
|
1465
|
-
Maximum number of elements. Default is ``1000``.
|
|
1466
|
-
max_length : str, optional
|
|
1467
|
-
Maximum length of elements. Default is ``1mm``.
|
|
1468
|
-
restrict_elements : bool, optional
|
|
1469
|
-
Whether to restrict number of elements. Default is ``True``.
|
|
1470
|
-
restrict_length : bool, optional
|
|
1471
|
-
Whether to restrict length of elements. Default is ``True``.
|
|
1472
|
-
mesh_region : str, optional
|
|
1473
|
-
Mesh region name.
|
|
1474
|
-
refine_inside : bool, optional
|
|
1475
|
-
Whether to refine inside or not. Default is ``False``.
|
|
866
|
+
return self._hfss_solver_settings.EnhancedLowFreqAccuracy
|
|
1476
867
|
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
if not name:
|
|
1482
|
-
name = generate_unique_name("skin")
|
|
1483
|
-
mesh_operation = MeshOperationLength(self, self._pedb.simsetupdata.LengthMeshOperation())
|
|
1484
|
-
mesh_operation.mesh_region = mesh_region
|
|
1485
|
-
mesh_operation.name = name
|
|
1486
|
-
mesh_operation.nets_layers_list = net_layer_list
|
|
1487
|
-
mesh_operation.refine_inside = refine_inside
|
|
1488
|
-
mesh_operation.max_elements = str(max_elements)
|
|
1489
|
-
mesh_operation.max_length = max_length
|
|
1490
|
-
mesh_operation.restrict_length = restrict_length
|
|
1491
|
-
mesh_operation.restrict_max_elements = restrict_elements
|
|
1492
|
-
self.mesh_operations[name] = mesh_operation
|
|
1493
|
-
return mesh_operation if self._update_setup() else False
|
|
1494
|
-
|
|
1495
|
-
@pyedb_function_handler()
|
|
1496
|
-
def add_skin_depth_mesh_operation(
|
|
1497
|
-
self,
|
|
1498
|
-
net_layer_list,
|
|
1499
|
-
name=None,
|
|
1500
|
-
max_elements=1000,
|
|
1501
|
-
skin_depth="1um",
|
|
1502
|
-
restrict_elements=True,
|
|
1503
|
-
surface_triangle_length="1mm",
|
|
1504
|
-
number_of_layers=2,
|
|
1505
|
-
refine_inside=False,
|
|
1506
|
-
mesh_region=None,
|
|
1507
|
-
):
|
|
1508
|
-
"""Add a mesh operation to the setup.
|
|
868
|
+
@enhanced_low_freq_accuracy.setter
|
|
869
|
+
def enhanced_low_freq_accuracy(self, value):
|
|
870
|
+
self._hfss_solver_settings.EnhancedLowFreqAccuracy = value
|
|
871
|
+
self._parent._update_setup()
|
|
1509
872
|
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
Maximum number of elements. Default is ``1000``.
|
|
1518
|
-
skin_depth : str, optional
|
|
1519
|
-
Skin Depth. Default is ``1um``.
|
|
1520
|
-
restrict_elements : bool, optional
|
|
1521
|
-
Whether to restrict number of elements. Default is ``True``.
|
|
1522
|
-
surface_triangle_length : bool, optional
|
|
1523
|
-
Surface Triangle length. Default is ``1mm``.
|
|
1524
|
-
number_of_layers : int, str, optional
|
|
1525
|
-
Number of layers. Default is ``2``.
|
|
1526
|
-
mesh_region : str, optional
|
|
1527
|
-
Mesh region name.
|
|
1528
|
-
refine_inside : bool, optional
|
|
1529
|
-
Whether to refine inside or not. Default is ``False``.
|
|
873
|
+
@property
|
|
874
|
+
def order_basis(self):
|
|
875
|
+
"""Order of the basic functions for HFSS.
|
|
876
|
+
- 0=Zero.
|
|
877
|
+
- 1=1st order.
|
|
878
|
+
- 2=2nd order.
|
|
879
|
+
- 3=Mixed.
|
|
1530
880
|
|
|
1531
881
|
Returns
|
|
1532
882
|
-------
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
mesh_operation = MeshOperationSkinDepth(self, self._pedb.simsetupdata.SkinDepthMeshOperation())
|
|
1538
|
-
mesh_operation.mesh_region = mesh_region
|
|
1539
|
-
mesh_operation.name = name
|
|
1540
|
-
mesh_operation.nets_layers_list = net_layer_list
|
|
1541
|
-
mesh_operation.refine_inside = refine_inside
|
|
1542
|
-
mesh_operation.max_elements = max_elements
|
|
1543
|
-
mesh_operation.skin_depth = skin_depth
|
|
1544
|
-
mesh_operation.number_of_layer_elements = number_of_layers
|
|
1545
|
-
mesh_operation.surface_triangle_length = surface_triangle_length
|
|
1546
|
-
mesh_operation.restrict_max_elements = restrict_elements
|
|
1547
|
-
self.mesh_operations[name] = mesh_operation
|
|
1548
|
-
return mesh_operation if self._update_setup() else False
|
|
1549
|
-
|
|
1550
|
-
@pyedb_function_handler()
|
|
1551
|
-
def add_frequency_sweep(self, name=None, frequency_sweep=None):
|
|
1552
|
-
"""Add frequency sweep.
|
|
883
|
+
int
|
|
884
|
+
Integer value according to the description."""
|
|
885
|
+
mapping = {0: "zero", 1: "first", 2: "second", 3: "mixed"}
|
|
886
|
+
return mapping[self._hfss_solver_settings.OrderBasis]
|
|
1553
887
|
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
888
|
+
@order_basis.setter
|
|
889
|
+
def order_basis(self, value):
|
|
890
|
+
mapping = {"zero": 0, "first": 1, "second": 2, "mixed": 3}
|
|
891
|
+
self._hfss_solver_settings.OrderBasis = mapping[value]
|
|
892
|
+
self._parent._update_setup()
|
|
893
|
+
|
|
894
|
+
@property
|
|
895
|
+
def relative_residual(self):
|
|
896
|
+
"""Residual for use by the iterative solver.
|
|
1560
897
|
|
|
1561
898
|
Returns
|
|
1562
899
|
-------
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
Examples
|
|
1566
|
-
--------
|
|
1567
|
-
>>> setup1 = edbapp.create_hfss_setup("setup1")
|
|
1568
|
-
>>> setup1.add_frequency_sweep(frequency_sweep=[
|
|
1569
|
-
... ["linear count", "0", "1kHz", 1],
|
|
1570
|
-
... ["log scale", "1kHz", "0.1GHz", 10],
|
|
1571
|
-
... ["linear scale", "0.1GHz", "10GHz", "0.1GHz"],
|
|
1572
|
-
... ])
|
|
900
|
+
float
|
|
1573
901
|
"""
|
|
1574
|
-
|
|
1575
|
-
return False
|
|
1576
|
-
if not name:
|
|
1577
|
-
name = generate_unique_name("sweep")
|
|
1578
|
-
return EdbFrequencySweep(self, frequency_sweep, name)
|
|
902
|
+
return self._hfss_solver_settings.RelativeResidual
|
|
1579
903
|
|
|
1580
|
-
@
|
|
1581
|
-
def
|
|
1582
|
-
|
|
904
|
+
@relative_residual.setter
|
|
905
|
+
def relative_residual(self, value):
|
|
906
|
+
self._hfss_solver_settings.RelativeResidual = value
|
|
907
|
+
self._parent._update_setup()
|
|
1583
908
|
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
909
|
+
@property
|
|
910
|
+
def solver_type(self):
|
|
911
|
+
"""Get solver type to use (Direct/Iterative/Auto) for HFSS.
|
|
912
|
+
Options:
|
|
913
|
+
1- ``kAutoSolver``.
|
|
914
|
+
2- ``kDirectSolver``.
|
|
915
|
+
3- ``kIterativeSolver``.
|
|
916
|
+
4- ``kNumSolverTypes``.
|
|
1592
917
|
|
|
1593
918
|
Returns
|
|
1594
919
|
-------
|
|
1595
|
-
|
|
1596
|
-
|
|
920
|
+
str
|
|
1597
921
|
"""
|
|
1598
|
-
|
|
1599
|
-
self.
|
|
1600
|
-
return
|
|
922
|
+
mapping = {"kAutoSolver": "auto", "kDirectSolver": "direct", "kIterativeSolver": "iterative"}
|
|
923
|
+
solver_type = self._hfss_solver_settings.SolverType.ToString()
|
|
924
|
+
return mapping[solver_type]
|
|
1601
925
|
|
|
1602
|
-
@
|
|
1603
|
-
def
|
|
1604
|
-
|
|
926
|
+
@solver_type.setter
|
|
927
|
+
def solver_type(self, value):
|
|
928
|
+
mapping = {
|
|
929
|
+
"auto": self._hfss_solver_settings.SolverType.kAutoSolver,
|
|
930
|
+
"direct": self._hfss_solver_settings.SolverType.kDirectSolver,
|
|
931
|
+
"iterative": self._hfss_solver_settings.SolverType.kIterativeSolver,
|
|
932
|
+
}
|
|
933
|
+
self._hfss_solver_settings.SolverType = mapping[value]
|
|
934
|
+
self._parent._update_setup()
|
|
1605
935
|
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
List or tuple of adaptive frequencies. The default is ``5GHz``.
|
|
1610
|
-
max_num_passes : int, optional
|
|
1611
|
-
Maximum number of passes. Default is ``10``.
|
|
1612
|
-
max_delta_s : float, optional
|
|
1613
|
-
Maximum delta S. The default is ``0.02``.
|
|
936
|
+
@property
|
|
937
|
+
def use_shell_elements(self):
|
|
938
|
+
"""Whether to enable use of shell elements.
|
|
1614
939
|
|
|
1615
940
|
Returns
|
|
1616
941
|
-------
|
|
1617
942
|
bool
|
|
1618
|
-
|
|
943
|
+
``True`` if shall elements are used, ``False`` otherwise.
|
|
1619
944
|
"""
|
|
1620
|
-
self.
|
|
1621
|
-
self.adaptive_settings.adaptive_settings.AdaptiveFrequencyDataList.Clear()
|
|
1622
|
-
for i in frequencies:
|
|
1623
|
-
if not self.adaptive_settings.add_adaptive_frequency_data(i, max_num_passes, max_delta_s):
|
|
1624
|
-
return False
|
|
1625
|
-
return True
|
|
1626
|
-
|
|
1627
|
-
@pyedb_function_handler()
|
|
1628
|
-
def set_solution_broadband(
|
|
1629
|
-
self, low_frequency="5GHz", high_frequency="10GHz", max_num_passes=10, max_delta_s="0.02"
|
|
1630
|
-
):
|
|
1631
|
-
"""Set broadband solution.
|
|
1632
|
-
|
|
1633
|
-
Parameters
|
|
1634
|
-
----------
|
|
1635
|
-
low_frequency : str, float, optional
|
|
1636
|
-
Low frequency. The default is ``5GHz``.
|
|
1637
|
-
high_frequency : str, float, optional
|
|
1638
|
-
High frequency. The default is ``10GHz``.
|
|
1639
|
-
max_num_passes : int, optional
|
|
1640
|
-
Maximum number of passes. The default is ``10``.
|
|
1641
|
-
max_delta_s : float, optional
|
|
1642
|
-
Maximum Delta S. Default is ``0.02``.
|
|
945
|
+
return self._hfss_solver_settings.UseShellElements
|
|
1643
946
|
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
self.adaptive_settings.adapt_type = "kBroadband"
|
|
1649
|
-
self.adaptive_settings.adaptive_settings.AdaptiveFrequencyDataList.Clear()
|
|
1650
|
-
if not self.adaptive_settings.add_broadband_adaptive_frequency_data(
|
|
1651
|
-
low_frequency, high_frequency, max_num_passes, max_delta_s
|
|
1652
|
-
): # pragma no cover
|
|
1653
|
-
return False
|
|
1654
|
-
return True
|
|
947
|
+
@use_shell_elements.setter
|
|
948
|
+
def use_shell_elements(self, value):
|
|
949
|
+
self._hfss_solver_settings.UseShellElements = value
|
|
950
|
+
self._parent._update_setup()
|