udf编译老是出错,帮忙看看什么问题,谢谢#include "udf.h"#include "sg_mphase.h"#define T_SAT 373#define LAT_HT 1.e3DEFINE_SOURCE(liq_src,cell,pri_th,dS,eqn){Thread *mix_th, *sec_th;real m_dot_1;mix_th=THREAD_SUPER_THREAD(pri_th);sec_th=THREAD_SUB_THREAD(mix_th,1);if(C_T(cell,mix_th)>=T_SAT){ m_dot_1=-0.1*C_VOF(cell,prin_th)*C_R(cell,pri_th)*fabs(C_T(cell,pri_th)-T_SAT)/T_SAT; dS[eqn]=-0.1*C_R(cell,pri_th)*fabs(C_T(cell,pri_th)-T_SAT)/T_SAT;}else{ m_dot_1=0.1*C_VOF(cell,sec_th)*C_R(cell,sec_th)*fabs(T_SAT-C_T(cell,mix_th))/T_SAT;dS[eqn]=0;return m_dot_1;}DEFINE_SOUECE(vap_src,cell,sec_th,dS,eqn){ Thread *mix_th, *pri_th; real m_dot_v; mix_th=THREAD_SUPER_THREAD(sec_th); pri_th=THREAD_SUB_THREAD(mix_th,0); if(C_T(cell,mix_th)>=T_SAT) { m_dot_v=0.1*C_VOF(cell,pri_th)*C_R(cell,pri_th)*fabs(C_T(cell,mix_th)-T_SAT)/T_SAT; dS[eqn]=0; } else { m_dot_v=-0.1*C_VOF(cell,sec_th)*C_R(cell,sec_th)*fabs(C_T(cell,sec_th)-T_SAT; } dS[eqn]=-0.1*C_R(cell,sec_th)*fabs(C_T(cell,sec_th)-T_SAT; } return m_dot_v; } DEFINE_SOUECE(enrg_src,cell,mix_th,dS,eqn){ Thread *pri_th, *sec_th; real m_dot; pri_th=THREAD_SUB_THREAD(mix_th,0); sec_th=THREAS_SUB_THREAD(mix_th,1); if(C_T(cell,mix_th)>=T_SAT) { m_dot=-0.1*C_VOF(cell,pri_th)*C_R(cell,pri_th)*fabs(C_T(cell,pri_th)-T_SAT)/T_SAT; dS[eqn]=-0.1*C_VOF(cell,pri_th)*C_R(cell,pri_th)/T_SAT;} else { m_dot=0.1*C_VOF(cell,sec_th)*C_R(cell,sec_th)*fabs(T_SAT-C_T(cell,mix_th))/T_SAT; dS[eqn]=-0.1*C_VOF(cell,sec_th)*C_R(cell,sec_th)/T_SAT;} return LAT_HT*m_dot;} |
共 0 个关于本帖的回复 最后回复于 2014-7-1 13:52