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

通过udf可以在迭代过程中的访问fluent计算的余差吗?

[复制链接]
发表于 2011-5-31 08:17:19 | 显示全部楼层 |阅读模式

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

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

x
通过udf可以在迭代过程中的访问fluent计算的余差吗?有没有这样的宏呢?
发表于 2011-5-31 09:27:25 | 显示全部楼层

#include "udf.h"

DEFINE_ADJUST(res_list,domain)
{
int nw;
real scaled_res;

Message("\nResiduals for iteration %g",count2[nres-1]);
for(nw=0; nw<MAX_EQNS; ++nw)
{
if(strlen(DOMAIN_EQN_LABEL(domain,nw))>0)
{
Message("\n%s equation:",DOMAIN_EQN_LABEL(domain,nw));

scaled_res=DOMAIN_RES(domain,nw)[nres-1]/
DOMAIN_RES_SCALE(domain,nw)[nres-1];

Message(" %g",scaled_res);
}
}
Message("\n");
}
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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