CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   UDF of two phase flow : drag coefficient (http://www.cfd-online.com/Forums/fluent/48309-udf-two-phase-flow-drag-coefficient.html)

superxeonman May 21, 2008 21:53

UDF of two phase flow : drag coefficient
 
i am now simulating air and water two phase flow,and there is a drag coefficient in the interaction panel.

now,i want to customize this drag coefficient, namely Cd. According to the fluent's help,liquid-liquid system could use schiller-naumann method to approach cd,so i use the formula described by schiller-naumann method to program my Cd udf,but after tens or hundrends iterates,calculations stops due to flow-out of pressure. I am wondering where is the problem,thanks.

#include "udf.h" real diam, Re,cd; m_drag(cell_t cell, Thread *mix_thread, int g_col, int l_col) { Thread *thread_g = THREAD_SUB_THREAD(mix_thread, g_col); Thread *thread_l = THREAD_SUB_THREAD(mix_thread, l_col); real diam = 0.0005 ;/*averaged diameter of liquid*/ real NV_VEC(V), velo; NV_DD(V, =, C_U(cell, thread_l), C_V(cell, thread_l), C_W(cell, thread_l),

-, C_U(cell, thread_g), C_V(cell, thread_g), C_W(cell, thread_g)); velo = NV_MAG(V); Re = C_R(cell, thread_g) * velo * diam / C_MU_L(cell, thread_g); cd = 24. * (1 + 0.15 * pow(Re,0.687) ) / Re; return cd ; } DEFINE_EXCHANGE_PROPERTY(mxdrag, cell, mix_thread, g_col, l_col) { return m_drag(cell, mix_thread, g_col, l_col); }


All times are GMT -4. The time now is 15:44.