|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
#include "udf.h"
DEFINE_PROFILE(xshear_stress,thread,position)
{
face_t f;
cell_t c;
Thread *tc;
begin_f_loop(f,thread)
{
c=F_C0(f,thread);
tc=THREAD_T0(thread);
F_PROFILE(f,thread,position)=-10.0*C_UDMI(c,tc,1);
}
end_f_loop(f,thread)
}
DEFINE_PROFILE(yshear_stress,thread,position)
{
face_t f;
cell_t c;
Thread *tc;
begin_f_loop(f,thread)
{
c=F_C0(f,thread);
tc=THREAD_T0(thread);
F_PROFILE(f,thread,position)=-10.0*C_UDMI(c,tc,0);
}
end_f_loop(f,thread)
}
DEFINE_SOURCE(ymomentum_source,c,thread,dS,eqn)
{
real source,tem;
C_UDMI(c,thread,0)=C_T_G(c,thread)[0];
C_UDMI(c,thread,1)=C_T_G(c,thread)[1];
tem=C_T(c,thread);
source=-0.4*tem;
dS[eqn]=0.0;
return source;
}
这是编写的UDF,初始化流场时老出现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: ()谁能帮我看看是不是上面UDs的原因。uds编译木有问题
[ 本帖最后由 ya634984094 于 2012-3-15 23:53 编辑 ] |
|