create_linear_step_sweep#
- SetupHFSS.create_linear_step_sweep(unit: str = 'GHz', start_frequency: float = 0.1, stop_frequency: float = 2.0, step_size: float = 0.05, name: str | None = None, save_fields: bool = True, save_rad_fields: bool = False, sweep_type: str = 'Discrete')#
Create a Sweep with a specified frequency step.
- Parameters:
- unit
str Unit of the frequency. For example,
"MHzor"GHz".- start_frequency
float,optional Starting frequency of the sweep. The default is
0.1.- stop_frequency
float,optional Stopping frequency of the sweep. The default is
2.0.- step_size
float,optional Frequency size of the step. The default is
0.05.- 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 the fields. The default is
True.- save_rad_fieldsbool,
optional Whether to save the radiating fields. The default is
False.- sweep_type
str,optional Whether to create a
"Discrete",``”Interpolating”`` or"Fast"sweep. The default is"Discrete".
- unit
- Returns:
ansys.aedt.core.modules.solve_sweeps.SweepHFSSor boolSweep object if successful,
Falseotherwise.
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 = setup.create_linear_step_sweep( ... name="LinearStepSweep", 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'>