Skip to content

Commit 3a804e1

Browse files
committed
RLC type is a string argument and not a list.
1 parent 1e694c2 commit 3a804e1

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

_unittest/test_20_HFSS.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,13 @@ def test_14_create_lumpedrlc_on_objects(self):
493493
assert imp.name in self.aedtapp.modeler.get_boundaries_name()
494494
assert imp.update()
495495

496+
box3 = self.aedtapp.modeler.create_box([0, 0, 20], [10, 10, 5], "rlc3", "copper")
497+
lumped_rlc2 = self.aedtapp.create_lumped_rlc_between_objects(
498+
"rlc2", "rlc3", self.aedtapp.AxisDir.XPos, Rvalue=50, Lvalue=1e-9, Cvalue=1e-9
499+
)
500+
assert lumped_rlc2.name in self.aedtapp.modeler.get_boundaries_name()
501+
assert lumped_rlc2.update()
502+
496503
def test_15_create_perfects_on_sheets(self):
497504
rect = self.aedtapp.modeler.create_rectangle(
498505
self.aedtapp.PLANE.XY, [0, 0, 0], [10, 2], name="RectBound", matname="Copper"
@@ -518,6 +525,15 @@ def test_17_create_lumpedrlc_on_sheets(self):
518525
names = self.aedtapp.modeler.get_boundaries_name()
519526
assert imp.name in self.aedtapp.modeler.get_boundaries_name()
520527

528+
rect2 = self.aedtapp.modeler.create_rectangle(
529+
self.aedtapp.PLANE.XY, [0, 0, 10], [10, 2], name="rlcBound2", matname="Copper"
530+
)
531+
imp = self.aedtapp.assign_lumped_rlc_to_sheet(
532+
rect.name, self.aedtapp.AxisDir.XPos, rlctype="Serial", Rvalue=50, Lvalue=1e-9
533+
)
534+
names = self.aedtapp.modeler.get_boundaries_name()
535+
assert imp.name in self.aedtapp.modeler.get_boundaries_name()
536+
521537
def test_17B_update_assignment(self):
522538
bound = self.aedtapp.assign_perfecth_to_sheets(self.aedtapp.modeler["My_Box"].faces[0].id)
523539
assert bound

pyaedt/hfss.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2822,7 +2822,7 @@ def create_lumped_rlc_between_objects(
28222822
sourcename : str, optional
28232823
Perfect H name. The default is ``None``.
28242824
rlctype : str, optional
2825-
Type of the RLC. Options are ``"Parallel"`` and ``"Series"``.
2825+
Type of the RLC. Options are ``"Parallel"`` and ``"Serial"``.
28262826
The default is ``"Parallel"``.
28272827
Rvalue : optional
28282828
Resistance value in ohms. The default is ``None``,
@@ -2882,7 +2882,7 @@ def create_lumped_rlc_between_objects(
28822882
props = OrderedDict()
28832883
props["Objects"] = [sheet_name]
28842884
props["CurrentLine"] = OrderedDict({"Start": start, "End": stop})
2885-
props["RLC Type"] = [rlctype]
2885+
props["RLC Type"] = rlctype
28862886
if Rvalue:
28872887
props["UseResist"] = True
28882888
props["Resistance"] = str(Rvalue) + "ohm"
@@ -3480,7 +3480,7 @@ def assign_lumped_rlc_to_sheet(
34803480
sourcename : str, optional
34813481
Lumped RLC name. The default is ``None``.
34823482
rlctype : str, optional
3483-
Type of the RLC. Options are ``"Parallel"`` and ``"Series"``. The default is ``"Parallel"``.
3483+
Type of the RLC. Options are ``"Parallel"`` and ``"Serial"``. The default is ``"Parallel"``.
34843484
Rvalue : float, optional
34853485
Resistance value in ohms. The default is ``None``, in which
34863486
case this parameter is disabled.
@@ -3529,7 +3529,7 @@ def assign_lumped_rlc_to_sheet(
35293529
props = OrderedDict()
35303530
props["Objects"] = [sheet_name]
35313531
props["CurrentLine"] = OrderedDict({"Start": start, "End": stop})
3532-
props["RLC Type"] = [rlctype]
3532+
props["RLC Type"] = rlctype
35333533
if Rvalue:
35343534
props["UseResist"] = True
35353535
props["Resistance"] = str(Rvalue) + "ohm"

0 commit comments

Comments
 (0)