create_frequency_sweep#
- SetupHFSS.create_frequency_sweep(unit=None, start_frequency=1.0, stop_frequency=10.0, num_of_freq_points=None, name=None, save_fields=True, save_rad_fields=False, sweep_type='Discrete', interpolation_tol=0.5, interpolation_max_solutions=250)#
Create a sweep with the specified number of points.
- Parameters:
- unit
str
,optional
Unit of the frequency.. The default is
None
, in which case the default desktop units are used.- start_frequency
float
,str
,optional
Starting frequency of the sweep. The default is
1.0
. If a unit is passed with number, such as"1MHz"
, the unit is ignored.- stop_frequency
float
,str
,optional
Stopping frequency of the sweep. The default is
10.0
. If a unit is passed with number, such as ``”1MHz”`, the unit is ignored.- num_of_freq_points
int
Number of frequency points in the range. The default is
401
for a sweep type of"Interpolating"
or"Fast"
. The default is5
for a sweep type of"Discrete"
.- 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
Type of the sweep. Options are
"Fast"
,"Interpolating"
, and"Discrete"
. The default is"Discrete"
.- interpolation_tol
float
,optional
Error tolerance threshold for the interpolation process. The default is
0.5
.- interpolation_max_solutions
int
,optional
Maximum number of solutions evaluated for the interpolation process. The default is
250
.
- unit
- Returns:
ansys.aedt.core.modules.solve_sweeps.SweepHFSS
or boolSweep object if successful,
False
otherwise.
References
>>> oModule.InsertFrequencySweep
Examples
Create a setup named
"LinearCountSetup"
and use it in a linear count sweep named"LinearCountSweep"
.>>> setup = hfss.create_setup("LinearCountSetup") >>> linear_count_sweep = setup.create_linear_count_sweep(,, >>> type(linear_count_sweep) <class 'from ansys.aedt.core.modules.setup_templates.SweepHFSS'>