CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

UDF for velocity dependant of time

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

LinkBack Thread Tools Display Modes
Old   July 14, 2011, 12:32
Default UDF for velocity dependant of time
New Member
Patterson G.
Join Date: Jul 2011
Posts: 2
Rep Power: 0
GOVIP is on a distinguished road
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:

real velocity;
real the_current_time;
face_t f;

the_current_time = CURRENT_TIME;

if ((the_current_time_time>=0) && (the_current_time<1))
if ((the_current_time>=1))


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.
GOVIP is offline   Reply With Quote

Old   August 12, 2011, 03:34
Join Date: Nov 2010
Posts: 50
Rep Power: 9
johnwinter is on a distinguished road
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)
johnwinter is offline   Reply With Quote

Old   August 22, 2011, 10:15
New Member
Join Date: Aug 2011
Posts: 5
Rep Power: 8
Erny is on a distinguished road
if ((the_current_time_time>=0) && (the_current_time<1))

should this not read

if ((the_current_time>=0) && (the_current_time<1)) ??
Erny is offline   Reply With Quote

Old   August 29, 2011, 02:27
Default velocity inlet udf
Join Date: Jul 2011
Posts: 43
Rep Power: 8
niravtm007 is on a distinguished road
Send a message via Skype™ to niravtm007
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) ...
niravtm007 is offline   Reply With Quote


Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Full pipe 3D using icoFoam cyberbrain OpenFOAM 4 March 16, 2011 10:20
UDF extern variable - mean time moment coefficient enry Fluent UDF and Scheme Programming 0 November 14, 2009 07:51
PostChannel maka OpenFOAM Post-Processing 5 July 22, 2009 09:15
UDF for time steps David FLUENT 0 August 14, 2007 11:54
time dependant patching?? Glenn FLUENT 0 November 7, 2002 09:59

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