SimulationSetup#
- class pyedb.grpc.database.simulation_setup.simulation_setup.SimulationSetup(pedb, core: ansys.edb.core.simulation_setup.simulation_setup.SimulationSetup)#
Bases:
SimulationSetupDeprecated
Overview#
Cast a core SimulationSetup to PyEDB SimulationSetup. |
|
This method is deprecated. Please use ‘add_sweep’ with appropriate parameters instead. |
|
Add a HFSS frequency sweep. |
|
Clear all frequency sweeps from the simulation setup. |
Unique ID of the EDB object. |
|
Check if the simulation setup is null. |
|
Get or set the name of the simulation setup. |
|
Get or set the position of the simulation setup. |
|
Get the sweep data associated with the simulation setup. |
|
Get the type of the simulation setup. |
Import detail#
from pyedb.grpc.database.simulation_setup.simulation_setup import SimulationSetup
Property detail#
- 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:
strSimulation setup name.
- property SimulationSetup.position: int#
Get or set the position of the simulation setup.
- Returns:
intSimulation 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.
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|NoneThe 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.