Fluids

Fluids

Topics relate to Fluent, CFX, Turbogrid and more

Mass source as a function of electric current density

    • Farzan Sepahi
      Bbp_participant

      Hi, 

      For modeling the electrochemical processes involved in water electrolysis I need to impose the electrode gas generation rate as a function of electric current density on the electrode surface. 2-phase Euler-Euler model has been chosen for multiphase flow and the gas generation function, written in Named Expressions, is called in the mass source term of phase-2 in the cells adjacent to the electrodes. However the solution freezes after few itereations leading to the error:

      Error at host: Internal error at line 2388 in file 'bc\src\profile.c'.  Too many profiles

      Interestingly, any function in the mass source term leads to the same error and it has nothing to do with the electric potential solution; even a function of temperature, pressure or any other variable produces the same error. Only if the gas generation rate is taken as constant then the solution continues without any problem.

      Could this problem be related to Expressions? Any thoughts on this will be really appreciated as nothing could resolve this so far. Thanks.

       

    • Rob
      Forum Moderator

      It's possible. Which version of Fluent are you using? Expression functionality has been expanding over the last few years but there are a few areas where UDFs are still more reliable. 

    • Farzan Sepahi
      Bbp_participant

      Thanks for the reply. I am using Fluent 2023 R2. 

      I can write UDFs which does that, however I could not find any Macros in UDF manual which allows access to the values of electric potential and electric current densitiy for each cell. Do you know any macros using which I can read cells potential/current values or is there a manual for this? Thanks.

    • Rob
      Forum Moderator

      OK, try in 2024R2 and see how that goes. 

      I can only refer you to the UDF manual, check in Electro chemistry as most of what you're doing will use those macros. 

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