求大神指導(dǎo)物性隨兩個(gè)變量改變的UDF怎么寫啊
瀏覽:1791 回答:3

#include "udf.h"
DEFINE_PROPERTY(cell_viscosity ,cell ,thread)
{
real mu_lam;
real temp = C_T(cell,thread);
real density = 1011.63-0.2205194*temp-1.92249*pow(10,-5)*pow(temp,2)+5.63788*pow(10,-9)*pow(temp,3);
if (temp > 773)
mu_lam = 0.0851*pow(10,-4)*pow(density,1/3)*exp((1.04*density)/temp);
else
mu_lam = 0.1235*pow(10,-4)*pow(density,1/3)*exp((1.04*density)/temp);
return mu_lam;
}
麻煩大神幫忙看下哪里不對(duì)?圖是物性的公式,密度本身就是溫度的函數(shù),粘度又是密度和溫度的函數(shù)。下面是我寫的UDF。

木子丞 


















