找回密码
 注册
查看: 1478|回复: 2

UDS的FLUX项不能读取F_U值

[复制链接]
发表于 2013-5-29 16:02:22 | 显示全部楼层 |阅读模式

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

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

x
我在编写UDS的FLUX项时,程序通过了编译,但是一运行时就出现了Error:
FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: #f

只要读取F_V(f,t)值,就出现了这种错误,
期待您的指点!!
#include "udf.h"




DEFINE_UDS_FLUX(uds_N_flux,f,t,N_UDS_NUM)
   {
            Thread *mix_th, *pri_th,*sec_th;
        
                  real NV_VEC(psi),NV_VEC(A),NV_VEC(psi1);
            real flux;
            
    mix_th = THREAD_SUPER_THREAD(t);
    pri_th = THREAD_SUB_THREAD(mix_th, 0);       
    sec_th= THREAD_SUB_THREAD(mix_th, 1);
   
   
          NV_D(psi, =, F_U(f,sec_th), F_V(f,sec_th), F_W(f,sec_th));  /* defining psi in terms of velocity field */
   
          F_AREA(A,f,mix_th);    /* face normal vector  returned from F_AREA , NV_DOT(psi,A); */
      
          flux=NV_DOT(psi,A);
         return flux;         /* dot product of the two returned, there is no density consideration for n */
   }
发表于 2013-5-29 22:58:24 | 显示全部楼层
F_U之类的只有边界才有值,自己根据C0和C1的值C_U(c0,t0),C_U(c1,t1)通过插值的方法求吧。最简单的就是0.5*(C_U(c0,t0)+C_U(c1,t1))
 楼主| 发表于 2013-5-30 08:01:06 | 显示全部楼层

回复 2# gearboy 的帖子

谢谢gearboy的指点。恍悟~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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