pyedb 0.8.1__py3-none-any.whl → 0.10.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.

@@ -0,0 +1,520 @@
1
+ # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
2
+ # SPDX-License-Identifier: MIT
3
+ #
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNE SS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ # SOFTWARE.
22
+
23
+ from pyedb.dotnet.edb_core.edb_data.edbvalue import EdbValue
24
+ from pyedb.dotnet.edb_core.general import convert_py_list_to_net_list
25
+ from pyedb.dotnet.edb_core.utilities.simulation_setup import (
26
+ BaseSimulationSetup,
27
+ EdbFrequencySweep,
28
+ )
29
+ from pyedb.generic.data_handlers import pyedb_function_handler
30
+ from pyedb.generic.general_methods import generate_unique_name
31
+
32
+
33
+ class RaptorXSimulationSetup(BaseSimulationSetup):
34
+ """Manages EDB methods for RaptorX simulation setup."""
35
+
36
+ def __init__(self, pedb, edb_object=None):
37
+ super().__init__(pedb, edb_object)
38
+ self._pedb = pedb
39
+ self._setup_type = "kRaptorX"
40
+ self._edb_setup_info = None
41
+ self.logger = self._pedb.logger
42
+
43
+ @pyedb_function_handler
44
+ def create(self, name=None):
45
+ """Create an HFSS setup."""
46
+ self._name = name
47
+ self._create(name)
48
+ return self
49
+
50
+ @property
51
+ def setup_type(self):
52
+ return self._setup_type
53
+
54
+ @property
55
+ def settings(self):
56
+ return RaptorXSimulationSettings(self._edb_setup_info, self._pedb)
57
+
58
+ @property
59
+ def enabled(self):
60
+ return self.settings.enabled
61
+
62
+ @enabled.setter
63
+ def enabled(self, value):
64
+ self.settings.enabled = value
65
+
66
+ @property
67
+ def position(self):
68
+ return self._edb_setup_info.Position
69
+
70
+ @position.setter
71
+ def position(self, value):
72
+ if isinstance(value, int):
73
+ self._edb_setup_info.Position = value
74
+ else:
75
+ self.logger.error(f"RaptorX setup position input setter must be an integer. Provided value {value}")
76
+
77
+ @property
78
+ def frequency_sweeps(self):
79
+ return list(self._edb_setup_info.SweepDataList)
80
+
81
+ @pyedb_function_handler()
82
+ def add_frequency_sweep(self, name=None, frequency_sweep=None):
83
+ """Add frequency sweep.
84
+
85
+ Parameters
86
+ ----------
87
+ name : str, optional
88
+ Name of the frequency sweep.
89
+ frequency_sweep : list, optional
90
+ List of frequency points.
91
+
92
+ Returns
93
+ -------
94
+ :class:`pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.EdbFrequencySweep`
95
+
96
+ Examples
97
+ --------
98
+ >>> setup1 = edbapp.create_hfss_setup("setup1")
99
+ >>> setup1.add_frequency_sweep(frequency_sweep=[
100
+ ... ["linear count", "0", "1kHz", 1],
101
+ ... ["log scale", "1kHz", "0.1GHz", 10],
102
+ ... ["linear scale", "0.1GHz", "10GHz", "0.1GHz"],
103
+ ... ])
104
+ """
105
+ if name in self.frequency_sweeps:
106
+ return False
107
+ if not name:
108
+ name = generate_unique_name("sweep")
109
+ return EdbFrequencySweep(self, frequency_sweep, name)
110
+
111
+
112
+ class RaptorXSimulationSettings(object):
113
+ def __init__(self, edb_setup_info, pedb):
114
+ self._pedb = pedb
115
+ self.logger = self._pedb.logger
116
+ self._edb_setup_info = edb_setup_info
117
+ self._simulation_settings = edb_setup_info.SimulationSettings
118
+ self._general_settings = RaptorXGeneralSettings(self._edb_setup_info, self._pedb)
119
+ self._advanced_settings = RaptorXSimulationAdvancedSettings(self._edb_setup_info, self._pedb)
120
+ self._simulation_settings = self._edb_setup_info.SimulationSettings
121
+
122
+ @property
123
+ def general_settings(self):
124
+ return self._general_settings
125
+
126
+ @property
127
+ def advanced_settings(self):
128
+ return self._advanced_settings
129
+
130
+ @property
131
+ def enabled(self):
132
+ return self._simulation_settings.Enabled
133
+
134
+ @enabled.setter
135
+ def enabled(self, value):
136
+ if isinstance(value, bool):
137
+ self._simulation_settings.Enabled = value
138
+ else:
139
+ self.logger.error(f"RaptorX setup enabled setter input must be a boolean. Provided value {value}")
140
+
141
+
142
+ class RaptorXGeneralSettings(object):
143
+ def __init__(self, edb_setup_info, pedb):
144
+ self._general_settings = edb_setup_info.SimulationSettings.GeneralSettings
145
+ self._pedb = pedb
146
+ self.logger = self._pedb.logger
147
+
148
+ @property
149
+ def global_temperature(self):
150
+ """The simulation temperature. Units: C"""
151
+ return self._general_settings.GlobalTemperature
152
+
153
+ @global_temperature.setter
154
+ def global_temperature(self, value):
155
+ self._general_settings.GlobalTemperature = EdbValue(value).tofloat
156
+
157
+ @property
158
+ def max_frequency(self):
159
+ return self._general_settings.MaxFrequency
160
+
161
+ @max_frequency.setter
162
+ def max_frequency(self, value):
163
+ """This allows user to specify the maximum simulation frequency, a parameter which controls how tight the model
164
+ mesh will be. User can override the default meshing frequency as defined by Max Frequency using the Advanced
165
+ settings > MeshFrequency. Example: "10GHz".
166
+ """
167
+ self._general_settings.MaxFrequency = EdbValue(value).tostring
168
+
169
+
170
+ class RaptorXSimulationAdvancedSettings(object):
171
+ def __init__(self, edb_setup_info, pedb):
172
+ self._edb_setup_info = edb_setup_info
173
+ self._advanced_settings = edb_setup_info.SimulationSettings.AdvancedSettings
174
+ self._pedb = pedb
175
+ self.logger = self._pedb.logger
176
+
177
+ @property
178
+ def auto_removal_sliver_poly(self):
179
+ return self._advanced_settings.AutoRemovalSliverPoly
180
+
181
+ @auto_removal_sliver_poly.setter
182
+ def auto_removal_sliver_poly(self, value):
183
+ self._advanced_settings.AutoRemovalSliverPoly = EdbValue(value).tofloat
184
+
185
+ @property
186
+ def cell_per_wave_length(self):
187
+ """This setting describes the number of cells that fit under each wavelength. The wavelength is
188
+ calculated according to the Max Frequency or the Mesh Frequency, unless specified by user through
189
+ this setting. E.g. Setting Cells/Wavelength to 20 means that an object will be divided into 10 cells
190
+ if its width or length is 1/2 wavelengths.
191
+ Units: unitless.
192
+ """
193
+ return self._advanced_settings.CellsPerWavelength
194
+
195
+ @cell_per_wave_length.setter
196
+ def cell_per_wave_length(self, value):
197
+ if isinstance(value, int):
198
+ self._advanced_settings.CellsPerWavelength = value
199
+ else:
200
+ self.logger.error(f"RaptorX cell_per_wave_length setter input must be an integer, value provided {value}")
201
+
202
+ @property
203
+ def edge_mesh(self):
204
+ """This option controls both, the thickness and the width of the exterior conductor filament.
205
+ When specified, it prevails over the Mesh Frequency or Max Frequency during mesh calculation.
206
+ Example: "0.8um".
207
+ """
208
+ return self._advanced_settings.EdgeMesh
209
+
210
+ @edge_mesh.setter
211
+ def edge_mesh(self, value):
212
+ self._advanced_settings.EdgeMesh = EdbValue(value).tostring
213
+
214
+ @property
215
+ def eliminate_slit_per_hole(self):
216
+ """This is a setting that internally simplifies layouts with strain relief or thermal relief slits and
217
+ holes. It will examine each hole separately against the whole polygon it belongs to.
218
+ If the area of the hole is below the threshold defined in this setting, then the hole will be filled.
219
+ Units: unitless.
220
+ """
221
+ return self._advanced_settings.EliminateSlitPerHoles
222
+
223
+ @eliminate_slit_per_hole.setter
224
+ def eliminate_slit_per_hole(self, value):
225
+ self._advanced_settings.EliminateSlitPerHoles = EdbValue(value).tofloat
226
+
227
+ @property
228
+ def mesh_frequency(self):
229
+ """User can override the default meshing applied by setting a custom frequency for mesh generation.
230
+ Example: "1GHz".
231
+ """
232
+ return self._advanced_settings.MeshFrequency
233
+
234
+ @mesh_frequency.setter
235
+ def mesh_frequency(self, value):
236
+ self._advanced_settings.MeshFrequency = EdbValue(value).tostring
237
+
238
+ @property
239
+ def net_settings_options(self):
240
+ """A list of Name, Value pairs that stores advanced option."""
241
+ return [val for val in list(self._advanced_settings.NetSettingsOptions)]
242
+
243
+ @net_settings_options.setter
244
+ def net_settings_options(self, value):
245
+ if isinstance(value, list):
246
+ self._advanced_settings.NetSettingsOptions = convert_py_list_to_net_list(value)
247
+ else:
248
+ self.logger.error(
249
+ f"RaptorX setup net_settings_options input setter must be a list. " f"Provided value {value}"
250
+ )
251
+
252
+ @property
253
+ def override_shrink_fac(self):
254
+ """Set the shrink factor explicitly, that is, review what-if scenarios of migrating to half-node
255
+ technologies.
256
+ Units: unitless.
257
+ """
258
+ return self._advanced_settings.OverrideShrinkFac
259
+
260
+ @override_shrink_fac.setter
261
+ def override_shrink_fac(self, value):
262
+ self._advanced_settings.OverrideShrinkFac = EdbValue(value).tofloat
263
+
264
+ @property
265
+ def plane_projection_factor(self):
266
+ """To eliminate unnecessary mesh complexity of "large" metal planes and improve overall extraction time,
267
+ user can define the mesh of certain planes using a combination of the Plane Projection Factor and
268
+ settings of the Nets Advanced Options.
269
+ Units: unitless.
270
+ """
271
+ return self._advanced_settings.PlaneProjectionFactor
272
+
273
+ @plane_projection_factor.setter
274
+ def plane_projection_factor(self, value):
275
+ self._advanced_settings.PlaneProjectionFactor = EdbValue(value).tofloat
276
+
277
+ @property
278
+ def use_accelerate_via_extraction(self):
279
+ """Setting this option will simplify/merge neighboring vias before sending the layout for processing
280
+ to the mesh engine and to the EM engine.
281
+ """
282
+ return self._advanced_settings.UseAccelerateViaExtraction
283
+
284
+ @use_accelerate_via_extraction.setter
285
+ def use_accelerate_via_extraction(self, value):
286
+ if isinstance(value, bool):
287
+ self._advanced_settings.UseAccelerateViaExtraction = value
288
+ else:
289
+ self.logger.error(
290
+ "RaptorX setup use_accelerate_via_extraction setter input must be boolean." f"Provided value {value}"
291
+ )
292
+
293
+ @property
294
+ def use_auto_removal_sliver_poly(self):
295
+ """Setting this option simplifies layouts by aligning slightly misaligned overlapping polygons."""
296
+ return self._advanced_settings.UseAutoRemovalSliverPoly
297
+
298
+ @use_auto_removal_sliver_poly.setter
299
+ def use_auto_removal_sliver_poly(self, value):
300
+ if isinstance(value, bool):
301
+ self._advanced_settings.UseAutoRemovalSliverPoly = value
302
+ else:
303
+ self.logger.error(
304
+ f"RaptorX setup use_auto_removal_sliver_poly setter must be a boolean. " f"Provided value {value}"
305
+ )
306
+
307
+ @property
308
+ def use_cells_per_wavelength(self):
309
+ """This setting describes the number of cells that fit under each wavelength. The wavelength is calculated
310
+ according to the Max Frequency or the Mesh Frequency, unless specified by user through this setting.
311
+ """
312
+ return self._advanced_settings.UseCellsPerWavelength
313
+
314
+ @use_cells_per_wavelength.setter
315
+ def use_cells_per_wavelength(self, value):
316
+ if isinstance(value, bool):
317
+ self._advanced_settings.UseCellsPerWavelength = value
318
+ else:
319
+ self.logger.error(f"RaptorX setup use_cells_per_wavelength setter must be boolean. Provided value {value}")
320
+
321
+ @property
322
+ def use_edge_mesh(self):
323
+ """This option controls both, the thickness and the width of the exterior conductor filament.
324
+ When checked, it prevails over the Mesh Frequency or Max Frequency during mesh calculation.
325
+ """
326
+ return self._advanced_settings.UseEdgeMesh
327
+
328
+ @use_edge_mesh.setter
329
+ def use_edge_mesh(self, value):
330
+ if isinstance(value, bool):
331
+ self._advanced_settings.UseEdgeMesh = value
332
+ else:
333
+ self.logger.error(f"RaptorX setup use_edge_mesh setter must be a boolean. Provided value {value}")
334
+
335
+ @property
336
+ def use_eliminate_slit_per_holes(self):
337
+ """This is a setting that internally simplifies layouts with strain relief or thermal relief slits and
338
+ holes.
339
+ """
340
+ return self._advanced_settings.UseEliminateSlitPerHoles
341
+
342
+ @use_eliminate_slit_per_holes.setter
343
+ def use_eliminate_slit_per_holes(self, value):
344
+ if isinstance(value, bool):
345
+ self._advanced_settings.UseEliminateSlitPerHoles = value
346
+ else:
347
+ self.logger.error(
348
+ f"RaptorX setup use_eliminate_slit_per_holes setter must be a boolean. " f"Provided value {value}"
349
+ )
350
+
351
+ @property
352
+ def use_enable_advanced_cap_effects(self):
353
+ """Applies all the capacitance related effects such as Conformal Dielectrics, Loading Effect,
354
+ Dielectric Damage.
355
+ """
356
+ return self._advanced_settings.UseEnableAdvancedCapEffects
357
+
358
+ @use_enable_advanced_cap_effects.setter
359
+ def use_enable_advanced_cap_effects(self, value):
360
+ if isinstance(value, bool):
361
+ self._advanced_settings.UseEnableAdvancedCapEffects = value
362
+ else:
363
+ self.logger.error(
364
+ f"RaptorX setup use_enable_advanced_cap_effects setter must be a boolean. " f"Provided value {value}"
365
+ )
366
+
367
+ @property
368
+ def use_enable_etch_transform(self):
369
+ """Pre-distorts the layout based on the foundry rules, applying the conductor's bias (positive/negative –
370
+ deflation/inflation) at the conductor edges due to unavoidable optical effects in the manufacturing process.
371
+ """
372
+ return self._advanced_settings.UseEnableEtchTransform
373
+
374
+ @use_enable_etch_transform.setter
375
+ def use_enable_etch_transform(self, value):
376
+ if isinstance(value, bool):
377
+ self._advanced_settings.UseEnableEtchTransform = value
378
+ else:
379
+ self.logger.error(
380
+ f"RaptorX setup use_enable_etch_transform setter must be a boolean. " f"Provided value {value}"
381
+ )
382
+
383
+ @property
384
+ def use_enable_hybrid_extraction(self):
385
+ """This setting allows the modelling engine to separate the layout into two parts in an attempt to
386
+ decrease the complexity of EM modelling.
387
+ """
388
+ return self._edb_setup_info.UseEnableHybridExtraction
389
+
390
+ @use_enable_hybrid_extraction.setter
391
+ def use_enable_hybrid_extraction(self, value):
392
+ if isinstance(value, bool):
393
+ self._advanced_settings.UseEnableHybridExtraction = value
394
+ else:
395
+ self.logger.error(
396
+ f"RaptorX setup use_enable_hybrid_extraction setter must be a boolean. " f"Provided value {value}"
397
+ )
398
+
399
+ @property
400
+ def use_enable_substrate_network_extraction(self):
401
+ """This setting models substrate coupling effects using an equivalent distributed RC network."""
402
+ return self._advanced_settings.UseEnableSubstrateNetworkExtraction
403
+
404
+ @use_enable_substrate_network_extraction.setter
405
+ def use_enable_substrate_network_extraction(self, value):
406
+ if isinstance(value, bool):
407
+ self._advanced_settings.UseEnableSubstrateNetworkExtraction = value
408
+ else:
409
+ self.logger.error(
410
+ f"RaptorX setup use_enable_substrate_network_extraction setter must be a boolean. "
411
+ f"Provided value {value}"
412
+ )
413
+
414
+ @property
415
+ def use_extract_floating_metals_dummy(self):
416
+ """Enables modeling of floating metals as dummy fills. Captures the effect of dummy fill by extracting
417
+ the effective capacitance between any pairs of metal segments in the design, in the presence of each
418
+ individual dummy metal islands. This setting cannot be used with UseExtractFloatingMetalsFloating.
419
+ """
420
+ return self._advanced_settings.UseExtractFloatingMetalsDummy
421
+
422
+ @use_extract_floating_metals_dummy.setter
423
+ def use_extract_floating_metals_dummy(self, value):
424
+ if isinstance(value, bool):
425
+ self._advanced_settings.UseExtractFloatingMetalsDummy = value
426
+ else:
427
+ self.logger.error(
428
+ f"RaptorX setup use_extract_floating_metals_dummy setter must be a boolean. " f"Provided value {value}"
429
+ )
430
+
431
+ @property
432
+ def use_extract_floating_metals_floating(self):
433
+ """Enables modeling of floating metals as floating nets. Floating metal are grouped into a single entity
434
+ and treated as an independent net. This setting cannot be used with UseExtractFloatingMetalsDummy.
435
+ """
436
+ return self._advanced_settings.UseExtractFloatingMetalsFloating
437
+
438
+ @use_extract_floating_metals_floating.setter
439
+ def use_extract_floating_metals_floating(self, value):
440
+ if isinstance(value, bool):
441
+ self._advanced_settings.UseExtractFloatingMetalsFloating = value
442
+ else:
443
+ self.logger.error(
444
+ f"RaptorX setup use_extract_floating_metals_floating setter must be a boolean. "
445
+ f"Provided value {value}"
446
+ )
447
+
448
+ @property
449
+ def use_lde(self):
450
+ """
451
+ Takes into account the variation of resistivity as a function of a conductor’s drawn width and spacing to
452
+ its neighbors or as a function of its local density, due to dishing, slotting, cladding thickness, and so
453
+ on.
454
+ """
455
+ return self._advanced_settings.UseLDE
456
+
457
+ @use_lde.setter
458
+ def use_lde(self, value):
459
+ if isinstance(value, bool):
460
+ self._advanced_settings.UseLDE = value
461
+ else:
462
+ self.logger.error(f"RaptorX setup use_lde setter must be a boolean. Provided value {value}")
463
+
464
+ @property
465
+ def use_mesh_frequency(self):
466
+ """
467
+ User can override the default meshing applied by the mesh engine by checking this option and setting a
468
+ custom frequency for mesh generation.
469
+ """
470
+ return self._advanced_settings.UseMeshFrequency
471
+
472
+ @use_mesh_frequency.setter
473
+ def use_mesh_frequency(self, value):
474
+ if isinstance(value, bool):
475
+ self._advanced_settings.UseMeshFrequency = value
476
+ else:
477
+ self.logger.error(f"RaptorX setup use_mesh_frequency setter must be a boolean. Provided value {value}")
478
+
479
+ @property
480
+ def use_override_shrink_fac(self):
481
+ """Set the shrink factor explicitly, that is, review what-if scenarios of migrating to half-node
482
+ technologies.
483
+ """
484
+ return self._advanced_settings.UseOverrideShrinkFac
485
+
486
+ @use_override_shrink_fac.setter
487
+ def use_override_shrink_fac(self, value):
488
+ if isinstance(value, bool):
489
+ self._advanced_settings.UseOverrideShrinkFac = value
490
+ else:
491
+ self.logger.error(f"RaptorX setup use_override_shrink_fac setter must be a boolean. Provided value {value}")
492
+
493
+ @property
494
+ def use_plane_projection_factor(self):
495
+ """To eliminate unnecessary mesh complexity of "large" metal planes and improve overall
496
+ extraction time, user can define the mesh of certain planes using a combination of the Plane Projection
497
+ Factor and settings of the Nets Advanced Options.
498
+ """
499
+ return self._advanced_settings.UsePlaneProjectionFactor
500
+
501
+ @use_plane_projection_factor.setter
502
+ def use_plane_projection_factor(self, value):
503
+ if isinstance(value, bool):
504
+ self._advanced_settings.UsePlaneProjectionFactor = value
505
+ else:
506
+ self.logger.error(
507
+ f"RaptorX setup use_plane_projection_factor setter must be a boolean. " f"Provided value {value}"
508
+ )
509
+
510
+ @property
511
+ def use_relaxed_z_axis(self):
512
+ """Enabling this option provides a simplified mesh along the z-axis."""
513
+ return self._advanced_settings.UseRelaxedZAxis
514
+
515
+ @use_relaxed_z_axis.setter
516
+ def use_relaxed_z_axis(self, value):
517
+ if isinstance(value, bool):
518
+ self._advanced_settings.UseRelaxedZAxis = value
519
+ else:
520
+ self.logger.error(f"RaptorX setup use_relaxed_z_axis setter must be a boolean. " f"Provided value {value}")
@@ -25,6 +25,7 @@ import json
25
25
  import os
26
26
 
27
27
  from pyedb.dotnet.clr_module import Dictionary
28
+ from pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data import AdaptiveType
28
29
  from pyedb.dotnet.edb_core.edb_data.sources import Source, SourceType
29
30
  from pyedb.generic.constants import (
30
31
  BasisOrder,
@@ -1249,6 +1250,9 @@ class SimulationConfigurationAc(object):
1249
1250
  self._snap_length_threshold = "2.5um"
1250
1251
  self._min_plane_area_to_mesh = "4mil2" # Newly Added
1251
1252
  self._mesh_sizefactor = 0.0
1253
+ self._adaptive_type = AdaptiveType.SingleFrequency
1254
+ self._adaptive_low_freq = "0GHz"
1255
+ self._adaptive_high_freq = "20GHz"
1252
1256
 
1253
1257
  @property
1254
1258
  def sweep_interpolating(self): # pragma: no cover
@@ -1902,6 +1906,51 @@ class SimulationConfigurationAc(object):
1902
1906
  if value > 0.0:
1903
1907
  self._do_lambda_refinement = False
1904
1908
 
1909
+ @property
1910
+ def adaptive_type(self):
1911
+ """HFSS adaptive type.
1912
+
1913
+ Returns
1914
+ -------
1915
+ class: pyedb.dotnet.edb_core.edb_data.hfss_simulation_setup_data.AdaptiveType
1916
+ """
1917
+ return self._adaptive_type
1918
+
1919
+ @adaptive_type.setter
1920
+ def adaptive_type(self, value):
1921
+ if isinstance(value, int) and value in range(3):
1922
+ self._adaptive_type = value
1923
+
1924
+ @property
1925
+ def adaptive_low_freq(self):
1926
+ """HFSS broadband low frequency adaptive meshing.
1927
+
1928
+ Returns
1929
+ -------
1930
+ str
1931
+ """
1932
+ return self._adaptive_low_freq
1933
+
1934
+ @adaptive_low_freq.setter
1935
+ def adaptive_low_freq(self, value):
1936
+ if isinstance(value, str):
1937
+ self._adaptive_low_freq = value
1938
+
1939
+ @property
1940
+ def adaptive_high_freq(self):
1941
+ """HFSS broadband high frequency adaptive meshing.
1942
+
1943
+ Returns
1944
+ -------
1945
+ str
1946
+ """
1947
+ return self._adaptive_high_freq
1948
+
1949
+ @adaptive_high_freq.setter
1950
+ def adaptive_high_freq(self, value):
1951
+ if isinstance(value, str):
1952
+ self._adaptive_high_freq = value
1953
+
1905
1954
 
1906
1955
  class SimulationConfiguration(object):
1907
1956
  """Provides an ASCII simulation configuration file parser.
@@ -1276,25 +1276,43 @@ class EdbHfss(object):
1276
1276
  as argument"
1277
1277
  )
1278
1278
  return False
1279
- adapt = self._pedb.simsetupdata.AdaptiveFrequencyData()
1280
- adapt.AdaptiveFrequency = simulation_setup.mesh_freq
1281
- adapt.MaxPasses = int(simulation_setup.max_num_passes)
1282
- adapt.MaxDelta = str(simulation_setup.max_mag_delta_s)
1283
1279
  simsetup_info = self._pedb.simsetupdata.SimSetupInfo[self._pedb.simsetupdata.HFSSSimulationSettings]()
1284
1280
  simsetup_info.Name = simulation_setup.setup_name
1285
1281
 
1282
+ if simulation_setup.ac_settings.adaptive_type == 0:
1283
+ adapt = self._pedb.simsetupdata.AdaptiveFrequencyData()
1284
+ adapt.AdaptiveFrequency = simulation_setup.mesh_freq
1285
+ adapt.MaxPasses = int(simulation_setup.max_num_passes)
1286
+ adapt.MaxDelta = str(simulation_setup.max_mag_delta_s)
1287
+ if is_ironpython:
1288
+ simsetup_info.SimulationSettings.AdaptiveSettings.AdaptiveFrequencyDataList.Clear()
1289
+ simsetup_info.SimulationSettings.AdaptiveSettings.AdaptiveFrequencyDataList.Add(adapt)
1290
+ else:
1291
+ simsetup_info.SimulationSettings.AdaptiveSettings.AdaptiveFrequencyDataList = (
1292
+ convert_py_list_to_net_list([adapt])
1293
+ )
1294
+ elif simulation_setup.ac_settings.adaptive_type == 2:
1295
+ low_freq_adapt_data = self._pedb.simsetupdata.AdaptiveFrequencyData()
1296
+ low_freq_adapt_data.MaxDelta = str(simulation_setup.max_mag_delta_s)
1297
+ low_freq_adapt_data.MaxPasses = int(simulation_setup.max_num_passes)
1298
+ low_freq_adapt_data.AdaptiveFrequency = simulation_setup.ac_settings.adaptive_low_freq
1299
+ high_freq_adapt_data = self._pedb.simsetupdata.AdaptiveFrequencyData()
1300
+ high_freq_adapt_data.MaxDelta = str(simulation_setup.max_mag_delta_s)
1301
+ high_freq_adapt_data.MaxPasses = int(simulation_setup.max_num_passes)
1302
+ high_freq_adapt_data.AdaptiveFrequency = simulation_setup.ac_settings.adaptive_high_freq
1303
+ simsetup_info.SimulationSettings.AdaptiveSettings.AdaptType = (
1304
+ self._pedb.simsetupdata.AdaptiveSettings.TAdaptType.kBroadband
1305
+ )
1306
+ simsetup_info.SimulationSettings.AdaptiveSettings.AdaptiveFrequencyDataList.Clear()
1307
+ simsetup_info.SimulationSettings.AdaptiveSettings.AdaptiveFrequencyDataList.Add(low_freq_adapt_data)
1308
+ simsetup_info.SimulationSettings.AdaptiveSettings.AdaptiveFrequencyDataList.Add(high_freq_adapt_data)
1309
+
1286
1310
  simsetup_info.SimulationSettings.CurveApproxSettings.ArcAngle = simulation_setup.arc_angle
1287
1311
  simsetup_info.SimulationSettings.CurveApproxSettings.UseArcToChordError = (
1288
1312
  simulation_setup.use_arc_to_chord_error
1289
1313
  )
1290
1314
  simsetup_info.SimulationSettings.CurveApproxSettings.ArcToChordError = simulation_setup.arc_to_chord_error
1291
- if is_ironpython:
1292
- simsetup_info.SimulationSettings.AdaptiveSettings.AdaptiveFrequencyDataList.Clear()
1293
- simsetup_info.SimulationSettings.AdaptiveSettings.AdaptiveFrequencyDataList.Add(adapt)
1294
- else:
1295
- simsetup_info.SimulationSettings.AdaptiveSettings.AdaptiveFrequencyDataList = convert_py_list_to_net_list(
1296
- [adapt]
1297
- )
1315
+
1298
1316
  simsetup_info.SimulationSettings.InitialMeshSettings.LambdaRefine = simulation_setup.do_lambda_refinement
1299
1317
  if simulation_setup.mesh_sizefactor > 0.0:
1300
1318
  simsetup_info.SimulationSettings.InitialMeshSettings.MeshSizefactor = simulation_setup.mesh_sizefactor