




下載本文檔
版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、fluent udf環境變量的設置初學udf,還沒進入主題就被udf問題搞死了,摸索了一兩天終于讓我搞出了點名堂, 本人用的是ANSYS 15.0和VC 10.0.不多說,先把ANSYS和vc都裝上,網上有教程安裝 的,一步步來別跳步。最好把vc6也裝一下,因為里面有的東西設置環境變量要用到。先 不要打開軟件。設置環境變量:1. C:Program FilesANSYS Incvl50fluentntbinwin64 目錄下雙擊 setenv和remenv 2,設置環境變量:INCLUDEC:Program Files (x86)Microsoft Visual Studio10.0VCinc
2、lude;C:Program Files (x86)Microsoft SDKsWindowsv7. 0AInclude; LIBC:Program Files (x86)Microsoft Visual Studio10. 0VClibamd64;C:Program Files (x86)MicrosoftSDKsWindowsv7. 0ALibx64;C:Program Files (x86)Microsoft Visual Studio 10. 0VCatlmfclib; PATHC:Program Files (x86)Microsoft Visual Studio10. 0VCbin
3、amd64;C:Program Files (x86)Microsoft Visual Studio10. 0Common7IDE;找個udf文件,注意udf是支持三維還是二維的,打開fluent ,設置工作目錄。如 下:接著就是編譯了,不用打開case的,直接就可以define.如果出現什么xcopy,.我們找到C:WindowsSystem32里面的xcopy復制到 C:Program Files (x86)Microsoft Visual Studio 10. 0VCbin:C:Program Files (x86)Microsoft Visual Studio 10. 0VCbinam
4、d64;如果出現“sizej":重定義:不同的基類型,可能是你的udf文件有問題。如果實 在不行,按照下面的環境變量重新設置一下,重啟電腦。INCLUDE C:Program Files (x86)Microsoft Visual Studio 10. 0VCinclude;C:Program Files (x86)Microsoft SDKsWindowsv7. 0AInclude;LIB C:Program Files (x86)Microsoft Visual Studio 10. 0VClibamd64;C:Program Files (x86)Microsoft SDKsW
5、indowsv7. 0ALibx64; C:Program Files (x86)Microsoft Visual Studio 10. 0VCatlmfclib;PATH C:Program Files (x86)Microsoft Visual Studio 10. 0VCbin;C:Program Files (x86)Microsoft Visual Studio 10. 0VCbinamd64;C:Program Files (x86)Microsoft Visual Studio 10. 0Common7IDE;C:Program Files (x86八'Microsoft
6、 Visual Studio 10. 0Common7Tools;c:Wprogram filesansys incvl50fluentntbinwin644. 1 Problem with 'nmake'According to the manual, I wrote a C code, saved it in my working folder, added it, clicked Build. . . and then I saw this:(system 1 file (s) copied, (chdir (chdir 'nmake' is not re
7、cognized as an internal or external command, operable program or batch file.'nmake' is not recognized as an internal or external command, operable program or batch file. Done.4. 2 Solution to the ' nmake' problemWithout any detail, the problem is caused because nmake. exe cannot be f
8、ound. The solution is to start Fluent from the x64 version of the Visual Studio 2021 Command Prompt:1. Open the Start screen (press Windows button on your keyboard) 2. Type * Visual Studio Tools*, click the folder.3. In the folder click and start * VS2021 x64 Cross Tools Command Prompt? 4. Navigate
9、to your working folder, i. e. the folder where your case and data files are (. cas & . dat).5. Start Fluent with Incvl40fluentfluentl4. 0. 0launcherwin64standard installation6. Make sure that on the Environment tab 'Setup Compilation Environment for UDF,is ticked. The default address is fine
10、.Starting Fluent this way should solve the ' nmake' problem and the compilation message should look like this:(system 1 file (s) copied, (chdir (chdir # Generating ud_iol. h velocity_prof ile. c# Generating udf_names. c because of makefile velocity_profile. obj udf_names. c# Linking libudf.
11、dll because of makefile user_nt. udf udf_names. obj velocity_profile. obj Microsoft (R) Incremental Linker Version 10. 00, 30319. 01 Copyright (C) Microsoft Corporation. All rights reserved.Creating library libudf. lib and object libudf. exp Done.5. 1 Problem with x64 systemIn case you do not have M
12、icrosoft Visual Studio 2021 Express then likely you tried starting Fluent from the ? Visual Studio Command Prompt (2021) or any other previous version of VS command prompt. It is likely that you encountered a problem when clicking Load, specifically this one:The UDF library you are trying to load (l
13、ibudf) is not compiled for 2d on the curent platform (win64). The system cannot find the file specified.X: Wlibudfwin642dlibudf. dllThe reason of this error is that previous versions of Visual Studio are 32bit and do not work with your x64 version of Fluent. You probably googledthe problem and found
14、 advice to start Fluent from the command promt of the SDK (Software Development Kit) 7.0/7.1 instead, or from the command prompt of the . NET Framework. Unfortunately, as Microsoft states on their website at the Windows SDK 8. 1 download page: environment. You must install a compiler and build envir
15、onment separately. If you require a complete development environment that includes compilers and a buildenvironment, you can download Visual Studio 2021, which includes the appropriate components of the Windows SDK. Older versions of the . NET Framework and SDK do not seem to work properly on Window
16、s 8. 1 (citation needed, just my experience ). I also found out that with a working x64 SDK installed you can start the simple windows command prompt (cmd. exe) with the proper environmental variables using a cmd. exe /k 5. 2 Solution to the problem of x64 systemThe solution to this is to start Flue
17、nt from the x64 command prompt* VS2021 x64 Cross Tools Command Prompt, as described in (4.1) instead of previous versions of VS or SDK/. NET command prompts.6. 1 Problem with math, hAnother problem occurred even after I had everything set up. This problem was reported by cfd-online user KITetima as
18、well in this forum topic. The very simple c code to initialize the velocity on the inlet boundary to a given velocity profile did not compile, and the following error message appeared:C:Program Files (x86)Microsoft Visual Studio12. OVCINCLUDEmath. h(482) : error C2059: syntax error :C:ProgramFiles (
19、x86)Microsoft Visual Studio 12. OVCINCLUDEmath. h(482) : error C2143: syntax error : missing ')' before 'constant'C:Program Files (x86)Microsoft Visual Studio12. OVCINCLUDEmath. h(482) : error C2143: syntax error : missing ' ' before 'constant'Studiosyntax errorconstant1C:Program Files (x86)Microsoft Vis
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 健身跑道施工方案
- 地磚結晶施工方案
- 2025至2030年中國人物蠟臺數據監測研究報告
- 小學科學青島版 (六三制2017)五年級上冊9 熱傳導教學設計
- 儋州2024年海南儋州市教育局招聘中學教師55人筆試歷年參考題庫附帶答案詳解
- 保山2025年云南保山市隆陽區瓦馬彝族白族鄉汶上衛生院鄉村醫生招聘筆試歷年參考題庫附帶答案詳解
- Module 6 Unit 1 You can play football well (教學設計) -2024-2025學年外研版(三起)英語五年級上冊
- 佛山2024年廣東佛山大學輔導員招聘6人筆試歷年參考題庫附帶答案詳解
- 夾板墻板施工方案
- 國企流水施工方案
- 美國加征關稅從多個角度全方位解讀關稅課件
- 期中(試題)-2024-2025學年人教精通版(2024)英語三年級下冊
- 2025-2030中國煤焦油雜酚油行業市場發展趨勢與前景展望戰略研究報告
- 防洪防汛安全教育知識培訓
- 2020-2025年中國遼寧省風力發電行業發展潛力分析及投資方向研究報告
- GB 15269-2025雪茄煙
- 定額〔2025〕1號文-關于發布2018版電力建設工程概預算定額2024年度價格水平調整的通知
- 《思想政治教育方法論》考研(第3版)鄭永廷配套考試題庫及答案【含名校真題、典型題】
- 一種基于STM32的智能門鎖系統的設計-畢業論文
- 極域電子教室解決方案
- JA系列電子天平使用說明書
評論
0/150
提交評論