编写UDF设置多孔介质非热平衡模型中的换热系数,但是直接报错,求大佬指教
#include "udf.h"
#define ds 0.00007
#define zeta 0.7835
DEFINE_PROFILE(wall_h, thread, position)
{
Thread *t;
cell_t c;
real Pr, HTC, U, dh, Rep, Area;
Area = 4.0*(1 - zeta) / ds;
dh = (4.0*zeta) / Area;
begin_c_loop(c, thread) {
U = sqrt(pow(C_U(c, t), 2.) + pow(C_V(c, t), 2.));
Rep = (U*dh*C_R(c, t)) / C_MU_EFF(c, t);
Pr = (C_MU_EFF(c, t)*C_CP(c, t)) / C_K_L(c, t);
HTC = (C_K_L(c, t)*(2.0 + (1.1*pow(Pr, 0.333)*pow(Rep, 0.6)))) / dh;
F_PROFILE(c, thread, position) = HTC;
}
end_c_loop(c, thread);
}
发自小木虫Android客户端 |