Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ansys/aedt/core/extensions/hfss/choke_designer.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def main(data):
setup.props["MaximumPasses"] = 10
hfss.create_linear_count_sweep(
setup=setup.name,
units="MHz",
unit="MHz",
start_frequency=0.1,
stop_frequency=100,
num_of_freq_points=100,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def main(data: ShieldingEffectivenessExtensionData):

aedtapp.create_linear_count_sweep(
setup_name,
units=data.frequency_units,
unit=data.frequency_units,
start_frequency=data.start_frequency,
stop_frequency=data.stop_frequency,
num_of_freq_points=data.points,
Expand Down
10 changes: 5 additions & 5 deletions src/ansys/aedt/core/hfss.py
Original file line number Diff line number Diff line change
Expand Up @@ -1687,7 +1687,7 @@ def create_setup(self, name="MySetupAuto", setup_type=None, **kwargs):
def create_linear_count_sweep(
self,
setup,
units,
unit,
start_frequency,
stop_frequency,
num_of_freq_points=None,
Expand All @@ -1704,7 +1704,7 @@ def create_linear_count_sweep(
----------
setup : str
Name of the setup.
units : str
unit : str
Unit of the frequency. For example, ``"MHz"`` or ``"GHz"``.
start_frequency : float
Starting frequency of the sweep, such as ``1``.
Expand Down Expand Up @@ -1749,7 +1749,7 @@ def create_linear_count_sweep(
>>> linear_count_sweep = hfss.create_linear_count_sweep(
... setup="LinearCountSetup",
... sweep="LinearCountSweep",
... units="MHz",
... unit="MHz",
... start_frequency=1.1e3,
... stop_frequency=1200.1,
... num_of_freq_points=1658,
Expand Down Expand Up @@ -1787,8 +1787,8 @@ def create_linear_count_sweep(
raise AEDTRuntimeError(f"Failed to add sweep '{name}' with type {sweep_type}")

sweepdata.props["RangeType"] = "LinearCount"
sweepdata.props["RangeStart"] = str(start_frequency) + units
sweepdata.props["RangeEnd"] = str(stop_frequency) + units
sweepdata.props["RangeStart"] = str(start_frequency) + unit
sweepdata.props["RangeEnd"] = str(stop_frequency) + unit
sweepdata.props["RangeCount"] = num_of_freq_points
sweepdata.props["Type"] = sweep_type
if sweep_type == "Interpolating":
Expand Down
10 changes: 5 additions & 5 deletions src/ansys/aedt/core/modules/solve_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3079,15 +3079,15 @@ def enable_adaptive_setup_single(self, freq=None, max_passes=None, max_delta_s=N
return self.update()

@pyaedt_function_handler()
def enable_adaptive_setup_broadband(self, low_frequency, high_frquency, max_passes=6, max_delta_s=0.02):
def enable_adaptive_setup_broadband(self, low_frequency, high_frequency, max_passes=6, max_delta_s=0.02):
"""Enable HFSS broadband setup.

Parameters
----------
low_frequency : float, str
Lower Frequency at which set the adaptive convergence.
It can be float (GHz) or str.
high_frquency : float, str
high_frequency : float, str
Lower Frequency at which set the adaptive convergence. It can be float (GHz) or str.
max_passes : int, optional
Maximum number of adaptive passes. The default is ``6``.
Expand All @@ -3108,10 +3108,10 @@ def enable_adaptive_setup_broadband(self, low_frequency, high_frquency, max_pass
del self.props["MultipleAdaptiveFreqsSetup"][el]
if isinstance(low_frequency, (int, float)):
low_frequency = f"{low_frequency}GHz"
if isinstance(high_frquency, (int, float)):
high_frquency = f"{high_frquency}GHz"
if isinstance(high_frequency, (int, float)):
high_frequency = f"{high_frequency}GHz"
self.props["MultipleAdaptiveFreqsSetup"]["Low"] = low_frequency
self.props["MultipleAdaptiveFreqsSetup"]["High"] = high_frquency
self.props["MultipleAdaptiveFreqsSetup"]["High"] = high_frequency
self.props["MaximumPasses"] = max_passes
self.props["MaxDeltaS"] = max_delta_s
self.auto_update = True
Expand Down
12 changes: 6 additions & 6 deletions tests/system/general/test_hfss.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,23 +256,23 @@ def test_create_linear_count_sweep(aedt_app):
)
assert aedt_app.create_linear_count_sweep(
setup="MySetup",
units="GHz",
unit="GHz",
start_frequency=1.1e3,
stop_frequency=1200.1,
num_of_freq_points=1234,
sweep_type="Interpolating",
)
assert aedt_app.create_linear_count_sweep(
setup="MySetup",
units="MHz",
unit="MHz",
start_frequency=1.1e3,
stop_frequency=1200.1,
num_of_freq_points=1234,
sweep_type="Interpolating",
)
assert aedt_app.create_linear_count_sweep(
setup="MySetup",
units="MHz",
unit="MHz",
start_frequency=1.1e3,
stop_frequency=1200.1,
num_of_freq_points=1234,
Expand All @@ -284,7 +284,7 @@ def test_create_linear_count_sweep(aedt_app):
units = "MHz"
sweep = aedt_app.create_linear_count_sweep(
setup="MySetup",
units="MHz",
unit="MHz",
start_frequency=freq_start,
stop_frequency=freq_stop,
num_of_freq_points=num_points,
Expand All @@ -298,7 +298,7 @@ def test_create_linear_count_sweep(aedt_app):
with pytest.raises(AttributeError) as execinfo:
aedt_app.create_linear_count_sweep(
setup="MySetup",
units="MHz",
unit="MHz",
start_frequency=1.1e3,
stop_frequency=1200.1,
num_of_freq_points=1234,
Expand Down Expand Up @@ -528,7 +528,7 @@ def test_validate_setup(aedt_app):
aedt_app.create_setup("ValidationSetup", Frequency="1GHz")
aedt_app.create_linear_count_sweep(
setup="ValidationSetup",
units="GHz",
unit="GHz",
start_frequency=0.8,
stop_frequency=1.2,
num_of_freq_points=10,
Expand Down