CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   udf parabolic velocity profile inlet (https://www.cfd-online.com/Forums/fluent-udf/231609-udf-parabolic-velocity-profile-inlet.html)

Luigi* November 11, 2020 17:13

udf parabolic velocity profile inlet
 
1 Attachment(s)
Hi,
I am trying to write a UDF to give a parabolic velocity profile at the inlet of my domain. I find the following UDF in the fluent's guide:


#include "udf.h"

DEFINE_PROFILE(Inlet_x_velocity, thread, position)
{
real x[ND_ND]; /* this will hold the position vector */
real y, h;
face_t f;

h = 0.00015; /* inlet height in m */

begin_f_loop(f,thread)
{
F_CENTROID(x, f, thread);
y = 2.*(x[1]-0.5*h)/h; /* non-dimensional y coordinate */
F_PROFILE(f, thread, position) = 0.22*(1.0-y*y);
}
end_f_loop(f, thread)
}


I change the value of h with my height of the inlet, but the problem is that my inlet's coordinate along Y axis starts from (x,y) = (0,700um) to (x,y) = (0,850um) , height of inlet = 150 um. How should I modify my UDF in order to apply it to my problem?

Attachment 81024


All times are GMT -4. The time now is 09:36.