# UDF problem

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 21, 2011, 13:40 UDF problem #1 New Member   N/A Join Date: May 2011 Posts: 14 Rep Power: 6 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, 03:28 #2 Member   john Join Date: Nov 2010 Posts: 50 Rep Power: 6 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, 14:05 #3 New Member   N/A Join Date: May 2011 Posts: 14 Rep Power: 6 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, 02:01 #4 Member   john Join Date: Nov 2010 Posts: 50 Rep Power: 6 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, 13:21 Thanks again! #5 New Member   N/A Join Date: May 2011 Posts: 14 Rep Power: 6 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, 02:31 velocity inlet udf #6 Member   Nirav Join Date: Jul 2011 Posts: 42 Rep Power: 6 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, 07:02 #7 Member   john Join Date: Nov 2010 Posts: 50 Rep Power: 6 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, 00:04 #8 Member   Nirav Join Date: Jul 2011 Posts: 42 Rep Power: 6 thanks john i will try that

 August 30, 2011, 07:27 #9 Member   Nirav Join Date: Jul 2011 Posts: 42 Rep Power: 6 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

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Rizwan Fluent UDF and Scheme Programming 32 May 8, 2015 06:05 july Fluent UDF and Scheme Programming 3 June 20, 2010 06:56 mansha goraya FLUENT 0 October 29, 2007 01:31 akr FLUENT 3 August 22, 2007 07:14 chiseung FLUENT 4 January 10, 2002 10:58

All times are GMT -4. The time now is 05:01.