CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   heat flux UDF (https://www.cfd-online.com/Forums/fluent-udf/110472-heat-flux-udf.html)

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:
http://www4.0zz0.com/2012/12/11/21/311406276.jpg

ghost82 December 12, 2012 06:48

Code:

#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:
http://www.cfd-online.com/Forums/flu...9-help-me.html

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.

Daniele

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 06:22.