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

UDF for condensation or boiling

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 2, 2005, 17:45
Default UDF for condensation or boiling
  #1
Yvonne
Guest
 
Posts: n/a
Hello everyone,

I am doing a project about condensation in FLUENT. There is a water-vapor 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
  Reply With Quote

Old   May 4, 2005, 12:42
Default Re: UDF for condensation or boiling
  #2
edi ghirardi
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.
  Reply With Quote

Old   May 5, 2005, 21:51
Default Re: UDF for condensation or boiling
  #3
Yvonne
Guest
 
Posts: n/a
hello edi ghirardi,

I already got them. thank you reply.

Best Yvonne
  Reply With Quote

Old   September 30, 2010, 15:55
Default Condensation UDF
  #4
New Member
 
Yaamunan Venkatesan
Join Date: Sep 2010
Posts: 1
Rep Power: 0
yaamunan is on a distinguished road
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
yaamunan is offline   Reply With Quote

Old   October 6, 2010, 11:44
Default
  #5
New Member
 
sreenivasa rao gubba
Join Date: Sep 2010
Location: Leeds University, UK
Posts: 27
Rep Power: 6
sreerao is on a distinguished road
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.e-20,MATERIAL_PROP(m,PROP_latent_heat));
if (ABS(latent_heat) < 1.e-20)
latent_heat = 1.e-20;
cp_gas = c->sHeat;
/*Message (" ****Cp gas: %16.8g\n",cp_gas); */
if (cp_gas < DPM_SMALL) cp_gas = DPM_SMALL;

temp_diff = c->temp-P_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.e-9)
{
/*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
sreerao is offline   Reply With Quote

Old   July 18, 2011, 11:24
Default
  #6
New Member
 
Join Date: Jul 2011
Posts: 1
Rep Power: 0
Niki is on a distinguished road
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.
Niki is offline   Reply With Quote

Old   October 15, 2011, 07:41
Default
  #7
New Member
 
Yaser
Join Date: Oct 2011
Location: I. R. of Iran- Tehran
Posts: 1
Rep Power: 0
unknow is on a distinguished road
hi everybody.
i have done some work on the condensation of water wapor in a condensor with Fluent.
i'm not sure about what i do.
is there anybody that can help me, please?


unknow is offline   Reply With Quote

Old   September 13, 2012, 07:43
Default request for udf for condensation
  #8
New Member
 
Amit
Join Date: Sep 2012
Posts: 2
Rep Power: 0
Amit is on a distinguished road
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
Amit is offline   Reply With Quote

Old   April 21, 2014, 13:23
Default Wall condensation
  #9
New Member
 
Mahesh
Join Date: Jul 2013
Location: India
Posts: 4
Rep Power: 4
Dinesh Yadav is on a distinguished road
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:
Originally Posted by Yvonne
;120321
Hello everyone,

I am doing a project about condensation in FLUENT. There is a water-vapor 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
Dinesh Yadav is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 09:55.