udf中关于C_YI_G(c,t,i)和F_AREA(A,f,t)的使用
#include"udf.h"#include"sg_mphase.h"#include"mem.h"DEFINE_SOURCE(liq_src,c,pri_th,dS,...
#include "udf.h"
#include "sg_mphase.h"
#include "mem.h"
DEFINE_SOURCE(liq_src,c,pri_th,dS,eqn)
{
Thread *mix_th,*sec_th;
real m_dot_l,A[ND_ND],A_F,A_M;
face_t f;
mix_th=THREAD_SUPER_THREAD(pri_th);
sec_th=THREAD_SUB_THREAD(mix_th,1);
F_AREA(A,f,mix_th);
A_F=NV_MAG(A);
A_M=C_YI_G(c,sec_th,0)[1];
m_dot_l=2.0*A_F*A_M;
dS[eqn]=0;
return m_dot_l;
}
考虑的问题是两相流,首相为水,次相为水蒸气和空气,需要编写源项,编写源项方程时需要用到C_YI_G(c,t,i)和F_AREA(A,f,t),但是总是解释通过,初始化就出问题,为了研究这两个宏的正确使用方法,于是将上述方程做了简化,但是这样初始化仍是有问题,显示
Error: received a fatal signal (Segmentation fault).
Error: received a fatal signal (Segmentation fault).
Error Object: #f
求大神看看上面这两个宏,到底怎么用才能正确? 展开
#include "sg_mphase.h"
#include "mem.h"
DEFINE_SOURCE(liq_src,c,pri_th,dS,eqn)
{
Thread *mix_th,*sec_th;
real m_dot_l,A[ND_ND],A_F,A_M;
face_t f;
mix_th=THREAD_SUPER_THREAD(pri_th);
sec_th=THREAD_SUB_THREAD(mix_th,1);
F_AREA(A,f,mix_th);
A_F=NV_MAG(A);
A_M=C_YI_G(c,sec_th,0)[1];
m_dot_l=2.0*A_F*A_M;
dS[eqn]=0;
return m_dot_l;
}
考虑的问题是两相流,首相为水,次相为水蒸气和空气,需要编写源项,编写源项方程时需要用到C_YI_G(c,t,i)和F_AREA(A,f,t),但是总是解释通过,初始化就出问题,为了研究这两个宏的正确使用方法,于是将上述方程做了简化,但是这样初始化仍是有问题,显示
Error: received a fatal signal (Segmentation fault).
Error: received a fatal signal (Segmentation fault).
Error Object: #f
求大神看看上面这两个宏,到底怎么用才能正确? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询