如何在DEFINE_SOURCE(de_sox,c,t,dS,eqn)中查找离散相的质量什么的

浏览:1689 回答:1

DEFINE_SOURCE(de_sox,c,t,dS,eqn)

{

real S_g_so2=0.;

real total_mass=0.,mean_mass=0.;

real total_diam=0.,mean_diam=0.;

real total_urel=0.,mean_urel=0.;

real total_p_temp=0.,mean_p_temp=0.;

real Aint=0.;

int i=0;

mu_g=C_MU_T(c,t)+1.e-8;

rho_g=C_R(c,t)+1.e-8;

pg=C_P(c,t)+1.e-8;

real Re,Sc,Sh,k_g_so2,Hso2,D_l_so2,f,k_l_so2,K_G,P_g_so2,mu_g,rho_g,pg,Tp;

/* particle index for looping over all particles */

Particle *pi;

/* loop over all particles in the cell to find their mass and weighted mean velocity and diameter */


real Tp=P_T(pi);/* particle temperature*/

begin_particle_cell_loop(pi,c,t)

{

total_mass+=pi->state.mass;

total_diam+=pi->state.diam;

total_urel+=urel(pi,c,t);

total_p_temp+=pi->state.temp;

i=i+1;

}

end_particle_cell_loop(pi,c,t)

我用的begin_particle_cell_loop(pi,c,t)来查找离散相中的质量,加载和load都可以,没有错误,但是一计算初始化就出现四个错误那个提醒,只能重启anysys重新导入,还是出现错误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

求大神提示怎么修改

邀请回答 我来回答

全部回答

(1)
默认 最新
结构力学
@ANSYS专家 @victor007
2016年12月19日
评论 点赞

没解决?试试专家一对一服务

换一批