|
[Sponsors] |
May 13, 2019, 11:26 |
UDF Drag for particles
|
#1 |
Member
imane
Join Date: Aug 2018
Posts: 62
Rep Power: 8 |
Hello!
I want to insert a drag force by a UDF. Fluent use this equation to specify the drag coefficient between particles and the fluid. F_D=(18μC_D R_e)/(〖24ρ〗_p d_p^2 ) In the description of the DEFINE_DPM_Drag macro, It was noticed that : ‘’your UDF will need to return the real value of the drag force on a particle. The value returned to the solver must be dimensionless and represent 18 * Cd * Re / 24.’’ However, I want to model drag force by this equation : F_D=(π.d_p^2.ρ_p.〖(U_p-U_p)〗^2.C_d)/〖8C〗_c My questions are : 1-Is it necessary to return exactly this value 18 * Cd * Re / 24 ? In the udf bellow I have computed a dimonsionless value correspond to cd/8Cc. For the drag force I multiply this dimensionless value by π.d_p^2.ρ_p.〖(U_p-U_p)〗^2, and finally I returned this value at the end of the macro. 2-Is fluent will consider the expression of my drag force or it will multiply the value I define by μ/(ρ_p d_p^2 ) ? #include "udf.h" #include "dpm.h" #include "mem.h" #define Boltzmann 1.3806505e-23 #define pi 3.14159265358979323846 #define nu_p 0.12 #define nu_f 0.001075 #define b1 0.186 #define b2 0.653 #define b3 0.437 #define b4 7178.74 DEFINE_DPM_DRAG(particle_drag_force,Re,p) { Thread *t=RP_THREAD(&(p->cCell)); cell_t c=RP_CELL(&(p->cCell)); real value; real lamda ,knudsen,Cc,cd,drag_force,p_dia,p_den,p_tem; lamda=(Boltzmann*p_tem)/(sqrt(2*pi)* p_dia*p_dia*C_P(c,t)); knudsen=2.*lamda/p_dia; Cc=1+knudsen*(1.257+0.4*exp(-1.1/knudsen)); cd=(24.0/Re)*(1+b1*pow(Re,b2))+(b3*Re)/(b4+Re); value=cd/(8*Cc); drag_force=pi*p_dia*p_dia*C_R(c,t)* pow((uf-up),2)*value; return(value) ; } Can you please give me some guidelines it is urgent ! |
|
May 14, 2019, 01:41 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
in description of DEFINE_DPM_DRAG macro it was shown that it is just a part of equation for calculating force
best regards |
|
May 14, 2019, 20:42 |
|
#3 |
Member
imane
Join Date: Aug 2018
Posts: 62
Rep Power: 8 |
Thanks for your help!
My equation for drag force is : Fd=[pi * dp² * (uf-up)² * Cd]/8Cc. So the part I should return will be (pi * Cd)/8Cc ? Is fluent will consider my equation to compute drag force (Fd=[pi * dp² * (uf-up)² * Cd]/8Cc. ) ? Can you take a look to my UDF? |
|
May 14, 2019, 23:34 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
I think you should divide your equation on equation from manual, but without DEFINE_DPM_DRAG part
best regards |
|
May 15, 2019, 01:23 |
|
#5 |
Member
imane
Join Date: Aug 2018
Posts: 62
Rep Power: 8 |
I don't understand you very well! Can you give me more details please?
Do you mean I have to use the Define dpm force macro for coding my drag force? Because in the manual they mentioned that the define dpm force macro is used to specify a body force other than a gravitational or drag force on the particles. |
|
May 15, 2019, 04:35 |
|
#6 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
my vision
Fluent equation: F_D=(18μC_D R_e)/(〖24ρ〗_p d_p^2 )(u-u_p) here (18C_D R_e)/(24) is DEFINE_DPM_DRAG Your equation: F_D=(π.d_p^2.ρ_p.〖(U_p-U_p)〗^2.C_d)/〖8C〗_c your DEFINE_DPM_DRAG(particle_drag_force,Re,p): return (π.d_p^2.ρ_p.〖(U_p-U_p)〗^2.C_d)/〖8C〗_c / (μ)/(〖ρ〗_p d_p^2 )(u-u_p) best regards |
|
May 17, 2019, 00:00 |
|
#7 |
Member
imane
Join Date: Aug 2018
Posts: 62
Rep Power: 8 |
Thank you I will try to this !
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How could I access drag term in multiphase flow using UDF | Jay Yin | Fluent UDF and Scheme Programming | 0 | October 23, 2016 23:10 |
problem with UDF drag !!!! | bohis | FLUENT | 1 | September 24, 2010 10:14 |
Custom Drag using UDF for Injected Particle | pmghadge | Fluent UDF and Scheme Programming | 0 | May 15, 2009 18:00 |
UDF of two phase flow : drag coefficient | superxeonman | FLUENT | 0 | May 21, 2008 22:53 |
Drag UDF | JK | FLUENT | 1 | March 10, 2008 09:33 |