@@ -1026,7 +1026,7 @@ def plot_scene(
1026
1026
1027
1027
class IcepakPostProcessor (PostProcessor , object ):
1028
1028
def __init__ (self , app ):
1029
- PostProcessor .__init__ (self , app )
1029
+ PostProcessorCommon .__init__ (self , app )
1030
1030
1031
1031
@pyaedt_function_handler ()
1032
1032
def create_field_summary (self ):
@@ -1108,7 +1108,7 @@ def get_fans_operating_point(self, export_file=None, setup_name=None, timestep=N
1108
1108
timestep ,
1109
1109
]
1110
1110
)
1111
- with open (export_file , "r" ) as f :
1111
+ with open_file (export_file , "r" ) as f :
1112
1112
reader = csv .reader (f )
1113
1113
for line in reader :
1114
1114
if "Fan Instances" in line :
@@ -1120,7 +1120,7 @@ def get_fans_operating_point(self, export_file=None, setup_name=None, timestep=N
1120
1120
1121
1121
@pyaedt_function_handler
1122
1122
def _parse_field_summary_content (self , fs , setup_name , design_variation , quantity_name ):
1123
- content = fs .get_field_summary_data (setup_name = setup_name , design_variation = design_variation )
1123
+ content = fs .get_field_summary_data (sweep_name = setup_name , design_variation = design_variation )
1124
1124
pattern = r"\[([^]]*)\]"
1125
1125
match = re .search (pattern , content ["Quantity" ][0 ])
1126
1126
if match :
@@ -1139,7 +1139,7 @@ def evaluate_faces_quantity(
1139
1139
quantity_name ,
1140
1140
side = "Default" ,
1141
1141
setup_name = None ,
1142
- design_variation = None ,
1142
+ design_variation = {} ,
1143
1143
ref_temperature = "" ,
1144
1144
):
1145
1145
"""Export the field surface output.
@@ -1175,17 +1175,11 @@ def evaluate_faces_quantity(
1175
1175
1176
1176
>>> oModule.ExportFieldsSummary
1177
1177
"""
1178
- if design_variation is None :
1179
- design_variation = {}
1180
- facelist_name = generate_unique_name (quantity_name )
1181
- self ._app .modeler .create_face_list (faces_list , facelist_name )
1178
+ name = generate_unique_name (quantity_name )
1179
+ self ._app .modeler .create_face_list (faces_list , name )
1182
1180
fs = self .create_field_summary ()
1183
- fs .add_calculation (
1184
- "Object" , "Surface" , facelist_name , quantity_name , side = side , ref_temperature = ref_temperature
1185
- )
1186
- out = self ._parse_field_summary_content (fs , setup_name , design_variation , quantity_name )
1187
- self ._app .oeditor .Delete (["NAME:Selections" , "Selections:=" , facelist_name ])
1188
- return out
1181
+ fs .add_calculation ("Object" , "Surface" , name , quantity_name , side = side , ref_temperature = ref_temperature )
1182
+ return self ._parse_field_summary_content (fs , setup_name , design_variation , quantity_name )
1189
1183
1190
1184
@pyaedt_function_handler ()
1191
1185
def evaluate_boundary_quantity (
@@ -1195,7 +1189,7 @@ def evaluate_boundary_quantity(
1195
1189
side = "Default" ,
1196
1190
volume = False ,
1197
1191
setup_name = None ,
1198
- design_variation = None ,
1192
+ design_variation = {} ,
1199
1193
ref_temperature = "" ,
1200
1194
):
1201
1195
"""Export the field output on a boundary.
@@ -1234,8 +1228,6 @@ def evaluate_boundary_quantity(
1234
1228
1235
1229
>>> oModule.ExportFieldsSummary
1236
1230
"""
1237
- if design_variation is None :
1238
- design_variation = {}
1239
1231
fs = self .create_field_summary ()
1240
1232
fs .add_calculation (
1241
1233
"Boundary" ,
@@ -1254,7 +1246,7 @@ def evaluate_monitor_quantity(
1254
1246
quantity_name ,
1255
1247
side = "Default" ,
1256
1248
setup_name = None ,
1257
- design_variation = None ,
1249
+ design_variation = {} ,
1258
1250
ref_temperature = "" ,
1259
1251
):
1260
1252
"""Export monitor field output.
@@ -1290,8 +1282,6 @@ def evaluate_monitor_quantity(
1290
1282
1291
1283
>>> oModule.ExportFieldsSummary
1292
1284
"""
1293
- if design_variation is None :
1294
- design_variation = {}
1295
1285
if settings .aedt_version < "2024.1" :
1296
1286
raise NotImplementedError ("Monitors are not supported in field summary in versions earlier than 2024 R1." )
1297
1287
else : # pragma: no cover
@@ -1315,7 +1305,7 @@ def evaluate_object_quantity(
1315
1305
side = "Default" ,
1316
1306
volume = False ,
1317
1307
setup_name = None ,
1318
- design_variation = None ,
1308
+ design_variation = {} ,
1319
1309
ref_temperature = "" ,
1320
1310
):
1321
1311
"""Export the field output on or in an object.
@@ -1353,8 +1343,6 @@ def evaluate_object_quantity(
1353
1343
1354
1344
>>> oModule.ExportFieldsSummary
1355
1345
"""
1356
- if design_variation is None :
1357
- design_variation = {}
1358
1346
fs = self .create_field_summary ()
1359
1347
fs .add_calculation (
1360
1348
"Boundary" ,
0 commit comments