I'm using the ANSYS Fluent program for CFD simulations. This program allows some partial automation of the simulation setup using a so-called Journal File, and I just came to know that this Journal File is written in Scheme. Unfortunately I never even heard of Scheme, I just know it's a Lisp dialect (which I also know nothing of).
I'm trying to automate some boring tasks by using a loop to automatically set a bunch of parameters to my simulation. If I run this command from Fluent's command interface:
(cx-gui-do cx-set-list-selections "Boundary Conditions*Table1*List2(Zone)" '( 4))
it does what's expected (it selects item 4 from a list). However, if I stick that into a loop:
(do ((z 4 (+ z 1))) ((> z 27))
(cx-gui-do cx-set-list-selections "Boundary Conditions*Table1*List2(Zone)" '( z))
)
nothing happens and the program prints a #f
in the command window. Then, if I do:
(define z 4)
(cx-gui-do cx-set-list-selections "Boundary Conditions*Table1*List2(Zone)" '( z))
nothing happens at all.
Why does replacing the number 4
by a variable doesn't work? And why does the loop returns a #f
?