24小时热门版块排行榜    

查看: 696  |  回复: 2

ajene

银虫 (小有名气)

[求助] UDS中对流项FLUX编写的问题

各位前辈:
我最近在编写一个UDF中包含有DEFINE_UDF_FLUX项的编写,这个code能够通过编译,也能正常加载,但是一计算就出现了读取错误:
Updating solution at time level N... done.
  iter continuity x-velocity y-velocity      uds-0     time/iter

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

我的FlUX程序很简单,如下:

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 */

请求您的帮助!
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

ajene

银虫 (小有名气)

我是在2D求解器中建立的模型。
2楼2013-05-29 12:13:56
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

chenxizh

铁杆木虫 (著名写手)

【答案】应助回帖

★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★
ajene: 金币+5, 谢谢您的指点!! 2013-06-05 08:55:05
ajene: 金币+10, ★★★很有帮助 2013-06-05 08:56:07
xiegangmai: 金币+2, 谢谢参与! 2013-06-05 20:49:20
你不需要密度,不要用这个方式,参照帮助里的另外的方法。
或者这个帖子
http://muchong.com/bbs/viewthread.php?tid=1736985&authorid=865248
3楼2013-06-04 19:04:45
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 ajene 的主题更新
信息提示
请填处理意见