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

UDF execution problem

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Philipp_Sch

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 12, 2011, 12:01
Question UDF execution problem
  #1
New Member
 
Ján
Join Date: Mar 2010
Location: Slovakia
Posts: 24
Rep Power: 16
argeus is on a distinguished road
Dear all,
I need your help. I cant find out how FLUENT executes UDFs in .c-file. A .c-file usually consist of a few UDFs marshalled in some logical order. Does FLUENT execute the UDFs in order they have been written?
I used UDF in testing geometry, and it works OK, but when I use it in another geometry (needed for real calculations), there is a problem with order of execution.
All parameters of boundary conditions of testing and real geometry are the same.
Ive made a write-bc file for both cases and the order of cruical UDFs (and boundary conditions as well) was swaped. Ive tried to change them and read bc file back, but finally, the order didnt change.. Am I able to affect it?

Thank you for any suggestion.

Last edited by argeus; April 12, 2011 at 15:33.
argeus is offline   Reply With Quote

Old   April 13, 2011, 08:08
Default
  #2
New Member
 
Join Date: Mar 2011
Posts: 10
Rep Power: 15
dmalcher is on a distinguished road
I've had a similar problem with the order of execution of several UDFs. Apparently, FLUENT does not execute the UDFs in order the have been written.

Perhaps you can solve your problem using the UDF DEFINE_EXECUTE_AT_END. The code or the (void) function within this UDF is executed at the end of every iteration (for a steady solver) or time step (unsteady solver).
However, as far as I experienced you can not execute another UDF (DEFINE_...) within it.

Regards
D
dmalcher is offline   Reply With Quote

Old   April 14, 2011, 04:39
Default
  #3
New Member
 
Ján
Join Date: Mar 2010
Location: Slovakia
Posts: 24
Rep Power: 16
argeus is on a distinguished road
Dmalcher, firstly thank you very much for you reply. Unfortunately, I cant use EXECUTE_AT_END, because my calculation is transient and there is a need to execute all my UDFs for every iteration. Actually, I found out, that order of executing of UDFs depends on order of boundary condition in FLUENT. I can affect the order in GAMBIT by order of specifying boundary types in reversed order (the last specified boundary type takes the first place in the list and so on). Probably there are more possibilities I dont know yet.
argeus is offline   Reply With Quote

Old   April 14, 2011, 11:03
Default
  #4
New Member
 
Philipp Schapotschnikow
Join Date: Oct 2010
Posts: 11
Rep Power: 15
Philipp_Sch is on a distinguished road
The order of execution depends

1) on the UDF type. DEFINE_ADJUST are executed at the beginning of an iteration/time step; EXECUTE_AT_END - at the end of an iteration/time step.

2) on the order in which they are hooked.
AlexanderZ likes this.
Philipp_Sch is offline   Reply With Quote

Old   April 15, 2011, 14:04
Post UDF Manual link
  #5
Member
 
pranab_jha's Avatar
 
Pranab N Jha
Join Date: Nov 2009
Location: Houston, TX
Posts: 86
Rep Power: 16
pranab_jha is on a distinguished road
Quote:
Originally Posted by argeus View Post
Dear all,
I need your help. I cant find out how FLUENT executes UDFs in .c-file. A .c-file usually consist of a few UDFs marshalled in some logical order. Does FLUENT execute the UDFs in order they have been written?
I used UDF in testing geometry, and it works OK, but when I use it in another geometry (needed for real calculations), there is a problem with order of execution.
All parameters of boundary conditions of testing and real geometry are the same.
Ive made a write-bc file for both cases and the order of cruical UDFs (and boundary conditions as well) was swaped. Ive tried to change them and read bc file back, but finally, the order didnt change.. Am I able to affect it?

Thank you for any suggestion.
Hi,
I dont know if you have gone through this before or not. But do take a look at this link from the UDF manual. This should give you a better picture.
pranab_jha is offline   Reply With Quote

Reply


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 06:05
A problem about 'printf' and 'Message' in UDF. LICH Fluent UDF and Scheme Programming 2 May 2, 2013 02:45
what's the problem with my udf zzyan FLUENT 0 November 4, 2010 03:56
Problem with my udf july Fluent UDF and Scheme Programming 3 June 20, 2010 06:56
udf compiling problem akr FLUENT 3 August 22, 2007 07:14


All times are GMT -4. The time now is 09:40.