SimulationSetup#

class pyedb.grpc.database.simulation_setup.simulation_setup.SimulationSetup(pedb, core: ansys.edb.core.simulation_setup.simulation_setup.SimulationSetup)#

Bases: SimulationSetupDeprecated

Overview#

cast

Cast a core SimulationSetup to PyEDB SimulationSetup.

add_frequency_sweep

This method is deprecated. Please use ‘add_sweep’ with appropriate parameters instead.

add_sweep

Add a HFSS frequency sweep.

clear_sweeps

Clear all frequency sweeps from the simulation setup.

id

Unique ID of the EDB object.

is_null

Check if the simulation setup is null.

name

Get or set the name of the simulation setup.

position

Get or set the position of the simulation setup.

sweep_data

Get the sweep data associated with the simulation setup.

setup_type

Get the type of the simulation setup.

Import detail#

from pyedb.grpc.database.simulation_setup.simulation_setup import SimulationSetup

Property detail#

property SimulationSetup.id: int#

Unique ID of the EDB object.

Returns:
int

Simulation setup ID.

property SimulationSetup.is_null: bool#

Check if the simulation setup is null.

Returns:
bool

True if the simulation setup is null, False otherwise.

property SimulationSetup.name: str#

Get or set the name of the simulation setup.

Returns:
str

Simulation setup name.

property SimulationSetup.position: int#

Get or set the position of the simulation setup.

Returns:
int

Simulation setup position.

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

Get the sweep data associated with the simulation setup.

Returns:
list[SweepData]

List of sweep data objects.

property SimulationSetup.setup_type: str#

Get the type of the simulation setup.

Returns:
str

Simulation setup type.

Attribute detail#

SimulationSetup.core#

Method detail#

SimulationSetup.cast()#

Cast a core SimulationSetup to PyEDB SimulationSetup.

SimulationSetup.add_frequency_sweep(frequency_sweep: list[str])#

This method is deprecated. Please use ‘add_sweep’ with appropriate parameters instead.

SimulationSetup.add_sweep(name: str | None = None, distribution: str = 'linear', start_freq: str | float = '0GHz', stop_freq: str | float = '20GHz', step: str | float = '10MHz', discrete: bool = False, frequency_set: list[list[str]] | None = None) pyedb.grpc.database.simulation_setup.sweep_data.SweepData | None#

Add a HFSS frequency sweep.

This method was refactored to reduce complexity. The behavior is compatible with the previous implementation: it accepts either a legacy frequency_set or single-sweep parameters.

Parameters:
name: str

sweep name

distribution: str

sweep distribution. Supported values “linear”, “linear_count”, “decade_count”, “exponential”, “octave_count”. Default: “linear”

start_freq: str or float

starting frequency (e.g. “0GHz” or 0)

stop_freq: str or float

stopping frequency (e.g. “20GHz” or 20000000000)

step: str or float

frequency step (e.g. “10MHz” or 10000000)

discrete: bool

whether the sweep is discrete or interpolating

frequency_set: list[list[str]] or None

legacy multi-sweep format (e.g. [[“linear_scale”, “0GHz”, “20GHz”, “10MHz”], […], …])

Returns:
SweepData | None

The newly added sweep when single sweep parameters are used, or None when frequency_set is provided (legacy multi-sweep behavior).

SimulationSetup.clear_sweeps()#

Clear all frequency sweeps from the simulation setup.