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

高手看看这个UDF有什么错误,多谢。

[复制链接]
发表于 2006-2-17 23:09:37 | 显示全部楼层 |阅读模式

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

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

x
/*********************************************************************/
/* UDF for specifying a viscous resistance property */
/*********************************************************************/
#include "udf.h"
#define Dp1 0.0014
DEFINE_PROPERTY(cell_viscous, c, t) /*defining viscous resistance of porous media*/
{
real x[ND_ND];
real y;
real p;
real vr;
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;
vr=150*(1-p)*(1-p)/(Dp1*Dp1*p*p*p);
return vr;     //returning viscous resistance distribution
}

/*********************************************************************/
/* UDF for specifying a inertial resistance property */
/*********************************************************************/
/*&#35;include "udf.h"
/*
/*&#35;define Dp1 0.0014
DEFINE_PROPERTY(cell_inertial, c, t) /*defining inertial resistance of porous media*/
{
real x[ND_ND];
real y;
real p;
real ir;
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;
ir=3.5*(1-p)/(Dp1*p*p*p);
return ir;     //returning inertial resistance distribution
}
/*********************************************************************/
/* UDF for specifying a porosity property */
/*********************************************************************/
/*&#35;include "udf.h"
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
}

注:不注释掉第二个和第三个前面的“&#35;include "udf.h"”也通不编译。
 楼主| 发表于 2006-2-18 20:59:48 | 显示全部楼层

高手看看这个UDF有什么错误,多谢。

高手帮忙看看。[br][br]-=-=-=-=- 以下内容由 ffzjf 时添加 -=-=-=-=-
它提示的错误是:parse error.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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