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

How can I get the particle current position in UDF

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 21, 2001, 06:35
Default How can I get the particle current position in UDF
  #1
cfdfans
Guest
 
Posts: n/a
hi

I want to write a UDF about particle track. who can tell me how to get the the particle current position in UDF. thanks
  Reply With Quote

Old   March 31, 2001, 11:12
Default Re: How can I get the particle current position in
  #2
yueroo
Guest
 
Posts: n/a
You can use Postprocessing for the Discrete Phase. You can use step- by-step reports of the particle position, velocity. or write reust to file.
  Reply With Quote

Old   April 1, 2001, 23:03
Default Re: How can I get the particle current position in
  #3
cfdfans
Guest
 
Posts: n/a
thank you

I want to calculate the multiphase flow .And I want to give a centripetal acceleration to particle.I must get the current position of particle in my UDF program not in postprocessing.

In UDF Use's Guide 5.4.1 "Melting Index Along a Particle Trajectory" ,there is a example program.

the followed is the program I modify for my project

#include "udf.h"

#include "dpm.h"

#define C_acceler 30.0 /* centripetal acceleration */

DEFINE_DPM_BODY_FORCE(particle_body_force, p, i) {

real y,z; real alpha; face_t f;

float bforce; /* centripetal force */

y = p->state.pos[1]; /* particle y axis coordinate */ z = p->state.pos[2]; /* particle z axis coordinate*/

alpha = acos(fabs(z)/(sqrt(pow(z,2)+pow(y,2))));

if(z>0)

{

if(y>0)

{

if(i==1) bforce=-C_acceler*sin(alpha)*P_MASS(p)*9.8;

else if(i==2) bforce=-C_acceler*cos(alpha)*P_MASS(p)*9.8;

}

else

{

if(i==1) bforce=C_acceler*sin(alpha)*P_MASS(p)*9.8;

else if(i==2) bforce=-C_acceler*cos(alpha)*P_MASS(p)*9.8;

}

}

else

{

if(y>0)

{

if(i==1) bforce=-C_acceler*sin(alpha)*P_MASS(p)*9.8;

else if(i==2) bforce=C_acceler*cos(alpha)*P_MASS(p)*9.8;

}

else

{

if(i==1) bforce=C_acceler*sin(alpha)*P_MASS(p)*9.8;

else if(i==2) bforce=C_acceler*cos(alpha)*P_MASS(p)*9.8;

}

}

return (bforce);

}

but the program can not pass the compile. FLUENT show error in the line "y = p->state.pos[1]; /* particle y axis coordinate */ z = p->state.pos[2]; /* particle z axis coordinate*/" with message " structure inference reference not implement " Could you help me find what is wrong with it. or is there another way to give a force that change with time and position to the particle . thank you very much

  Reply With Quote

Old   April 2, 2001, 01:00
Default Re: How can I get the particle current position in
  #4
yueroo
Guest
 
Posts: n/a
Hi: I don't know why you want to add centripetal acceleration to particle. In my case. I simulate particle flow in 180degree bend tube. Particle flow in bend tube, it will get centripetal force, and hit tube. Particle ¡¥s Trajectory was decided from fluid flow. Can you tell me why you want to add centripetal acceleration to particle? Thanks!!
  Reply With Quote

Old   April 2, 2001, 05:03
Default Re: How can I get the particle current position in
  #5
cfdfans
Guest
 
Posts: n/a
hi thank you

the flow field in a column container with a exit. and the container in a curve motion. so the particle in the flow field have a body force change with position and time. if you konw how to resolve it ,please tell me thanks
  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
How to define Particle with UDF? sega Fluent UDF and Scheme Programming 3 January 20, 2010 05:50
Looping inside UDF and use of C_UDMs in DEFINE_DPM_BC shankara.2 Fluent UDF and Scheme Programming 0 November 10, 2009 18:11
Particle Tacking and UDF Häwimeddel FLUENT 1 September 29, 2009 09:56
DPM UDF particle position using the macro P_POS(p)[i] dm2747 FLUENT 0 April 17, 2009 01:29
Help: UDF of "particle body force" !!! zhaoh FLUENT 3 January 16, 2007 21:17


All times are GMT -4. The time now is 04:13.