CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   velocity inlet using udf (http://www.cfd-online.com/Forums/fluent-udf/101506-velocity-inlet-using-udf.html)

hillator May 5, 2012 12:22

velocity inlet using udf
 
i have an velocity inlet profile u(y)
but this profile isn't Analytical (i have an array u) how can I put it as a udf function?
the final result should be a u(y)u(t) so i can't use the regular profile at (define-> profiles)
thanks for the help

Patrick1 May 10, 2012 00:37

Quote:

Originally Posted by hillator (Post 359489)
i have an velocity inlet profile u(y)
but this profile isn't Analytical (i have an array u) how can I put it as a udf function?
the final result should be a u(y)u(t) so i can't use the regular profile at (define-> profiles)
thanks for the help

You can use a UDF with lots of IF statements. For example, if you have 4 mesh points in your inlet face at y=0,1,2,3 the UDF will be:

if y<3 then;
velocity=ArrayU(1)
if y<2 then;
velocity=ArrayU(2)
if y<1 then;
velocity=ArrayU(3)
if y<0 then;
velocity=ArrayU(4)

Obviously making this kind of UDF is best suited to a computer program if you have many mesh points, so you need to write a computer program to write your UDF for you :)

I think Fluent will interpolate the velocity profile if you don't have data for each meshpoint.


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