|
[Sponsors] |
September 25, 2017, 06:07 |
UDF velocity profile
|
#1 |
New Member
Join Date: Dec 2015
Location: Japan
Posts: 25
Rep Power: 10 |
Hi all,
I would like to prescribe a uniform velocity of 100m/s at an inlet by using the time argument. But I'm afraid that the way i write the code does not represents what I mean. When I run the code, the velocity at the inlet is less than 100 m/s (around 20-30m/s). But there is no issue with the timing. ************************************************** ******* if ((the_current_time>=0) && (the_current_time<2)) { velocity=100.00; } ************************************************** ******* |
|
September 25, 2017, 08:35 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
You should give your complete code if you want help...
You are using a DEFINE_PROFILE, I guess? Give the complete code for this DEFINE_PROFILE. |
|
September 25, 2017, 08:55 |
|
#3 |
New Member
Join Date: Dec 2015
Location: Japan
Posts: 25
Rep Power: 10 |
DEFINE_PROFILE(velocity_magnitude, t, i)
{ real velocity; real the_current_time; face_t f; the_current_time = CURRENT_TIME; if ((the_current_time>=0) && (the_current_time<2)) { velocity=100.00; } else if ((the_current_time >=2)) { velocity=0.00; } begin_f_loop(f,t) { F_PROFILE(f,t,i) = velocity; } end_f_loop(f,t) } Thank you |
|
September 25, 2017, 11:13 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
It looks to me that you have written a clear code that should do what you said, I can not see any mistake.
I don't understand why it does not work for you. If you don't use a UDF, but fix the velocity in Fluent (so ignoring the time), does it work then? |
|
September 26, 2017, 10:03 |
|
#5 |
New Member
Join Date: Dec 2015
Location: Japan
Posts: 25
Rep Power: 10 |
It works without the UDF.
Red region represents 100m/s. <https://ibb.co/iHAbDk> By the way, I have another question. How can I increase the red region as shown in below image (from literature)? The literature also using the same velocity 100m/s. <https://ibb.co/foWcKQ> |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF - Inlet Velocity Profile (Ansys Fluent) | vinayak4399 | Fluent UDF and Scheme Programming | 3 | August 25, 2020 15:15 |
UDF for 3d velocity inlet profile in channel flow | Thejas4ansys | Fluent UDF and Scheme Programming | 0 | April 1, 2016 16:09 |
Velocity profile UDF | egge24 | Fluent UDF and Scheme Programming | 2 | May 10, 2012 14:03 |
Logarithmic velocity profile | cfdworker | Fluent UDF and Scheme Programming | 0 | April 23, 2009 20:09 |
Multi step transient UDF velocity profile problem | William177 | FLUENT | 1 | February 3, 2008 07:47 |