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

Trap and reflect udf

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 10, 2009, 11:51
Unhappy Trap and reflect udf
  #1
New Member
 
sadegh motallebi
Join Date: Jul 2009
Posts: 5
Rep Power: 17
motallebi is on a distinguished road
HI

I am gonna write a udf about the DPM.

I am gonna write a udf that can trap or reflect. On the other hand I can trap if shear stress lower than critical shear stress. otherwise it can reflect.

I used of swich command and another command But It does not work for me.

I wanna use of REMOVE_ PARTICLE FALSE that delet some of the particle .

It can use to solve this problem.

At the udf manual 6.2.3 write a udf about the DPM OUTPUT.

At the this program uses of REMOVE_ PARTICLE FALSE .


#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

}

But it does not describe obout the this command.

Can you help me about the description for this command?


ALL THE BEST.

THANK YOU

MOTALLEBI
motallebi is offline   Reply With Quote

Old   October 8, 2013, 08:05
Smile کمک
  #2
New Member
 
Reza Yosri
Join Date: Oct 2013
Posts: 2
Rep Power: 0
rezayo is on a distinguished road
سلام برادر
مشکل منم اینجوریه
میخوام با سرعت بحرانی بسنجه
اگه udf رو داشته باشی ممنون میشم به منم بدی
rezayo 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
please help me. i have question about the UDF at the DPM motallebi FLUENT 0 July 6, 2009 12:27
I have a big problem at the UDF. Please help me motallebi FLUENT 1 July 3, 2009 12:10
DPM BC Trap or Reflect RIK FLUENT 8 October 28, 2008 07:09
DPM Boundary Conditions, UDF Juan FLUENT 1 November 11, 2005 15:37
Help with UDF for BC needed. Albert FLUENT 1 January 7, 2004 14:32


All times are GMT -4. The time now is 14:53.