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 condensation or boiling

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 2, 2005, 18: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, 13: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, 22: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, 16: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, 12:44
Default
  #5
New Member
 
sreenivasa rao gubba
Join Date: Sep 2010
Location: Leeds University, UK
Posts: 28
Rep Power: 16
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, 12: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, 08: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, 08: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 08:43. Reason: a
Amit is offline   Reply With Quote

Old   April 21, 2014, 14:23
Default Wall condensation
  #9
New Member
 
Mahesh
Join Date: Jul 2013
Location: India
Posts: 4
Rep Power: 13
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

Old   April 20, 2016, 07:50
Default
  #10
New Member
 
Wang Jie
Join Date: Apr 2016
Posts: 7
Rep Power: 10
qhwj1990 is on a distinguished road
Quote:
Originally Posted by Yvonne
;120428
hello edi ghirardi,

I already got them. thank you reply.

Best Yvonne
hello,Best Yvonne , I need the UDFs,too. could you give me?If not, could you tell where I can find it. Thank you.
qhwj1990 is offline   Reply With Quote

Old   April 28, 2016, 09:50
Default
  #11
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23
vasava will become famous soon enough
Have a look at tutorial titled Heat and Mass Transfer with the Mixture Model
and Evaporation-Condensation Model
. It demonstrates usage of evaporation-condensation model. I dont think you need UDF unless something very complex is happening in your model.
vasava is offline   Reply With Quote

Old   May 5, 2017, 09:40
Default Wall Condensation
  #12
New Member
 
Diksha
Join Date: Mar 2017
Posts: 11
Rep Power: 9
Diksha is on a distinguished road
Hi,

I have to model condensation of water vapour in a vertical minichannel. I am new to fluent. Could anyone help me with it please?

I am using the evaporation/condensation model. However, I am not having the condensate film on the wall..

Thank you
Diksha is offline   Reply With Quote

Old   June 24, 2019, 17:57
Default UDF for condensation
  #13
Member
 
Soumitra Vadnerkar
Join Date: Aug 2018
Posts: 70
Rep Power: 8
soumitra2102 is on a distinguished road
Quote:
Originally Posted by Diksha View Post
Hi,

I have to model condensation of water vapour in a vertical minichannel. I am new to fluent. Could anyone help me with it please?

I am using the evaporation/condensation model. However, I am not having the condensate film on the wall..

Thank you
Hi,

Did you solve the problem?
I used standard evaporation-condensation model, but it did not give me any significant condensation. I played with the condensation frequency as well. It did not work.

Do you have any UDF to achieve the condensation?
soumitra2102 is offline   Reply With Quote

Reply


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 Subcooled Nucleate Boiling Jake Fluent UDF and Scheme Programming 3 December 30, 2019 06:10
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 12:58.