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/)
-   -   modelling heat flux in udf (https://www.cfd-online.com/Forums/fluent-udf/82347-modelling-heat-flux-udf.html)

dzuodoka November 24, 2010 05:10

modelling heat flux in udf
 
I have problem with defining moving heat flux in udf. Heat flux is limited by circle and rest of the face transfering heat by convection.

I tried many times to modify this code but I even wasn't able to have stable heat flux circle on a face with desired parameters.

Mesh geometry is a cube.

I'll be really gratefull to anyone who help me with this code.

Code:

#include "udf.h"

DEFINE_PROFILE(laser,thread,i)

{
  real q = 1000;
  real t = CURRENT_TIME;
  real x[ND_ND];
  real qO;
  real xO = 5;
  real xOt;
  real z = 0;   
  real v = 0.003;
  real r = 0.001;
  real alfa = 20;
  real TO = 290;
  real Tp = 280;
  face_t f;
 
  xOt = xO + v*t;
  qO = alfa*(TO-Tp); 


 
 

      begin_f_loop(f,thread)
{
 
      F_CENTROID(x,f,thread);
       
      if ( ((x[0]-xOt)*(x[0]-xOt) + (x[1]-z)*(x[1]-z) ) <= r*r )
   
      F_PROFILE(f,thread,i) = q;

      else 

      F_PROFILE(f,thread,i) = qO;
}
      end_f_loop(f,thread)

}



All times are GMT -4. The time now is 09:59.