C_face_loop应用问题!
使用如下一段代码做测试,验证使用c_face _loop加上C_FACE和C_FACE_THREAD对计算区域某些特定面的F_udmi和F_udsi进行赋值,发现这个方法不可行,即在c_face_loop进行面扫描时,在循环内部不能调用F_UDMI和F_UDSI。会报错如下: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: ()
各位大虾是否也遇到过这个情况,怎么处理的?
DEFINE_SOURCE(velocity_u_source,c,t,dS,i)
{
face_t f;
Thread *tf;
int n;
real S=0;
c_face_loop(c,t,n)
{
f=C_FACE(c,t,n);
tf=C_FACE_THREAD(c,t,n);
if (THREAD_ID(tf)==10)
{
F_UDSI(f,tf,0)=0.0;
}
}
return S;
}
页:
[1]