HfssSimulationSetup#

class pyedb.grpc.database.simulation_setup.hfss_simulation_setup.HfssSimulationSetup(pedb, core: ansys.edb.core.simulation_setup.hfss_simulation_setup.HfssSimulationSetup, name: str = None)#

Bases: pyedb.grpc.database.simulation_setup.simulation_setup.SimulationSetup

HFSS simulation setup class.

Overview#

create

Create a new HFSS simulation setup.

set_solution_single_frequency

Set HFSS single frequency solution.

set_solution_multi_frequencies

Set HFSS setup multi frequencies adaptive.

set_solution_broadband

Set solution to broadband.

add_adaptive_frequency_data

Add adaptive frequency data to simulation setup.

add_length_mesh_operation

Add a mesh operation to the setup.

add_skin_depth_mesh_operation

Add a mesh operation to the setup.

auto_mesh_operation

Automatically create and apply a length-based mesh operation for all nets in the design.

mesh_operations

List of HFSS mesh operations.

defeature_settings

HFSS defeature settings class.

via_settings

HFSS via settings class.

advanced_mesh_settings

HFSS advanced meshing settings class.

hfss_solver_settings

Legacy compatibility to settings properties.

settings

HFSS simulation settings class.

adaptive_settings

Legacy compatibility to general settings.

curve_approx_settings

Legacy compatibility to advanced meshing settings.

dcr_settings

HFSS DCR settings class.

hfss_port_settings

HFSS port settings class.

sweep_data

List of HFSS sweep data.

Import detail#

from pyedb.grpc.database.simulation_setup.hfss_simulation_setup import HfssSimulationSetup

Property detail#

property HfssSimulationSetup.mesh_operations: list[pyedb.grpc.database.simulation_setup.length_mesh_operation.LengthMeshOperation | pyedb.grpc.database.simulation_setup.skin_depth_mesh_operation.SkinDepthMeshOperation]#

List of HFSS mesh operations.

property HfssSimulationSetup.defeature_settings#

HFSS defeature settings class.

Deprecated since version 0.67.2.

Use :attr:`settings ” instead.

property HfssSimulationSetup.via_settings#

HFSS via settings class.

Deprecated since version 0.67.2.

Use settings instead.

property HfssSimulationSetup.advanced_mesh_settings#

HFSS advanced meshing settings class.

Deprecated since version 0.67.2.

Use settings instead.

property HfssSimulationSetup.hfss_solver_settings#

Legacy compatibility to settings properties.

Deprecated since version 0.67.2.

Use settings instead.

#

property HfssSimulationSetup.settings: pyedb.grpc.database.simulation_setup.hfss_simulation_settings.HFSSSimulationSettings#

HFSS simulation settings class.

Returns:
:class:`HFSSSimulationSettings
`
property HfssSimulationSetup.adaptive_settings#

Legacy compatibility to general settings.

Deprecated since version 0.67.2.

use general_settings instead.

property HfssSimulationSetup.curve_approx_settings#

Legacy compatibility to advanced meshing settings.

Deprecated since version 0.67.2.

use advanced_mesh_settings instead.

property HfssSimulationSetup.dcr_settings#

HFSS DCR settings class.

Deprecated since version 0.67.2.

use dcr instead.

property HfssSimulationSetup.hfss_port_settings#

HFSS port settings class.

Deprecated since version 0.67.2.

use settings instead.

property HfssSimulationSetup.sweep_data: list[pyedb.grpc.database.simulation_setup.sweep_data.SweepData]#

List of HFSS sweep data.

Returns:
list[SweepData]

List of sweep data.

Attribute detail#

HfssSimulationSetup.core#

Method detail#

classmethod HfssSimulationSetup.create(edb: pyedb.grpc.edb.Edb, name: str = None)#

Create a new HFSS simulation setup.

Parameters:
edbpyedb.Edb

The EDB instance to which the simulation setup will be added.

namestr, optional

Name of the simulation setup.

Returns:
HfssSimulationSetup
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.

Parameters:
frequenciesstr, List[str].

Adaptive frequencies.

max_delta_sfloat, List[float].

Max delta S values.

Returns:
bool.
HfssSimulationSetup.set_solution_broadband(low_frequency='1GHz', high_frequency='10GHz', max_delta_s=0.02, max_num_passes=10)#

Set solution to broadband.

Parameters:
low_frequencystr

Low frequency value.

high_frequencystr

High frequency value.

max_delta_sfloat

Max delta S value.

max_num_passesint

Maximum number of passes.

Returns:
bool.
HfssSimulationSetup.add_adaptive_frequency_data(frequency='5GHz', max_delta_s='0.01')#

Add adaptive frequency data to simulation setup.

Parameters:
frequencystr

Adaptive frequency value.

max_delta_sstr

Maximum delta S value.

Returns:
bool.
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_listdict

Dictionary containing nets and layers on which enable Mesh operation. Example {"A0_N": ["TOP", "PWR"]}.

namestr, optional

Mesh operation name.

max_elementsint, optional

Maximum number of elements. Default is 1000.

max_lengthstr, 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_regionstr, optional

Mesh region name.

refine_insidebool, optional

Whether to refine inside or not. Default is False.

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_listdict

Dictionary containing nets and layers on which enable Mesh operation. Example {"A0_N": ["TOP", "PWR"]}.

namestr, optional

Mesh operation name.

max_elementsint, optional

Maximum number of elements. Default is 1000.

skin_depthstr, 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_layersint, str, optional

Number of layers. Default is 2.

mesh_regionstr, optional

Mesh region name.

refine_insidebool, optional

Whether to refine inside or not. Default is False.

Returns:
LengthMeshOperation
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 GrpcLengthMeshOperation whose maximum element length is smallest_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 global num_via_sides advanced setting.

Parameters:
trace_ratio_seedingfloat, 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 to 3.

signal_via_side_numberint, 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_numberint, optional

Number of sides assigned to power/ground vias via the global advanced.num_via_sides setting. Defaults to 6.

Returns:
bool
Raises:
ValueError

If 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 as False.

  • Existing contents of mesh_operations are 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'