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

新手求助~UDF提示parse error.和undeclared variable

[复制链接]
发表于 2013-1-14 17:17:28 | 显示全部楼层 |阅读模式

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

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

x
fluent做Axisymmetric Swirl模拟流体流动,自己编写UFD初始温度场。。在载入的时候老是提示错误,新手,不知道哪里有问题。。
#include "udf.h"
DEFINE_INIT(initial_temp_field,domain)
{ cell_t c;
   Thread *t;
domain=Get_Domain(1);
   real xc[ND_ND];
     /*loop over all cell threads in the domain*/  
       thread_loop_c (t,domain)
           {
   begin_c_loop_all(c,t)
   {
    C_CENTROID(xc,c,t);
        if (xc[0]<=25.5)
                C_T(c,t)=2.81*xc[0]+211;
        else
                if (25.5<xc[0]<61)
                        C_T(c,t)=5.668*xc[0]+210;
                else
                        if (61<=xc[0]<=96.5)
                                C_T(c,t)=-5.09*xc[0]+217;
                        else
                                C_T(c,t)=-12.367*xc[0]+224;
                        }
   end_c_loop_all(c,t);
           }
}
提示line9:parse error.
line 17:xc:undeclared variable
怎么回事。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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