CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   The Scheme of things... (http://www.cfd-online.com/Forums/fluent/27711-scheme-things.html)

Alfonso Ferrandez June 5, 2000 05:37

The Scheme of things...
 
Dear all,

this is a question for the Scheme guru's out there. I'm trying to export a really long sequence of frames from Fluent to Ensight. I've written a journal file with what I want to do:

(cx-gui-do cx-activate-item "MenuBar*ReadSubMenu*Data...")

;PATHNAME /export/home/mensgi5_a/menafe/Fluent/CoW/newgeom/NoLACA

(cx-gui-do cx-set-text-entry "Select File*FilterText" "*.dat*") (cx-gui-do cx-activate-item "Select File*Apply")

(cx-gui-do cx-set-text-entry "Select File*Text" "results/CoW0001.dat")

(cx-gui-do cx-activate-item "Select File*OK")

(cx-gui-do cx-activate-item "Export*PanelButtons*PushButton1(OK)")

;PATHNAME /export/home/mensgi5_a/menafe/Fluent/CoW/newgeom/NoLACA

(cx-gui-do cx-set-text-entry "Select File*FilterText" "*")

(cx-gui-do cx-activate-item "Select File*Apply")

(cx-gui-do cx-set-text-entry "Select File*Text" "ensight/CoW%t")

(cx-gui-do cx-activate-item "Select File*OK")

The problem is that there are 400 time steps in this simulation and I don't think copying and pasting 400 times is my idea of fun. So I was wondering whether there is a way of converting this into a loop. I know nothing about scheme except for what the Journal facility in Fluent writes for me.

Any charitative soul out there that could point me to the loop structure in scheme?

Thank you all! AL

Chris June 5, 2000 17:19

Re: The Scheme of things...
 
Al, you can use a "do" loop, try this:

;; Loop 400 times (i goes from from 0 to 399)

;; Replace (display i) and (newline) lines with your code

(do ((i 0 (+ i 1)))

((= i 400) (display "Done.\n"))

(display i) ;; Your code here...

(newline) ;; Your code here...

) ;; End do

Alfonso Ferrandez June 6, 2000 03:55

Re: The Scheme of things...
 
Cheers Chris!

I'll get right on it :)


All times are GMT -4. The time now is 08:00.