自己编写的udf解释能通过,但初始化时出现错误,请大家看看怎样修改,谢谢大家

浏览:9971
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
#include "udf.h"
#include "dpm.h"
DEFINE_DPM_PROPERTY(partical_diameter,c,t,p)
{
int phase_domain_index;
cell_t cell;
Tracked_Particle*p;
Thread *cell_thread;
Domain *subdomain;
Domain *mixture_domain;
mixture_domain = Get_Domain(1);
sub_domain_loop(subdomain,mixture_domain,phase_domain_index)
{
real x[ND_ND];
real y,i,u,v,s,a;
real w[ND_ND];
begin_c_loop(c,cell_thread) /*loops over cells in a cell thread*/
{
C_CENTROID(x, c, t)
y = x[1];
u =P_VEL(p)[0];
v =P_VEL(p)[1];
w[0] = u;
w[1] = v;
s = NV_MAG(w);
a=C_VOF(c,1);
P_DIAM(p) = 0.0000206*pow(s,2.0)*pow(a,-4.8)+0.06701*pow(s-0.14,0.294)*pow(y,0.288)*pow(a,0.6)-sqrt(0.17*pow(s,4.0)*pow(a,-9.6)+790548.61*pow(s-0.14,0.784)*pow(y,0.768)*pow(a,1.6)+706.742*pow(s-0.14,0.392)*pow(y,0.384)*pow(s,2.0)*pow(a,-4.0)-2.251e-16)/19360.918;
}
end_c_loop(c,cell_thread)
}
}
邀请回答 我来回答

当前暂无回答

回答可获赠 200金币

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

换一批
    App下载
    技术邻APP
    工程师必备
    • 项目客服
    • 培训客服
    • 平台客服

    TOP