/**************************************************************/
/*                                                            */
/* User-Defined Functions for sinusoidal temperature profile  */
/* FLUENT 5 version                                           */
/*                                                            */
/* Author: Frank Kelecy                                       */
/*   Date: January 1998                                       */
/*                                                            */
/**************************************************************/

#include "udf.h"
#define PI 3.141592654

DEFINE_PROFILE(temperature_profile, thread, position) 
{
   real r[3]; /* this will hold the position vector */
   real x;
   face_t f;

   begin_f_loop(f, thread)
   {
     F_CENTROID(r,f,thread);
     x = r[0];
     F_PROFILE(f, thread, position) = 300.+100.*sin(PI*x/0.005);
   }
   end_f_loop(f, thread)
}
