CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Siemens (https://www.cfd-online.com/Forums/siemens/)
-   -   past itteration register value (https://www.cfd-online.com/Forums/siemens/54439-past-itteration-register-value.html)

cmv March 13, 2005 13:24

past itteration register value
 
Hi it is me again!

This is a programming question, do you know how to define a vector that could give you the value of a variable calculated one iteration before. In posdat.f, this could mean a variable 'A' that gives you the value of variable 'B' calculated on the past level. For example you calculate B as a function of the mass fraction of scalar 1: B=t(ic,2)*alpha, and you would like to know what this value was the last time it was calculated: A=B(past), not this level or itteration the "past one".

Many thanks CM

Richard March 13, 2005 13:52

Re: past itteration register value
 
In each iteration you calculate B and then set A=B. As long as A is either SAVEd or it is in a COMMON block, it will be "remembered" in the next iteration (up until the point when you do A=B anyway).


All times are GMT -4. The time now is 13:48.