CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   Udf for a fully developed velocity profile atinlet (http://www.cfd-online.com/Forums/fluent-udf/40982-udf-fully-developed-velocity-profile-atinlet.html)

 philip meppen May 15, 2006 13:55

Udf for a fully developed velocity profile atinlet

I need to specify a boundary condition at the inlet region of a square duct. At the inlet i want to specify a fully developed velocity profile. I know i need to use a UDF. The fluent manual gives examples of a fully developed velocity profile at the inlet for a 2d example but not 3d. Has anybody ever done this. would you be willing to send me your c code if you have?

 houston May 16, 2006 04:10

Re: Udf for a fully developed velocity profile ati

Hi, meppen, I have met a question, it seems that you could help me.I don't know where can I find an example of a fully developed velocity profile at the inlet for a 2d example using UDF.Thanks in advance. sincerely, houston

 Colin May 26, 2006 14:06

Re: Udf for a fully developed velocity profile ati

Philip,

http://www.cfd-online.com/Search/cgi...cfd-online.com%2FForum%2Ffluent;exclude=;config=htdig;method=and ;sort=score;words=velocity%20profile;page=1

and then read the post titled as:

Re: problem in 3d parabolic velocity profile****

You will get some ideas about the C code for 3D.

By the way, could you send me the c code for 2D fully developed velocity profile?

 AYOUB November 7, 2012 05:47

Re: Udf for a fully developed velocity profile ati

Quote:
 Originally Posted by philip meppen ;132225 I need to specify a boundary condition at the inlet region of a square duct. At the inlet i want to specify a fully developed velocity profile. I know i need to use a UDF. The fluent manual gives examples of a fully developed velocity profile at the inlet for a 2d example but not 3d. Has anybody ever done this. would you be willing to send me your c code if you have?
Hi, I need the UDF for 2D. would you pleas give me?

 vicarious November 7, 2012 07:33

Example of a parabolic velocity profile in 2D:
************************************
#include "udf.h"
{
real x[ND_ND];
real y;
face_t f;
{
y = x[1];
}
}
*********************************************
Ref. : FLUENT UDF manual.

 AYOUB November 7, 2012 10:49

thernall fully developed

thank you, but is it suitable to reach thermal fully developed?if not what is your suggestion?

 vicarious November 7, 2012 15:30

Quote:
 Originally Posted by AYOUB (Post 390812) thank you, but is it suitable to reach thermal fully developed?if not what is your suggestion?
I'm not exactly sure about the thermal boundary layer, but since the parabolic profile is suitable for the laminar flow boundary layer (for Re lower than 1000), I suppose it is correct to use it in a numerical procedure.

 CaptainCombo October 8, 2015 09:52

Quote:
 Originally Posted by vicarious (Post 390775) Example of a parabolic velocity profile in 2D: ************************************ #include "udf.h" DEFINE_PROFILE(x_velocity,thread,index) { real x[ND_ND]; real y; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); y = x[1]; F_PROFILE(f,thread,index) = y; } end_f_loop(f,thread) } ********************************************* Ref. : FLUENT UDF manual.
I build this code and loaded it then I initialized this profile for inlet velocity but when I plot it by using Solution XY Plot(before solving, just initialization) I get uniform velocity profile. Velocity values don't change along y axis. What is the problem?

Here are values;
Quote:
 (title "X Velocity") (labels "Position" "X Velocity") ((xy/key/label "inlet") 5.73798 0 4.78165 2.86899 3.82532 2.86899 2.86899 2.86899 1.91266 2.86899 0.95633 2.86899 0 0 )

 `e` October 8, 2015 15:17

Quote:
 Originally Posted by CaptainCombo (Post 567164) I build this code and loaded it then I initialized this profile for inlet velocity but when I plot it by using Solution XY Plot(before solving, just initialization) I get uniform velocity profile. Velocity values don't change along y axis. What is the problem? Here are values;
Try solving at least one iteration and then checking the inlet velocity profile. If 2.86899 m/s is your average inlet velocity (and the previous step worked) then perhaps the Fluent initialisation applies this value, and then the profile is called at the start of each iteration.

 CaptainCombo October 12, 2015 04:17

Results after one iteration;

(title "Velocity Magnitude")
(labels "Position" "Velocity Magnitude")

((xy/key/label "inlet")
5.73798 0
4.78165 4.78165
3.82532 3.82532
2.86899 2.86899
1.91266 1.91266
0.95633 0.95633
0 0
)

It requires at least one iteration to update.

 abdi mohamed1 November 3, 2015 16:56

udf

I*need UDF velocity profile fully developed turbulent flow for cylinder 3d please.

 All times are GMT -4. The time now is 20:00.