ibelief的个人博客分享 http://blog.sciencenet.cn/u/ibelief

博文

FLUENT UDF编译的问题解决

已有 6505 次阅读 2016-2-1 17:05 |个人分类:笔记|系统分类:科研笔记

“NMAKE不是内部或外部命令 “ FLUENT 非环境变量更改方式

已经测试五台电脑/工作站,成功


台式机上UDF编译的问题部分解决了。解决方案参考在最后。


我对比了两台主机上的环境变量 Path、 lib 以及 include 之后发现可以正常运行udf的旧的主机(我使用的那台A)与进门那台新的主机(B)之间的差别,发现Path等并没有太多异常,甚至A上几乎没有添加环境变量。于是采用下方案


 


解决方案:


从Microsoft 官网下载 软件开发补丁: NET Framework 2.0 Software Development Kit (SDK) (x64)


安装补丁


从开始快捷键中 以管理员身份运行 SDK 命令行,SDK Command Prompt


命令行中 切换至fluent 启动项位置,运行fluent


切换fluent工作目录至case 目录,运行。


udf 可以成功运行


——————————————————


随后,删除了libudf之后 以正常方式打开case之后仍然失败。


不删除libudf,正常方式打开case之后成功。


因此推断 在编译过程中有点问题,可能还是VS与 fluent 之间配合不好。 在编译完成之后udf即可正常运行


附上一张图片和参考方案来源


How can I manage to compile my UDF with Windows 7 64bit?


This problem sometimes looks similar to the one concerning the missing ‘nmake’.


Install Visual Studio. Most of the time the Visual C++ 2008 Express Edition [3] is recommended. On my system it even works with the new Visual Studio 2010 Professional Release Candidate [4].

Set the correct environment variables. Browse your way through the Windows system control to ‘System’. There you will find a section ‘Advanced system settings’. In the following dialog go to the ‘Advanced’ tabulator and click on ‘Environment variables’ (lower right corner). Go through the ‘System variables’ list and search for the ‘Path’ entry. Add the following to the variable: C:Program Files (x86)Microsoft Visual Studio 10.0Common7Tools;C:Program Files (x86)Microsoft Visual Studio 10.0VCbin;C:Program FilesANSYS Incv120fluentntbinwin64. Adjust this entry to your system concerning the installation directories! The Visual Studio entry should point to the location where ‘nmake’ is located.

Install a Software Development Kit (SKD) for 64bit systems. This may be the difference between 32bit and 64bit systems. I have used the .NET Framework 2.0 Software Development Kit (SDK) (x64) from 2006[5] because it is explicitly for 64bit systems and I was not sure if more recent versions are for 64bit systems as well.

Start FLUENT from the SDK command prompt. Do not use the Visual Studio command prompt, use the SDK command prompt! Go to the directory your case is in and type ‘fluent’.




https://blog.sciencenet.cn/blog-2058290-953906.html

上一篇:研究生生活记录28 春来了
下一篇:生活记录100 去做一个小太阳
收藏 IP: 124.205.76.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-12-6 03:51

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部