相变UDF求助



  • #include “udf.h”

    DEFINE_MASS_TRANSFER(SeaIce_SeaWater, cell, thread, from_index, from_species_index, to_index, to_species_index)
    {
    real s_lq;
    real T_SeaIce=273.15;
    real T_SeaWater;
    Thread solid, liquid;
    solid= THREAD_SUB_THREAD(thread, from_index);
    liquid= THREAD_SUB_THREAD(thread, to_index);
    s_lq=0;
    T_SeaWater=C_T(cell, liquid);
    if(T_SeaWater>=T_SeaIce&&C_VOF(cell,solid)>0)
    {
    real Re_s;
    real Pr;
    real Nu_sl;
    real Nu_sl1;
    real Nu_sl2;
    real Nu_sl3;
    real Latent_Heat=120000;
    real H_sl;
    real visocity_Sea=0.0024;
    real density_Sea=1011.93;
    real particle_diameter=0.0005;
    real conductivity_Sea=0.56;
    real Spec_Heat_Sea=4160;
    real SuDu_s_x=C_U(cell, solid);
    real SuDu_s_y=C_V(cell, solid);
    real SuDu_s_z=C_W(cell, solid);
    real SuDu_l_x=C_U(cell, liquid);
    real SuDu_l_y=C_V(cell, liquid);
    real SuDu_l_z=C_W(cell, liquid);
    real SuDu_x_Cha=(SuDu_s_x - SuDu_l_x)
    (SuDu_s_x - SuDu_l_x);
    real SuDu_y_Cha=(SuDu_s_y - SuDu_l_y)
    (SuDu_s_y - SuDu_l_y);
    real SuDu_z_Cha=(SuDu_s_z - SuDu_l_z)(SuDu_s_z - SuDu_l_z);
    real SuDu_PFH=sqrt(SuDu_x_Cha+SuDu_y_Cha+SuDu_z_Cha);
    Re_s=density_Sea
    particle_diameterSuDu_PFH/visocity_Sea;
    Pr=visocity_Sea
    Spec_Heat_Sea/conductivity_Sea;
    Nu_sl1=7+10C_VOF(cell, liquid)+5pow(C_VOF(cell, liquid),2);
    Nu_sl2=1+0.7pow(Re_s, 0.2)pow(Pr, 0.33);
    Nu_sl3=(1.33-2.4
    C_VOF(cell, liquid)1.2pow(C_VOF(cell, liquid),2))pow(Re_s, 0.7)pow(Pr, 0.33);
    Nu_sl=Nu_sl1
    Nu_sl2+Nu_sl3;
    H_sl=6
    C_VOF(cell,solid)conductivity_SeaNu_sl/pow(particle_diameter,2);
    s_lq=H_sl
    (T_SeaWater-T_SeaIce)/Latent_Heat;
    }
    return (s_lq);
    }
    这是我的UDF程序,添加到欧拉两相流mass transfer中计算出现发散,不添加此UDF不出现发散,哪位大神能帮忙看一下程序哪里有错吗?

    • 列表


  • 顶顶顶



  • 已经解决了!


登录后回复
 

与 CFD中文网 的连接断开,我们正在尝试重连,请耐心等待