Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.

Ansys Learning Forum Forums Discuss Simulation Preprocessing About the selection of odd and even numbers through *IF and *DO loop Reply To: About the selection of odd and even numbers through *IF and *DO loop

danielshaw
Ansys Employee
There are probably multiple approaches that will work. One approach might be to use the MOD(x,y) function. to find the remainder. Something like:
x1 = mod(ii,2) ! place immediately after *DO command
If ii is an even number; then x1 would be equal to zero
If ii is an odd number, then x1 would be equal to 1
You can then use x1 in the *IF statements
[bingo_chatbox]