# UDF

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

 December 6, 2007, 04:00 UDF #1 James Guest   Posts: n/a Hi, I am having problem with UDF.I am doing a simulation of moving bodies.I need help for that.Can anybody help me to programme UDF.I know nothing is free in this world.I am willing to pay for the help.

 December 6, 2007, 12:22 Re: UDF #2 SMF_MS Guest   Posts: n/a Compile Define Zones Here an UDF example: #include #include #include "udf.h" # define UDF_FILENAME "udf_velocity" DEFINE_CG_MOTION(disk, dt, cg_vel, cg_omega, time, dtime) { real velo,a,b,f,x,s1,t1,t2; /* reset velocities */ NV_S (cg_vel, =, 0.0); NV_S (cg_omega, =, 0.0); /* motion */ a = 0.25; /* amplitude */ f = 0.1; /* frequency */ b = 2.0 * 3.1416 * f; /* angular frequency */ s1 = 0.4; /* distance */ t1 = s1 / (a * b); /* time */ if(time < t1) /* process */ { x = s1 * time / t1; velo = a * b; } else /* sine motion */ { t2 = time - t1; x = a * sin(b * t2) + s1; velo = a * b * cos(b * t2); } /* set x-component of velocity */ cg_vel[0] = velo; /*Message ("\nUDF disk: dt = %f, cg_vel = %f, cg_omega = %f, time = %f, dtime = %f, dt0 = %f, dt1= %f\n", dt, cg_vel[0], cg_omega[0], time, dtime, dt[0], dt[1]);*/ /*Message ("\n\nUDF disk: dt = %f", dt);*/ Message (" cg_vel = %f", cg_vel[0]); /* C.G. linear velocity */ Message (" cg_omega = %f", cg_omega[0]); /* C.G. angular velocity */ Message (" time = %f", time); /* total time */ Message (" dtime = %f", dtime); /* time step size */ Message (" x = %f\n", x); /* x motion */

 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 Qureshi FLUENT 7 March 23, 2017 08:37 shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14 kim FLUENT 3 October 26, 2011 21:38 Luc SEMINEL FLUENT 0 November 25, 2002 05:03 Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01

All times are GMT -4. The time now is 04:37.