CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

UDF for velocity dependant of time

Register Blogs Community New Posts Updated Threads Search

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

Old   August 12, 2011, 04:34
Default
  #2
Member
 
john
Join Date: Nov 2010
Posts: 50
Rep Power: 16
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, 11:15
Default
  #3
New Member
 
Join Date: Aug 2011
Posts: 5
Rep Power: 15
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, 03:27
Default velocity inlet udf
  #4
Member
 
Nirav
Join Date: Jul 2011
Posts: 43
Rep Power: 15
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

Reply


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 Off
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 10:15
UDF for time steps David FLUENT 0 August 14, 2007 12:54
time dependant patching?? Glenn FLUENT 0 November 7, 2002 09:59


All times are GMT -4. The time now is 21:30.