|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
现在遇到这个的一个问题,我想在基台上方加一个圆形的温度源相,要求圆内的温度在3000K左右,圆外的温度fluent默认或300K也可。需要自定义源相,其编程如下:
/**************************************************************/
/* UDF for specifying an heat source term */
/**************************************************************/
#include "udf.h"
#define C1 0.028
#define C2 0.030
#define PI 3.14159
#define T_SAT 300.
DEFINE_SOURCE(energy_source, cell, thread, dS, eqn)
{
real r[ND_ND];
real d, temp,source,x,y,co;
temp=C_T(cell,thread);
x=r[0];
y=r[1];
d= sqrt(x*x+(y-C1)*(y-C1));
co=1.+cos(PI*d/C2);
if(d<=(C2/2))
{
source =C_CP(cell,thread)*C_R(cell,thread)*(temp-T_SAT)*co;
dS[eqn]=C_CP(cell,thread)*C_R(cell,thread)*co;
}
else
source=0;
return source;
}
导入到fluent里面,显示正确,却没有计算结果, 我很少苦恼,不知道有哪位大侠帮我指导下啊,某将感激不尽!
[ 本帖最后由 fpw0412 于 2010-8-20 10:56 编辑 ] |
-
附加图片
|