Fluids

Fluids

How to write udf for temperature dependent viscosity??

    • AmkJU
      Subscriber

       


      I have written a udf for the above equation.


      I am not getting the correct results for the circular channel.


      Please check if udf is correct or not??


       


      #include "udf.h"


      #define mu_ref 0.001005


      #define temp_ref 293


      DEFINE_PROPERTY(viscosity_T,c,t)


      {


      real mu_lam;


      real T = C_T(c,t);


      mu_lam = mu_ref * ( pow((T/temp_ref),8.9) ) * exp( 4700 * ((1/T)-(1/temp_ref)) );


      return mu_lam;


      }


       


      Thank You.


       

    • DrAmine
      Ansys Employee

      Looks Ok.

    • Karthik R
      Administrator

      Hello,


      please share more on what you think are the issues with your results? Are you seeing any compilation errors with your UDF? Also, there is an example UDF in the Fluent customization manual for defining viscosity. I'd encourage you to take a look at that.


      please provide some more information so we can help you better.


      thanks.


      Best,


      Karthik

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