fluentudf环境变量的设置

上传人:大米 文档编号:466026109 上传时间:2023-05-08 格式:DOCX 页数:7 大小:13.48KB
返回 下载 相关 举报
fluentudf环境变量的设置_第1页
第1页 / 共7页
fluentudf环境变量的设置_第2页
第2页 / 共7页
fluentudf环境变量的设置_第3页
第3页 / 共7页
fluentudf环境变量的设置_第4页
第4页 / 共7页
fluentudf环境变量的设置_第5页
第5页 / 共7页
点击查看更多>>
资源描述

《fluentudf环境变量的设置》由会员分享,可在线阅读,更多相关《fluentudf环境变量的设置(7页珍藏版)》请在金锄头文库上搜索。

1、ANSYS 15. 0 fluent udf环境变量的设置 初学udf,还没进入主题就被udf问题搞死了,摸索了一两天终于让我搞出了点 名堂,本人用的是 ANSYS 15.0和vc 10.0不多说,先把 ANSYS和vc者B装上, 网上有教程安装的,一步步来别跳步。最好把vc6也装一下,因为里面有的东西设置环境变量要用到。先不要打开软件。设置环境变量:1 .C:Program FilesANSYS Incv150fluentntbinwin64 目录下双击 setenv和 remenv2 .设置环境变量:INCLUDEC:Program Files (x86)Microsoft Visual

2、Studio 10.0VCinclude;C:Program Files (x86)Microsoft SDKsWindowsv7.0AInclude;LIBC:Program Files (x86)Microsoft Visual Studio 10.0VClibamd64;C:Program Files (x86)Microsoft SDKsWindowsv7.0ALibx64;C:Program Files (x86)Microsoft Visual Studio 10.0VCatlmfclib;PATHC:Program Files (x86)Microsoft Visual Stud

3、io 10.0VCbinamd64;C:Program Files (x86)Microsoft VisualStudio 10.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

4、10.0VCbinamd64;如果出现size t ”重定义;不同的基类型,可能是你的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 SDK

5、sWindowsv7.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 Visual

6、Studio 10.0Common7Tools;c:program filesansys incv150fluentntbinwin64 4 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:1 file(s) copied.(chdir example)()(chdir win642d)()nmake is not recognized as an internal

7、 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 found. The solution is to start Fluent from the

8、x64 version of the Visual Studio 2013 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 VS2013 x64 Cross Tools Command Prompt4. Navigate to your working folder, i.e. the folder where your c

9、ase and data files are (.cas & .dat).6. Make sure that on the Environment tab Setup Compilation Environment for UDF is ticked. The default address is fine.Starting Fluent this way should solve the nmake problem and the compilation message should look like this:1 file(s) copied.(chdir exex)()(chdir w

10、in642d)()# Generating ud_io1.hvelocity_profile.c# Generating udf_names.c because of makefile velocity_profile.objudf_names.c# Linking libudf.dll because of makefile user_nt.udf udf_names.obj velocity_profile.objCopyright (C) Microsoft Corporation. All rights reserved.Creating library libudf.lib and

11、object libudf.expDone.5.1 Problem with x64 systemIn case you do not have Microsoft Visual Studio 2013 Express then likely you tried starting Fluent from the Visual Studio Command Prompt (2010) or any other previous version of VScommand prompt. It is likely that you encountered a problem when clickin

12、g Load, specifically thisone:The UDF library you are trying to load (libudf) is not compiled for 2d on the curent platform (win64).The system cannot find the file specified.X:libudfwin642dlibudf.dllThe reason of this error is that previous versions of Visual Studio are 32bit and do not work with you

13、r x64 version of Fluent. You probably googled the problem and found 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 downl

14、oad page:The Windows SDK no longer ships with a complete command-line build environment. You must install a compiler and build environment separately. If you require a complete development environment that includes compilers and a build environment, you can download Visual Studio 2013, which include

15、s the appropriate components of the Windows SDK.Older versions of the .NET Framework and SDK do not seem to work properly on Windows 8.1(citation needed , just my experience? 3 ?). 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 command, which I failed to get to work.5.2 Solution to the problem of x64 systemThe solution to this is to start Fluent from t

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 演讲稿/致辞

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号