|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
下面这个是一个UDF的例子, 不过总是出现一个问题
下面是udf 代码:
# include "udf.h"
# define domain_ID 1
DEFINE_ADJUST(adjust_gradient, domain)
{
Thread *t;
cell_t c;
face_t f;
domain = Get_Domain(domain_ID);
/* Fill UDS with the variable. */
thread_loop_c (t,domain)
{
begin_c_loop (c,t)
{
C_UDSI(c,t,0) = C_DUDX(c,t); /× 问题貌似在这出现了, 求二阶导数, 但是出现问题了×/
}
end_c_loop (c,t)
}
/* thread_loop_f (t,domain)
{
if (THREAD_STORAGE(t,SV_UDS_I(0))!=NULL)
begin_f_loop (f,t)
{
F_UDSI(f,t,0) = F_VOF(f,t);
}
end_f_loop (f,t)
}
*/
}
/*DEFINE_ON_DEMAND(store_gradient)
{
Domain *domain;
cell_t c;
Thread *t;
domain=Get_Domain(1);
/* Fill the UDM with magnitude of gradient. */
/* thread_loop_c (t,domain)
{
begin_c_loop (c,t)
{
C_UDMI(c,t,0) = NV_MAG(C_UDSI_G(c,t,0));
}
end_c_loop (c,t)
}
}
*/
下面是出现的问题, 在fluent 显示的
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
有没有前辈指导这是什么问题啊。
[ 本帖最后由 chenzhaolin 于 2011-5-30 16:15 编辑 ] |
|