|
[Sponsors] |
July 14, 2011, 13: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, 04:34 |
|
#2 |
Member
john
Join Date: Nov 2010
Posts: 50
Rep Power: 16 |
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, 11:15 |
|
#3 |
New Member
Join Date: Aug 2011
Posts: 5
Rep Power: 15 |
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, 03:27 |
velocity inlet udf
|
#4 |
Member
|
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) ... |
|
|
|
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 |