Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

how to write volumetric reaction rate in udf

    • kzqing
      Subscriber

      Hello. I am simulating hypersonic flow with finite rate chemistry using Fluent. As both thermal and chemical nonequilibrium exist, I think I need to include vibration temperature for the reaction rate. As Fluent only considers the translational temperature, a UDS is needed for vibration temperature. I also need to use DEFINE_VR_RATE to define the reaction rate. There is a argument in DEFINE_VR_RATE: Reaction *r. It is the pointer to data structure that represents the current reaction. From the example in udf manual, I saw that we can access some data using r, such as r->n_reactants, r->A, r->E, r->b. Are these what we input in the reaction panel for the Arrhenius Rate? If I want to include third-body efficiencies and backward reaction, what variables can I use in my DEFINE_VR_RATE udf? Thank you.

    • DrAmine
      Ansys Employee

      1/Yes: That is your input from GUI.


      2/Are not documented.

    • kzqing
      Subscriber

      Hello Amine,


      Do you know where I can find the documented variables related to the reaction?


      Thanks,


      Qing

    • DrAmine
      Ansys Employee

      In the customization manual. Any other else is not supported (..but you can check the header files where you might find more on the reaction structure)

    • kzqing
      Subscriber

      Hello Amine,


      I didn't find any other descriptions about reaction structure, but I have other questions. 


      The molar rate of creation/destruction of species i in reaction r is given by 


          equation (a)


      The net source of chemical species i due to reaction is computed as the sum of the reaction sources over the NR reactions that the species participate in:


         equation (b)


      (1) In DEFINE_VR_RATE( name,c,t,r,mw,yi,rr,rr_t), we need to give reaction rate to rr and rr_t. What values should we give them? Is it equation (a) or equation (b)?


      (2) If I want to include third body efficiencies and backward reactions, I need to specifically define in equation (a) and use them for rr and rr_t, right?


      (3) What name can I use in udf if I want to access stoichiometric coefficient for reaction i/product i in reaction r that are input from GUI?


       


      Thanks,


      Qing

    • DrAmine
      Ansys Employee

      DEFINE_VR_RATE calculates the reaction rate of each reaction before appliying getting multiplied with the coefficients. It just provides the rate of the reaction kgmol/m^3*s. When it is multiplied by the respective stoichiometric coefficients, yield the production/consumption rates of the individual chemical components. 


      Again if accessing stochiometric coefficient is not documented in the manual then is not supported. You can however look into the header files and search for reaction strcuture whe you might perhaps find how to access.


       


       


       

    • DrAmine
      Ansys Employee
      You can get started by r->stoich_reactant
Viewing 6 reply threads
  • The topic ‘how to write volumetric reaction rate in udf’ is closed to new replies.
[bingo_chatbox]