
[Sponsors] 
May 2, 2005, 17:45 
UDF for condensation or boiling

#1 
Guest
Posts: n/a

Hello everyone,
I am doing a project about condensation in FLUENT. There is a watervapor two phase flow passing through a cooler wall. I am searching a UDF for condensation. Does anyone have the UDF code for condensation or boiling? Thanks in advance. Yvonne 

May 4, 2005, 12:42 
Re: UDF for condensation or boiling

#2 
Guest
Posts: n/a

I think I saw one about mass transfer in multiphase flows based on saturation temperature on the UDF manual. DEFINE_MASS_TRANSFER, or something like that.


May 5, 2005, 21:51 
Re: UDF for condensation or boiling

#3 
Guest
Posts: n/a

hello edi ghirardi,
I already got them. thank you reply. Best Yvonne 

September 30, 2010, 15:55 
Condensation UDF

#4 
New Member
Yaamunan Venkatesan
Join Date: Sep 2010
Posts: 1
Rep Power: 0 
Hi Yvonne,
I was searching for a condensation UDF. I am working on condensation through microchannels. I need to give water vapor at the inlet. I was wondering if i need to use udf...Since it is condensation, as the fluid flows through the channel, there should be a phase change. I was wondering if i shud give the option of multiphase in fluent. Please help me on this. I would also appreciate if you could send me ur udf file. Best Regards Yaamunan 

October 6, 2010, 11:44 

#5 
New Member
sreenivasa rao gubba
Join Date: Sep 2010
Location: Leeds University, UK
Posts: 27
Rep Power: 7 
Hi Guys
I have one developed part of my work. It is working nicely. However, you may need to change according to your problem. ************************************************** ** DEFINE_DPM_LAW(Boiling_sree, p, ci) { double cp_gas, vap_rate_const, latent_heat; double temp_diff,term,dia_ratio; double fv = DPM_VOLATILE_FRACTION(p); double diam_dry = 0; cphase_state_t *c = &(p>cphase); double qrad = 0.0; Material *m = p>injection>material; double min_liquid_mass = P_INIT_MASS(p)*(1.0  DPM_VOLATILE_FRACTION(p)); double liq_mass = PI*(pow(P_INIT_DIAM(p),3)/6.0)*(1.0  P_INIT_LF(p))*MATERIAL_PROP(p>injection>material,PROP_rho); law = 3; vapor_on = FALSE; boil_on = TRUE; /* Message (" ****Control is in Boiling: %16.8g, liquid mass:%16.8g, law: %i\n",liq_mass,min_liquid_mass,law); */ if (P_MASS(p) <= liq_mass) { if (ci) AddSources(p); p>current_law_index++; HeatMassUpdate(p,ci); vapor_on = FALSE; return; } if (DPM_WET_COMBUSTION(p)) { m = p>injection>evaporating_material; diam_dry = P_INIT_DIAM(p) * pow(1.P_INIT_LF(p),1./3.); } else { if (fv < 1.) diam_dry = P_INIT_DIAM(p) * pow(1.fv,1./3.); } /* Message (" ****diam dry: %16.8g, org dia:%16.8g\n",diam_dry,P_DIAM(p)); */ latent_heat = MAX(1.e20,MATERIAL_PROP(m,PROP_latent_heat)); if (ABS(latent_heat) < 1.e20) latent_heat = 1.e20; cp_gas = c>sHeat; /*Message (" ****Cp gas: %16.8g\n",cp_gas); */ if (cp_gas < DPM_SMALL) cp_gas = DPM_SMALL; temp_diff = c>tempP_T(p); if (temp_diff < 0.) temp_diff = 0.; /* Message (" ****temp_diff: %16.8g, c>temp:%16.8g\n",temp_diff,c>temp); */ if (dpm_par.radiation_p) { qrad = DPM_EMISSIVITY(p,P_MATERIAL(p))*(.25*c>G  SIGMA_SBC*pow(P_T(p),4.)); } /*Message (" ****q_rad_default: %16.8g, q_rad: %16.8g, time_step: %16.8fl \n",qrad, qrad1,p>time_step); */ if (qrad < 1.e9) { /*Message("it is true\n");*/ vap_rate_const = 8. * c>tCond / (P_RHO(p)*cp_gas)* log(1. + cp_gas*temp_diff/latent_heat); term = P_DIAM(p)*P_DIAM(p)  vap_rate_const*(1. + 0.23*sqrt(p>Re)) * p>time_step; P_DIAM(p) = (term > 0.) ? sqrt(term) : diam_dry; } else { /*Message("it is false\n");*/ real ku = 2.0 + 0.46*sqrt(p>Re); real alpha = 2.*qrad/(P_RHO(p)*latent_heat); vap_rate_const = c>tCond * temp_diff * ku; term = P_DIAM(p)  (vap_rate_const + qrad*P_DIAM(p))*alpha*p>time_step / MAX(qrad*P_DIAM(p),DPM_SMALL); P_DIAM(p) = (term > 0.) ? term : diam_dry; /*Message("term: %16.8g, diam: %16.8g\n", term, P_DIAM(p));*/ } if (DPM_WET_COMBUSTION(p)) { P_DIAM(p) = MAX(P_DIAM(p), diam_dry); P_LF(p) = MAX(0., 1.0  diam_dry*diam_dry*diam_dry /(P_DIAM(p)*P_DIAM(p)*P_DIAM(p))); P_RHO(p) = P_LF(p) * MATERIAL_PROP(p>injection>evaporating_material,PROP_rho) + (1.P_LF(p)) * MATERIAL_PROP(p>injection>material,PROP_rho); P_MASS(p) = P_RHO(p) * PI * P_DIAM(p)*P_DIAM(p)*P_DIAM(p) / 6.; } else { dia_ratio = P_DIAM(p)/P_INIT_DIAM(p); P_MASS(p) = P_INIT_MASS(p) * dia_ratio*dia_ratio*dia_ratio; } /*Message (" P_Mass:%16.8g, Liquid_fraction:%16.8g \n",P_MASS(p),P_LF(p));*/ } ************************************************* Hope this helps sree 

July 18, 2011, 11:24 

#6 
New Member
Join Date: Jul 2011
Posts: 1
Rep Power: 0 
Hello sreerao!
I have recently started to work with UDF and can not understand what this line means : { if (ci) AddSources(p); //what exactly does that mean?? p>current_law_index++; HeatMassUpdate(p,ci); // and that too??? vapor_on = FALSE; return; } Thanks in advance. 

October 15, 2011, 07:41 

#7 
New Member
Yaser
Join Date: Oct 2011
Location: I. R. of Iran Tehran
Posts: 1
Rep Power: 0 

September 13, 2012, 07:43 
request for udf for condensation

#8 
New Member
Amit
Join Date: Sep 2012
Posts: 2
Rep Power: 0 
where is available udf for condensation in manual???? or can specify any other resourse??
Last edited by Amit; September 13, 2012 at 07:43. Reason: a 

April 21, 2014, 13:23 
Wall condensation

#9  
New Member
Mahesh
Join Date: Jul 2013
Location: India
Posts: 4
Rep Power: 4 
Hi,
I have to model the wall condensation for water vapor. I am new to UDF writing. If you could mail me the UDF, it will a great help to start with. Thanks. Quote:


April 20, 2016, 06:50 

#10  
New Member
Wang Jie
Join Date: Apr 2016
Posts: 2
Rep Power: 0 
Quote:


April 28, 2016, 08:50 

#11 
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 591
Rep Power: 13 
Have a look at tutorial titled Heat and Mass Transfer with the Mixture Model
and EvaporationCondensation Model. It demonstrates usage of evaporationcondensation model. I dont think you need UDF unless something very complex is happening in your model. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
UDF for Subcooled Nucleate Boiling  Jake  Fluent UDF and Scheme Programming  2  September 26, 2013 11:22 
boiling and condensation udf  brusly  FLUENT  0  January 8, 2007 23:33 
udf for boiling and condensation  brusly  FLUENT  0  November 22, 2006 23:17 
udf for boiling and condensation  brusly  FLUENT  0  November 20, 2006 02:10 
What udf macro for boiling   thomas  FLUENT  6  January 19, 2004 08:31 