Hello Rob,


I tried your suggestion and the simulation is running without udf. Later, I imported only properties udf and still the simulation is working, however, when I'm trying to include the mass transfer model then I'm getting the same error. Could you please suggest what's the actual problem? I'm attaching the ansys reference udf for mass transfer which is mentioned in the udf tutorial and it too having the same problem. Please help me in figuring out the error in the process.

Reference UDF for mass transfer:

#include "udf.h"


DEFINE_MASS_TRANSFER(liq_gas_source, c, t, from_index, from_species_index, to_index, to_species_index)
    #if !RP_Host
    real m_lg;
    real T_sat = 373.15;
    real vol = C_VOLUME(c, t);                                  //SIGNIFIES THE CELL VOLUME FOR A CELL AND THREAD
    Thread *pt = THREAD_SUB_THREAD(t, 0);                       //PRIMARY PHASE THREAD
    Thread *st = THREAD_SUB_THREAD(t, 1);                       //SECONDARY PHASE THREAD

    m_lg = 0;
    if (C_T(c, pt) >= T_sat)
        m_lg = -0.1 * C_VOF(c, pt) * C_R(c, pt) * fabs(C_T(c,pt) - T_sat) / T_sat;

    if ((m_lg == 0.) && (C_T(c, st) <= T_sat))
        m_lg = -0.1 * C_VOF(c, st) * C_R(c, st) * fabs(T_sat - C_T(c,st)) / T_sat;

    return (m_lg);