以梦为马,不负韶华

搜索
查看: 2939|回复: 0
收起左侧

[求助] fluent模拟塔板气液两相流

[复制链接]
发表于 1970-1-1 08:00:00 显示全部楼层 |阅读模式
新手自学fluent模拟塔板气液两相流,使用默认的曳力模型能够收敛,加载自己编写曳力UDF,能编译加载成功,也能通过初始化,但是几百次迭代后出现
# Divergence detected in AMG solver: mp-x-momentum -> Decreasing coarsening group size!
# Divergence detected in AMG solver: mp-x-momentum -> Increasing relaxation sweeps!
# Divergence detected in AMG solver: pressure correction -> Turning off correction scaling!
# Divergence detected in AMG solver: pressure correction -> Increasing relaxation sweeps!
以及floating point exception
自己编写的UDF如下
#include <stdio.h>
#include <math.h>
#include"udf.h"
#define Cd 0.44
#define diam 0.006
DEFINE_EXCHANGE_PROPERTY(custom_drag,cell,mix_thread,s_col,f_col)
{
        Thread*thread_g,*thread_l;
        real NV_VEC(Ug),NV_VEC(Ul),NV_VEC(U),NV_VEC(fdrg);
        real void_g,rho_g,rho_l,M,N,fdrg;
        /*find the threads for the liquid (primary)*/
        /*and gas (secondary phases) */
        thread_g=THREAD_SUB_THREAD(mix_thread,s_col);/*gas phase */
        thread_l=THREAD_SUB_THREAD(mix_thread,f_col);/*liquid phase */
        /*find gas vol frac and properties */
        void_g=C_VOF(cell,thread_g) ;
        rho_g=C_R(cell,thread_g);
       NV_D(Ug,=,C_U(cell,thread_g),C_V(cell,thread_g),C_W(cell,thread_g));
       NV_D(Ul,=,C_U(cell,thread_l),C_V(cell,thread_l),C_W(cell,thread_l));
       NV_VV(U,=,Ug,-,Ul);
        M=NV_MAG(U);
        /*compute drag and return drag*/
       N=0.75*Cd*void_g*rho_l*M/diam;
        NV_VS(fdrg,=,U,*,N);
        return NV_VEC(fdrg);
}
所要编写的曳力如图所示,求有相关经验的大神能给予指导,不胜感激。

曳力模型

曳力模型
不想打字就选择快捷回复吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|以梦为马,不负韶华

GMT+8, 2025-2-13 04:17

Powered by 以梦为马,不负韶华

© 2024-2099 Meng.Horse

快速回复 返回顶部 返回列表