CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > 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 Display Modes
Old   March 17, 2013, 13:09
Default Access variables from previous iteration
  #1
New Member
 
Benjamin
Join Date: Sep 2011
Posts: 10
Rep Power: 5
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, 02:35
Default
  #2
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 541
Rep Power: 12
vasava will become famous soon enough
I think the thread (Previous time step variable to be used in UDF ) has the answer to your problem.
vasava is offline   Reply With Quote

Old   March 19, 2013, 16:15
Default
  #3
New Member
 
Benjamin
Join Date: Sep 2011
Posts: 10
Rep Power: 5
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: 5
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
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 On
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 03: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 23:23.