欢迎访问海纳仿真交互平台!

pbm模型用自带的曳力模型可以算,加上曳力udf就报错

悬赏金币:0 snowing62 时间:2017-09-21 18:08

 fluent报错
# 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!
 
Error: Divergence detected in AMG solver: pressure correction
 
Error: Divergence detected in AMG solver: pressure correction
Error Object: #f


#include "udf.h"
#include "sg_pb.h"
 
DEFINE_EXCHANGE_PROPERTY(dragcoff_gs,cell,mix_thread,l_col,b_col)
{
 Thread *thread_l, *thread_b;
 real x_vel_l, x_vel_b; 
 real y_vel_l, y_vel_b;
 real z_vel_l, z_vel_b,  abs_v; 
 real slip_x, slip_y , slip_z;
 real rho_l, rho_b, mu_l, reyp, w, void_l, void_b,  k_l_b, Coeff, fdrgs;
 real diamb,Mo;
 
 
 
 
 thread_l = THREAD_SUB_THREAD(mix_thread, l_col);
 thread_b = THREAD_SUB_THREAD(mix_thread, b_col);
 
 
 
 x_vel_l = C_U(cell, thread_l);
 y_vel_l = C_V(cell, thread_l);
 z_vel_l = C_W(cell, thread_l);
 
 x_vel_b = C_U(cell, thread_b);
 y_vel_b = C_V(cell, thread_b);
 z_vel_b = C_W(cell, thread_b);
 
 slip_x = x_vel_l - x_vel_b;
 slip_y = y_vel_l - y_vel_b;
 slip_z = z_vel_l - z_vel_b;
 
 rho_l = C_R(cell, thread_l);
 rho_b = C_R(cell, thread_b);
 
 mu_l = C_MU_L(cell, thread_l);
 
 
 abs_v = sqrt(slip_x*slip_x + slip_y*slip_y + slip_z*slip_z);
 
 
 void_l = C_VOF(cell, thread_l);
 void_b = C_VOF(cell, thread_b);
 
 diamb=C_PB_DISCI(cell, thread_b,3)/C_PB_DISCI(cell, thread_b,2); //discrete method
 //diamb=C_PB_SMMI(cell, thread_b,3)/C_PB_SMMI(cell, thread_b,2); //SMM 
 //diamb=C_PB_QMOMI(cell, thread_b,3)/C_PB_QMOMI(cell, thread_b,2); //QMOMI 
 
 
 reyp = rho_l*abs_v*diamb/mu_l;
 
 
 Mo= 9.81*pow(mu_l,4.)*(rho_l-rho_b)/(pow(0.0466,3.)*pow(rho_l,2.));
 
 if(reyp>=0.5 && reyp<=5.)
 Coeff = 22.73*(pow(reyp,-0.849))*pow(Mo, 0.02);
 else if(reyp>=5. && reyp<=50.)
 Coeff = 20.08*(pow(reyp,-0.636))*pow(Mo, 0.046);
 fdrgs = Coeff*reyp/24.;
 
 return fdrgs;
}
 
回答(0)

线

欢迎咨询

售前咨询
售后服务
技术咨询

18792739811