How do I get the current iteration number as a variable into a junction box routine, which is called after each coefficient loop?



You can get this information from the MMS data structures.
The iteration number is stored in the data area '/FLOW/SOLUTION/AITERN'.
The time step number is stored in the data area '/FLOW/SOLUTION/ATSTEP'.
It is possible that steady state simulations also use ATSTEP to represent the iteration number

For example
INTEGER ATSTEP

CALL PEEKI('/FLOW/SOLUTION/ATSTEP',1, ATSTEP,'STOP',CRESLT, IZ)

If you want to see what data is in /FLOW/SOLUTION, or indeed any other data area, you can push to it and call LISDIR1
For example:

CALL PSHDIR('/FLOW/SOLUTION')
CALL LISDIR1(CZ,DZ,IZ,LZ,RZ)
CALL POPDIR('STOP', CRESLT)

This can be useful if you have created your own data areas and you want to check they have been created properly.

Please be advised that there are other ways to obtain the time step information (see ANSYS Knowledge Base Solution 506699)





Show Form
No comments yet. Be the first to add a comment!