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

Access variables from previous iteration

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 17, 2013, 12:09
Default Access variables from previous iteration
  #1
New Member
 
Benjamin
Join Date: Sep 2011
Posts: 11
Rep Power: 14
elys is on a distinguished road
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
elys is offline   Reply With Quote

Old   March 18, 2013, 01:35
Default
  #2
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 22
vasava will become famous soon enough
I think the thread (http://www.cfd-online.com/Forums/flu...-used-udf.html ) has the answer to your problem.
vasava is offline   Reply With Quote

Old   March 19, 2013, 15:15
Default
  #3
New Member
 
Benjamin
Join Date: Sep 2011
Posts: 11
Rep Power: 14
elys is on a distinguished road
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
elys is offline   Reply With Quote

Old   September 19, 2014, 01:32
Default
  #4
New Member
 
Jacky
Join Date: Jul 2011
Posts: 24
Rep Power: 14
bharat.cmeri is on a distinguished road
Quote:
Originally Posted by elys View Post
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


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
bharat.cmeri is offline   Reply With Quote

Reply

Tags
iteration, memory, udf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
how to increase "Newton Pressure Iteration Limit" kus CFX 9 April 21, 2013 01:54
Fluent Access Violation error after a specific iteration number willyCEP FLUENT 11 August 29, 2012 12:10
Getting solution values per iteration Joao Bettencourt CFX 3 October 4, 2006 10:24
user SUBROUTINE for additional variables Tuks CFX 0 November 8, 2005 02:09
Creating, loop or iteration using expression edito Jan CFX 3 July 28, 2003 11:01


All times are GMT -4. The time now is 04:32.