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

udf : velocity profile in DPM (and mass)

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 31, 2013, 05:17
Question udf : velocity profile in DPM (and mass)
  #1
New Member
 
Join Date: Jul 2013
Posts: 21
Rep Power: 3
cdiako is on a distinguished road
Hello,

I am an user of FINE/Open. I would like to make a comparison with Fluent. Therefore, I need a little help in Fluent. I would like to insert a radial velocity profile for the DPM module. I saw that it had to use P_VEL. The code is correct? My injection point is located at (0,0,0.059) in my domain and I choose a solid cone (radius = 0.025 m) for the injection.

#include "udf.h"

real some_func(real r)
{
real vel;
real r0[] = {0.0, 0.02, 0.022, 0.025};
real v0[] = {25.0, 20.0, 10.0, 0.00};
int i=0;

if ( r >= r0[3] ) return 0.0;
while( r >= r0[++i]) ;

return v0[i-1]+((v0[i] - v0[i-1])/(r0[i] - r0[i-1]))*(r-r0[i-1]);

}

DEFINE_DPM_INJECTION_INIT(DPM_VELOCITY,I)
{

static const real orig[3]={0.0, 0.0, 0.059};
real x[ND_ND];
real r;
Particle *p;

loop(p,I->p)
{
NV_VV(x,=,x,-,orig);
r = sqrt(x[0]*x[0]+x[1]*x[1]);
P_VEL(p)[2] = some_func(r);
P_VEL(p)[1]=0;
P_VEL(p)[0]=0;
}
}
cdiako is offline   Reply With Quote

Reply

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
DPM mass problem Henrik Ström FLUENT 7 September 10, 2014 07:15
Add Mass to a Particle with UDF (DPM) sega Fluent UDF and Scheme Programming 6 October 24, 2013 22:14
Hooking a DPM Particle Heat and Mass Transfer UDF to FLUENT subhankar_bhandari Fluent UDF and Scheme Programming 0 August 19, 2010 03:09
Hooking a DPM Particle Heat and Mass Transfer UDF to FLUENT subhankar_bhandari FLUENT 0 August 19, 2010 03:01
Hooking a DPM Particle Heat and Mass Transfer UDF to FLUENT subhankar_bhandari Main CFD Forum 0 August 19, 2010 03:01


All times are GMT -4. The time now is 21:07.