fluent udf中体积分数宏 C_VOF 的取值问题
-
使用vof模型求解两相,希望在最后使用DEFINE_ON_DEMAND来做一个体积分数与温度的简单运算从而得到单相 的温度,udf如下,但一直报Error: received a fatal signal (Segmentation fault). C_VOF的提取问题不知道在哪里,求赐教~
DEFINE_ON_DEMAND(demand) { cell_t c; Thread *t, *Pri_th, *Mix_th; Mix_th = THREAD_SUPER_THREAD(t); Pri_th = THREAD_SUB_THREAD(Mix_th, 0); Domain *d; d = Get_Domain(1); thread_loop_c(Mix_th, d) { begin_c_loop(c, Mix_th) { C_UDMI(c, Mix_th, 0) = C_T(c, Mix_th)*C_VOF(c, Pri_th); } end_c_loop(c, Mix_th) } }```
-
thread_loop_c 获取subthread层的值似乎有点问题,见https://muchong.com/html/201211/5150612_2.html,最好是用mp_thread_loop_c,配合**pt和C_VOF(c, pt[0])来进行取值。