6 Aug 2012

命令行调用ICEM

ICEM用来做CFD很方便,可惜命令行功能不是很强大,不过还是可以通过录制script file的方法来实现.
  1.  2步骤法:
    1. 先写一个test.rpl文件,内容如下:
      ic_trans_ug_tetin UG_PART_FILE.prt ICEM_TETIN_FILE.tin
    2. 然后在同一文件夹下写一个test.bat文件,内容如下:
      icemcfd.bat -batch -script test.rpl
      如果icemcfd.bat的路径不在环境变量ICEM_ACN中,可以多加几行进入该路径后在调用,变为
      drive_letter_of_icemcfd.bat
      cd parent_folder_of_icemcfd.bat
      icemcfd.bat -batch -script full_path_of_test.rpl
  2. 一步到位,经过研究icemcfd.bat内容可以发现,是通过调用一个cmd文件实现的,因此可以只生成一个文件来调用.方法:
    写一个test.bat文件,内容为(调用levels.tcl通过layer导入,也可以调用ug_names_to_tin.tcl通过名称导入)
    ug_run_script.cmd %full_path_dif_ug_lib_ug_ug_levels_to_tin.tcl input.prt output.tin
  3. 继续查看ug_run_script.cmd文件,发现时通过调用ug_wish.exe来完成操作,因此应该还有直接调用这个exe的部分,但是该程序命令行参数还没有试验出来.暂空.

No comments :

Post a Comment