24小时热门版块排行榜    

查看: 586  |  回复: 2

凯仂

铜虫 (小有名气)


[交流] FLUENT DUF DEFINE_INIT 导入不能初始化

fluent模拟流化床传热传质,编程设定初始的颗粒湿度,并计算求得空气的相对湿度,但是一导进去一点初始化就出现错误,DEFINE_INIT去掉以后可以初始化,求高手帮忙解决这个问题...
#include "udf.h"
/* Heat and moisture transfer in bulks of grains */
/* Graham Thorpe */
/* Victoria University, Melbourne, Australia */
/* Chung-Pfost constants */
#define ACP 921.69
#define BCP 18.077
#define CCP 112.35
#define RHOB 639.2
#define PATM 101325
/* Define ambient temperature conditions */
#define TMEAN 288.15
/* Define a global variable that acts as a comparitor in DEFINE_ADJUST */
int last_ts = -1;
DEFINE_INIT(moisure_init,d)
/* The initial solids moisture content, W, is set */
/* and the corresponding humidity, w, of the  intergranular air is calculated */
{
cell_t c;
Thread *t;
real W,Tabs,TC,r,psat,p,w;
/* Loop over all of the cell threads in the bulk of grain */
thread_loop_c(t,d)
{
begin_c_loop(c,t)
{
C_UDMI(c,t,0) = 0.1364;
W = C_UDMI(c,t,0);
Tabs = C_T(c,t);
TC = Tabs-273.15;
/* Calculate relative humidity of intergranular air */
r = exp(-ACP/(TC+CCP)*exp(-BCP*W));
/* Ensure the air does not become supersaturated */
if (r>0.99)
{r = 0.99;}
psat = 6.0e25/pow(Tabs,5) *exp(-6800/Tabs);
p = r*psat;
w = 0.622*p/(PATM-p); /* Eqn 12 */
C_UDSI(c,t,0) = w;
}
end_c_loop(c,t);
}
}
FLUENT DUF DEFINE_INIT 导入不能初始化
_ISCN{O85`GZ`[81Y69R~}M.jpg
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

» 抢金币啦!回帖就可以得到:

查看全部散金贴

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

gyctju

金虫 (正式写手)


★ ★
凯仂(金币+1): 谢谢参与
xiegangmai: 金币+1, 谢谢参与! 2013-06-02 10:41:38

凯仂

铜虫 (小有名气)


相关版块跳转 我要订阅楼主 凯仂 的主题更新
普通表情 高级回复(可上传附件)
信息提示
请填处理意见