Access variables from previous iteration
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!
I think the thread (http://www.cfd-online.com/Forums/flu...-used-udf.html ) has the answer to your problem.
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 ;)
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
|All times are GMT -4. The time now is 10:49.|