UDF for 3d inlet parabolic velocity profile ?
hi every body......
i want to use a udf which gives me parabolic velocity profile at inlet. my case is a pipe flow and i have made a model with its face at X-Z face and its length extends in the + ive y direction. can anybody please help me on this ? |
The UDF manual has a 2D parabolic inlet example. You just need to change that example a little bit.
|
1 Attachment(s)
I try to find in manual, but didnt appear.
How could be when your inlet face is not coincident with the axis? How it works for the case on picture?for example, for and angle of 50º... i want to understand how works the x[ND_ND] vector....or array any help Plz!!! |
Quote:
#include "udf.h" DEFINE_PROFILE(inlet_x_velocity, thread, position) { real x[ND_ND]; /* this will hold the position vector */ real y; face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y = x[1]; F_PROFILE(f, thread, position) = 20. - y*y/(.0745*.0745)*20.; } end_f_loop(f, thread) } For 2D case, the X[ND_ND] has X[0] for axis x and X[1] for axis y. For 3D case, the X[ND_ND] has X[0] for axis x, X[1] for axis y and X[2] for axis z. If your inlet is not coincident with the axis you need to calculate the distance between certain point on the inlet surface and inlet center. |
thank for your reply. So you telling me that we need to know the position point of inlet center?
|
You need coordinate transformation at first then you can process it as the inlet face coincident with the axis.
wiki page for coordinate transformation: http://en.wikipedia.org/wiki/Coordin...dinate_systems |
thank again for your answer.
I already solve the problem. Was a geometric construction of the reactor. But to solve this kind of UDF's we need to rotate the axis and then see see the coordinates. Thank again |
Quote:
Thanks in advance |
If you're in a hurry and you have no experience in UDF, what you should do instead is write a profile for the velocity based on (x,y,z) positions and use that as a boundary condition.
Fluent has a few tutorials explaining how to use profiles. The documentation will also help you. Cheers |
Quote:
|
|
All times are GMT -4. The time now is 23:37. |