如何在DEFINE_SOURCE(de_sox,c,t,dS,eqn)中查找離散相的質(zhì)量什么的
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)來(lái)查找離散相中的質(zhì)量,加載和load都可以,沒(méi)有錯(cuò)誤,但是一計(jì)算初始化就出現(xiàn)四個(gè)錯(cuò)誤那個(gè)提醒,只能重啟anysys重新導(dǎo)入,還是出現(xiàn)錯(cuò)誤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
求大神提示怎么修改




















