CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   STAR-CCM+ (http://www.cfd-online.com/Forums/star-ccm/)
-   -   User code, How can I get information from last time step (http://www.cfd-online.com/Forums/star-ccm/104961-user-code-how-can-i-get-information-last-time-step.html)

onlyacan July 19, 2012 13:02

User code, How can I get information from last time step
 
I do some User Code in starccm+, f() is a function I want to calculate. its variables(arguments)are all from last time step and include itself. say, f(time step n) = f(var1_n-1, var2_n-1, var3_n-1.f_n-1). n-1 mean these variables are form n-1 time step.

How can I get the some value from last time step and then use them in calculation of the current time step? I tried it, but at every time step, when the user code is executed, the variables in it will be re-initialized, no information from last time step is kept in the memory. anybody have idea? Thanks very much. :)

ryancoe July 24, 2012 13:52

Here's another current thread where we've been discussing this sort of thing: http://www.cfd-online.com/Forums/sta...-function.html


All times are GMT -4. The time now is 11:40.