# include "udf.h"
# include "math.h"
real hi=3000; // film coefficient in wetting regime (global variables)
real low=800;
real film=2.57e4; // film boiling heat flux
real leiden=122; // leidenfrost temperature
real wid=2; // temperature slot for smoothing
real x_max=0.04; // location of wetting ending point
DEFINE_PROFILE(lateral,t,i)
{
face_t f;
real T,q,FC[2],h;
begin_f_loop(f,t) // this loop to specify heat flux at boundary
{
T=F_T(f,t);
F_CENTROID(FC,f,t);
h=(hi+low)/2+tanh((FC[0]-x_max)/(0.001))*(low-hi)/2;
q=h*(T-77);
F_PROFILE(f,t,i)=-((q+film)/2+tanh((T-(leiden-0.5*wid))/(wid/6))*(film-q)/2);
评论2