CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Problem UDF Drag with three phases

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 11, 2012, 12:36
Default Problem UDF Drag with three phases
  #1
Member
 
Fer Villa
Join Date: Apr 2012
Posts: 35
Rep Power: 13
fevi84 is on a distinguished road
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.
fevi84 is offline   Reply With Quote

Old   September 11, 2012, 23:31
Default help help?
  #2
New Member
 
Shuiqing Zhan
Join Date: Aug 2012
Posts: 2
Rep Power: 0
shuiqing is on a distinguished road
hello,i do the same problem as you, please taalk about these using QQ. My QQ :723859249 . best wishes to u.
shuiqing is offline   Reply With Quote

Old   September 14, 2012, 15:46
Default
  #3
Member
 
Fer Villa
Join Date: Apr 2012
Posts: 35
Rep Power: 13
fevi84 is on a distinguished road
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:
Originally Posted by shuiqing View Post
hello,i do the same problem as you, please taalk about these using QQ. My QQ :723859249 . best wishes to u.
Attached Images
File Type: png Sin título.png (67.8 KB, 50 views)
fevi84 is offline   Reply With Quote

Old   September 15, 2012, 22:31
Default
  #4
New Member
 
Shuiqing Zhan
Join Date: Aug 2012
Posts: 2
Rep Power: 0
shuiqing is on a distinguished road
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 View Post
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"
shuiqing is offline   Reply With Quote

Old   September 16, 2012, 21:00
Default
  #5
Member
 
Fer Villa
Join Date: Apr 2012
Posts: 35
Rep Power: 13
fevi84 is on a distinguished road
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:
Originally Posted by shuiqing View Post
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
fevi84 is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 40 March 18, 2018 06:05
UDF using problem, error happens-heip!! Michael FLUENT 1 December 9, 2008 07:51
UDF problem mansha goraya FLUENT 0 October 29, 2007 00:31
udf compiling problem akr FLUENT 3 August 22, 2007 07:14
I have problem of UDF with turbulent premx source. Z FLUENT 0 February 16, 2005 03:34


All times are GMT -4. The time now is 16:48.