CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF for condensation or boiling (https://www.cfd-online.com/Forums/fluent-udf/36551-udf-condensation-boiling.html)

Yvonne May 2, 2005 17:45

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

edi ghirardi May 4, 2005 12:42

Re: UDF for condensation or boiling
 
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.

Yvonne May 5, 2005 21:51

Re: UDF for condensation or boiling
 
hello edi ghirardi,

I already got them. thank you reply.

Best Yvonne

yaamunan September 30, 2010 15:55

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

sreerao October 6, 2010 11:44

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

Niki July 18, 2011 11:24

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.

unknow October 15, 2011 07:41

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?



Amit September 13, 2012 07:43

request for udf for condensation
 
where is available udf for condensation in manual???? or can specify any other resourse??

Dinesh Yadav April 21, 2014 13:23

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


qhwj1990 April 20, 2016 06:50

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.

vasava April 28, 2016 08:50

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.

Diksha May 5, 2017 08:40

Wall Condensation
 
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.. :confused::confused:

Thank you

soumitra2102 June 24, 2019 16:57

UDF for condensation
 
Quote:

Originally Posted by Diksha (Post 647780)
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.. :confused::confused:

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?


All times are GMT -4. The time now is 02:34.