Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

define_pr_rate

    • z5489721
      Subscriber

      I am using the DEFINE_PR_RATE UDF to calculate the reaction rate for the reduction of Fe₂O₃ with H₂. My reaction rate equation also depends on the partial pressures of H₂ and H₂O. In the macro, there is an argument pp that contains the gas partial pressures.

      If I use pp[3] to represent the partial pressure of Hâ‚‚, after calculating the reaction rate for the first iteration, will Fluent automatically update the partial pressures of these species? Specifically, will it account for the fact that some of the hydrogen has been consumed and water vapor produced, thus altering the partial pressures?

      If the macro does not consider these updated values automatically, do I need to update the gas species fractions and then recalculate the partial pressures? If so, how can I update the gas species fractions and recalculate the partial pressures after each iteration?

      Additionally, do I need to update the temperature in the code as well? If so, how should I go about updating the temperature correctly? thanks in advance

    • Rob
      Forum Moderator

      The solver will handle everything, and you're altering ONLY what is set in the UDF. So, all pressure, temperature etc are recalculated as the solver updates. 

    • z5489721
      Subscriber

      thanks for your reply. What about species fractions in the mixture? My code runs, but as contour, I don't see any change in H2 and H2O mass fractions before and after the reduction reaction. Do I need to update them?

    • Rob
      Forum Moderator

      If it's transient, how much of a change would you expect in a time step?

Viewing 3 reply threads
  • You must be logged in to reply to this topic.