CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Drawing a velocity profile as inlet boundary condition in Fluent ANSYS ???? (https://www.cfd-online.com/Forums/fluent/148707-drawing-velocity-profile-inlet-boundary-condition-fluent-ansys.html)

hasanifte February 17, 2015 23:51

Drawing a velocity profile as inlet boundary condition in Fluent ANSYS ????
 
I have a velocity profile equation which I want to give as inlet boundary condition in ANSYS Fluent. How this is possible.??? :confused: Please guide me step wise. Comments are really appreciated :)

maverick123 February 18, 2015 02:11

Hi..
You have to use UDF for defining velocity profile at inlet.

Code:

/**********************************************************************    udfexample.c                                                              UDF for specifying a steady-state velocity profile boundary  condition    **********************************************************************/  #include "udf.h"  /* must be at the beginning of every UDF you write */
  DEFINE_PROFILE(x_velocity,thread,index) { 
real x[ND_ND];        /*  this will hold the position vector */
  real y;
  face_t f;   
begin_f_loop(f,thread)  /* loops over all faces in the thread passed                                in the DEFINE macro argument  */
    {        F_CENTROID(x,f,thread);      y = x[1];      F_PROFILE(f,thread,index)  = 20. - y*y/(.0745*.0745)*20.;    }  end_f_loop(f,thread) }



You may refer
http://aerojet.engr.ucdavis.edu/flue...df/node224.htm

hasanifte February 18, 2015 12:44

Thank you Maverick.. your post is very helpful. I will try doing that


All times are GMT -4. The time now is 21:53.