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

UDF for Syamlal obrein symmetric grag model (solid-solid)

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

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 23, 2018, 12:47
Default UDF for Syamlal obrein symmetric grag model (solid-solid)
  #1
Member
 
Muhammad Ali Uzair
Join Date: Sep 2017
Posts: 44
Rep Power: 8
m.uzair is on a distinguished road
Hi,

Has anyone here written a udf for syamlal obrein symmetric model for solid solid interaction? Need help urgently.

I dont know how to include radial distribution function into that model.

Please do reply
m.uzair is offline   Reply With Quote

Old   October 23, 2018, 14:07
Default explanation
  #2
Member
 
Muhammad Ali Uzair
Join Date: Sep 2017
Posts: 44
Rep Power: 8
m.uzair is on a distinguished road
I am simulating a three phase flow, and i want to write a udf for solid solid interaction.(SYAMLAL OBREIN SYMMETRIC DRAG MODEL)

I am facing two problems.

1) when i interpret udf, it shows me undeclared variable

line 19: l_col: undeclared variable

AND

`DEFINE_EXCHANGE_PROPERTY' used with too many (6) args





2) I dont know how to include radial distribution function in the udf

Can someone please point out the flaws and how to fix them

UDF is as follows

#include "udf.h"

#define diam2 0.0005
#define diam3 0.005
#define PI 3.141592654


DEFINE_EXCHANGE_PROPERTY(custom_drag,cell,mix_thre ad,g_col,s_col,l_col)
{
Thread *thread_g, *thread_l, *thread_s;
real x_vel_l, x_vel_s, y_vel_l, y_vel_s, abs_v, slip_x, slip_y,rho_l, rho_s;
real void_g,void_l,void_s,k_l_s;

/* find the threads for the gas phase */
/* and biomass (solid phase one) */
/* and sand (solid phase two) */

thread_g = THREAD_SUB_THREAD(mix_thread, g_col);/* gas phase */
thread_l = THREAD_SUB_THREAD(mix_thread, l_col);/* solid phase one */
thread_s = THREAD_SUB_THREAD(mix_thread, s_col);/* solid phase two*/

/* find phase velocities and properties*/

x_vel_l = C_U(cell, thread_l);
y_vel_l = C_V(cell, thread_l);

x_vel_s = C_U(cell, thread_s);
y_vel_s = C_V(cell, thread_s);

slip_x = x_vel_l - x_vel_s;
slip_y = y_vel_l - y_vel_s;

rho_l = C_R(cell, thread_l);
rho_s = C_R(cell, thread_l);

/*compute slip*/
abs_v = sqrt(fabs(slip_x*slip_x + slip_y*slip_y));


void_g = C_VOF(cell, thread_g);/* gas phase vol frac*/
void_s=1.-void_g-void_l;
void_l=1.-void_g-void_s;

k_l_s=(3*(1+0.9)*(PI*0.5)*void_s*rho_s*void_l*rho_ l*pow(diam2+diam3,2)*abs_v)/(2*PI*((rho_l*pow(diam2,3))+(rho_s*pow(diam3,3)))) ;

return k_l_s;
}
Attached Images
File Type: gif img7446.gif (2.7 KB, 2 views)
m.uzair is offline   Reply With Quote

Old   October 24, 2018, 23:56
Default
  #3
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
where did you get this macro?

from Ansys Fluent customization manual:
Code:
DEFINE_EXCHANGE_PROPERTY (name, c, mixture_thread,second_column_phase_index,first_column_phase_index)
I recommend to COMPILE UDF instead of interpretation

best regards
m.uzair likes this.
AlexanderZ is offline   Reply With Quote

Old   October 25, 2018, 04:59
Default
  #4
Member
 
Muhammad Ali Uzair
Join Date: Sep 2017
Posts: 44
Rep Power: 8
m.uzair is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
where did you get this macro?

from Ansys Fluent customization manual:
Code:
DEFINE_EXCHANGE_PROPERTY (name, c, mixture_thread,second_column_phase_index,first_column_phase_index)
I recommend to COMPILE UDF instead of interpretation

best regards
Dear Thank you for the advice. Will the structure of the code remain same for the compiled udf?
P.S just a beginner :-)

I got it from this forum, shared by someone.
m.uzair is offline   Reply With Quote

Reply

Tags
drag, eulerian multiphase model, fluent, multiphase flow, udf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Thermal non-equilibrium porous media model with conjugate heat transfer Hexahedron FLUENT 9 February 22, 2023 02:55
Can we write UDF for secondary phase droplet/bubble diameter in Eulerain model? Navier Stoke Fluent UDF and Scheme Programming 1 September 7, 2017 15:02
What viscosity to use for solid phase in VOF model redwanamit034 FLUENT 0 June 14, 2017 17:09
How model radiation of both solid wall and fluid£¿ Harry Qiu FLUENT 2 February 3, 2013 23:04
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 15:55


All times are GMT -4. The time now is 06:28.