@@ -49,34 +49,34 @@ def test_03_assign_initial_mesh_from_slider(self):
49
49
assert self .aedtapp .mesh .assign_initial_mesh_from_slider (4 )
50
50
51
51
def test_04_create_winding (self ):
52
- bounds = self .aedtapp .assign_winding (faces = ["Coil" ], current = 20e-3 )
52
+ bounds = self .aedtapp .assign_winding (assignment = ["Coil" ], current = 20e-3 )
53
53
assert bounds
54
54
o = self .aedtapp .modeler .create_rectangle ([0 , 0 , 0 ], [3 , 1 ], name = "Rectangle2" , matname = "copper" )
55
- bounds = self .aedtapp .assign_winding (faces = o .id , current = 20e-3 )
55
+ bounds = self .aedtapp .assign_winding (assignment = o .id , current = 20e-3 )
56
56
assert bounds
57
- bounds = self .aedtapp .assign_winding (faces = ["Coil" ], current = "20e-3A" )
57
+ bounds = self .aedtapp .assign_winding (assignment = ["Coil" ], current = "20e-3A" )
58
58
assert bounds
59
- bounds = self .aedtapp .assign_winding (faces = ["Coil" ], resistance = "1ohm" )
59
+ bounds = self .aedtapp .assign_winding (assignment = ["Coil" ], resistance = "1ohm" )
60
60
assert bounds
61
- bounds = self .aedtapp .assign_winding (faces = ["Coil" ], inductance = "1H" )
61
+ bounds = self .aedtapp .assign_winding (assignment = ["Coil" ], inductance = "1H" )
62
62
assert bounds
63
- bounds = self .aedtapp .assign_winding (faces = ["Coil" ], voltage = "10V" )
63
+ bounds = self .aedtapp .assign_winding (assignment = ["Coil" ], voltage = "10V" )
64
64
assert bounds
65
65
bounds_name = generate_unique_name ("Coil" )
66
- bounds = self .aedtapp .assign_winding (faces = ["Coil" ], name = bounds_name )
66
+ bounds = self .aedtapp .assign_winding (assignment = ["Coil" ], name = bounds_name )
67
67
assert bounds_name == bounds .name
68
68
69
69
def test_04a_assign_coil (self ):
70
- bound = self .aedtapp .assign_coil (objects = ["Coil" ])
70
+ bound = self .aedtapp .assign_coil (assignment = ["Coil" ])
71
71
assert bound
72
72
polarity = "Positive"
73
- bound = self .aedtapp .assign_coil (objects = ["Coil" ], polarity = polarity )
73
+ bound = self .aedtapp .assign_coil (assignment = ["Coil" ], polarity = polarity )
74
74
assert bound .props ["PolarityType" ] == polarity .lower ()
75
75
polarity = "Negative"
76
- bound = self .aedtapp .assign_coil (objects = ["Coil" ], polarity = polarity )
76
+ bound = self .aedtapp .assign_coil (assignment = ["Coil" ], polarity = polarity )
77
77
assert bound .props ["PolarityType" ] == polarity .lower ()
78
78
bound_name = generate_unique_name ("Coil" )
79
- bound = self .aedtapp .assign_coil (objects = ["Coil" ], name = bound_name )
79
+ bound = self .aedtapp .assign_coil (assignment = ["Coil" ], name = bound_name )
80
80
assert bound_name == bound .name
81
81
82
82
def test_05_create_vector_potential (self ):
@@ -114,7 +114,7 @@ def test_10_assign_torque(self):
114
114
assert T .props ["Objects" ][0 ] == "Rotor_Section1"
115
115
assert T .props ["Is Positive" ]
116
116
assert T .delete ()
117
- T = self .aedtapp .assign_torque (objects = "Rotor_Section1" , is_positive = False , torque_name = "Torque_Test" )
117
+ T = self .aedtapp .assign_torque (assignment = "Rotor_Section1" , is_positive = False , torque_name = "Torque_Test" )
118
118
assert T .name == "Torque_Test"
119
119
assert not T .props ["Is Positive" ]
120
120
assert T .props ["Objects" ][0 ] == "Rotor_Section1"
@@ -125,7 +125,7 @@ def test_11_assign_force(self):
125
125
assert F .props ["Objects" ][0 ] == "Magnet2_Section1"
126
126
assert F .props ["Reference CS" ] == "Global"
127
127
assert F .delete ()
128
- F = self .aedtapp .assign_force (objects = "Magnet2_Section1" , force_name = "Force_Test" )
128
+ F = self .aedtapp .assign_force (assignment = "Magnet2_Section1" , force_name = "Force_Test" )
129
129
assert F .name == "Force_Test"
130
130
131
131
def test_12_assign_current_source (self ):
@@ -137,7 +137,8 @@ def test_12_assign_current_source(self):
137
137
138
138
def test_13_assign_master_slave (self ):
139
139
mas , slave = self .aedtapp .assign_master_slave (
140
- self .aedtapp .modeler ["Rectangle2" ].edges [0 ].id , self .aedtapp .modeler ["Rectangle2" ].edges [2 ].id
140
+ self .aedtapp .modeler ["Rectangle2" ].edges [0 ].id ,
141
+ self .aedtapp .modeler ["Rectangle2" ].edges [2 ].id ,
141
142
)
142
143
assert "Independent" in mas .name
143
144
assert "Dependent" in slave .name
@@ -210,24 +211,24 @@ def test_19_matrix(self):
210
211
self .aedtapp .assign_current ("Coil_2" , amplitude = 1 , swap_direction = True , name = "Current2" )
211
212
self .aedtapp .assign_current ("Coil_3" , amplitude = 1 , swap_direction = True , name = "Current3" )
212
213
self .aedtapp .assign_current ("Coil_4" , amplitude = 1 , swap_direction = True , name = "Current4" )
213
- L = self .aedtapp .assign_matrix (sources = "Current1" )
214
+ L = self .aedtapp .assign_matrix (assignment = "Current1" )
214
215
assert L .props ["MatrixEntry" ]["MatrixEntry" ][0 ]["Source" ] == "Current1"
215
216
assert L .delete ()
216
217
L = self .aedtapp .assign_matrix (
217
- sources = ["Current1" , "Current2" ], matrix_name = "Test1" , turns = 2 , return_path = "Current3"
218
+ assignment = ["Current1" , "Current2" ], matrix_name = "Test1" , turns = 2 , return_path = "Current3"
218
219
)
219
220
assert len (L .props ["MatrixEntry" ]["MatrixEntry" ]) == 2
220
221
L = self .aedtapp .assign_matrix (
221
- sources = ["Current1" , "Current2" ], matrix_name = "Test2" , turns = [2 , 1 ], return_path = ["Current3" , "Current4" ]
222
+ assignment = ["Current1" , "Current2" ], matrix_name = "Test2" , turns = [2 , 1 ], return_path = ["Current3" , "Current4" ]
222
223
)
223
224
assert L .props ["MatrixEntry" ]["MatrixEntry" ][1 ]["ReturnPath" ] == "Current4"
224
225
L = self .aedtapp .assign_matrix (
225
- sources = ["Current1" , "Current2" ], matrix_name = "Test3" , turns = [2 , 1 ], return_path = ["Current1" , "Current1" ]
226
+ assignment = ["Current1" , "Current2" ], matrix_name = "Test3" , turns = [2 , 1 ], return_path = ["Current1" , "Current1" ]
226
227
)
227
228
assert not L
228
229
group_sources = {"Group1_Test" : ["Current3" , "Current2" ]}
229
230
L = self .aedtapp .assign_matrix (
230
- sources = ["Current3" , "Current2" ],
231
+ assignment = ["Current3" , "Current2" ],
231
232
matrix_name = "Test4" ,
232
233
turns = [2 , 1 ],
233
234
return_path = ["Current4" , "Current1" ],
@@ -236,7 +237,7 @@ def test_19_matrix(self):
236
237
assert L .name == "Test4"
237
238
group_sources = {"Group1_Test" : ["Current3" , "Current2" ], "Group2_Test" : ["Current1" , "Current2" ]}
238
239
L = self .aedtapp .assign_matrix (
239
- sources = ["Current1" , "Current2" ],
240
+ assignment = ["Current1" , "Current2" ],
240
241
matrix_name = "Test5" ,
241
242
turns = [2 , 1 ],
242
243
return_path = "infinite" ,
@@ -247,7 +248,7 @@ def test_19_matrix(self):
247
248
group_sources ["Group1_Test" ] = ["Current1" , "Current3" ]
248
249
group_sources ["Group2_Test" ] = ["Current2" , "Current4" ]
249
250
L = self .aedtapp .assign_matrix (
250
- sources = ["Current1" , "Current2" , "Current3" , "Current4" ],
251
+ assignment = ["Current1" , "Current2" , "Current3" , "Current4" ],
251
252
matrix_name = "Test6" ,
252
253
turns = 2 ,
253
254
group_sources = group_sources ,
@@ -256,7 +257,7 @@ def test_19_matrix(self):
256
257
assert L .props ["MatrixGroup" ]["MatrixGroup" ][0 ]["GroupName" ] == "Group1_Test"
257
258
group_sources = {"Group1_Test" : ["Current1" , "Current3" ], "Group2_Test" : ["Current2" , "Current4" ]}
258
259
L = self .aedtapp .assign_matrix (
259
- sources = ["Current1" , "Current2" , "Current3" , "Current4" ],
260
+ assignment = ["Current1" , "Current2" , "Current3" , "Current4" ],
260
261
matrix_name = "Test7" ,
261
262
turns = [5 , 1 ],
262
263
group_sources = group_sources ,
@@ -265,7 +266,7 @@ def test_19_matrix(self):
265
266
assert len (L .props ["MatrixGroup" ]["MatrixGroup" ]) == 2
266
267
group_sources = {"Group1_Test" : ["Current1" , "Current3" , "Current2" ], "Group2_Test" : ["Current2" , "Current4" ]}
267
268
L = self .aedtapp .assign_matrix (
268
- sources = ["Current1" , "Current2" , "Current3" ],
269
+ assignment = ["Current1" , "Current2" , "Current3" ],
269
270
matrix_name = "Test8" ,
270
271
turns = [2 , 1 , 2 , 3 ],
271
272
return_path = ["infinite" , "infinite" , "Current4" ],
@@ -277,7 +278,7 @@ def test_19_matrix(self):
277
278
assert L .props ["MatrixEntry" ]["MatrixEntry" ][0 ]["NumberOfTurns" ] == 3
278
279
group_sources = {"Group1_Test" : ["Current1" , "Current3" ], "Group2_Test" : ["Current2" , "Current4" ]}
279
280
L = self .aedtapp .assign_matrix (
280
- sources = ["Current1" , "Current2" , "Current3" , "Current4" ],
281
+ assignment = ["Current1" , "Current2" , "Current3" , "Current4" ],
281
282
matrix_name = "Test9" ,
282
283
turns = [5 , 1 , 2 , 3 ],
283
284
group_sources = group_sources ,
@@ -334,8 +335,8 @@ def test_25_export_rl_matrix(self):
334
335
self .aedtapp .set_active_design ("Sinusoidal" )
335
336
assert not self .aedtapp .export_rl_matrix ("Test1" , " " )
336
337
self .aedtapp .solution_type = SOLUTIONS .Maxwell2d .EddyCurrentXY
337
- self .aedtapp .assign_matrix (sources = ["PM_I1_1_I0" , "PM_I1_I0" ], matrix_name = "Test1" )
338
- self .aedtapp .assign_matrix (sources = ["Phase_A" , "Phase_B" , "Phase_C" ], matrix_name = "Test2" )
338
+ self .aedtapp .assign_matrix (assignment = ["PM_I1_1_I0" , "PM_I1_I0" ], matrix_name = "Test1" )
339
+ self .aedtapp .assign_matrix (assignment = ["Phase_A" , "Phase_B" , "Phase_C" ], matrix_name = "Test2" )
339
340
setup_name = "setupTestMatrixRL"
340
341
setup = self .aedtapp .create_setup (name = setup_name )
341
342
setup .props ["MaximumPasses" ] = 2
0 commit comments