|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
编了两个很简单的程序,一个是密度的函数,一个是比热的函数。函数内容如下:
#include "udf.h"
DEFINE_PROPERTY(cell_density, c, t)
{
real mu_lam;
real temp = C_T(c, t);
mu_lam=0.00276*exp(0.034*temp)-0.00000004*pow(temp,3)+0.00004*pow(temp,2)-0.018*temp+3.25052;
return mu_lam;
}
#include "udf.h"
DEFINE_PROPERTY(cell_spe_heat,c,t)
{
real mu_lam;
real temp = C_T(c,t);
mu_lam=-5.18e-9*pow(temp,3)-3.98e5*pow(temp,2)+9.12e-4*temp+0.78+3197*pow(temp,-2);
return mu_lam;
}
在设置密度的选项中可以选择“user-defined”,但是设置比热的选项中却看不到“user-defined”选项,也不知道程序编的对不对。本人是新手,希望得到大家的帮助,谢谢啦~ |
|