|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
compeled型udf环境变量设置过程按照如下过程处理的:
1) Set up the environmental variable. This is done by going to the start menu > Programs>Fluent> Set_environment clicking this would set the path and variable.
我的电脑 > 属性 > 高级 > 环境变量
Verify that the Include, Lib and path variables have been defined.
(1)将自己所安装的VC路径作为include和lib变量的值,如:
include:D:\Program Files\Microsoft Visual Studio .NET\Vc7\include\
lib:D:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\
(2)找到Microsoft Visual Studio .NET\Vc7\bin\cl.exe的动态链接库mspdb70.dll, 将mspdb70.dll的路径加入到path的值。
cl.exe is the Microsoft Visual Studio compiler executable and will only be recognized if the environment is set up properly. You will see output similar to what is shown below:
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
usage: cl [ option... ] filename... [ /link linkoption... ]
2) Set up a directory structure as follows: create a direction libudf in that create "src" and "ntx86". In ntx86 create 3d (assuming that your simulation is 3d).
libudf/src/和libudf/ntx86/3d
3) Copy the udf (.c file) and the required header files (you can get the header files from c:\FLUENT.INC\fluent6.*.*\ntx86\src) files into the "src" folder.
libudf/src/*.c
libudf/src/*.h
4) Go to c:\FLUENT.INC\fluent6.*.*\ntx86\3d copy the contents into the 3d folder which you created.(好像可以不要这一步)
5) Go to c:\FLUENT.INC\fluent6.*.*\ntx86\src copy makefile_nt.udf and user_nt.udf to your 3d folder.
libudf/ntx86/3d/makefile_nt.udf
libudf/ntx86/3d/user_nt.udf
6) Rename makefile_nt.edf to makefile and open user_nt.udf and read the instructions and do accordingly.
libudf/ntx86/3d/makefile
打开user_nt.udf,根据里面的提示修改user_nt.udf里的内容
7) Close FLUENT(可关可不关). Open cmd.exe (开始 > 运行 > cmd). Type the following C:\ Program Files \ Microsoft Visual Studio .NET\Vc7\bin. Type 执行命令:vcvars32.(这步不能省略)
8) Go to the libudf\ntx86\3d which you have created. Type 命令nmake.
This will compile your code and build a libudf if you don’t have any errors. If errors are present it will say, so you need to debug it then.
9) Open FLUENT, read case, define->user-defined->functions->complied, tap load. This will load the created libudf.
在第8)步时,nmake不能通过,提示如下:
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.
用compiled udf编译时有如下提示:
Deleted old libudf\ntx86\2ddp\libudf.dll
已复制 1 个文件。
系统找不到指定的文件。
(system "copy D:\PROGRA~1\Fluent.Inc\fluent6.3.21\src\makefile_nt.udf libudf\ntx86\2ddp\makefile")
已复制 1 个文件。
(chdir "libudf")()
(chdir "ntx86\2ddp")()
请问上述过程问题出在哪里?谢谢 |
|