# UDF for velocity dependant of time

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

 July 14, 2011, 12:32 UDF for velocity dependant of time #1 New Member   Patterson G. Join Date: Jul 2011 Posts: 2 Rep Power: 0 Hi, im trying to create a UDF so that the velocity will be dependant of time What i want to do exactly is: At 0 seconds to 1 seconds, the velocity is at 0 m/s and from 1 seconds to time x, the velocity will be at 2 m/s This applies at the inlet, can anybody help me with this? From the searching the forums, i have found an example similar to what i want to do, and i did a little modification to it, here it is: DEFINE_PROFILE(velocity_magnitude,t,i); { real velocity; real the_current_time; face_t f; the_current_time = CURRENT_TIME; if ((the_current_time_time>=0) && (the_current_time<1)) { velocity=0; } if ((the_current_time>=1)) { velocity=2; } begin_f_loop(f,t) { F_PROFILE(f,t,i)=velocity; } end_loop(f,t) } but for some reason when i use interpret , it says parse error at line 5, Can someone please help me with this? thank you in advance for your time.

 August 12, 2011, 03:34 #2 Member   john Join Date: Nov 2010 Posts: 50 Rep Power: 9 i have few suggestions 1.use float/double instead of real 2. try compiling instead intrepret 3.chenge to end_f_loop(f,t) instead end_loop(f,t)

 August 22, 2011, 10:15 #3 New Member   Join Date: Aug 2011 Posts: 5 Rep Power: 8 if ((the_current_time_time>=0) && (the_current_time<1)) should this not read if ((the_current_time>=0) && (the_current_time<1)) ??

 August 29, 2011, 02:27 velocity inlet udf #4 Member   Nirav Join Date: Jul 2011 Posts: 43 Rep Power: 8 hiii friends i am entirely new to using udf's in fluent. I have a cubical geometry, with two inlets on perpendicular adjacent faces. i have to implement udf to only one of the conditions. i have two cases 1) parabolic velocity inlet ( space varient) 2) sinusodial velocity velocity inlet ( time variant) can any one pls send me the udf ( codes) ...

 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 cyberbrain OpenFOAM 4 March 16, 2011 10:20 enry Fluent UDF and Scheme Programming 0 November 14, 2009 07:51 maka OpenFOAM Post-Processing 5 July 22, 2009 09:15 David FLUENT 0 August 14, 2007 11:54 Glenn FLUENT 0 November 7, 2002 09:59

All times are GMT -4. The time now is 17:19.