Fluids

Fluids

Topics relate to Fluent, CFX, Turbogrid and more

UDF for accessing the interfacial area density of cell

    • Ding HC
      Subscriber

      Hello everyone, I have a question that I would like to seek your advice on!

      In the Eulerian Two-Fluids Model (also known as the Eulerian Model) of ANSYS FLUENT, I'm interested in utilizing a User-Defined Function (UDF) to access the interfacial area Ai of grid cells. This interfacial area Ai refers to the interfacial area of the mixture per unit volume in a two-phase flow. While examining the header files provided by ANSYS, I have come across two macros that might be capable of accessing Ai. However, I'm uncertain about the meanings of their parameters and haven't been able to find information about them in the user manual. Hence, I'm reaching out to all of you for guidance.

      These two macros are MP_IAD_INDEX(i, j) and C_MP_AREA_DENSITY(c, t, index). The first macro seems to potentially return a parameter 'index' required in the second macro, but I'm unsure about this and I also lack a clear understanding of how these macros are employed. Right now, my goal is to understand the functions of these macros and whether they can truly be employed to access the interfacial area Ai. Additionally, I'm uncertain about the role of parameter 't' and which thread it pertains to (mixture thread, primary phase thread, or secondary phase thread).

      I genuinely appreciate your assistance and response!

    • Rob
      Ansys Employee

      Staff can't comment beyond what's in the manual, but if you read Section 1.3.1 https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v232/en/flu_udf/flu_udf_DEFINEMacros.html%23flu_udf_IncludingUdf_h  and use a bit of lateral thinking you may find more information. As the second macro isn't in the manual I can't say much. 

      As a general comment, c & t typically are cell and thread. Whether you need to define the phase domain will depend on whether the value is kept at the phase level or mixure level: that may be model dependent. 

      • Ding HC
        Subscriber

        Thank u very much!

        So if I want to call the area density of the phase interface in the UDF of the Euler two-fluid framework, is there any other way?
        Because I try to use this macro, but the interface area returned is a fixed constant, probably around 0.006, I don't know what is the reason? I can't determine what level of thread is used by the second macro, just in the multiphase flow system of the Eulerian model, and what is the input of the parameter i? 

        Anyway, I really need a way to get the key information of the interface area density of the phase interface.

        I sincerely hope to get your help, thank you very much!

    • Ding HC
      Subscriber
      The problem has been solved,Thanks!
    • Rob
      Ansys Employee

      Please can you post the solution so others can learn? 

    • Ding HC
      Subscriber

      OK!

      As described in my question, these two macros can effectively obtain the interfacial area density (defined using the algebraic method) in two-phase flow problems. The first macro can determine the indices of the interface between the two phases based on the provided information about the two phases. After supplying these indices to the second macro, the interfacial area density of the grid cell can be obtained. UDF validation has been conducted for several typical algebraic definition models, and the results are as follows:

      It was found that the Particle and Symmetric models in ANSYS FLUENT have a minimum lower limit for interfacial area density, which is 0.006 m^-1. When the mathematical model calculates a result smaller than this value, it can only return 0.0059999..., and it returns a true value only when the calculated result is greater than this value. Furthermore, there is a slight deviation between the interfacial area density calculated by the UDF for the Gradient model and the values extracted by the macros, the reason for which is currently unknown.

      In addition, there is a significant discrepancy between the interfacial area values extracted by the macro and the interfacial area concentration (IAC) model obtained based on the transport equation for the interface. If any of you discover the reasons for the disparity between these two models while using the macro, your guidance would be greatly appreciated. Thank you very much!

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