CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLOW-3D (
-   -   how to write an UDF programming in 3D (

coolyihao March 16, 2009 09:15

how to write an UDF programming in 3D
i have a 3D domain as a seawater and a turbine locate inside the seawater.. I had set the inlet as velocity inlet in Gambit..And now come into Fluent, i have to use a UDF programming to set a parabolic flow veloctiy inlet and difference pressure at the inlet.. cuz when the increasing the depth(h) , pressure will increse as well.. But i dont know how to write a programme about this 3D domain... Anyone can help? thanks

milton.tafadzwa March 16, 2009 09:59

You can try this maybe it will work.
#include "udf.h"
Define all your constants here.
DEFINE_PROFILE(inlet_velocity, thread, index)
real x[ND_ND];
real y, z;
face_t f;
begin_f_loop(f, thread)
y =? ; write value of z and y at your entrance.
F_PROFILE(f, thread, index) = write your parabolic equation here;
end_f_loop(f, thread)

All times are GMT -4. The time now is 05:40.