Ansys Learning Forum Forums Discuss Simulation Fluids Gas-Liquid Mass Transfer Source Term (CO2 transfer from gas to Liquid water) Reply To: Gas-Liquid Mass Transfer Source Term (CO2 transfer from gas to Liquid water)

kavatar
Subscriber

Hello Rob,

Thanks again for your time. Are you talking about this UDF:

/* UDF to define a simple mass transfer based on Saturation
   Temperature. The "from" phase is the gas and the "to" phase is the
   liquid phase  */

#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_SUB_THREAD(thread, from_index);
   Thread *liq = THREAD_SUB_THREAD(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,liq)-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);
}

This includes phase volume fraction in the code. The coefficient 0.1 has unit of (1/s). Therefore, the unit of mass transfer rate from this UDF is consistent with the unit of first term.
(mass of species per unit cell volume per unit time)

So you suggest me to include volume fraction in the rate? And follow