Problem UDF Drag with three phases
I need help!!!
I have three phase: liquid continuous (primary phase), immiscible liquid (secondary phase) and dispersed gas (second phase secondary). My udf is for drag force between liquid continous (primary phase) and gas dispersed (second phase secondary). THE PROBLEM IS, HOW I CAN IDENTIFY THE SECOND PHASE SECONDARY??? I saw the example in the Ansys Fluent UDF Manual, but in this example only have two phase, the primary phase and the secondary phase, and the phases are identified using: thread_g = THREAD_SUB_THREAD(mix_thread, s_col); thread_s= THREAD_SUB_THREAD(mix_thread, f_col); in this example the primary phase is gas and the secondary phase is solid. Anyone know how I can identify, in my case, the second phase secondary (dispersed gas)??? Thank. |
help help?
hello,i do the same problem as you, please taalk about these using QQ. My QQ :723859249 . best wishes to u.
|
1 Attachment(s)
thread_g = THREAD_SUB_THREAD(mix_thread, s_col);
thread_s= THREAD_SUB_THREAD(mix_thread, f_col); this is right. The Fluent recognizes, when linking the udf in the interaction dialog box, what are the phases that are involved in the calculation. In the figure, I use a udf for interaction between the phases air-disp and water. In this case, "f_col" identifies the "air-disp" and "s_col" identifies the "water" Quote:
|
hi I could not understand very much.In you case,there are three phase. when you write your udf, you only define "f_col" identifies the "air-disp" and "s_col" identifies ? what about the second "f_col" ? can you send you drag udf for me ? my E mail:zhanshuiqing@csu.edu.cn
Quote:
|
Hi,
f_col = first column in the interaction dialog box s_col = second column in the interction dialog box I have three phases: water, air and air-disp. In my case, I created a udf for drag law between air-disp and water. Fluent identifies automaticaly to the phase involved in the drag law, through of the argument "f_col" and "s_col" of the DEFINE_EXCHANGE_PROPERTY macro, when you linking the udf to the corresponding phases in the interaction dialog box. In my case: f_col identifies to the air-disp phase s_col identifies to the water phase (see figure in the previous reply) This is part of my udf: DEFINE_EXCHANGE_PROPERTY(drag_law,cell,mix_thread, snd_column, fst_column) { Thread *thread_l, *thread_g; real x_vel_l, x_vel_g, y_vel_l, y_vel_g, abs_v, slip_x, slip_y, rho_l, rho_g, rho_lg, mu_l, mu_g, reyp, cd, void_l, void_g, fdrlg, taup, k_l_g; real tx_l, ty_l, ttx_l, tty_l, tx_g, ty_g, ttx_g, tty_g; real tau_l, tau_g; real t_l[ND_ND]; real t_g[ND_ND]; real grad_vf_l[ND_ND]; real grad_vf_g[ND_ND]; real tt_l[ND_ND]; real tt_g[ND_ND]; thread_l = THREAD_SUB_THREAD(mix_thread, snd_column); thread_g = THREAD_SUB_THREAD(mix_thread, fst_column); x_vel_l = C_U(cell, thread_l); y_vel_l = C_V(cell, thread_l); x_vel_g = C_U(cell, thread_g); y_vel_g = C_V(cell, thread_g); slip_x = x_vel_g - x_vel_l; slip_y = y_vel_g - y_vel_l; The next example is in the ANSYS FLUENT 14.0 UDF manual page 133 or in the ANSYS FLUENT 12.0 UDF manual page 2-141 #include "udf.h" #define pi 4.*atan(1.) #define diam2 3.e-4 DEFINE_EXCHANGE_PROPERTY(custom_drag,cell,mix_thre ad,s_col,f_col) { Thread *thread_g, *thread_s; real x_vel_g, x_vel_s, y_vel_g, y_vel_s, abs_v, slip_x, slip_y, rho_g, rho_s, mu_g, reyp, afac, bfac, void_g, vfac, fdrgs, taup, k_g_s; /* find the threads for the gas (primary) */ /* and solids (secondary phases) */ thread_g = THREAD_SUB_THREAD(mix_thread, s_col);/* gas phase */ thread_s = THREAD_SUB_THREAD(mix_thread, f_col);/* solid phase*/ /* find phase velocities and properties*/ x_vel_g = C_U(cell, thread_g); y_vel_g = C_V(cell, thread_g); x_vel_s = C_U(cell, thread_s); y_vel_s = C_V(cell, thread_s); slip_x = x_vel_g - x_vel_s; slip_y = y_vel_g - y_vel_s; rho_g = C_R(cell, thread_g); rho_s = C_R(cell, thread_s); mu_g = C_MU_L(cell, thread_g); ...Continues, see manual. I hope you find it useful. Quote:
|
All times are GMT -4. The time now is 16:16. |