Fluids

Fluids

Topics relate to Fluent, CFX, Turbogrid and more

The UDF of Heat Transfer Coefficient In Two-Fluids Model (Eulerian Model)

TAGGED: 

    • Ding HC
      Subscriber

      Hello everyone, I have a question regarding the usage of a User-Defined Function (UDF) to define the interphase heat transfer coefficient for the Eulerian model (Two-Fluids Model,TFM) within ANSYS FLUENT. I'm wondering whether the UDF should return the heat transfer coefficient 'h' (measured in W/m²K) directly, or if it should return the product of the heat transfer coefficient 'h' and the interface area 'Ai' (measured in 1/m). Additionally, I have a few minor questions to ask:

      1. I've developed a UDF based on the Ranz-Marshall correlation to compute the interphase heat transfer coefficient between the liquid phase and the interface. However, the computed results differ from those obtained using FLUENT's internal Ranz-Marshall correlation. I'm seeking insights into the potential reasons for this disparity.

      2. Concerning the correlation itself, should the 'Pr' value in the correlation refer to the Prandtl number of the gas phase? I came across this information in the FLUENT Theory Guide, but I'm uncertain about its accuracy.

      3. Here is the UDF code I have written:

      include "udf.h"
      DEFINE_EXCHANGE_PROPERTY(htc_1, c, mixthread, pi1, pi2)
      {
          Thread* liqthread, * vapthread;
          real Nu, h, h_eff, Re, Pr, vel,d,k,cp,mu,Ai;
          real NV_VEC(v);
          liqthread = THREAD_SUB_THREAD(mixthread, pi1);
          vapthread = THREAD_SUB_THREAD(mixthread, pi2);
          d = C_PHASE_DIAMETER(c, vapthread);
          k = C_K_L(c, vapthread);
          cp = C_CP(c, vapthread);
          mu = C_MU_L(c, vapthread);
          Pr = (cp * mu) / k;
          NV_DD(v, =, C_U(c, liqthread), C_V(c, liqthread), C_W(c, liqthread), -, C_U(c, vapthread), C_V(c, vapthread), C_W(c, vapthread));
          vel = NV_MAG(v);
          Re = (C_R(c, liqthread) * vel * d) / (C_MU_L(c, liqthread));
          Nu = 2.0 + 0.6 * pow(Re, 0.5) * pow(Pr, 1. / 3.);
          h = C_K_L(c, liqthread) * Nu / d;
          Ai = 6.0 * C_VOF(c, vapthread) / d;
          h_eff = h * Ai;
          return h_eff;
      }

      Thanks!😊

    • Atharva Nagarkar
      Subscriber

      Hello,

      Please refer to the UDF Manual for detailed explanation on the DEFINE_EXCHANGE_PROPERTY macro. I have attached the link below for your reference. Check section 2.4.3 as well as example 3 (section 2.4.3.5) which is related to your topic. As per the manual, the UDF will need to return the real value of the effective heat transfer coefficient to the solver. So, if the quantity being modeled by your UDF depends on the interfacial area, your UDF should return the coefficient multiplied by the interfacial area.

      2.4. Multiphase DEFINE Macros (ansys.com)

      As per the Fluent Theory Guide, for the Ranz-Marshall model, the relative Reynolds number is based on the diameter of one phase which is liquid in your case. The Prandtl number is defined for the other phase which must be gas. Please check the section 14.5.17.1.3 of the Theory guide, the link of which is given below.

      14.5.17. Description of Heat Transfer (ansys.com)

      If you are not able to access the links, please refer to this forum discussion: Using Help with links (ansys.com)

      Thanks!

      • Ding HC
        Subscriber

        Thank you very much!

        Let me confirm once again that the User-Defined Function (UDF) needs to provide the actual volumetric heat transfer coefficient in units of W/m²*K. This coefficient should be calculated using the properties of the gas to define the Prandtl number.

        This information is mentioned in both the theoretical manual and the UDF manual. However, I've noticed a discrepancy between this information and the heat transfer coefficient UDF example provided in the UDF manual. So, I would like to verify this once again for clarity.

        In the example 2.4.3.5 provided in the UDF manual, the returned heat transfer coefficient is multiplied by the interface area density. However, according to the definitions and descriptions given earlier, the expected return value should be the true, unmodified heat transfer coefficient. Does this mean that there is an error in the provided example? Below is a screenshot of the code from the example.

    • Atharva Nagarkar
      Subscriber

      Hello,

      Please check my earlier post for clarification. It says that "The UDF will need to return the real value of the effective heat transfer coefficient to the solver. So, if the quantity being modeled by your UDF depends on the interfacial area, your UDF should return the coefficient multiplied by the interfacial area."

      This is why in the example, the returned value is multiplied by the interface area.

      Thanks!

       

      • Ding HC
        Subscriber

        Thank you for your reply!

        This means that in the UDF definition for the phase interaction of heat transfer coefficient, what I need to return is the effective heat transfer coefficient, which is the product of the volumetric heat transfer coefficient and the interface area. Instead of the Single volumetric heat transfer coefficient introduced and mentioned in the manual earlier, right?

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