|
[Sponsors] |
March 17, 2013, 13:09 |
Access variables from previous iteration
|
#1 |
New Member
Benjamin
Join Date: Sep 2011
Posts: 11
Rep Power: 15 |
Hello everybody,
I have read through various postings and did some "googling", however I couldn't find a satisfying solution for my problem. Lets say I have defined some local variables in my UDF computing some coefficients and the UDF is working well so far. Now, I want to extend the UDF having some additional functionality. In order to do so, it is necessary to access these coefficients from a previous iteration. What do I have to do to get access to these kind of data? The only thing I can think about is to allocate user defined memory, but this would also mean, that the memory is allocated for every cell, right? Is there another way for accessing or storing data which is not bounded to a cell, face or node? Thanks so much in advance! Ben |
|
March 18, 2013, 02:35 |
|
#2 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23 |
I think the thread (http://www.cfd-online.com/Forums/flu...-used-udf.html ) has the answer to your problem.
|
|
March 19, 2013, 16:15 |
|
#3 |
New Member
Benjamin
Join Date: Sep 2011
Posts: 11
Rep Power: 15 |
Thanks for the hint, but I think this is not the solution for my problem. If I understood correctly a UDM allocates a datatype for each cell, which is not what I want and would waste a lot of memory.
However, I think the solution is to declare either variables as static to get access to the content in the next iteration or use the rpc_setvar procedure from the scheme environment. Of course the UDM approach will work as well (I do use it right now, because I couldnt try the other ways yet), but for the 10 values or so I need from the previous iteration the UDM method is far to overheaded. Thanks again and maybe somebody has another idea or points me into the right direction Cheers, Ben |
|
September 19, 2014, 02:32 |
|
#4 | |
New Member
Jacky
Join Date: Jul 2011
Posts: 24
Rep Power: 15 |
Quote:
Hi Ben, Can you tell me how you use UDM variables for accessing previous iteration value ? Please post your code. Also did you got any other means of accessing previous iteration value in FLUENT ? Thanks & Regards Bharat |
||
Tags |
iteration, memory, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to increase "Newton Pressure Iteration Limit" | kus | CFX | 9 | April 21, 2013 02:54 |
Fluent Access Violation error after a specific iteration number | willyCEP | FLUENT | 11 | August 29, 2012 13:10 |
Getting solution values per iteration | Joao Bettencourt | CFX | 3 | October 4, 2006 11:24 |
user SUBROUTINE for additional variables | Tuks | CFX | 0 | November 8, 2005 03:09 |
Creating, loop or iteration using expression edito | Jan | CFX | 3 | July 28, 2003 12:01 |