CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

UDF problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 21, 2011, 14:40
Question UDF problem
  #1
New Member
 
N/A
Join Date: May 2011
Posts: 14
Rep Power: 15
cp_jef is on a distinguished road
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
cp_jef is offline   Reply With Quote

Old   August 12, 2011, 04:28
Default
  #2
Member
 
john
Join Date: Nov 2010
Posts: 50
Rep Power: 16
johnwinter is on a distinguished road
i think you can do it by using DEFINE_ADJUST UDF
or
may be you can also use DEFINE_PROFILE.
good luck
johnwinter is offline   Reply With Quote

Old   August 12, 2011, 15:05
Thumbs up
  #3
New Member
 
N/A
Join Date: May 2011
Posts: 14
Rep Power: 15
cp_jef is on a distinguished road
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
cp_jef is offline   Reply With Quote

Old   August 13, 2011, 03:01
Default
  #4
Member
 
john
Join Date: Nov 2010
Posts: 50
Rep Power: 16
johnwinter is on a distinguished road
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
johnwinter is offline   Reply With Quote

Old   August 13, 2011, 14:21
Thumbs up Thanks again!
  #5
New Member
 
N/A
Join Date: May 2011
Posts: 14
Rep Power: 15
cp_jef is on a distinguished road
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
cp_jef is offline   Reply With Quote

Old   August 29, 2011, 03:31
Default velocity inlet udf
  #6
Member
 
Nirav
Join Date: Jul 2011
Posts: 43
Rep Power: 15
niravtm007 is on a distinguished road
Send a message via Skype™ to niravtm007
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
niravtm007 is offline   Reply With Quote

Old   August 29, 2011, 08:02
Default
  #7
Member
 
john
Join Date: Nov 2010
Posts: 50
Rep Power: 16
johnwinter is on a distinguished road
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
johnwinter is offline   Reply With Quote

Old   August 30, 2011, 01:04
Default
  #8
Member
 
Nirav
Join Date: Jul 2011
Posts: 43
Rep Power: 15
niravtm007 is on a distinguished road
Send a message via Skype™ to niravtm007
thanks john i will try that
niravtm007 is offline   Reply With Quote

Old   August 30, 2011, 08:27
Default
  #9
Member
 
Nirav
Join Date: Jul 2011
Posts: 43
Rep Power: 15
niravtm007 is on a distinguished road
Send a message via Skype™ to niravtm007
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
niravtm007 is offline   Reply With Quote

Reply

Tags
inlet velocity, steady state, udf


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 13:36.