|
|
发表于 2012-3-11 21:23:46
|
显示全部楼层
我的也是,请高人指点下
#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_T_G(c,tc)[0];
}
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_T_G(c,tc)[1];
}
end_f_loop(f,thread)
}
DEFINE_SOURCE(uds_source,c,thread,dS,eqn)
{
real source,tem,x[ND_ND];
C_CENTROID(x,c,thread);
if(x[1]==1)
{tem=C_T(c,thread);
source=-0.4*tem;
dS[eqn]=0.0;
}
else
source=0.0;
return source;
} |
|