CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   udf inlet velocity is not set correctly, why ? (http://www.cfd-online.com/Forums/fluent/48524-udf-inlet-velocity-not-set-correctly-why.html)

 GaoGe June 17, 2008 08:33

udf inlet velocity is not set correctly, why ?

Hi,

While i show the inlet velocity in plot window,the figure is strange, in the zone that z<-10, the velocity is not 10,it shows 2,why?

best regards, Bob De Clercq

/************************************************** ****************/ /* velo.c*/ /*UDF for grads wind profile boundary condition Park10Unm_windvelo*/ /************************************************** ****************/ #include "udf.h"

#define Um 10 #define Zm 10 #define Z0 0.025 #define H 5 #define B 0.0706 #define K 0.4 #define Zo2 0.3 #define one 1

DEFINE_PROFILE(Park10Um_windvelo, t, i) { real x[ND_ND], ux , ux2, z ,media ; /* */ real absz ; cell_t c ; ux = K*Um /(log(Zm/Z0)); ux2 =ux/(pow((Z0/Zo2),B)); begin_c_loop(c, t) {

C_CENTROID(x,c,t);

z = x[2];

absz=z+15;

if (absz <= H )

C_PROFILE(c,t,i) =Um;

else

media =(absz-H+Zo2/K)/Zo2;

C_PROFILE(c,t,i) =(one/K)*ux2*log (media); } end_c_loop(f,c) }

this

 All times are GMT -4. The time now is 01:04.