|
[Sponsors] |
March 6, 2013, 07:41 |
UDF for Population Blance Model (PBM)
|
#1 |
Member
Yanlong Li
Join Date: Jan 2013
Location: BeiJing
Posts: 47
Rep Power: 13 |
Hi guys,
I'm trying to change the drag law for PBM, I knew there were several bubbles in a cell, but I don't know how to get the diameters, so I write this code to define a equal diameter, but it does not work, the error messages: "Divergence detected in AMG solver:mp-x-momentum -> Decreasing coarsening group size!" "Divergence detected in AMG solver:mp-x-momentum -> Increasing relaxation sweep" "Divergence detected in AMG solverressure correction -> Turning off correction scaling!" "Divergence detected in AMG solver:Pressure correction -> Increasing relaxation sweep!" my code: #include "udf.h" DEFINE_EXCHANGE_PROPERTY(drag_ceofficient,c,t,s_co l,f_col) { real Coe,Re,We,Cd,v_slip,d,f,tp,surface_tension = 1.82; Thread *t_l,*t_g; t_l = THREAD_SUB_THREAD(t,f_col); t_g = THREAD_SUB_THREAD(t,s_col); d = pow(6.*C_VOLUME(c,t_g)/M_PI,1./3.); v_slip = sqrt(pow(C_U(c,t_l) - C_U(c,t_g),2.0) + pow(C_V(c,t_l) - C_V(c,t_g),2.0) + pow(C_W(c,t_l) - C_W(c,t_g),2.0)); Re = C_R(c,t_l)*d*v_slip/C_MU_L(c,t_l); if (Re < 0.49) Cd = 16.0/Re; else if (Re < 100.0) Cd = 20.68/(pow(Re,0.643)); else if (Re > 100.0) Cd = 6.3/(pow(Re,0.385)); We = C_R(c,t_l)*d*pow(v_slip,2.0)/surface_tension; if (Re > 2065.1/pow(We,2.6)) Cd = We/3.0; else if (We > 8.0) Cd = 8.0/3.0; f = Cd*Re/24.0; tp = C_R(c,t_g)*d*d/18.0/C_MU_L(c,t_l); Coe = C_VOF(c,t_g)*C_VOF(c,t_l)*C_R(c,t_g)*f/tp; return Coe; } please help me |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Use of k-epsilon and k-omega Models | Jade M | Main CFD Forum | 40 | January 27, 2023 08:18 |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 06:36 |
UDF: how to know domain number in the model? | mssound | FLUENT | 0 | May 17, 2010 16:00 |
UDF for Herschel-Bulkely model | emad | Fluent UDF and Scheme Programming | 5 | July 20, 2009 09:16 |
UDF of Zimont model in fluent | Z | Main CFD Forum | 0 | February 17, 2005 04:07 |