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')[source]#

Create a sweep with a specified frequency step.

Parameters:
setupstr

Name of the setup.

unitstr

Unit of the frequency. For example, "MHz" or "GHz".

start_frequencyfloat

Starting frequency of the sweep.

stop_frequencyfloat

Stopping frequency of the sweep.

step_sizefloat

Frequency size of the step.

namestr, 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_typestr, optional

Type of the sweep. Options are "Discrete",``”Interpolating”`` and "Fast". The default is "Discrete".

Returns:
ansys.aedt.core.modules.solve_sweeps.SweepHFSS or bool

Sweep 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'>