Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Writing UDF for solid-gas reaction in fluent

    • 2018ugme092
      Subscriber

      Hii everyone,

      I am working on simulation of fuel reactor of chemical looping combustion from this paper

    • Rahul Kumar
      Ansys Employee
      Hello,
      Please refer to this section on writing a UDF : Fluent Customization Manual (ansys.com)
      If you have any specific questions or you want to know how to circumvent an error message, let us know and we can assist you.
    • 2018ugme092
      Subscriber
      This is the UDF I wrote and its working fine for me:
      # include "udf.h"

      #define R 8.31434 /*Universal Gas Constant*/
      # define Pre 4300 /*Pre-exponential factor, 1/s-kPa*/
      # define E1 151000 /*Activation Energy, J/mol*/
      # define rho_caso4 21764 /*Molar density of CaSO4, kgmol/m3*/ //TO CHECK ----> Correct I think

      DEFINE_HET_RXN_RATE(deng_rxn_rate,c,t,r,mw,yi,rr,rr_t)
      {
      Thread **pt = THREAD_SUB_THREADS(t);
      Thread *prim_t = pt[0]; /*Thread for primary Phase*/
      Thread *sec_t = pt[1]; /*Thread for secondary Phase*/
      real T_SEC = C_T(c,sec_t); /*Phase secondary temperature, K*/
      real T_PRIM = C_T(c,prim_t);
      real pp_h2 = (C_R(c,prim_t) * R * T_PRIM)/2.0;
      *rr = rho_caso4* pp_h2 *Pre*(exp((-E1/(R*T_SEC))));
      }
Viewing 2 reply threads
  • The topic ‘Writing UDF for solid-gas reaction in fluent’ is closed to new replies.