|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
我的步骤为:
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. 2) set up a directory structure as follows create a dir libudf in that create "src" and "ntx86". In ntx86 create "3d".( am asuming that ur simulation is 3d) 3) copy the udf (.C file) and the required header( u can get the header files frm c:\FLUENT.INC\fluent6.*.*\ntx86\src) files into the "src" folder. 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 6) rename makefile_nt.edf to makefile and open user_nt.udf and read the instructions and do accordingly. 7) close FLUENT . Open command prompt ( start > accessories > command prompt ) type the following C:\ CD program Files \ microsoft visual studio .net\vc7\bin 8) type :- vcvars32 9)go to the libudf\ntx86\3d which u have created 10) type nmake 11) This will compile ur code and build a lib if u dont have any errors , if errors are present it will say so u need to debug it then. 12) once this is done u can open fluent again and load the lib u have just created , in this case it would be libudf.
出现的问题:
C:\FLUENT.INC\libudf\ntx86\2d>nmake
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
cl /c /Za -Ic:\fluent.inc\fluent6.0\ntx86\2d -Ic:\fluent.inc\fluent6.0\
src -Ic:\fluent.inc\fluent6.0\cortex\src -Ic:\fluent.inc\fluent6.0\client\src
-Ic:\fluent.inc\fluent6.0\tgrid\src -Ic:\fluent.inc\fluent6.0\multiport\src .
.\..\src\inlet.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
inlet.c
# Generating udf_names.c because of makefile inlet.obj
cl /c /Za -Ic:\fluent.inc\fluent6.0\ntx86\2d -Ic:\fluent.inc\fluent6.0\
src -Ic:\fluent.inc\fluent6.0\cortex\src -Ic:\fluent.inc\fluent6.0\client\src
-Ic:\fluent.inc\fluent6.0\tgrid\src -Ic:\fluent.inc\fluent6.0\multiport\src u
df_names.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
udf_names.c
udf_names.c(7) : error C2059: syntax error : '}'
udf_names.c(8) : warning C4034: sizeof returns 0
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
|
|