fluent udf环境变量的设置

上传人:第*** 文档编号:31075640 上传时间:2018-02-04 格式:DOC 页数:10 大小:103.50KB
返回 下载 相关 举报
fluent udf环境变量的设置_第1页
第1页 / 共10页
fluent udf环境变量的设置_第2页
第2页 / 共10页
fluent udf环境变量的设置_第3页
第3页 / 共10页
fluent udf环境变量的设置_第4页
第4页 / 共10页
fluent udf环境变量的设置_第5页
第5页 / 共10页
点击查看更多>>
资源描述

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

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

2、sual 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

3、 Studio 10.0VCbinamd64;C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDE;找个 udf 文件,注意 udf 是支持三维还是二维的,打开 fluent , 设置工作目录。如下:接着就是编译了,不用打开 case 的,直接就可以 define .如果出现什么 xcopy.我们找到 C:WindowsSystem32 里面的 xcopy 复制到C:Program Files (x86)Microsoft Visual Studio 10.0VCbin;C:Program Files (x86)Microsof

4、t Visual Studio 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 File

5、s (x86)Microsoft SDKsWindowsv7.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 (x

6、86)Microsoft Visual Studio 10.0Common7Tools;c:program filesansys incv150fluentntbinwin644.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 copy C:PROGRA1ANSYSI1v140fluentfluent14.0.0sr cmakefile_nt.udf

7、 examplewin642dmakefile )1 file(s) copied.(chdir example)()(chdir win642d)()nmake is not recognized 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 problemWithou

8、t any detail, the problem is caused because nmake.exe cannot be found. The solution is to start Fluent from the 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 an

9、d start VS2013 x64 Cross Tools Command Prompt4. Navigate to your working folder, i.e. the folder where your case and data files are (.cas & .dat).5. Start Fluent with C:Program FilesANSYS Incv140fluentfluent14.0.0launcherwin64 (quotation signs included, in case of standard installation6. Make sure t

10、hat 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:(system copy C:PROGRA1ANSYSI1v140fluentfluent14.0.0sr cmakefile_nt.udf exexwin642dmakefile

11、 )1 file(s) copied.(chdir exex)()(chdir win642d)()# 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.objMicrosoft (R) Incremental Linker Version 10.00.3

12、0319.01Copyright (C) Microsoft Corporation. All rights reserved.Creating library libudf.lib and 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 othe

13、r 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 (libudf) is not compiled for 2d on the curent platform (win64).The system cannot find the file specified.X:libudfwin642dlibudf.dllThe

14、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 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

15、 .NET Framework. Unfortunately, as Microsoft states on their website at the Windows SDK 8.1 download 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 includes 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 ). I also found o

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

当前位置:首页 > 办公文档 > 解决方案

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