Use the For Loop for Devices node (

) to evaluate one or several ranges and set a local variable equal to each range’s value while looping over them. When using multiple ranges, all the ranges must have the same length.
To add a For Loop for Devices to a physics feature or physics property node, right-click the node and choose
For Loop for Devices from the
Devices submenu. If added under any of these nodes or a
Component node, the for loop for devices belongs to the device models closest in the hierarchy. For most cases this will be the device model added by the physics interface.
The Settings window has the following section:
Enter the names of the loop variables in the Name column of the table, and enter the corresponding range expression in the
Expression column. The range can either be a range using the range operator or an array variable. As an example, the expression
range(1,2,5) loops over the numbers 1, 3, and 5. For a device parameter A of size 4, the loop will be over values of the parameter’s scalar components. You can also enter a vector-valued expression directly (for example,
{1, 10, 100, 1000}). For multiple loop variables all range expressions must be of the same length. The loop expression must also only depend on device constants or device parameters.