|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
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: ()
望大侠给看一下哪儿的问题,多谢了。
|
|