SDK 解决FLUENT 中udf 编译问题

2017-01-11  by:CAE仿真在线  来源:互联网

错误原因与解决方法:fluent udf在compiled时出现错误:'nmake' 不是内部或外部命令

对比了两台主机上的环境变量 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 可以成功运行

在SDK 运行代码为:

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

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

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

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

SDK 解决FLUENT 中udf 编译问题fluent图片1

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

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.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Program Files\ANSYS Inc\v120\fluent\ntbin\win64. 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 directo是、ry your case is in and type 'fluent'.


开放分享:优质有限元技术文章,助你自学成才

相关标签搜索:SDK 解决FLUENT 中udf 编译问题 fluent流体分析培训 fluent培训 fluent技术教程 fluent在线视频教程 fluent资料下载 fluent分析理论 fluent化学反应流体气体流固耦合分析 fluent软件下载 fluent-udf编程开发教程 fluent代做 Fluent、CFX流体分析 HFSS电磁分析 

编辑
在线报名:
  • 客服在线请直接联系我们的客服,您也可以通过下面的方式进行在线报名,我们会及时给您回复电话,谢谢!
验证码

全国服务热线

1358-032-9919

广州公司:
广州市环市中路306号金鹰大厦3800
电话:13580329919
          135-8032-9919
培训QQ咨询:点击咨询 点击咨询
项目QQ咨询:点击咨询
email:kf@1cae.com