| 查看: 4275 | 回复: 0 | |||
[交流]
udf中的面宏如何使用,例如F_UDMI(f,t,i),和C_UDMI(c,t,i)的使用有什么区别?
|
|
请教一下各位fluent大神,udf中的面宏如何使用,例如F_UDMI(f,t,i),和C_UDMI(c,t,i)的使用有什么区别?附上自己模拟时的一段程序,一直运行不通,请大家多多指教。 DEFINE_INIT(my_init_func2,d) { face_t f; Thread *t; real xf[ND_ND]; int id_f=5; t=Lookup_Thread(d,id_f); thread_loop_f(t,d) { begin_f_loop(f,t) { F_CENTROID(xf,f,t); F_UDMI(f,t,0)=(arrhenius_rate(tw0))*(c0-cs(tw0))*(c0-cs(tw0))+2*mw_h2o/mw_caso4*(arrhenius_rate(tw0))*(c0-cs(tw0))*(c0-cs(tw0));/*deposite rate md*/ F_UDMI(f,t,1)=0;/*length of foul*/ F_UDMI(f,t,2)=0;/*resistence of fouling layer*/ F_UDMI(f,t,3)=tw0;/*t=0,tf=320k*/ F_UDMI(f,t,4)=(arrhenius_rate(tw0))*(c0-cs(tw0))*(c0-cs(tw0))+2*mw_h2o/mw_caso4*(arrhenius_rate(tw0))*(c0-cs(tw0))*(c0-cs(tw0));/*mf*/ F_UDMI(f,t,5)=0;/*mr*/ } end_f_loop(f,t) } } DEFINE_EXECUTE_AT_END(execute_at_end2) { Domain *d; Thread *t; face_t f; d=Get_Domain(1); int id_f=5; t=Lookup_Thread(d,id_f); thread_loop_f(t,d) { begin_f_loop(f,t) { F_UDMI(f,t,1)+=F_UDMI(f,t,0)*delta_t/rho_f; F_UDMI(f,t,2)=F_UDMI(f,t,1)/lambda_f; F_UDMI(f,t,3)=F_T(f,t)+(tw0-F_T(f,t))/(1+h*F_UDMI(f,t,2)); F_UDMI(f,t,0)=(arrhenius_rate(F_UDMI(f,t,3)))*(F_YI(f,t,caso4)*F_R(f,t)-cs(F_T(f,t)))*(F_YI(f,t,caso4)*F_R(f,t)-cs(F_T(f,t)))+2*mw_h2o/mw_caso4*(arrhenius_rate(F_UDMI(f,t,3)))*(F_YI(f,t,caso4)*F_R(f,t)-cs(F_T(f,t)))*(F_YI(f,t,caso4)*F_R(f,t)-cs(F_T(f,t))); F_UDMI(f,t,4)=F_UDMI(f,t,0)-F_UDMI(f,t,5);/*mf*/ F_UDMI(f,t,5)=0.012*pow(F_U(f,t),1.46)*F_UDMI(f,t,4)*(1+beta*(320-F_UDMI(f,t,3)))*dp*pow(F_R(f,t)*F_R(f,t)*0.0005806*9.81,1/3);/*mr*/ } end_f_loop(f,t) } } DEFINE_ADJUST(adjust_wall_temp,d) { Thread *t; face_t f; real time; int id_f=5; t=Lookup_Thread(d,id_f); time=RP_Get_Integer("time_step" ;thread_loop_f(t,d) { begin_f_loop(f,t) { if (time<2) F_UDMI(f,t,6)=tw0; else F_UDMI(f,t,6)=F_T(f,t)+(tw0-F_T(f,t))/(1+h*F_UDMI(f,t,2));/*adjust wall temperature*/ } end_f_loop(f,t) } } DEFINE_PROFILE(wall_temp,t,position) { face_t f; Domain *d; int id_f=5; d=Get_Domain(1); t=Lookup_Thread(d,id_f); begin_f_loop(f,t) { F_PROFILE(f,t,position)=F_UDMI(f,t,6); } end_f_loop(f,t) } |
» 猜你喜欢
国家基金申请书模板内插入图片不可调整大小?
已经有9人回复
退学或坚持读
已经有20人回复
免疫学博士有名额,速联系
已经有14人回复
面上基金申报没有其他的参与者成吗
已经有4人回复
多组分精馏求助
已经有6人回复
国家级人才课题组招收2026年入学博士
已经有6人回复













;
回复此楼