CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

problem with compilation udf about droplet collision (DPM)

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

LinkBack Thread Tools Display Modes
Old   November 7, 2011, 15:09
Default problem with compilation udf about droplet collision (DPM)
New Member
Join Date: Jul 2011
Location: Poland
Posts: 16
Rep Power: 8
Jaskull is on a distinguished road
I have following problem. I'll try to compile following UDF (I found it in help).

#include "udf.h"
#include "dpm.h"
#include "surf.h"
/* non-physical collision UDF that relaxes he particle */
/* velocity and diameter in a cell to the mean over the */
/* specified time scale t_relax */
const real t_relax = 0.001; /* seconds */

/* get the cell and Thread that the particle is currently in */
cell_t c = P_CELL(tp);
Thread *t = P_CELL_THREAD(tp);
/* Particle index for looping over all particles in the cell */
Particle *pi;

/* loop over all particles in the cell to find their mass */
/* weighted mean velocity and diameter */
int i;
real u_mean[3]={0.}, mass_mean=0.;
real d_orig = P_DIAM(tp);
real decay = 1. - exp(-t_relax);
mass_mean += P_MASS(pi);
u_mean[i] += P_VEL(pi)[i]*P_MASS(pi);
end_particle_cell_loop(pi,c,t) /* relax particle velocity to the mean and diameter to the */
/* initial diameter over the relaxation time scale t_relax */
if( mass_mean > 0. )
u_mean[i] /= mass_mean;
P_VEL(tp)[i] += decay*( u_mean[i] - P_VEL(tp)[i] );
P_DIAM(tp) += decay*( P_INIT_DIAM(tp) - P_DIAM(tp) );
/* adjust the number in the droplet parcel to conserve mass */
P_N(tp) *= CUB( d_orig/P_DIAM(tp) );

But during compilation I receive following warning:

# Generating udf_names.c because of makefile aglom.obj
udf_names.c(7) : error C2059: syntax error : '}'
udf_names.c(8) : warning C4034: sizeof returns 0

Have anybody idea what is wrong??
Jaskull is offline   Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
discrete model problem (water droplet evaporation) rabaeto1984 FLUENT 3 February 3, 2015 07:00
Problem with UDF compilation in LINUX tez Fluent UDF and Scheme Programming 2 April 11, 2010 19:18
DPM UDF particle position using the macro P_POS(p)[i] dm2747 FLUENT 0 April 17, 2009 01:29
UDF compilation problem -- "undeclared variable" Henrik Ström FLUENT 1 September 21, 2005 05:25
Help with DPM UDF for OUTPUT needed Zhengcai Ye FLUENT 0 January 5, 2004 17:58

All times are GMT -4. The time now is 19:52.