Fluids

Fluids

How to access wall heat transfer coefficient in Fluent UDF.

    • chen04
      Subscriber

      Recently I am trying to code with UDF in Fluent. And I want to access the wall Heat Transfer Coefficient (HTC) in the UDF code after the simulation is finished. However, I cannot find any macros in the help document that can access the HTC. Is there any macros in Fluent UDF that can access HTC?

    • Rob
      Ansys Employee

      Please can you explain what you're trying to do? 

    • chen04
      Subscriber
      Hi Rwoolhou
      I have simulated a uncompressable airflow around an airfoil. I need to access the wall heat transfer coefficient in the DEFINE_ON_DEMAND macro. Is there any macro (for example C_T for temperature) I can use to get it?
    • Rob
      Ansys Employee

      OK, thanks for explaining. Many of the macros are listed in the Customisation (UDF) Manual, so please look there. However, please also read up on the definitions as using the result may not be as you expect.  

    • chen04
      Subscriber
      Thanks for helping. I have already looked carefully in the manual. There is no such macro in it. However, I think the developer of fluent may have coded the macro, as I can find some information about HTC in the mem.h and storage.h file. But the information is not enough. So could you help me to contact the engineer of fluent to see if they can provide more information about macro used to access HTC.
    • Rob
      Ansys Employee

      You'd need to contact support for that via the Customer Portal. Access to that will depend on what software your University has, and even then you may need your supervisor to log the request. 

    • Karthik R
      Administrator

      Hello,


       One way to obtain the HTC is the calculate it and store it in a UDMI. You can do this by


      HTC = (wall temp - wall adj temp) / (-k * dT/dn)


      If I might ask, why are you trying to do with the values of HTC?


      Best,


      Karthik

    • chen04
      Subscriber

      Hi, 


      Thanks for helping. The wall boundary condition I used is adiabatic wall, so I cannot use HTC = (wall temp - wall adj temp) / (-k * dT/dn). I need to get the HTC wihch is calculated based on wall function (see the attached figure).


      I am dealing with the simulation of ice accretion now, in which case there is a thin water film on the solid surface. I assume the HTC between air and water film is equal to that between air and solid wall. And I need to use the HTC between air and water film to calculate the mass of froozen water.


       


    • Karthik R
      Administrator

      Hello,


      Thank you for posting this update. I'll get back to you soon with an update on how you might be able to access this.


      Thank you for your patience.


      Best Regards,


      Karthik

    • Karthik R
      Administrator

      Hello,


      Couple of questions:



      • Which version of Fluent are you using?

      • I was just checking the Fluent users and theory guides for v18.2. Could you please verify and confirm if this is what you want? I am posting screenshots from the Users and Theory guide here.


      From Users Guide:



      From Theory guide:



      Thank you.


      Best Regards,


      Karthik

    • chen04
      Subscriber
      Hi I am using 18.0. The formula you posted is what I want. However, is there any macro I can use to get HTC directly? Thank you.
    • chen04
      Subscriber

      Hi Kremella,


      I have found there are some enum types in the file "threads.h" under the direction ..ANSYS Incv180fluentfluent18.0.0srcstorage, which is the direction of UDF head file. Please see below. And there is FLUX_C_WALL_FUNCT_BASED_HTC, which seems to be used for calculate the HTC. The description says "fill C_TEMP". However, I can not find any description for C_TEMP. Is there any place I can find some instruction about how to use C_TEMP?


      Thank you.


       


      /* flux function "compute" values */


      enum {


        FLUX_C_RESIDUALS, /* residual contributions */


        FLUX_C_INTEGRALS, /* integral contributions */


        FLUX_C_YPLUS, /* y-plus contour values (fill C_TMP) */


        FLUX_C_WALL_SHEAR, /* wall-shear contour values (fill C_TMP) */


        FLUX_C_WALL_SHEAR_MEAN, /* mean wall-shear contour values (fill C_TMP) */


        FLUX_C_WALL_HEAT_TRANSFER,    /* wall heat-transfer coeficient (fill C_TMP) */


        FLUX_C_WALL_HEAT_TRANSFER_MEAN,    /* mean wall heat-transfer coeficient (fill C_TMP) */


        FLUX_C_WALL_FUNCT_BASED_HTC,  /* heat-trans. coef. based on turbulent wall funct(fill C_TMP) */


        FLUX_C_WALL_HEAT_FLUX, /* wall heat-flux (fill C_TMP) */


        FLUX_C_WALL_HEAT_FLUX_MEAN, /* mean wall heat-flux (fill C_TMP) */


        FLUX_C_WALL_NUSSELT_NUMBER,   /* wall Nusselt number= h_eff*L_ref/k_eff (fill C_TMP) */


        FLUX_C_WALL_NUSSELT_NUMBER_MEAN,   /* mean wall Nusselt number= h_eff*L_ref/k_eff (fill C_TMP) */


        FLUX_C_WALL_STANTON_NUMBER,   /* wall Stanton number= h_eff/(rho*U*Cp) (fill C_TMP) */


        FLUX_C_WALL_STANTON_NUMBER_MEAN,   /* mean wall Stanton number= h_eff/(rho*U*Cp) (fill C_TMP) */


        FLUX_C_WALL_SHEAR_X, /* x-wall-shear contour values */


        FLUX_C_WALL_SHEAR_Y, /* x-wall-shear contour values */


        FLUX_C_WALL_SHEAR_Z, /* x-wall-shear contour values */


        FLUX_C_WALL_SHEAR_X_MEAN, /* mean x-wall-shear contour values */


        FLUX_C_WALL_SHEAR_Y_MEAN, /* mean y-wall-shear contour values */


        FLUX_C_WALL_SHEAR_Z_MEAN, /* mean z-wall-shear contour values */


          


        FLUX_C_WALL_TEMP_OUTER_SURF, /* wall-temperature on c0 */


        FLUX_C_WALL_TEMP_INNER_SURF, /* wall-temperature on c1 */


        FLUX_C_WALL_EXT_TEMP_SHELL, /*temperature on external planar wall*/


        FLUX_C_NODES, /* forces accumulated at nodes */


        FLUX_WALL_FACE_FORCE,              /* force accumulation at face */


        FLUX_WALL_NODE_FORCE,              /* average force at node */


        FLUX_JUMP_NODE_FORCE,             /*average force at face node at jump boundary*/


        FLUX_C_WALL_RAD_HEAT_FLUX, /* radiation heat flux */


        FLUX_C_YPLUS_UTAU, /* y-plus contour values */


        FLUX_C_FACE_FLUX,             /* face-flux contributions */


        FLUX_C_FACE_FLUX_MASS_BAL,    /* face-flux contributions and mass balance */


        FLUX_C_WALL_INCIDENT_RADIATION,/* Q_minus in sg_disco */


        FLUX_C_BOUNDARY_VALUES,        /* update b.c. dependent values at boundary */


        FLUX_C_TORQUE,                 /* torque on boundary for swirl cons. in MP */


        FLUX_C_T_ENTHALPY,             /* total enthalpy integration for MP */


          


        SKIN_FRICTION_COEFF,           /* Skin Friction Coefficient */


        SKIN_FRICTION_MEAN_COEFF,      /* Skin Friction Mean Coefficient */


        FORCE_MOMENT_VECTOR,             /* For things related to force monitor only */


       


        FLUX_C_WALL_EVAP_FLUX,       /*  evaporation heat flux in boiling model */ 


        FLUX_C_WALL_THIN_FILM_FLUX,  /*  thin liquid film heat flux            */


        FLUX_C_WALL_QUENCH_FLUX,     /*  quench heat flux in boiling model     */  


        FLUX_C_WALL_LIQUID_FLUX,     /*  liquid phase heat flux                */ 


        FLUX_C_WALL_VAPOR_FLUX       /*  vapor  phase heat flux                */  


      };

    • JohnnyT
      Subscriber

      Hello! I am wondering if you found out how to use the above expressions in a UDF flie ? I need to use FLUX_C_WALL_FUNCT_BASED_HTC  in my UDF and dont know how..


      Can i apply the function FLUX_C_WALL_FUNCT_BASED_HTC on a face thread like FLUX_C_WALL_FUNCT_BASED_HTC (f,t) ?


      Any help would be great.thank you for your time!


      john

    • DrAmine
      Ansys Employee

      This is not documented so do not expect that ANSYS Staff would provide any hints here. But: what is the purpose behind accessing that value?

    • chen04
      Subscriber
      Hi I have not found out how to use the FLX_C_WALL_FUNCT_BASED_HTC. Instead, I calculated the HTC based on the wall function by myself with the formular provided by the help document.

      Regards
      Ningli
Viewing 14 reply threads
  • You must be logged in to reply to this topic.