Advertisement
Guest User

Untitled

a guest
Jan 25th, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. /***********************************************************************
  2.  vprofile.c 
  3. UDF for specifying steady-state velocity profile boundary condition
  4.  ************************************************************************/
  5.  
  6.  #include "udf.h"
  7.  
  8.  DEFINE_PROFILE(inlet_x_velocity, thread, position)
  9.  {
  10.  real x[ND_ND]; /* this will hold the position vector */
  11.  real y, h;
  12.  face_t f;
  13.  h = 0.0023; /* inlet height in m */
  14.  begin_f_loop(f,thread)
  15.  {
  16.  F_CENTROID(x, f, thread);
  17.  y = 2.*(x[1]-0.5*h)/h; /* non-dimensional y coordinate */
  18.  F_PROFILE(f, thread, position) = 0.1*(1.0-y*y);
  19.  }
  20.  end_f_loop(f, thread)
  21.  } 
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement