HfssSimulationSetup#
- class pyedb.grpc.database.simulation_setup.hfss_simulation_setup.HfssSimulationSetup(pedb, edb_object, name: str = None)#
Bases:
ansys.edb.core.simulation_setup.hfss_simulation_setup.HfssSimulationSetupHFSS simulation setup class.
Overview#
Set HFSS single frequency solution. |
|
Set HFSS setup multi frequencies adaptive. |
|
Set solution to broadband. |
|
Add adaptive frequency data to simulation setup. |
|
Add a mesh operation to the setup. |
|
Add a mesh operation to the setup. |
|
Add a HFSS frequency sweep. |
|
Automatically create and apply a length-based mesh operation for all nets in the design. |
Legacy compatibility to settings properties. |
|
Legacy compatibility to general settings. |
Import detail#
from pyedb.grpc.database.simulation_setup.hfss_simulation_setup import HfssSimulationSetup
Property detail#
- property HfssSimulationSetup.hfss_solver_settings#
Legacy compatibility to settings properties.
- property HfssSimulationSetup.adaptive_settings#
Legacy compatibility to general settings.
Method detail#
- HfssSimulationSetup.set_solution_single_frequency(frequency='5GHz', max_num_passes=10, max_delta_s=0.02) bool#
Set HFSS single frequency solution. Parameters ———- frequency : str, optional
Adaptive frequency.
- max_num_passesint, optional
Maxmímum passes number. Default value 10.
- max_delta_sfloat, optional
Maximum delta S value. Default value 0.02,
- Returns:
- bool.
- HfssSimulationSetup.set_solution_multi_frequencies(frequencies='5GHz', max_delta_s=0.02) bool#
Set HFSS setup multi frequencies adaptive.
- HfssSimulationSetup.set_solution_broadband(low_frequency='1GHz', high_frequency='10GHz', max_delta_s=0.02, max_num_passes=10)#
Set solution to broadband.
- HfssSimulationSetup.add_adaptive_frequency_data(frequency='5GHz', max_delta_s='0.01')#
Add adaptive frequency data to simulation setup.
- HfssSimulationSetup.add_length_mesh_operation(net_layer_list, name=None, max_elements=1000, max_length='1mm', restrict_elements=True, restrict_length=True, refine_inside=False, mesh_region=None)#
Add a mesh operation to the setup.
- Parameters:
- net_layer_list
dict Dictionary containing nets and layers on which enable Mesh operation. Example
{"A0_N": ["TOP", "PWR"]}.- name
str,optional Mesh operation name.
- max_elements
int,optional Maximum number of elements. Default is
1000.- max_length
str,optional Maximum length of elements. Default is
1mm.- restrict_elementsbool,
optional Whether to restrict number of elements. Default is
True.- restrict_lengthbool,
optional Whether to restrict length of elements. Default is
True.- mesh_region
str,optional Mesh region name.
- refine_insidebool,
optional Whether to refine inside or not. Default is
False.
- net_layer_list
- Returns:
LengthMeshOperation
- HfssSimulationSetup.add_skin_depth_mesh_operation(net_layer_list, name=None, max_elements=1000, skin_depth='1um', restrict_elements=True, surface_triangle_length='1mm', number_of_layers=2, refine_inside=False, mesh_region=None)#
Add a mesh operation to the setup.
- Parameters:
- net_layer_list
dict Dictionary containing nets and layers on which enable Mesh operation. Example
{"A0_N": ["TOP", "PWR"]}.- name
str,optional Mesh operation name.
- max_elements
int,optional Maximum number of elements. Default is
1000.- skin_depth
str,optional Skin Depth. Default is
1um.- restrict_elementsbool,
optional Whether to restrict number of elements. Default is
True.- surface_triangle_lengthbool,
optional Surface Triangle length. Default is
1mm.- number_of_layers
int,str,optional Number of layers. Default is
2.- mesh_region
str,optional Mesh region name.
- refine_insidebool,
optional Whether to refine inside or not. Default is
False.
- net_layer_list
- Returns:
LengthMeshOperation
- HfssSimulationSetup.add_sweep(name=None, distribution='linear', start_freq='0GHz', stop_freq='20GHz', step='10MHz', discrete=False, frequency_set=None)#
Add a HFSS frequency sweep.
- Parameters:
- name
str,optional Sweep name.
- distribution
str,optional Type of the sweep. The default is “linear”. Options are: - “linear” - “linear_count” - “decade_count” - “octave_count” - “exponential”
- start_freq
str,float,optional Starting frequency. The default is
1.- stop_freq
str,float,optional Stopping frequency. The default is
1e9.- step
str,float,int,optional Frequency step. The default is
1e6. or used for “decade_count”, “linear_count”, “octave_count” distribution. Must be integer in that case.- discretebool,
optional Whether the sweep is discrete. The default is
False.- frequency_set
List,optional Frequency set is a list adding one or more frequency sweeps. If
frequency_setis provided, the other arguments are ignored exceptdiscrete. Default value isNone. example of frequency_set : [[‘linear_scale’, ‘50MHz’, ‘200MHz’, ‘10MHz’]].
- name
- Returns:
- HfssSimulationSetup.auto_mesh_operation(trace_ratio_seeding: float = 3, signal_via_side_number: int = 12, power_ground_via_side_number: int = 6) bool#
Automatically create and apply a length-based mesh operation for all nets in the design.
The method inspects every signal net, determines the smallest trace width, and seeds a
GrpcLengthMeshOperationwhose maximum element length issmallest_width * trace_ratio_seeding. Signal vias (padstack instances) are configured with the requested number of polygon sides, while power/ground vias are updated through the globalnum_via_sidesadvanced setting.- Parameters:
- trace_ratio_seeding
float,optional Ratio used to compute the maximum allowed element length from the smallest trace width found in the design. The resulting length is
min_width * trace_ratio_seeding. Defaults to3.- signal_via_side_number
int,optional Number of sides (i.e. faceting resolution) assigned to signal padstack instances that belong to the nets being meshed. Defaults to
12.- power_ground_via_side_number
int,optional Number of sides assigned to power/ground vias via the global
advanced.num_via_sidessetting. Defaults to6.
- trace_ratio_seeding
- Returns:
- Raises:
ValueErrorIf the design contains no terminals, making mesh seeding impossible.
Notes
Only primitives of type
"path"are considered when determining the smallest trace width.Every
(net, layer, sheet)tuple required by the mesher is automatically populated; sheet are explicitly marked asFalse.Existing contents of
mesh_operationsare replaced by the single new operation.
Examples
>>> setup = edbapp.setups["my_setup"] >>> setup.auto_mesh_operation(trace_ratio_seeding=4, signal_via_side_number=16) >>> setup.mesh_operations[0].max_length '2.5um'