- 积分
- 0
- 注册时间
- 2012-7-14
- 仿真币
-
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2012-7-15 13:21:51
|
显示全部楼层
来自 北京石景山
用双流体模型进行稠密气固射流的计算,想对颗粒相的Turbulent viscosity进行修改,使其大小等于气相的Turbulent viscosity乘以颗粒相的密度,我写的UDF如下:
#include "udf.h"
DEFINE_TURBULENT_VISCOSITY(mu_s, c, t)
{
Domain *domain;
domain=Get_Domain(2);
Thread *tm=lookup_thread_by_id(domain,2);
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);
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? |
|