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

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

 October 23, 2018, 13:47 UDF for Syamlal obrein symmetric grag model (solid-solid) #1 Member   Muhammad Ali Uzair Join Date: Sep 2017 Posts: 44 Rep Power: 7 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

October 23, 2018, 15:07
explanation
#2
Member

Join Date: Sep 2017
Posts: 44
Rep Power: 7
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

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

/* find phase velocities and properties*/

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

/*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
 img7446.gif (2.7 KB, 2 views)

 October 25, 2018, 00:56 #3 Senior Member   Alexander Join Date: Apr 2013 Posts: 2,256 Rep Power: 32 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.

October 25, 2018, 05:59
#4
Member

Join Date: Sep 2017
Posts: 44
Rep Power: 7
Quote:
 Originally Posted by AlexanderZ 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.

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