create_linear_step_sweep#
- Hfss.create_linear_step_sweep(setup, unit, start_frequency, stop_frequency, step_size, name=None, save_fields=True, save_rad_fields=False, sweep_type='Discrete')#
Create a sweep with a specified frequency step.
- Parameters:
- setup
str
Name of the setup.
- unit
str
Unit of the frequency. For example,
"MHz"
or"GHz"
.- start_frequency
float
Starting frequency of the sweep.
- stop_frequency
float
Stopping frequency of the sweep.
- step_size
float
Frequency size of the step.
- name
str
,optional
Name of the sweep. The default is
None
, in which case a name is automatically assigned.- save_fieldsbool,
optional
Whether to save fields. The default is
True
.- save_rad_fieldsbool,
optional
Whether to save radiating fields. The default is
False
.- sweep_type
str
,optional
Type of the sweep. Options are
"Discrete"
,``”Interpolating”`` and"Fast"
. The default is"Discrete"
.
- setup
- Returns:
ansys.aedt.core.modules.solve_sweeps.SweepHFSS
or boolSweep object if successful,
False
otherwise.
References
>>> oModule.InsertFrequencySweep
Examples
Create a setup named
"LinearStepSetup"
and use it in a linear step sweep named"LinearStepSweep"
.>>> setup = hfss.create_setup("LinearStepSetup") >>> linear_step_sweep = hfss.create_linear_step_sweep(setup="LinearStepSetup", unit="MHz", ... start_frequency=1.1e3, stop_frequency=1200.1, ... step_size=153.8) >>> type(linear_step_sweep) <class 'from ansys.aedt.core.modules.setup_templates.SweepHFSS'>