@@ -667,7 +667,9 @@ def test_12_create_perfects_on_objects(self):
667
667
def test_13_create_impedance_on_objects (self ):
668
668
box1 = self .aedtapp .modeler .create_box ([0 , 0 , 0 ], [10 , 10 , 5 ], "imp1" , "Copper" )
669
669
box2 = self .aedtapp .modeler .create_box ([0 , 0 , 10 ], [10 , 10 , 5 ], "imp2" , "copper" )
670
- imp = self .aedtapp .create_impedance_between_objects ("imp1" , "imp2" , self .aedtapp .AxisDir .XPos , "TL2" , 50 , 25 )
670
+ imp = self .aedtapp .create_impedance_between_objects (
671
+ box1 .name , box2 .name , self .aedtapp .AxisDir .XPos , "TL1" , 50 , 25
672
+ )
671
673
assert imp .name in self .aedtapp .modeler .get_boundaries_name ()
672
674
assert imp .update ()
673
675
@@ -677,14 +679,14 @@ def test_14_create_lumpedrlc_on_objects(self):
677
679
box1 = self .aedtapp .modeler .create_box ([0 , 0 , 0 ], [10 , 10 , 5 ], "rlc1" , "Copper" )
678
680
box2 = self .aedtapp .modeler .create_box ([0 , 0 , 10 ], [10 , 10 , 5 ], "rlc2" , "copper" )
679
681
imp = self .aedtapp .create_lumped_rlc_between_objects (
680
- "rlc1" , "rlc2" , self .aedtapp .AxisDir .XPos , Rvalue = 50 , Lvalue = 1e-9
682
+ box1 . name , box2 . name , self .aedtapp .AxisDir .XPos , Rvalue = 50 , Lvalue = 1e-9
681
683
)
682
684
assert imp .name in self .aedtapp .modeler .get_boundaries_name ()
683
685
assert imp .update ()
684
686
685
687
box3 = self .aedtapp .modeler .create_box ([0 , 0 , 20 ], [10 , 10 , 5 ], "rlc3" , "copper" )
686
688
lumped_rlc2 = self .aedtapp .create_lumped_rlc_between_objects (
687
- "rlc2" , "rlc3" , self .aedtapp .AxisDir .XPos , Rvalue = 50 , Lvalue = 1e-9 , Cvalue = 1e-9
689
+ box2 . name , box3 . name , self .aedtapp .AxisDir .XPos , Rvalue = 50 , Lvalue = 1e-9 , Cvalue = 1e-9
688
690
)
689
691
assert lumped_rlc2 .name in self .aedtapp .modeler .get_boundaries_name ()
690
692
assert lumped_rlc2 .update ()
@@ -710,9 +712,24 @@ def test_16_create_impedance_on_sheets(self):
710
712
rect = self .aedtapp .modeler .create_rectangle (
711
713
self .aedtapp .PLANE .XY , [0 , 0 , 0 ], [10 , 2 ], name = "ImpBound" , matname = "Copper"
712
714
)
713
- imp = self .aedtapp .assign_impedance_to_sheet ("imp1" , "TL2" , 50 , 25 )
714
- assert imp .name in self .aedtapp .modeler .get_boundaries_name ()
715
- assert imp .update ()
715
+ imp1 = self .aedtapp .assign_impedance_to_sheet (rect .name , "TL2" , 50 , 25 )
716
+ assert imp1 .name in self .aedtapp .modeler .get_boundaries_name ()
717
+ assert imp1 .update ()
718
+
719
+ impedance_box = self .aedtapp .modeler .create_box ([0 , - 100 , 0 ], [200 , 200 , 200 ], "ImpedanceBox" )
720
+ ids = self .aedtapp .modeler .get_object_faces (impedance_box .name )[:3 ]
721
+
722
+ imp2 = self .aedtapp .assign_impedance_to_sheet (ids , sourcename = "ImpedanceToFaces" , resistance = 60 , reactance = - 20 )
723
+ assert imp2 .name in self .aedtapp .modeler .get_boundaries_name ()
724
+
725
+ rect2 = self .aedtapp .modeler .create_rectangle (
726
+ self .aedtapp .PLANE .XY , [0 , 0 , 0 ], [10 , 2 ], name = "AniImpBound" , matname = "Copper"
727
+ )
728
+ assert not self .aedtapp .assign_impedance_to_sheet (rect2 .name , "TL3" , [50 , 20 , 0 , 0 ], [25 , 0 , 5 ])
729
+ imp2 = self .aedtapp .assign_impedance_to_sheet (rect2 .name , "TL3" , [50 , 20 , 0 , 0 ], [25 , 0 , 5 , 0 ])
730
+ assert imp2 .name in self .aedtapp .modeler .get_boundaries_name ()
731
+ imp3 = self .aedtapp .assign_impedance_to_sheet (impedance_box .top_face_z .id , "TL4" , [50 , 20 , 0 , 0 ], [25 , 0 , 5 , 0 ])
732
+ assert imp3 .name in self .aedtapp .modeler .get_boundaries_name ()
716
733
717
734
def test_17_create_lumpedrlc_on_sheets (self ):
718
735
rect = self .aedtapp .modeler .create_rectangle (
@@ -844,7 +861,6 @@ def test_24_create_curvilinear(self):
844
861
).GetPropValue ("Apply Curvilinear Elements" )
845
862
mesh .delete ()
846
863
assert len (self .aedtapp .mesh .meshoperations ) == 2
847
- pass
848
864
849
865
def test_30_assign_initial_mesh (self ):
850
866
assert self .aedtapp .mesh .assign_initial_mesh_from_slider (6 )
0 commit comments