We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

alkaline water electrolysis reaction UDF mass source

    • su.lim
      Subscriber

      I am currently modeling an alkaline water electrolysis system using electrochemical models in ANSYS Fluent.

      Referring to some published papers, I implemented a User-Defined Function (UDF) to apply the mass source term based on Faraday’s law in order to compute the mass flow rates of generated hydrogen and oxygen.

      My question is:

      1. By using the mass source term UDF based on Faraday’s law, am I correctly calculating the actual mass flow rates of hydrogen and oxygen being produced in the system?

      2. Before using the UDF, I had already enabled the Species and Potential (Electrochemistry) models in Fluent. These models already allow me to visualize hydrogen and oxygen production through concentration contours based on the electrochemical reactions.

      Would using both the built-in electrochemical reaction models and the UDF lead to double-counting of the hydrogen and oxygen generation?

    • Rob
      Forum Moderator

      If you're adding a source of both mass and species you're adding the intended material at the rate you expect. If you're also using a built in model you may be double counting, but that will depend on exactly how your UDF works. 

      • su.lim
        Subscriber

        I simply activated Species Transport, Potential, and Energy models to observe electrochemical reactions and to check the distribution of hydrogen and oxygen before moving on to more complex multiphase modeling.

        As many references suggest, I also implemented a UDF for mass source terms (based on Faraday’s law) to compute the actual mass flow rate of generated hydrogen and oxygen, using local current density.

        However, what’s confusing is this:

        Even without a UDF, Fluent still shows a contour of generated Hâ‚‚ and Oâ‚‚ (mass fraction, mole fraction, etc.) when using the potential and species models.
        So if I apply a UDF on top of that, am I double-counting the generated hydrogen and oxygen?

    • Rob
      Forum Moderator

      You have coded up a UDF to add material. If you have already turned on the species models with reactions/whatever then you may be double counting. As I don't actually know what you've set, nor what your UDF does it's a little difficult to know. 

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