# Problem UDF Drag with three phases

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 11, 2012, 12:36 Problem UDF Drag with three phases #1 Member   Fer Villa Join Date: Apr 2012 Posts: 35 Rep Power: 7 Sponsored Links 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.

 September 11, 2012, 23:31 help help? #2 New Member   Shuiqing Zhan Join Date: Aug 2012 Posts: 2 Rep Power: 0 hello,i do the same problem as you, please taalk about these using QQ. My QQ :723859249 . best wishes to u.

September 14, 2012, 15:46
#3
Member

Fer Villa
Join Date: Apr 2012
Posts: 35
Rep Power: 7

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:
 Originally Posted by shuiqing hello,i do the same problem as you, please taalk about these using QQ. My QQ :723859249 . best wishes to u.
Attached Images
 Sin título.png (67.8 KB, 28 views)

September 15, 2012, 22:31
#4
New Member

Shuiqing Zhan
Join Date: Aug 2012
Posts: 2
Rep Power: 0
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:
 Originally Posted by fevi84 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"

September 16, 2012, 21:00
#5
Member

Fer Villa
Join Date: Apr 2012
Posts: 35
Rep Power: 7
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:

{
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 tt_l[ND_ND];
real tt_g[ND_ND];

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

{
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) */

/* find phase velocities and properties*/
slip_x = x_vel_g - x_vel_s;
slip_y = y_vel_g - y_vel_s;

...Continues, see manual.

I hope you find it useful.

Quote:
 Originally Posted by shuiqing 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

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Rizwan Fluent UDF and Scheme Programming 39 June 29, 2017 19:04 Michael FLUENT 1 December 9, 2008 08:51 mansha goraya FLUENT 0 October 29, 2007 01:31 akr FLUENT 3 August 22, 2007 07:14 Z FLUENT 0 February 16, 2005 04:34