Skip to content

Commit

Permalink
Add Eigenmode
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelopez-ansys committed Nov 4, 2024
1 parent 02af838 commit d7c7a0c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ansys/aedt/core/hfss.py
Original file line number Diff line number Diff line change
Expand Up @@ -3574,7 +3574,7 @@ def assign_impedance_to_sheet(
"""

if self.solution_type in ["Modal", "Terminal", "Transient Network"]:
if self.solution_type in ["Modal", "Terminal", "Transient Network", "Eigenmode"]:

Check warning on line 3577 in src/ansys/aedt/core/hfss.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/hfss.py#L3577

Added line #L3577 was not covered by tests
if not name:
name = generate_unique_name("Imped")
elif name in self.modeler.get_boundaries_name():
Expand Down
10 changes: 9 additions & 1 deletion tests/system/general/test_20_HFSS.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ def test_15_create_perfects_on_sheets(self):
assert perfect_e_eigen.name in self.aedtapp.modeler.get_boundaries_name()
self.aedtapp.solution_type = "solution_type"

def test_16_create_impedance_on_sheets(self):
def test_16_a_create_impedance_on_sheets(self):
rect = self.aedtapp.modeler.create_rectangle(
self.aedtapp.PLANE.XY, [0, 0, 0], [10, 2], name="ImpBound", material="Copper"
)
Expand All @@ -760,6 +760,14 @@ def test_16_create_impedance_on_sheets(self):
imp3 = self.aedtapp.assign_impedance_to_sheet(impedance_box.top_face_z.id, "TL4", [50, 20, 0, 0], [25, 0, 5, 0])
assert imp3.name in self.aedtapp.modeler.get_boundaries_name()

def test_16_b_create_impedance_on_sheets_eigenmode(self, add_app):
aedtapp = add_app(solution_type="Eigenmode", project_name="test_16_b")
rect = aedtapp.modeler.create_rectangle(
aedtapp.PLANE.XY, [0, 0, 0], [10, 2], name="ImpBound", material="Copper"
)
imp1 = aedtapp.assign_impedance_to_sheet(rect.name, "TL2", 50, 25)
assert imp1.name in aedtapp.modeler.get_boundaries_name()

def test_17_create_lumpedrlc_on_sheets(self):
rect = self.aedtapp.modeler.create_rectangle(
self.aedtapp.PLANE.XY, [0, 0, 0], [10, 2], name="rlcBound", material="Copper"
Expand Down

0 comments on commit d7c7a0c

Please sign in to comment.