Skip to content

Commit

Permalink
FIX: Edit sources from file in HFSS 3DLayout inversed order (#5490)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelopez-ansys authored Nov 27, 2024
1 parent 7efbd5e commit b590d97
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/ansys/aedt/core/hfss3dlayout.py
Original file line number Diff line number Diff line change
Expand Up @@ -2292,13 +2292,12 @@ def find_scale(data, header_line):
self.oboundary.EditExcitations(
[
"NAME:Excitations",
[source, f"pwl({ds_name_mag}, Freq)", f"pwl({ds_name_phase}, Freq)"],
[source, f"pwl({ds_name_phase}, Freq)", f"pwl({ds_name_mag}, Freq)"],
],
["NAME:Terminations", [source, False, str(impedance) + "ohm", "0ohm"]],
",".join(str_val),
[],
)

self.logger.info("Source Excitation updated with Dataset.")
return True
self.logger.error("Port not found.")
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions tests/system/general/test_41_3dlayout_modeler.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ def test_13a_create_edge_port(self):
assert self.aedtapp.create_edge_port("line1", 3, False)
assert len(self.aedtapp.excitations) > 0
time_domain = os.path.join(TESTS_GENERAL_PATH, "example_models", test_subfolder, "Sinusoidal.csv")
assert self.aedtapp.boundaries[0].object_properties.props["Magnitude"] == "1V"
assert self.aedtapp.edit_source_from_file(
source=port_wave.name,
input_file=time_domain,
Expand All @@ -344,6 +345,7 @@ def test_13a_create_edge_port(self):
y_scale=1e-3,
data_format="Voltage",
)
assert self.aedtapp.boundaries[0].object_properties.props["Magnitude"] != "1V"
self.aedtapp.boundaries[0].object_properties.props["Boundary Type"] = "PEC"
assert list(self.aedtapp.oboundary.GetAllBoundariesList())[0] == self.aedtapp.boundaries[0].name

Expand Down

0 comments on commit b590d97

Please sign in to comment.