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

UDF for electric coalescence

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 9, 2018, 10:13
Default UDF for electric coalescence
  #1
New Member
 
liwenlong
Join Date: Oct 2018
Posts: 5
Rep Power: 8
leewenlong is on a distinguished road
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;
}
Attached Images
File Type: png 20181009210558.png (107.2 KB, 16 views)
leewenlong is offline   Reply With Quote

Old   October 9, 2018, 10:17
Default
  #2
New Member
 
liwenlong
Join Date: Oct 2018
Posts: 5
Rep Power: 8
leewenlong is on a distinguished road
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
leewenlong is offline   Reply With Quote

Old   October 9, 2018, 22:34
Default
  #3
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
what is wrong?

best regards
AlexanderZ is offline   Reply With Quote

Old   October 9, 2018, 23:12
Default
  #4
New Member
 
liwenlong
Join Date: Oct 2018
Posts: 5
Rep Power: 8
leewenlong is on a distinguished road
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!
leewenlong is offline   Reply With Quote

Old   October 10, 2018, 23:04
Default
  #5
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
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;
from my point of view should be:
Code:
if (d_1>d_2)
{lamuta = d_2/d_1; alpha = d_1;}
else
{lamuta = d_1/d_2; alpha = d_2;}
may be this will help. You should compile this code.

best regards
AlexanderZ is offline   Reply With Quote

Reply

Tags
pbm model udf


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
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


All times are GMT -4. The time now is 14:13.