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/)
-   -   problem in udf (https://www.cfd-online.com/Forums/fluent-udf/116135-problem-udf.html)

pratkb April 13, 2013 15:47

problem in udf
 
Can anyone please help me in using udf in ansys?basically i have to give a parabolic velocity inlet in 2-d geometry using udf.

will be waiting..

A CFD free user April 13, 2013 16:08

Hi Pratik
You only need to define your own code by using DEFINE_PROFILE macro and then interpret or compile it. If you only have this simple macro, I suggest you that use interpret option. Afterwards, you should hook it up through Boundary condition/Inlet/ Velocity (x, y direction). Here's the structure of a DEFINE_PROFILE UDF:
DEFINE_PROFILE(your desired name for UDF, t, i)
{
cell_t c;
real x[ND_ND];
define others parameters
real ...
real ...
real ...
begin_c_loop(c,t)
{
C_CENTROID(x,c,t);
F_PROFILE(c,t,i)=......
}
end_c_loop(c,t)
}

Hope it help
Good luck

pratkb April 13, 2013 16:55

Udf
 
Thank you very much.I am also following some of the pdf on udf in net.Being very new to this software and eager to learn it,if you please help me about the steps and processings to carry out my job or attach any file,I will be very grateful to you..

The parabolic inlet eqn is 2(1-r/R)^2...

shuai_manlou April 13, 2013 23:49

You can find the similar example in FLUENT UDF HELP, make some corrections and you can use it in your own case.


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