# UDF for 3-Dimensional geometry

 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 1, 2004, 02:49 UDF for 3-Dimensional geometry #1 vimal Guest   Posts: n/a I want to write a UDF for parabolic velocity proifles for flow in a 3-Dimensional pipe. Can any one suggest me.

 January 2, 2004, 17:26 Re: UDF for 3-Dimensional geometry #2 ap Guest   Posts: n/a It's just the same as in 2D. Write the equation of the paraboloid which represents your profile. Suppose your flow is oriented along the z axiz. Center the inlet with the origin of your reference system. Your profile will assume the simple form: z = a*x^2 + b*y^2 + c Use the macro F_CENTROID to retrieve the cell centroid coordinates, with a line like the following: F_CENTROID(x,f,t); where x is an array of dimension ND_ND, f is the face and t the thread. Then, you can put x = x[0]; y = x[1]; and use F_PROFILE(f, t, i) = a*pow(x,2) + b*pow(y,2) + c; replacing a, b and c with their values. Hi ap

 January 5, 2004, 14:09 Re: UDF for 3-Dimensional geometry #3 co2 Guest   Posts: n/a ap, why do you put Hi at the end of your message?

 January 8, 2004, 11:09 Re: UDF for 3-Dimensional geometry #4 ap Guest   Posts: n/a Just a nice and short way to say "Hello and good work". A smile always helps. Hi ap

 January 8, 2004, 15:50 Re: UDF for 3-Dimensional geometry #5 hatta Guest   Posts: n/a Hi everyone, Suppose i am using the velocity at the inlet of the st. pipe is 0.45 m/s. The ID of the tube is 0.0102 m, by using these values i made a UDF for 3D as #include "udf.h" DEFINE_PROFILE(inlet_x_velocity, thread, position) { real x[ND_ND]; /* this will hold the position vector */ real y,z; face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y = x[0]; z = x[1]; F_PROFILE(f,thread,position)=0.45-y*y/(.0051*.0051)*0.45-z*z/(.0051*.0051)*0.45; } end_f_loop(f, thread) } when is read the velocity at the inlet of the tube it shows 2400 m/s. there is somthing wrong, can you please suggest me what is wrong here.

 January 8, 2004, 19:51 Re: UDF for 3-Dimensional geometry #6 ap Guest   Posts: n/a If your velocity profile is function of y and z coordinates, these two lines are wrong: y = x[0]; z = x[1]; The x vector contains in the order x,y,z coordinates. So: x[0] -> x coordinate x[1] -> y coordinate x[2] -> z coordinate To check the paraboloid equation, just plot it in a softwnare like gnuplot. Hi ap

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post AndresC FLUENT 0 February 25, 2010 16:50 EmersonKB CFX 5 July 2, 2009 08:17 shubham208011 Fluent UDF and Scheme Programming 0 April 6, 2009 15:13 Maziar Mahzari FLUENT 1 November 1, 2005 07:29 adhimac FLUENT 1 March 27, 2001 14:04

All times are GMT -4. The time now is 10:57.