|
[Sponsors] |
February 23, 2007, 14:16 |
Cant understand the UDF...need help
|
#1 |
Guest
Posts: n/a
|
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 |
|
February 25, 2007, 19:17 |
Re: Cant understand the UDF...need help
|
#2 |
Guest
Posts: n/a
|
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 08:37 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
How to add a UDF to a compiled UDF library | kim | FLUENT | 3 | October 26, 2011 22:38 |
UDF...UDF...UDF...UDF | Luc SEMINEL | FLUENT | 0 | November 25, 2002 05:03 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |