SimulationSetup#
- class pyedb.grpc.database.simulation_setup.simulation_setup.SimulationSetup(pedb, core: ansys.edb.core.simulation_setup.simulation_setup.SimulationSetup)#
Bases:
SimulationSetupDeprecated,abc.ABCHelper class that provides a standard way to create an ABC using inheritance.
Overview#
Cast a core SimulationSetup to PyEDB SimulationSetup. |
|
This method is deprecated. Please use ‘add_sweep’ with appropriate parameters instead. |
|
Add a frequency sweep to the simulation setup. |
|
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. |
|
Get the simulation settings. |
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.
- property SimulationSetup.setup_type: str#
Get the type of the simulation setup.
- Returns:
strSimulation setup type.
- abstract property SimulationSetup.settings#
Get the simulation settings.
- Returns:
SettingsThe simulation settings object specific to the 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 frequency sweep to the simulation setup.
Accepts either a single-sweep shorthand (
distribution/start_freq/stop_freq/step) or a multi-bandfrequency_setlist that groups several sweep sub-ranges into one named sweep object.- Parameters:
- name
str,optional Name of the sweep. Auto-generated when omitted.
- distribution
str,optional Sweep distribution used in single-sweep mode. Supported values:
"linear"(default),"linear_count","decade_count","log_scale","exponential","octave_count".- start_freq
strorfloat,optional Start frequency for single-sweep mode (e.g.
"0GHz"or0). Default is"0GHz".- stop_freq
strorfloat,optional Stop frequency for single-sweep mode (e.g.
"20GHz"or20e9). Default is"20GHz".- step
strorfloat,optional Frequency step or point count for single-sweep mode (e.g.
"10MHz"or10e6). Default is"10MHz".- discretebool,
optional When
Truethe sweep type is set to discrete; otherwise interpolating. Default isFalse.- frequency_set
list[list[strorfloat]]orNone,optional Multi-band sweep definition. Each inner list has the form
[distribution, start_freq, stop_freq, step]and supports all distribution aliases recognised by thedistributionparameter. When provided,distribution/start_freq/stop_freq/stepare ignored.
- name
- Returns:
SweepDataorNoneThe newly added
SweepDataobject, orNoneif the sweep could not be created.
Examples
Single linear sweep:
>>> setup = edbapp.simulation_setups.create_siwave_setup() >>> sweep = setup.add_sweep(name="sweep1", start_freq="0GHz", stop_freq="10GHz", step="10MHz")
Multi-band sweep combining a DC point, a decade (log) band and a linear band — all grouped under one sweep name:
>>> setup = edbapp.simulation_setups.create_siwave_setup() >>> setup.add_sweep( ... name="sweep1", ... frequency_set=[ ... ["linear_count", "0GHz", "0GHz", "1"], ... ["decade_count", "1Hz", "10MHz", "10"], ... ["linear", "10MHz", "10GHz", "10MHz"], ... ], ... )
- SimulationSetup.clear_sweeps()#
Clear all frequency sweeps from the simulation setup.