24小时热门版块排行榜    

CyRhmU.jpeg
查看: 656  |  回复: 0

xxfreedomxx

新虫 (初入文坛)

[求助] 求助各位大神,我的wen-yu曳力UDF不能收敛

求助各位大神,如下是我的UDF,我发现自己写的别的曳力公式和这个wen-yu的UDF是一个情况,我做的是固液搅拌体系,500个时间步之后第二项速度在10-3以上就收敛不了了,慢慢增大,调节收敛因子,时间步长,湍流模型,都不行,单纯用自带模型就没有问题,选择的时候加入了brucato的模型进行修正。在这里卡了两个星期了。

#include "udf.h"
#define pi 4.*atan(1.)

DEFINE_EXCHANGE_PROPERTY(s_l_drag_IL_sl, cell, mix_thread, s_col, f_col)
{
        Thread *thread_l, *thread_s;

        real abs_v, slip_x, slip_y, slip_z;
        real reyp, void_s, rho_l, rho_s, mu_l, fdrag, k_l_s, void_l, diam2, Res;

        /* find the threads for the liquid(primary) */
        /* and solids (secondary phases) */

        thread_l = THREAD_SUB_THREAD(mix_thread, f_col); /* liquid phase */
        thread_s = THREAD_SUB_THREAD(mix_thread, s_col); /* solid phase */

        /* find phase velocities and properties*/
        rho_l = C_R(cell, thread_l);
        mu_l = C_MU_L(cell, thread_l);
        rho_s = C_R(cell, thread_s);
        diam2 = C_PHASE_DIAMETER(cell, thread_s);

        slip_x = C_U(cell, thread_l) - C_U(cell, thread_s);
        slip_y = C_V(cell, thread_l) - C_V(cell, thread_s);
        slip_z = C_W(cell, thread_l) - C_W(cell, thread_s);

        /*compute slip*/
        abs_v = sqrt(slip_x*slip_x + slip_y*slip_y + slip_z*slip_z);

        /*compute Reynold's number*/
        reyp = rho_l*abs_v*diam2/mu_l;

        /* compute particle relaxation time */
        void_s = C_VOF(cell, thread_s);/* solid vol frac*/
        void_l = C_VOF(cell, thread_l);/* liquid vol frac*/
        Res=void_l*reyp;

        if(Res<=1000){
                fdrag = 24.*(1. + 0.15*pow(Res, 0.687)/Res;
        }   
        else(Res>1000){
                fdrag = 0.44;
        }
       
        k_l_s = 0.75*void_s*void_l*mu_l*fdrag*abs_v*pow(void_l, -2.65)/diam2;
         
        return k_l_s;

}
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 xxfreedomxx 的主题更新
信息提示
请填处理意见