TAGGED: #fluent-#ansys, electrolysis, udf
-
-
March 24, 2025 at 11:22 am
su.lim
SubscriberI 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:
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?
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?
-
March 24, 2025 at 11:39 am
Rob
Forum ModeratorIf 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.Â
-
March 24, 2025 at 2:11 pm
su.lim
SubscriberI 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?
-
-
March 24, 2025 at 2:22 pm
Rob
Forum ModeratorYou 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.Â
-
- You must be logged in to reply to this topic.
-
2918
-
970
-
852
-
599
-
591
© 2025 Copyright ANSYS, Inc. All rights reserved.