使用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)
}
}```