# How can I get the particle current position in UDF

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

 March 21, 2001, 05:35 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

 March 31, 2001, 11:12 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.

 April 1, 2001, 23:03 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

 April 2, 2001, 01:00 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!!

 April 2, 2001, 05:03 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