lihongyang0 发表于 2013-3-10 12:12:57

一个UDF问题

各位大侠好!我是UDF新手,在处理一个二维瞬态两相加空化问题。需要我对两相界面进行实时捕捉,并且对界面的一部分施加热流(反映在温度梯度上)。下面是我的程序:
#include "udf.h"
DEFINE_ADJUST(my_adjust,d)
{
Domain *mixture_domain;
cell_t c;
int phase_domain_index=1;
int temp1;
int temp2;
int K;
face_t f;       
Thread *mixture_thread;
Thread *subthread=THREAD_SUB_THREAD(mixture_thread,phase_domain_index);
real xc;
thread_loop_c(c,subthread)
{
C_CENTROID(xc,c,subthread);
if(xc<0.04586)
{
temp=C_T(c,subthread);
K=C_K_L(c,subthread);

C_T_G(c,subthread)=300000000/K;
}
}
}
请路过的各位大侠帮看看,指点小弟一二,感激不尽!!!

hu521pan 发表于 2013-4-8 09:04:31

你好,我也是UDF新手,但是可以和你讨论一下你的问题,这样也是我学习的过程,我觉得你里面有几个小问题,这个是我的qq694270056加我私聊

mesea 发表于 2015-8-31 10:32:32

我也是新人,172121193,求加
页: [1]
查看完整版本: 一个UDF问题