|
发表于 2014-9-3 20:53:06
|
显示全部楼层
#include "udf.h"
#include "metric.h"
#define L 100
DEFINE_PROPERTY(mycell_poriness,c,t)
{
real myc_p=0.;
real x[ND_ND];
real xx1,xx2,xx3;
begin_c_loop(c,t)
{
C_CENTROID(x,c,t)
xx1=x[0];
xx2=x[1];
xx3=x[2];
if((xx1<=150.)&&(xx1>=0.)&&(xx2<=50.)&&(xx2>=-50.))
{
if((xx3<=20.)&&(xx3>=0.)&&(xx2>=50.))
myc_p=(0.2*exp(-0.0221*xx1)+0.1)*(exp(-0.15*(L-xx2))+1);
else if((xx3<=20.)&&(xx3>=0.)&&(xx2<=50.))
myc_p=(0.2*exp(-0.0221*xx1)+0.1)*(exp(-0.15*(L+xx2))+1);
}
else
myc_p=0.;
}
end_c_loop(c,t)
return myc_p;
}
编译没有错误,只是我找不到porosity加载udf的项,是不是用DEFINE_PROPERTY(mycell_poriness,c,t)定义孔隙率。 |
|