phase-index无混合物标号,第一相为 domain_sub_domain(mixture domain,phase_domain_index)求指针 phase_domain_index(phase_domain) 求指针索引 sub_domain_loop 10_多相流2 P11 - 10:41 sub_thread_loop 10_多相流2 P11 - 33:47 vod和欧拉的区别 10_多相流2 P11 - 59:16 重要...
pt = THREAD_SUB_THREADS(mixture_thread); mixture_thread是一个指向mixture级别的thread指针,其可以代表一个网格thread或一个网格面thread。当使用包含thread变量参数的DEFINE宏(如DEFINE_PROFILE),且该UDF加载到mixture相时,其被Fluent求解器自动传递给UDF。若mixture thread指针没有显式地传递UDF,则需要使用其他方法(...
void calc_source(cell_t cell, Thread *thread){real VOF_Val[3], VOF_Mag, source, VOF_Norm[3];Thread *phaset;phaset= THREAD_SUB_THREAD(thread,1);if(C_VOF(cell,phaset)!=0.0 && N_TIME > 1){/* The gradients of the VOF function are found in the x,y and z dir. */if (NULL...
Thread *liq = THREAD_SUB_THREAD(thread, to_index);m_lg = 0.;#endif #if!RP_HOST if (C_...
sec_th=THREAD_SUB_THREAD(mix_th,1); //单相控制区的气相指针,气相为第二相 if(C_T(cell,mix...
UDF定义一个与VOF梯度成正比的动量源项: DEFINE_SOURCE(xmomentum,c,t,dS,eqn) { Thread *w; real vof_gx, source; w=THREAD_SUB_THREAD(t,1); vof_gx=C_VOF_G(c,w)[0]; source=-200*C_R(c,t)*vof_gx; dS[eqn]=0; returnsource; ...
Thread *ti = THREAD_SUB_THREAD(t,i); Thread *tj = THREAD_SUB_THREAD(t,j); double val; val = heat_gunn_udf(c,ti, tj); return val; } double heat_gunn_udf(cell_t c, Thread *ti, Thread *tj) { double h; double d = C_PHASE_DIAMETER(c,tj); ...
在上面的例子中,要事先获得超级域的指针。如前文所述,某些函数勾在超级域上,求解器就会自动传递超级域指针到UDF。而某些函数则不能显式地得到超级域的指针,则需要用宏Get_Domain(1)来获取。 3 已知超级线的指针,则可以使用THREAD_SUB_THREAD宏求的其子线的指针。
for the ith phase, where i is the phase_domain_index. For example, C_VOF(c,pt[i]) can be used to return the volume fraction of the ith phase fluid at cell c. The pointer pt[i] can also be retrieved using THREAD_SUB_THREAD, discussed in Section 6.5.4, using i as an argument....
Thread *pri_th = THREAD_SUB_THREAD(mixture_thread,to_phase_index);real d_s = C_R(c,pri_...