我正在使用 Numeca/Design3D。我必须通过 python 脚本耦合 2 行、一个叶轮和扩散器。该脚本针对用于优化的许多示例进行了重写。这部分脚本:
def multistage_script_assembly(row1_mesh , row2_mesh , multistage_mesh):
import_igg_project("/home/slagter/Desktop/Optimization/Impeller_Turbo_Comp/Impeller_Turbo_Comp_DATA_Impeller_222/_dbs/multistage/ImpAnchorRough.igg","row1")
import_igg_project("/home/slagter/Desktop/Optimization/Impeller_Turbo_Comp/Impeller_Turbo_Comp_DATA_Impeller_222/_dbs/multistage/DiffWholeMeshRough.igg","row2")
patch("row2#row_2_flux_1_Main_Blade_skin",6,3).set_type("ROT")
.
.
.
被重写为:
def multistage_script_assembly(row1_mesh , row2_mesh , multistage_mesh):
import_igg_project("/home/slagter/Desktop/Optimization/Impeller_Turbo_Comp/Impeller_Turbo_Comp_DATA_Impeller_222/_dbs/_flow_1/_mesh/ImpAnchorRough.igg","row1")
import_igg_project("/home/slagter/Desktop/Optimization/Impeller_Turbo_Comp/Impeller_Turbo_Comp_DATA_Impeller_222/_dbs/_mesh/DiffWholeMeshRough.igg","row2")
patch("row2#row_2_flux_1_Main_Blade_skin",6,3).set_type("ROT")
.
.
.
因此, import_igg_project 前面的缩进看不到,并且会弹出一个错误,指出“需要缩进”。
关于如何强制缩进或解决此问题的任何建议。也可能是 Numeca/Design3D 有问题?