【原創(chuàng)分享】fluent成功加載udf編譯器的方式(非環(huán)境變量更改方式)

2016-11-30  by:CAE仿真在線  來源:互聯(lián)網(wǎng)



電腦配置:win7 64bit

經(jīng)常有同學(xué)在用fluent編譯UDF時(shí)出現(xiàn)“nmake不是內(nèi)部或外部命令”的問題,筆者分享一個(gè)解決方案,已測試五臺電腦/工作站,成功解決。


我對比了兩臺主機(jī)上的環(huán)境變量Path、lib以及include之后發(fā)現(xiàn)可以正常運(yùn)行udf的舊的電腦A與新的服務(wù)器B之間的差別,發(fā)現(xiàn)Path等并沒有太多異常,甚至A上幾乎沒有添加環(huán)境變量。于是采用下方案

解決方案

從Microsoft官網(wǎng)下載軟件開發(fā)補(bǔ)丁:NET Framework 2.0 Software Development Kit (SDK) (x64)

安裝補(bǔ)丁

從開始快捷鍵中以管理員身份運(yùn)行“SDK”命令行,SDK Command Prompt

命令行中切換至fluent 啟動(dòng)項(xiàng)位置,運(yùn)行fluent

切換fluent工作目錄至case 目錄,運(yùn)行。

udf 可以成功運(yùn)行

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

隨后,刪除了libudf之后 以正常方式打開case之后仍然失敗。

不刪除libudf,正常方式打開case之后成功。

因此推斷,在編譯過程中有點(diǎn)問題,可能還是VS與fluent 之間配合不好。在編譯完成之后udf即可正常運(yùn)行。


附SDK 中 fluent打開方式

【原創(chuàng)分享】fluent成功加載udf編譯器的方式(非環(huán)境變量更改方式)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 directory your case is in and type ‘fluent’


開放分享:優(yōu)質(zhì)有限元技術(shù)文章,助你自學(xué)成才

相關(guān)標(biāo)簽搜索:【原創(chuàng)分享】fluent成功加載udf編譯器的方式(非環(huán)境變量更改方式) Fluent培訓(xùn) Fluent流體培訓(xùn) Fluent軟件培訓(xùn) fluent技術(shù)教程 fluent在線視頻教程 fluent資料下載 fluent分析理論 fluent化學(xué)反應(yīng) fluent軟件下載 UDF編程代做 Fluent、CFX流體分析 HFSS電磁分析 

編輯
在線報(bào)名:
  • 客服在線請直接聯(lián)系我們的客服,您也可以通過下面的方式進(jìn)行在線報(bào)名,我們會(huì)及時(shí)給您回復(fù)電話,謝謝!
驗(yàn)證碼

全國服務(wù)熱線

1358-032-9919

廣州公司:
廣州市環(huán)市中路306號金鷹大廈3800
電話:13580329919
          135-8032-9919
培訓(xùn)QQ咨詢:點(diǎn)擊咨詢 點(diǎn)擊咨詢
項(xiàng)目QQ咨詢:點(diǎn)擊咨詢
email:kf@1cae.com