In CFX, how can I monitor a recursive quantity at a point, such as a running time average of a variable?
Recursion is not premitted in regular expressions, because the expressions are reevaluated at each timestep and not stored.
To get around thie recursion problem, store the expression in an algebraic additional value and monitor the additional variable.
Below are the steps, using time average temperature as an example:
1. Set up the case in CFX- Pre as usual and create an algebraic additional variable called "Tave".
2. Set this variable to T initially
3. Create a monitor point at the x,y,z location where you want to monitor Tave and select the variables T and Tave for monitoring
4. Run the solver for 1 iteration to initialize Tave.
5. Stop the run and set the additional variable to (Tave*(citern-1) + T)/citern. (Tave is the running average of temperature at the beginning of the timestep, and Temperature is new value. The expression calculates a weighted average of Tave old + Tnew to come up with a new Tave)
6. Restart the run from the .res file generated in step 5.
The temperature that is plotted will be a running time or iteration average of T.
A small demo is attached. Restart from _002.res to get the plot of Tave ` or remonitor the run using_005 .res