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

DEFINE_DPM_OUTPUT

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 18, 2007, 22:54
Default DEFINE_DPM_OUTPUT
  #1
Josh Kemp
Guest
 
Posts: n/a
I am trying to use the DEFINE_DPM_OUTPUT UDF given on the fluent users website, but can't interpret or compile it. I copied it straight from their site and tried on windows and Linux.

The error it gives in windows is "Error: C:\Josh's_Documents\CFD\axi-co-flow\axi_test_matrix\discrete_phase_sampler.c: line 13: structure reference not implemented"

Here is the code:

#include "udf.h" /************************************************** ****************/ /* UDF that samples discrete phase size and velocity distributions*/ /* within the domain. */ /************************************************** ****************/ #define REMOVE_PARTICLES FALSE

DEFINE_DPM_OUTPUT(discrete_phase_sample,header,fp, p,t,plane) {

#if RP_2D

real flow_time = solver_par.flow_time; real y;

if(header)

par_fprintf_head(fp," #Time[s] R [m] X-velocity[m/s]

W-velocity[m/s] R-velocity[m/s] Drop Diameter[m]

Number of Drops Temperature [K] Initial Diam [m]

Injection Time [s] \n");

if(NULLP(p))

return;

if (rp_axi && (sg_swirl || rp_ke))

y = MAX(sqrt(SQR(p->state.pos[1]) + SQR(p->state.pos[2])),DPM_SMALL); else

y = p->state.pos[1];

#if PARALLEL par_fprintf(fp,"%d %d %e %f %f %f %f %e %e %f %e %f \n",

p->injection->try_id,p->part_id, P_TIME(p),y,p->state.V[0],

p->state.V[1],p->state.V[2],P_DIAM(p),p->number_in_parcel,

P_T(p), P_INIT_DIAM(p),p->time_of_birth); #else par_fprintf(fp,"%e %f %f %f %f %e %e %f %e %f \n",

P_TIME(p), y,p->state.V[0],p->state.V[1],p->state.V[2],P_DIAM(p),

p->number_in_parcel, P_T(p), P_INIT_DIAM(p), p->time_of_birth); #endif /* PARALLEL */ #else

real flow_time = solver_par.flow_time; real r, x, y;

if(header)

par_fprintf_head(fp," #Time[s] R [m] x-velocity[m/s]

y-velocity[m/s] z-velocity[m/s] Drop Diameter[m]

Number of Drops Temperature [K] Initial Diam [m]

Injection Time [s] \n");

if(NULLP(p))

return;

x = p->state.pos[0]; y = p->state.pos[1]; r = sqrt(SQR(x) + SQR(y));

#if PARALLEL par_fprintf(fp,"%d %d %e %f %f %f %f %e %e %f %e %f \n",

p->injection->try_id, p->part_id, P_TIME(p), r,p->state.V[0],

p->state.V[1],p->state.V[2],P_DIAM(p),p->number_in_parcel,

P_T(p), P_INIT_DIAM(p), p->time_of_birth); #else par_fprintf(fp,"%e %f %f %f %f %e %e %f %e %f \n",

P_TIME(p), r,p->state.V[0],p->state.V[1],p->state.V[2],

P_DIAM(p),p->number_in_parcel,P_T(p), P_INIT_DIAM(p),

p->time_of_birth); #endif /* PARALLEL */ #endif

#if REMOVE_PARCELS p->stream_index=-1; #endif }
  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



All times are GMT -4. The time now is 15:12.