Cant understand the UDF...need help
Hi
I was reading the FLUENT manual. I couldnt understand the UDF example for mass transfer. In the following UDF it says that the mass transfer takes place gas to liquid and the magnitude is negative. Can I remove the negative sign and change the mass transfer direction from liq to gas? #include<udf.h> DEFINE_MASS_TRANSFER(liq_gas_source, cell, thread, from_index, from_species_index, to_index, to_species_index) { real m_lg; real T_SAT = 373.15; Thread *gas = THREAD_SUBTHREAD(thread, from_index); Thread *liq = THREAD_SUBTHREAD(thread, to_index); m_lg = 0; if(C_T(Cell,liq)>= T_SAT) { m_lg = -0.1*C_VOF(cell,liq)*C_R(cell,liq)*fabs(C_T(cell,li q)-T_SAT)/T_SAT; } if ((m_lg == 0.)&& (C_T(cell, gas) <= T_SAT)) { m_lg=0.1*C_VOF(Cell, gas)*C_R(cell, gas)* fabs(T_SAT-C_T(cell,gas))/T_SAT; } return(m_lg); } Thanks, Shanti |
Re: Cant understand the UDF...need help
Hi Shanti,
When the temperature of the liquid is more or equal to the saturation temperature mass is transfered from liquid to gas. that is the first if condition. When the teperature of the gas is cooled down to less than 373 and there is no mass transfer at that time then mass transfer from gas to liquid occurs which is typically condensation. Thanks Regards Ronald |
All times are GMT -4. The time now is 03:03. |