Studies and Solvers > Solution Utility Nodes > For and End For

For and End For
From the Programming submenu for solver sequences, you can select For to add two nodes to the end of the sequence, a For node () and an End For node (). You can then move these node where you want to create a for loop that iterates some part of the solver sequence. When the sequence is run, the for loop runs the node in between the For and End For nodes a fixed number of steps. You can add more than one For node to create nested for loops. The model tree displays the loop structure by indenting the description text for the nodes. The for loops must be balanced; otherwise an error occurs. For loops can be useful, for example, for solving particle-field interactions in particle tracing by iterating between a stationary and a time-dependent solver.
The End For node has no settings. The Settings window for the For node contains the following setting:
General
Use the Number of iterations text field to specify how many times to run the solver nodes between the For node and the enclosing End For node (default value: 5). Any nonnegative integer is supported (including zero).