Looking for a solution?

Where there's a problem there's a solution

  • UDF example for DEFINE_VR_RATE in fluent

  • #include "udf.h"
    DEFINE_VR_RATE(user_vr_rate, c, t, r, mw, yi, rr_k, rr_t)
    {
    real T = C_T(c,t);
    real Keq = 1.;
    real tau = TRB_TIM_SCAL(c,t);
    real tau_min = 1e-5;
    if (tau < tau_min)
    *rr_t *= (tau/tau_min);
    if ( ! STREQ(r->name, "reaction-9") ) return;
    if (T < 600.) T = 600.;
    if (T > 2000.) T = 2000.;
    Keq = 2408.1/T + 1.5350*log10(T) - 7.452e-5 * T - 6.7753;
    Keq = pow(10, Keq);
    /* alternative expression */
    /* Keq = exp(-4.33 + 4577.8/T); */
    *rr_k /= Keq;
    }



  • Show Form
    No comments yet. Be the first to add a comment!