|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
大家好,小弟新学UDF,我用的是Fluent6.3.26和Visual Studio 2008,但是编译程序的时候出现了如下所示的错误(我已经设置了INCLUDE、LIB和Path的环境变量),不知各位能否指点一二,小弟感激不尽。
已复制 1 个文件。
(system "copy D:\PROGRA~1\Fluent\Fluent.Inc\fluent6.3.26\src\makefile_nt.udf libudf\ntx86\2d\makefile")
已复制 1 个文件。
(chdir "libudf")()
(chdir "ntx86\2d")()
myadjust.c
d:\program files\fluent\fluent.inc\fluent6.3.26\src\machine.h(114) : warning C4005: 'stdout' : macro redefinition
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(161) : see previous definition of 'stdout'
d:\program files\fluent\fluent.inc\fluent6.3.26\src\machine.h(115) : warning C4005: 'stderr' : macro redefinition
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(162) : see previous definition of 'stderr'
d:\program files\fluent\fluent.inc\fluent6.3.26\src\machine.h(116) : warning C4005: 'stdin' : macro redefinition
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(160) : see previous definition of 'stdin'
# Generating udf_names.c because of makefile myadjust.obj
udf_names.c
d:\program files\fluent\fluent.inc\fluent6.3.26\src\machine.h(114) : warning C4005: 'stdout' : macro redefinition
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(161) : see previous definition of 'stdout'
d:\program files\fluent\fluent.inc\fluent6.3.26\src\machine.h(115) : warning C4005: 'stderr' : macro redefinition
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(162) : see previous definition of 'stderr'
d:\program files\fluent\fluent.inc\fluent6.3.26\src\machine.h(116) : warning C4005: 'stdin' : macro redefinition
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(160) : see previous definition of 'stdin'
# Linking libudf.dll because of makefile user_nt.udf udf_names.obj myadjust.obj
Microsoft (R) Incremental Linker Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.
Creating library libudf.lib and object libudf.exp
Done.
"F:/Fluentcal/Udftest001"
Opening library "libudf"...
Library "libudf\ntx86\2d\libudf.dll" opened
myadjust
Done.
c程序是udf帮助里面的,如下:
#include "udf.h"
DEFINE_ADJUST(myadjust,d)
{
Thread *t;
/* Integrate dissipation. */
real sum_diss=0;
cell_t c;
thread_loop_c(t,d)
{
begin_c_loop(c,t)
sum_diss +=C_D(c,t)*C_VOLUME(c,t);
end_c_loop(c,t)
}
printf("Volume integral of turbulent dissipation: %g\n", sum_diss);
} |
|