UDF for velocity dependant of time
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. |
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) |
if ((the_current_time_time>=0) && (the_current_time<1))
should this not read if ((the_current_time>=0) && (the_current_time<1)) ?? |
velocity inlet udf
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) ... |
All times are GMT -4. The time now is 17:44. |