|
[Sponsors] |
How can I get the particle current position in UDF |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 21, 2001, 06:35 |
How can I get the particle current position in UDF
|
#1 |
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, 12:12 |
Re: How can I get the particle current position in
|
#2 |
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 2, 2001, 00:03 |
Re: How can I get the particle current position in
|
#3 |
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, 02:00 |
Re: How can I get the particle current position in
|
#4 |
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, 06:03 |
Re: How can I get the particle current position in
|
#5 |
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 |
|
|
|
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 10:56 |
DPM UDF particle position using the macro P_POS(p)[i] | dm2747 | FLUENT | 0 | April 17, 2009 02:29 |
Help: UDF of "particle body force" !!! | zhaoh | FLUENT | 3 | January 16, 2007 21:17 |