|
[Sponsors] |
July 21, 2011, 14:40 |
UDF problem
|
#1 |
New Member
N/A
Join Date: May 2011
Posts: 14
Rep Power: 15 |
Hi FLUENT Gurus,
I am trying to create a UDF that changes the velocity magnitude at the inlet only after certain conditions are satisfied. Basically, once the pressure at the inlet has stabilized (during interations; this is a steady-state analysis), the velocity at the inlet needs to be changed so as to deliver a certain value of pumping power, P_predefined = deltaP*A_inlet*V_avg_inlet. So, once the pressure at the inlet seems to have stabilized, the inlet velocity is to be adjusted to V_avg_inlet = P_predefined/(deltaP*A_inlet). The UDF has to continue to adjust the inlet velocity until the predefined value of pumping power is achieved within a certain accuracy. Any suggestions as to how to go about doing this? Thanks. Regards, John |
|
August 12, 2011, 04:28 |
|
#2 |
Member
john
Join Date: Nov 2010
Posts: 50
Rep Power: 16 |
i think you can do it by using DEFINE_ADJUST UDF
or may be you can also use DEFINE_PROFILE. good luck |
|
August 12, 2011, 15:05 |
|
#3 |
New Member
N/A
Join Date: May 2011
Posts: 14
Rep Power: 15 |
Hi John,
Thanks for the reply. I'm currently using "DEFINE_PROFILE" to adjust the inlet velocity and "DEFINE_ADJUST" or "DEFINE_EXECUTE_AT_END" to calculate the area-weighted average of pressure at the inlet. (One of) The later functions feed into DEFINE_PROFILE as input (P_avg) to calculate the new velocity magnitude (average). However, once I have hooked the UDFs to Fluent, I continue to get "Error: divergence detected in AMG solver: x-momentum" even when I drop the momentum URF to 0.01 and change solvers. Any suggestions of how to tackle this issue? Thanks, John |
|
August 13, 2011, 03:01 |
|
#4 |
Member
john
Join Date: Nov 2010
Posts: 50
Rep Power: 16 |
HI,
It is difficult to say what may be the exact problem. But i have few suggestions 1. Check units consistency 2. Print Pressure or velcoity values at the inlet face, check if there are any abnormal values. Good luck |
|
August 13, 2011, 14:21 |
Thanks again!
|
#5 |
New Member
N/A
Join Date: May 2011
Posts: 14
Rep Power: 15 |
Hi John,
Thanks for the input. Now that I think about it, I don't recall having scaled my model to m from mm. Since the UDF manual specifies that all operations are carried out in SI units, I guess that might be my mistake. Anyway, I'll take a crack at it and hope for the best. With regard to your second point, the solution doesn't even get through the first iteration, so I do not have the option of checking values. If you can think of something else that might be causing issues, kindly bring it to my attention. As always, thanks for your input. Regards, John EF |
|
August 29, 2011, 03:31 |
velocity inlet udf
|
#6 |
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 ( code |
|
August 29, 2011, 08:02 |
|
#7 |
Member
john
Join Date: Nov 2010
Posts: 50
Rep Power: 16 |
Hi Nirav,
Fluent manual have velcoity profile example. Please their velcoity function with yours. you can find example here http://my.fit.edu/itresources/manual...udf/node42.htm Good luck |
|
August 30, 2011, 01:04 |
|
#8 |
Member
|
thanks john i will try that
|
|
August 30, 2011, 08:27 |
|
#9 |
Member
|
Hii john i tried that link but didnt really have my kind of problem. i have worked out with 2d udf for parabolic velocity inlet.
please help me how this code will change with 3d. i wanna know how will be the equation considering 3rd dimmension. as in 2d we have V(x)=Vmax- y^2/(disatnce from centre in y direction )^2 * Vmax. please help me. also give suggestion how to work out on sinusoidal inlet udf. thanks in advance |
|
Tags |
inlet velocity, steady state, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 07:05 |
Problem with my udf | july | Fluent UDF and Scheme Programming | 3 | June 20, 2010 07:56 |
UDF problem | mansha goraya | FLUENT | 0 | October 29, 2007 01:31 |
udf compiling problem | akr | FLUENT | 3 | August 22, 2007 08:14 |
UDF problem | chiseung | FLUENT | 4 | January 10, 2002 10:58 |