#include "udf.h"
#include "mem.h"
#define D_O_2 2.1e-09
#define Pie 3.14
DEFINE_MASS_TRANSFER(liq_gas_source, cell, thread, from_index, to_index)
{
real K_L;
real C_R;
real C_D;
real C_MU_L;
Thread *gas = THREAD_SUB_THREAD(thread, to_index);
Thread *liq = THREAD_SUB_THREAD(thread, from_index);
C_D = C_D(cell, liq);
C_MU_L = C_MU_L(cell, liq);
C_D = 0;
if (C_T(cell, liq) >= C_D)
{
K_L = (2.0 / sqrt(Pie))*(sqrt(D_O_2)*pow(C_D*(C_R / C_MU_L), 0.25));
}
if ((C_D == 0.0) && (C_T(cell, gas)