|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
新手学Fluent,做一个理工大学出版的书上的例子!
系统是win2000,安装的是fluent6.0,exceed7.1,gambit2.0
没有安装VC++6.0
Udf源程序如下:
----------------------------
/************************************/
/*pexit.c*/
/************************************/
#include "udf.h"
DEFINE_PROFILE(unsteady_pressure,thread,position)
{
face_tf;
begin_f_loop(f,thread)
{
real t=RP_GET_REAL("flow-time");
F_PROFILE(f,thread,position)=101325*(0.843+0.008*sin(1256.6*t));
}
end_f_loop(f,thread)
}
---------------------------------------
按照书上的选择:
Define-〉User-defined->functions->interpreted...
在interpreted UDFs面板里,Source File Name中输入:pexit.c
选上:Display Assembly Listing
点:Compile
显示:
cpp -ID:\FLUENT.INC\fluent6.0/src -ID:\FLUENT.INC\fluent6.0/cortex/src -ID:\FLUENT.INC\fluent6.0/client/src -ID:\FLUENT.INC\fluent6.0/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" pexit.cError: pexit.c: line 1: parse error.
Interrupting...
Done.
不知道是怎麽回事!
Define-〉User-defined->functions->interpreted...
在interpreted UDFs面板里,Source File Name中输入:pexit.c
选上:Display Assembly Listing
选上:Use Contributed Cpp
点:Compile
显示:
Warning: unable to run cpp: D:\FLUENT.INC/contrib/ntx86/cpp
cpp -ID:\FLUENT.INC\fluent6.0/src -ID:\FLUENT.INC\fluent6.0/cortex/src -ID:\FLUENT.INC\fluent6.0/client/src -ID:\FLUENT.INC\fluent6.0/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" pexit.cError: pexit.c: line 1: parse error.
查看了Udf中文帮助手册上那十章内容,对以上问题仍不知道如何处理!
对于书中提到的“源程序应存放在当前目录下”,不知道是哪个目录!
Win2k系统是装在D盘的,D盘根目录下为fluent.inc目录!
case文件和pexit.c放在同一个目录,在E盘!
我自己的理解工作目录,是不是就是Case文件和pexit.c文件所在的目录?如果不是,那麽工作目录如何看,是哪个目录!
另外,查找Cpp,所在的路径为:cpp d:\fluent.inc\ntbin\ntx86
安装fluent,exceed,gambit时就是该了一下盘符,其他的都没有变,为什麽会出现这样的问题?
我所出现的问题如何解决,谢谢! |
|