- 积分
- 6
- 注册时间
- 2010-7-27
- 仿真币
-
- 最后登录
- 1970-1-1
|
iSight是个非常优秀的优化软件,具体不多说,但如何在iSight中集成CFX呢?
在iSight中集成CFX分三步:pre solve post,具体代码示例如下:
(1) Pre(下列代码作适当修改,保存为*.bat,在iSight中调用即可,2-Solver、3-Post亦同):
if exist *.def del *.def
if exist *.res del *.res
if exist *.out del *.out
if exist *.lock del *.lock
"D:\Ansys Inc\CFX\CFX-10.0\bin\cfx5pre.exe" -batch missile.pre
"D:\Ansys Inc\CFX\CFX-10.0\bin\cfx5pre.exe" -cfx missile.cfx -gtm missile.gtm
(2) Solver:
"D:\Ansys Inc\CFX\CFX-10.0\bin\cfx5solve.exe" -definition missile.def
(3) Post:
"D:\Ansys Inc\CFX\CFX-10.0\bin\cfx5export.exe" -ansysfsi -name missile_ansysfsi -eltype 154 -regions "Domain 1 Default" Missile_001.res
"D:\Ansys Inc\CFX\CFX-10.0\bin\cfx5post.exe" -session missile.cse
上述工作需要注意下面几个问题:
1) 把CFX工作目录设置为当前工作文件目录;
2) 关于.pre文件的说明:
Session Files (.pre)
Session files are used by CFX-Pre to record CFX Command Language (CCL) commands executed during a session. The commands can be played back at a later date to reproduce the session. These files are in ASCII format and can be edited or written in a text editor.
New Session Command
When a session file is not currently being recorded, you can select Session > New Session. This opens the Set Session File dialog box where you can enter a file name for your session file. Once you have saved the file, it becomes the current session file. Commands are not written to the file until you select Session > Start Recording.
Browse to the directory in which you wish to create the session file, and then enter a name for the file ending with a .pre (CFX-Pre) extension.
Click Save to create the file.
This will not start recording to the session file. To do this, you must select Session > Start Recording.
Important
Session files must not contain > undo commands. These commands would produce errors when playing back the session file.
If you create more than one session file during a CFX-Pre session, the most recently created file is the current session file by default. You can set a different file to be the current session file by selecting an existing file from the New Session > Set Session File window and then clicking Save Because the file exists, a warning dialog box appears:
If you select Overwrite, the existing session file is deleted and a new file is created in its place.
If you select Append, commands will be added to the end of the existing session file when recording begins.
Note
By default, CFX-Pre does not continuously write commands to a session file while you are working on your simulation. You can change a setting in Edit > Options so that a session file is recorded by default. If a session file is being recorded by CFX-Pre, whether by default or intentionally, a new session file cannot be recorded. You can stop the recording of the current session file by selecting Session > Stop Recording.
使用CCL文件的一种方法:cfx5solve -def model -ccl yourccl,可以实现自定义输出。
(3) 如果cfx11或者更高版本不能与iSight集成,在iSight里面选上restore 那个选项再试试。
(4) 要注意CFX和iSight的perl版本要兼容,最好是一样的,如果出现问题,网上有相关解决办法,查找看下。 |
|