CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

WenYu Define_DPM_Drag

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 8, 2019, 04:28
Question WenYu Define_DPM_Drag
  #1
New Member
 
Mario B.
Join Date: Feb 2018
Posts: 11
Rep Power: 8
blerli_91 is on a distinguished road
Dear Forum,


For future projects I want to implement alternative Drag laws for the DDPM model. For getting experience in UDF programming (I am quite new to the topic) I am trying to recreate the Fluent Build-In Drag law by Wen and Yu. I have a 1D test case for comparison of the original drag law and my UDF. For comparison I am using a DPM-Sample at the Outlet for a patched Flow-Field.
According to UDF Manual the Define_DPM_Drag should return an expression equal to: \frac{18 Cd Re }{24} . First I tried to directly insert the Wen-Yu Cd given in the Theory Guide into the expression:

C_D = \frac{24}{\alpha_g Re_s} (1 + 0.15 (\alpha_g Re_s)^{0.687})


However, I was not able to recreate the results of the original Drag Law. So I guess I will need another formulation for Cd? Maybe someone has experience with that? I am not sure which kind of expression I should use for : \frac{18 C_D Re }{24} in case of Wen-Yu.
The code I was using.:

Code:
#include "udf.h" 

#include "dpm.h" 

DEFINE_DPM_DRAG(particle_drag_force,Re,tp) 

{ real drag_force, void_s,void_g; 

 cell_t cell; Thread *thread_s, *mix_thread;  

cell=P_CELL(tp); 
 
 mix_thread=P_CELL_THREAD(tp);  

thread_s = THREAD_SUB_THREAD(mix_thread,1); 

void_s = C_VOF(cell, thread_s);  void_g =1-void_s ; 
 //drag_force = 18.0 * pow(void_g,-2.65) * (1 + 0.15 * pow(void_g * Re,0.687))/void_g ;
 
drag_force = 18.0 * (1 + 0.15 * pow(void_g * Re,0.687))/void_g ; 
return (drag_force); }
Thank You and Best Regards
blerli_91 is offline   Reply With Quote

Old   January 10, 2019, 08:56
Default
  #2
New Member
 
Mario B.
Join Date: Feb 2018
Posts: 11
Rep Power: 8
blerli_91 is on a distinguished road
Looks like I found the problem here,


The Formulation ANSYS offers for the WenYu model in the Theory Guide is not complete.

Looks like Fluent is setting C_D = 0.43245 for particle Reynolds numbers > 1000 (Similar like for the Gidaspow model with C_D = 0.44 for Rep > 1000).

As far as I know this is not included in the original WenYu Formulation?



best regards
blerli_91 is offline   Reply With Quote

Old   February 19, 2019, 18:35
Default
  #3
New Member
 
Filippo Marchelli
Join Date: Feb 2019
Posts: 5
Rep Power: 7
filippo is on a distinguished road
Hi Blerli,

I have your same problem. Have you managed to solve it? Even if I set a constant CD, I still don't get the same results of the Fluent Wen-Yu model.

Thanks and best regards
filippo is offline   Reply With Quote

Old   April 8, 2019, 19:42
Default
  #4
New Member
 
Filippo Marchelli
Join Date: Feb 2019
Posts: 5
Rep Power: 7
filippo is on a distinguished road
Hi,

I'm writing this in case someone is dealing with the same problem.

We were getting the wrong result because we were missing an alpha_g. The correct formula to get the drag force from the gas-solid exchange coefficient and viceversa is:

alpha_g*alpha_g*ro_p*F_D=K_pg*(Ug_Up) (alpha_g*ro_p comes from the assumption that n_p*m_p=alpha_g*ro_p in each cell)

So that finally the value that must be returned by the UDF is:

drag_force = 18.0 * pow(void_g,-3.65) * (1 + 0.15 * pow(void_g * Re,0.687))

I still get vaguely different results, but at least now they are comparable to the Fluent Wen-Yu model.

Best regards,
Filippo
filippo is offline   Reply With Quote

Old   April 29, 2019, 07:01
Default
  #5
New Member
 
Taha Abbas Bin Rashid
Join Date: Jul 2016
Posts: 9
Rep Power: 9
taha91_1@hotmail.com is on a distinguished road
Quote:
Originally Posted by filippo View Post
alpha_g*alpha_g*ro_p*F_D=K_pg*(Ug_Up) (alpha_g*ro_p comes from the assumption that n_p*m_p=alpha_g*ro_p in each cell)
I do not understand how n_p*m_p=alpha_g*ro_p, left side has units of mass while right side has units of density.
taha91_1@hotmail.com is offline   Reply With Quote

Old   April 29, 2019, 19:24
Default
  #6
New Member
 
Filippo Marchelli
Join Date: Feb 2019
Posts: 5
Rep Power: 7
filippo is on a distinguished road
Quote:
Originally Posted by taha91_1@hotmail.com View Post
I do not understand how n_p*m_p=alpha_g*ro_p, left side has units of mass while right side has units of density.
n_p is the number of particles per unit volume, so 1/m^3
filippo is offline   Reply With Quote

Reply

Tags
ddpm drag law, define_dpm_drag, udf drag law, wen-yu


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
WenYu drag model code implimentation dinh OpenFOAM Programming & Development 4 August 2, 2023 18:28


All times are GMT -4. The time now is 06:11.