|
[Sponsors] |
July 29, 2019, 12:03 |
UDF of bubble departure diameter
|
#1 |
New Member
Join Date: Mar 2015
Posts: 13
Rep Power: 11 |
Hello everybody
I have written a UDF for the Unal bubble departure diameter model, but it is still some problems. could you help me with that. the code is below: #include "udf.h" #include "stdio.h" #define pi 3.1416 #define g 9.81 #define U0 0.61 DEFINE_BOILING_PROPERTY(bubble_depart_dia,f,t,c0,t 0,from_index,from_species_index,to_index,to_specie s_index) { int liq_phase = from_index; int vap_phase = to_index; Thread **pt0 = THREAD_SUB_THREADS(t0); FILE *fp; double a; double b; double phi; double pre; double dw; double pre_op; double rho_g; double h_lg = 1.5038425e+6; double rho_s; double cp_s; double k_s; double T_wall; double T_sat; double T_l; double rho_l; double delta_Tsub; double Ub; T_sat = C_STORAGE_R(c0,t0,SV_SAT_TEMPERATURE); T_wall = F_T(f, t); rho_g = C_R(c0, pt0[vap_phase]); rho_l = C_R(c0, pt0[liq_phase]); rho_s = 8440.0; cp_s = -5.0e-06*T_wall*T_wall+0.13123*T_wall+416.33; k_s = -2.0e-05*T_wall*T_wall+0.052926*T_wall+1.6355; a=(T_wall-T_sat)/(2.0*rho_g*h_lg)*sqrt(rho_s*cp_s*k_s/pi); T_l = C_T(c0, pt0[liq_phase]); delta_Tsub = T_sat-T_l; if (delta_Tsub<=3.0) b = delta_Tsub/(2.0*(1-rho_g/rho_l))*exp(delta_Tsub/3.0-1); else b = delta_Tsub/(2.0*(1-rho_g/rho_l)); Ub = C_U(c0,t0); phi = MAX(pow(Ub/U0,0.47),1.0); pre = C_P(c0, pt0[liq_phase]); pre_op = RP_Get_Real("operating-pressure"); pre = (pre+pre_op); if (b>0.0) dw = 2.4145e-05*pow(pre,0.709)*a/sqrt(b*phi); else dw = 3.3216e-05*pow(pre,0.709)*a/sqrt(-b*phi); return dw; } the calculated bubble departure diameter is too large and i don't know why. please give me some suggestion, thank you very much. |
|
July 30, 2019, 00:59 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Code:
DEFINE_BOILING_PROPERTY(bubble_depart_dia,f,t,c0,t 0,from_index,from_species_index,to_index,to_specie s_index) there should be no spaces, check it in your code if this is not the reason of your problem, than check your equations, because UDF code seems to be correct best regards |
|
July 30, 2019, 01:47 |
|
#3 | |
New Member
Join Date: Mar 2015
Posts: 13
Rep Power: 11 |
Quote:
I want to know if the fluent has some modificaiton when using the Unal bubble departure diameter. or if I have some problem about unit? |
||
August 1, 2019, 00:24 |
|
#4 | |
New Member
Join Date: Mar 2015
Posts: 13
Rep Power: 11 |
Quote:
the reason maybe these lines if (delta_Tsub<=3.0) b = delta_Tsub/(2.0*(1-rho_g/rho_l))*exp(delta_Tsub/3.0-1); else b = delta_Tsub/(2.0*(1-rho_g/rho_l)); in the Unal's original paper, the subcooling is requested to be larger than 3K. in the Fluent, a modificaiton is used in the calculation of b. so when delta_Tsub is close to 0, b suffer a large fluctuation which lead to a large bubble departure diameter. but if anyone knows how is dealed with in the fluent calculation without UDF? |
||
Tags |
udf, unal |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bubble column simulation with Lift coefficient UDF | raju.vadlakonda | Fluent UDF and Scheme Programming | 8 | June 19, 2023 09:36 |
UDF bubble diameter | CeesH | Fluent UDF and Scheme Programming | 9 | May 20, 2023 03:54 |
bubble equivalent diameter | mayj | CFX | 9 | November 17, 2019 13:12 |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 04:32 |
Query on VOF for Bubble rise | Vamsi | Main CFD Forum | 0 | December 22, 2005 01:02 |