CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   heat flux UDF (

lopital03000 December 11, 2012 17:34

heat flux UDF

pleas help me i want UDF of heat flux, Q=f(z)=1-(z/0.002)*(z/0.002)
exemple in the link:

ghost82 December 12, 2012 06:48


#include "udf.h"
/* profile for heat flux*/
DEFINE_PROFILE(heatflux_profile, t, i)

  real x[ND_ND];  /* this will hold the position vector */
  face_t f;
  begin_f_loop(f, t)
    F_CENTROID(x, f,t);
    F_PROFILE(f, t, i) =1.-(x[2]/0.002)*(x[2]/0.002);
  end_f_loop(f, t)

You could easily change this code:

If needed edit the formula or translate your geometry to have the base aligned with z=0 (from the picture I see your geometry is centered in Z);
also take care if you need positive or negative Q and if needed change the formula.


lopital03000 December 12, 2012 12:52

Thank you very much my brother, can you give me your email address to communicate

ghost82 December 13, 2012 10:47

post your questions here, so also somebody else can help you.

All times are GMT -4. The time now is 07:53.