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

Parse error whilst interpreting UDF for drag model

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 20, 2012, 06:49
Default Parse error whilst interpreting UDF for drag model
  #1
Member
 
Musango Lungu
Join Date: Dec 2011
Location: China
Posts: 73
Rep Power: 14
Musa is on a distinguished road
Hello dear friends,
I have been trying to interpret the code below but I keep getting the message parse error in line 10. Kindly help me out. I am a beginner in using udf's.

# include "udf.h"

# define pi 4.atan(1.)
# define diam2 4.06e-4

DEFINE_EXCHANGE_PROPERTY(Cao-Ahmadi_drag,cell,mix_thread,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,vof_g,vof_s,vof_m,taup,k_g_s ;
vof_m = 0.47
/* 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);

rho_g = C_R(cell,thread_g);
rho_s = C_R(cell,thread_s);

mu_g = C_MU_L(cell,thread_g);

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

/* compute reynolds number*/
reyp = rho_g*abs_v*diam2/mu_g;

/* compute particle relaxation time*/
taup = rho_s*vof_s/k_g_s
vof_g = C_VOF(cell,thread_g);/* gas vol frac */
vof_s = C_VOF(cell,thread_s);/* solid vol frac*/


k_g_s = 18*mu_g*vof_s*(1 + 0.1*pow(reyp,0.75))/diam2/diam2/pow(1-(vof_s/vof_m),2.5*vof_m);
return k_g_s;
}
Musa is offline   Reply With Quote

Old   August 20, 2012, 10:05
Default
  #2
Member
 
Mohsen
Join Date: Jul 2012
Posts: 49
Rep Power: 14
smhosseini is on a distinguished road
Hi musa,
your mistake:
vof_m = 0.47;
Don't forget the ";"
smhosseini is offline   Reply With Quote

Old   August 20, 2012, 10:53
Default
  #3
Member
 
Musango Lungu
Join Date: Dec 2011
Location: China
Posts: 73
Rep Power: 14
Musa is on a distinguished road
Thanx Mohsen. Actually I am just a fresher in programming!
Musa 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
Use of k-epsilon and k-omega Models Jade M Main CFD Forum 40 January 27, 2023 08:18
EMMS drag model UDF NAD Fluent UDF and Scheme Programming 26 November 19, 2017 08:49
UDF fails to model 9.81m/s^2 gravity jpo Fluent UDF and Scheme Programming 2 January 24, 2012 19:15
UDF, Herschel-Bulkely model don't have Yielding viscosity term emad Fluent UDF and Scheme Programming 0 May 19, 2009 13:46
UDF of Zimont model in fluent Z Main CFD Forum 0 February 17, 2005 04:07


All times are GMT -4. The time now is 22:55.