|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
#include "udf.h"
DEFINE_MASS_TRANSFER(liq_sol_source, cell, thread, from_index,
from_species_index, to_index, to_species_index)
{
real m_ls;
real T_SAT = 273.15;/*凝固温度*/
Thread *liq, *sol;
liq = THREAD_SUB_THREAD(thread, from_index);
sol = THREAD_SUB_THREAD(thread, to_index);
m_ls = 0.0;
if (C_T(cell, liq) < T_SAT)
{ /* soliding 凝固*/
m_ls = 0.1*C_VOF(cell,liq)*C_R(cell,liq)*
(C_T(cell,liq)-T_SAT)/T_SAT;
}
else if (C_T(cell, sol) > T_SAT)
{ /* thawing 融化*/
m_ls = -0.1*C_VOF(cell,sol)*C_R(cell,sol)*
(T_SAT-C_T(cell,sol))/T_SAT;
}
return (m_ls);
}
|
|