
[Sponsors] 
3D parabolic velocity Inlet  Steady state  UDF Turbulent Flow 

LinkBack  Thread Tools  Search this Thread  Display Modes 
May 12, 2015, 10:29 
3D parabolic velocity Inlet  Steady state  UDF Turbulent Flow

#1 
Member
Mochibaru
Join Date: Jan 2015
Location: Japan
Posts: 41
Rep Power: 11 
Hello Members,Senior Members,And all others who can help me out,
I am currently seeking help for the 3D parabolic velocity Inlet UDF for turbulent flow as i have already seen the Fluent User UDF Manual for my case but there i only found a 2d Case and that was not for turbulent inlet velocity profile? Can any body help me how to fix my problem as i am new User of Fluent and do not know much about UDF and velocity Inlet profiles? Your Helping Hand will be highly appreciated. I only found this code but i am not sure whether this will work for my case or not?My case is the velocity Inlet in Negative direction while pipe inlet is 20 mm above XY plane. Need your Help plzzz.Thanks. #include "udf.h" #define PIPE_DIAMETER 10.e3 // Set here the diameter of your pipe in meters #define AVG_Z_VELOCITY 1. // Set here the average z velocity at inlet in m/s DEFINE_PROFILE(paraboloid_velocity, thread, position) { real x[ND_ND]; real coeff,r,v_max; face_t f; r = PIPE_DIAMETER/2.; //Calculating radius v_max = 2.*AVG_Z_VELOCITY; //Calculating paraboloid vertex z (max velocity) coeff = v_max/pow(r,2.); begin_f_loop(f, thread) { F_CENTROID(x,f,thread); F_PROFILE(f, thread, position) = coeff*(pow(x[0],2.) + pow(x[1],2)) + v_max; } end_f_loop(f, thread) } 

May 18, 2015, 05:17 
Help Required for 3D parabolic Velocity Inlet UDF

#2 
Member
Mochibaru
Join Date: Jan 2015
Location: Japan
Posts: 41
Rep Power: 11 
Hello,
I want to apply a turbulent parabolic velocity inlet for a pipe outlet in 3D which is located 20m above the xy plane along z direction and velocity is in Znegative direction.I am using power Law for turbulent. I have manged a code but it has lots of problem? Can any body can help me to make my code correct i will be really thank ful you guys.I need your helps guys. CODE is: #include "udf.h" #include "math.h" DEFINE_PROFILE(inlet_z_velocity, thread, index) { real xcoord; real ycoord; real zcoord; real a; real n; real Umax; real Umean; face_t f; begin_f_loop(f, thread) /*loops over all faces in the thread passed in the DEFINE macro argument*/ { F_CENTROID(x,f,thread); xcoord=x[0]; ycoord=x[1]; zcoord=x[2];; n = 7; d = 0.001; /* m */ Umean = 15; /* m/s */ Umax = Umean*(((n+1)*(2*n+1))/(2*pow(n,2))); a = pow((pow(y,2)+pow(z,2)),0.5); F_PROFILE(f, thread, index) = Umax*pow(1sqrt(pow(xcoord,2)+pow(ycoord,2))/(d/2),(1/n)); } end_f_loop(f, thread) } Waiting for kind response. 

May 18, 2015, 05:31 

#3 
Member
Join Date: Jul 2013
Posts: 80
Rep Power: 12 
#include "udf.h"
#include "math.h" DEFINE_PROFILE(inlet_z_velocity, thread, index) { real xcoord; real ycoord; real zcoord; real a; real n; real Umax; real Umean; real d; face_t f; real x[ND_ND]; real y, z; begin_f_loop(f, thread) /*loops over all faces in the thread passed in the DEFINE macro argument*/ { F_CENTROID(x,f,thread); xcoord=x[0]; ycoord=x[1]; zcoord=x[2];; n = 7; d = 0.001; /* m */ Umean = 15; /* m/s */ y= ycoord;//¿? I don't know what you mean, could be this? z=zcoord;//¿? Umax = Umean*(((n+1)*(2*n+1))/(2*pow(n,2))); a = pow((pow(y,2)+pow(z,2)),0.5); F_PROFILE(f, thread, index) = Umax*pow((1sqrt(pow(xcoord,2)+pow(ycoord,2))/(d/2)),(1/n));//some extra brackets are ok } end_f_loop(f, thread) } 

May 18, 2015, 05:32 

#4 
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 
What velocity profile are you expecting from your velocity inlet and what velocity profile are you actually applying with this UDF?
upeksa is correct in that you need to declare the variable "x" if you're using this variable with the F_CENTROID macro. 

May 18, 2015, 05:45 

#5 
Member
Mochibaru
Join Date: Jan 2015
Location: Japan
Posts: 41
Rep Power: 11 
Hello upeksa and "e",
Thanks a lot for your quick reply and i am really thankful to you.As i am new and i do not know much about UDF what i want is a parabolic velocity profile for a pipe outlet.That round section of that pipe outlet is 20m above the XY plane and my velocity is in negative z direction.So i need to make changes in this code.I have also find another code which is similar to that but i need to make it according to my case?Can you guys can help me? kindly check this code too: Thank you so much #include "udf.h" #include "math.h" DEFINE_PROFILE(inlet_x_velocity, thread, index) { real x[ND_ND]; /* this will hold the position vector */ real y; real z; real a n; real Umax Umean; face_t f; begin_f_loop(f, thread) /*loops over all faces in the thread passed in the DEFINE macro argument*/ { F_CENTROID(x,f,thread); y =x[1]; z =x[1]; n = 7; d = 10; /* cm */ Umean = 3.1; /* m/s */ Umax = Umean*(((n+1)*(2*n+1))/(2*pow(n,2))); a = pow((pow(y,2)+pow(z,2)),0.5); F_PROFILE(f, thread, index) = Umax*pow(1sqrt(pow(x,2)+pow(z,2))/(d/2),(1/n)); } end_f_loop(f, thread) } 

May 18, 2015, 05:55 
"e"

#6 
Member
Mochibaru
Join Date: Jan 2015
Location: Japan
Posts: 41
Rep Power: 11 
I need a parabolic velocity Inlet at pipe in Negative Z direction.My case is in 3d the main problem is that so i am not getting help from any where although my problem is not that much complex one?


May 18, 2015, 07:14 

#8 
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26 
You already have a code. You don't tell us what is wrong with it, so it is very difficult to help you.
Does your code compile? If not, what are the error messages? If it compiles, did it do what you want it to do? If it did not, what did it do wrong? 

May 18, 2015, 10:08 

#9  
Member
Mochibaru
Join Date: Jan 2015
Location: Japan
Posts: 41
Rep Power: 11 
Quote:
I want velocity Inlet profile in z direction that it. Thanks a lot for coordinating 

May 18, 2015, 10:15 

#10 
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26 
There is no need to go to torrents to download software to compile UDFs...
You can install the Microsoft Software Development Kit for free, without any legal difficulties. 

May 18, 2015, 10:34 

#11  
Member
Mochibaru
Join Date: Jan 2015
Location: Japan
Posts: 41
Rep Power: 11 
Quote:
Thanks once again 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Issues on the simulation of highspeed compressible flow within turbomachinery  dowlee  OpenFOAM Running, Solving & CFD  11  August 6, 2021 06:40 
UDF for 3d inlet parabolic velocity profile ?  shahzeb irfan  Fluent UDF and Scheme Programming  10  March 28, 2016 15:00 
error message  cuteapathy  CFX  14  March 20, 2012 06:45 
UDF problem : inlet velocity in cyl. coord. system  Jongdae Kim  FLUENT  0  June 15, 2004 11:21 
About the difference between steady and unsteady problems  Lisa  Main CFD Forum  11  July 5, 2000 14:37 