找回密码
 注册
查看: 2352|回复: 0

多相流中的湍流粘性

[复制链接]
发表于 2011-8-25 11:03:28 | 显示全部楼层 |阅读模式

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

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

x
用双流体模型进行稠密气固射流的计算,想对颗粒相的Turbulent viscosity进行修改,使其大小等于气相的Turbulent viscosity乘以颗粒相的密度,我写的UDF如下:
#include "udf.h"
DEFINE_TURBULENT_VISCOSITY(mu_s, c, t)
{
        Domain *domain;
        domain=Get_Domain(2);/*获得气相的domian*/
                     Thread *tm=lookup_thread_by_id(domain,2);/*获得气相中流体的thread*/
        real mu_t;
        mu_t = M_keCmu*C_R(c,t)/C_R(c,tm)*C_K(c,tm)*C_K(c,tm)/C_D(c,tm);/*计算turbulent viscosity*/
        return mu_t;
}
报错为:
..\..\src\turbulent_viscosity.c(9) : error C2275: 'Thread' : illegal use of this type as an expression
        D:\Fluent.Inc\fluent\fluent6.3.26\src\mem.h(653) : see declaration of 'Thread'
..\..\src\turbulent_viscosity.c(9) : error C2065: 'tm' : undeclared identifier
..\..\src\turbulent_viscosity.c(11) : error C2275: 'real' : illegal use of this type as an expression
        D:\Fluent.Inc\fluent\fluent6.3.26\src\global.h(158) : see declaration of 'real'
..\..\src\turbulent_viscosity.c(11) : error C2146: syntax error : missing ';' before identifier 'mu_t'
..\..\src\turbulent_viscosity.c(11) : error C2065: 'mu_t' : undeclared identifier
..\..\src\turbulent_viscosity.c(13) : error C2223: left of '->storage' must point to struct/union
..\..\src\turbulent_viscosity.c(13) : error C2223: left of '->storage' must point to struct/union
..\..\src\turbulent_viscosity.c(13) : error C2223: left of '->storage' must point to struct/union
..\..\src\turbulent_viscosity.c(13) : error C2223: left of '->storage' must point to struct/union
请问怎么解决,或者在计算颗粒相时怎样用UDF调用气相的turbulent viscosity?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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