|
[Sponsors] |
June 4, 2015, 23:31 |
How can I set Y_velocity of particle =0, when particle attach the wall?
|
#1 |
Member
YANNAPOL SRIPHUTKIAT
Join Date: Sep 2014
Posts: 43
Rep Power: 12 |
Dear All,
The concept is if (distance between particle and wall < .... ) particle_velocity_Y = 0; I would like to set this particle velocity in Y axis =0, when the particle attach the wall. Please kindly advise ..... Regards, Yannapol S. Last edited by YANNAPOL; June 5, 2015 at 06:13. |
|
June 5, 2015, 06:20 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Do you want to set the y-velocity to zero when a particle really hits the wall (zero distance) or already when it is close to a wall?
If you want to do it when it hits the wall, it is easier, look for DEFINE_DPM_BC in the manual. If you want to do it when it is close to a wall, it is complicated. It can be done, sure, but think about if you really want that. |
|
June 5, 2015, 06:51 |
|
#3 |
Member
YANNAPOL SRIPHUTKIAT
Join Date: Sep 2014
Posts: 43
Rep Power: 12 |
Dear pakk,
Thanks for your reply, at this moment, I will make it stop when it hit the wall. As I understand the reference is set at the center of the particle. So if I need to set Y_velocity =0 when it hit the wall, my distance should be at the exact number of the particle radius. Am I understand correctly ? How can I refer the Y_velocity of the particle ? I am very new with C code and UDF code, could you please kindly advise ? Is it the ...return PATH_ABORT; if I use this particle will be suddenly stopped(does not move in any directions), am i right ? Thank you in advance Yannapol S. |
|
June 5, 2015, 07:18 |
|
#4 | |||
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Quote:
But, more importantly: you don't have to calculate this distance. If you use DEFINE_DPM_BC on the wall, the udf will only be used when the particle hits the wall. You don't have to check for that, Fluent will do that. Quote:
Quote:
|
||||
June 6, 2015, 01:21 |
|
#5 |
Member
YANNAPOL SRIPHUTKIAT
Join Date: Sep 2014
Posts: 43
Rep Power: 12 |
Dear pakk,
Thanks for your reply, from the tutorial, #define DEFINE_DPM_BC(name, p, t, f, normal, dim) \ int name(Tracked_Particle *p, Thread *t, face_t f, real normal[], int dim) The way Fluent define normal velocity is .... the normal velocity = P_VEL(p)[i]*normal[i] in my case tangential velocity is actually y-velocity, then I set P_VEL(p)[i]=0 to make particle stationary (velocity=0 in any directions). BUT I use for (i=0; i<idim; i++) P_VEL(p)[i]=0; Then, i let it show particle position. The particle is still moving. Particle position is 8.91828e-05 Particle position is -1.50772e-05 Particle position is -4.51884e-05 . . Particle position is 6.21914e-05 Particle position is -1.02045e-05 Particle position is -7.82501e-05 Why the particle is still moving I set velocity =0 already ?? Best Regards, Yannapol S. Last edited by YANNAPOL; June 6, 2015 at 05:39. |
|
Tags |
dpm, message log, udf, udf and programming |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with assigned inlet velocity profile as a boundary condition | Ozgur_ | FLUENT | 5 | August 25, 2015 05:58 |
unable to get parabolic velocity profile with pimplefoam | houkensjtu | OpenFOAM | 4 | October 8, 2012 05:41 |
WSS and normal velocity gradient for the slanted pipe | wanna88 | FLUENT | 2 | October 1, 2012 23:34 |
Problem with time average tangential velocity in swirl flow. | lakhi | FLUENT | 5 | July 18, 2012 17:28 |
Emergency:UDF for a time dependent parabolic velocity | zumaqiong | Fluent UDF and Scheme Programming | 12 | March 25, 2010 13:00 |