|
[Sponsors] |
April 12, 2011, 13:01 |
UDF execution problem
|
#1 |
New Member
Ján
Join Date: Mar 2010
Location: Slovakia
Posts: 24
Rep Power: 16 |
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 16:33. |
|
April 13, 2011, 09:08 |
|
#2 |
New Member
Join Date: Mar 2011
Posts: 10
Rep Power: 15 |
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 |
|
April 14, 2011, 05:39 |
|
#3 |
New Member
Ján
Join Date: Mar 2010
Location: Slovakia
Posts: 24
Rep Power: 16 |
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.
|
|
April 14, 2011, 12:03 |
|
#4 |
New Member
Philipp Schapotschnikow
Join Date: Oct 2010
Posts: 11
Rep Power: 16 |
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. |
|
April 15, 2011, 15:04 |
UDF Manual link
|
#5 | |
Member
Pranab N Jha
Join Date: Nov 2009
Location: Houston, TX
Posts: 86
Rep Power: 17 |
Quote:
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. |
||
|
|
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 |
A problem about 'printf' and 'Message' in UDF. | LICH | Fluent UDF and Scheme Programming | 2 | May 2, 2013 03:45 |
what's the problem with my udf | zzyan | FLUENT | 0 | November 4, 2010 04:56 |
Problem with my udf | july | Fluent UDF and Scheme Programming | 3 | June 20, 2010 07:56 |
udf compiling problem | akr | FLUENT | 3 | August 22, 2007 08:14 |