|
[Sponsors] |
January 8, 2019, 04:28 |
WenYu Define_DPM_Drag
|
#1 |
New Member
Mario B.
Join Date: Feb 2018
Posts: 11
Rep Power: 8 |
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: . First I tried to directly insert the Wen-Yu Cd given in the Theory Guide into the expression: 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 : 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); } |
|
Tags |
ddpm drag law, define_dpm_drag, udf drag law, wen-yu |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
WenYu drag model code implimentation | dinh | OpenFOAM Programming & Development | 5 | May 23, 2024 02:56 |