找回密码
 注册
查看: 1172|回复: 1

大侠进来,看看这段UDF有什么问题?

[复制链接]
发表于 2006-2-20 22:06:16 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
/*********************************************************************/
/* UDF for specifying a viscous resistance property */
/*********************************************************************/
#include "udf.h"
/*********************************************************************/
/* UDF for specifying a porosity property */
/*********************************************************************/
DEFINE_PROPERTY(cell_porosity, c, t) /*defining porosity of porous media*/
{
real x[ND_ND];
real y;
real p;
C_CENTROID(x,c,t);
y=x[0];
if (y<=100.)
   p=0.00001*y*y-0.002*y+0.3;
else
   p=0.2;
return p;     //returning porosity distribution
}

这是一段用来自定义多孔介质孔隙率的UDF,程序在fluent中编译时通过,但在初始化时报如下错误:
chip-exec: cell_porosity: wrong return type: void udf function expected
Error:
FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: ()

望大侠给看一下哪儿的问题,多谢了。
发表于 2006-2-23 23:02:42 | 显示全部楼层

大侠进来,看看这段UDF有什么问题?

F_PROFILE{} 怎么没用啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表