|
[Sponsors] |
October 9, 2018, 10:13 |
UDF for electric coalescence
|
#1 |
New Member
liwenlong
Join Date: Oct 2018
Posts: 5
Rep Power: 8 |
PBM!!!! I want to write an UDF for electric coalescence kernel function. The equations
and UDF code are as follow. But someting is wrong with the code. Please help me to correct them. Thank you for your attention. DEFINE_PB_COALESCENCE_RATE(aggregation_kernel, c, t, d_1, t_2, d_2) { real f_1, f_2, lamuta, alpha, miu_ratio = miu_1/miu_2, agg;/*miu_1 and 2 are viscosity for two phases.*/ if (d_1>d_2) lamuta = d_2/d_1, alpha = d_1; else lamuta = d_1/d_2, alpha = d_2; f_1 = 2250*(miu_ratio+1)*pow(alpha,2)*(1-pow(lamuta,2))/(0.151263*miu_ratio+0.100842); f_2 = 2.8*3*(1-lamuta)*pow(UM4,2)/(2*9.8*lamuta*114.8*alpha); zhang_agg = 0.785*pow(d_1+d_2,2)*f_1*0.45*pow(f_2,0.55); return agg; } |
|
October 9, 2018, 10:17 |
|
#2 |
New Member
liwenlong
Join Date: Oct 2018
Posts: 5
Rep Power: 8 |
PLEASE not consider the case in absence of electric field. And the paper is attached. http://dx.doi.org/10.1016/j.jtice.2015.06.028
|
|
October 9, 2018, 22:34 |
|
#3 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
what is wrong?
best regards |
|
October 9, 2018, 23:12 |
|
#4 |
New Member
liwenlong
Join Date: Oct 2018
Posts: 5
Rep Power: 8 |
I do not know where and why was wrong with it. the code can run in fluent. but the results are incorrect. thank you for your reply!
|
|
October 10, 2018, 23:04 |
|
#5 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
take a look into your code
Code:
if (d_1>d_2) lamuta = d_2/d_1, alpha = d_1; else lamuta = d_1/d_2, alpha = d_2; Code:
if (d_1>d_2) {lamuta = d_2/d_1; alpha = d_1;} else {lamuta = d_1/d_2; alpha = d_2;} best regards |
|
Tags |
pbm model udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
udf for one dimensional linear motion based on force | maccheese | Fluent UDF and Scheme Programming | 2 | September 1, 2019 03:18 |
Save output of udf in another udf! | JuanJoMex | FLUENT | 0 | February 8, 2018 13:43 |
UDF Compilation Error - Loading Library - COMMON Problem! Help! | robtheslob | Fluent UDF and Scheme Programming | 8 | July 24, 2015 01:53 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |