# 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; /* particle y axis coordinate */ z = p->state.pos; /* 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; /* particle y axis coordinate */ z = p->state.pos; /* 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 Thread Tools Search this Thread Show Printable Version Email this Page Search this Thread: Advanced Search Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules Similar Threads Thread Thread Starter Forum Replies Last Post sega Fluent UDF and Scheme Programming 3 January 20, 2010 04:50 shankara.2 Fluent UDF and Scheme Programming 0 November 10, 2009 17:11 Häwimeddel FLUENT 1 September 29, 2009 09:56 dm2747 FLUENT 0 April 17, 2009 01:29 zhaoh FLUENT 3 January 16, 2007 20:17

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