|
1、在VC中调用ANSYS
::WinExec("XX/XX/XX/AnsysXXX.exe -b -p ansys_product_feature -i input_file -o output_file",SW_SHOWNORMAL);
2、在FORTRAN中调用ANSYS
RESULT=SYSTEMQQ('"XX/XX/XX/AnsysXXX.exe" -b -p ansys_product_feature -i input_file -o output_file')。
说明:
-p ansys_product_feature为产品特征代码,对应于Ansys的不同模块,比如ANSYS Mechanical/LS-DYNA的特征代码为ansysds。全部特征代码可查Ansys帮助文件,目录为(Ansys13.0):
Installation and Licensing Documentation_ANSYS,inc.Licensing Guide_Product Variable Table
-i input_file为以Apdl命令流编写的输入文件
-o output_file为输出文件
举例:
result=systemqq('"E:\ANSYS Inc\v130\ansys\bin\intel\ANSYS130.exe" -b -p structds -i layanjin.ans -o test.out')
此外还常用批处理文件对Ansys进行调用,调用命令同上述命令相似,举例:
1)将如下命令写到txt文件内保存。
cmd /c "E:\ANSYS Inc\v130\ansys\bin\intel\ANSYS130.exe" -b -i 5_1.ans -o test.out
2)将保存后的文件扩展名改为cmd。
Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )
GMT+8, 2024-4-26 19:34 , Processed in 0.022070 second(s), 14 queries , Gzip On, MemCache On.
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.