找回密码
 注册
查看: 2201|回复: 1

关于热源的udf

[复制链接]
发表于 2007-3-6 19:31:56 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
// chengxu.cpp : Defines the entry point for the console application.
//
#include"udf.h"
DEFINE_SOURCE(heat_source,cell,thread,dS,eqn)
{
real source;
real m,n,l;
real time;
real x[ND_ND];
Thread *t;
   cell_t c;
C_CENTROID(x,c,thread);
m=x[0];
n=x[1];
l=x[2];
if(1<m<1.5||1<n<1.5||5<l<5.5)
{
    time=RP_Get_Real("flow-time");
source=5e8;
    dS[eqn]=5e8;
}
else
source=dS[eqn]=0;
return source;
}

模型是这样的:圆柱体高20cm,半径2cm,内部区域为solid
假设高5-5.5,半径1-1.5的地方有热源,其他的地方没有热源
计算的结果是没有温度升高,请指点,udf函数一定有问题,问题在哪儿呢
发表于 2007-4-14 10:04:36 | 显示全部楼层

关于热源的udf

不太懂啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表