Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

journal file | cx-gui-do | element i from a list

    • Andreas Schaufler
      Subscriber
      Hello,

      ; define iterations
          (define iterations 10)
       
      ; Start the loop
           (do ((i 1 (+ i 1))) ((> i iterations)) ; 
                (cx-gui-do cx-set-real-entry-list "Iso-Surface*Table1*Table1*RealEntry6(Iso-Values)" '( 2e-07))
                (ti-menu-load-string (format #f "display save-picture \"./00_plot/pic~a.png\" " i)) ;
      )

      can you please tell me, how is it possible to get the element (2e-07) in the cx-gui-do from a list like:
      (define list '(1 2 3))
       
      normally i can refer to the list with:
      (list-ref list 0)

      But how is it possible to get this in 
       (cx-gui-do cx-set-real-entry-list "Iso-Surface*Table1*Table1*RealEntry6(Iso-Values)" '( (list-ref list 0)))... which doesnt work

      Thanks and Regarsd

    • Andreas Schaufler
      Subscriber

      Solved it with the TUI-Command and the List in a do-Loop

      (define list '(1e-07 3e-07 5e-07 7e-07 9e-07 1e-6 3e-6 5e-6))
      (define iterations (length list)-1)
       
      ; Starten Sie die Schleife
      (do ((i 0 (+ i 1))) ((>= i iterations)) ; i ist der Zähler, der von 1 bis iterations hochgezählt wird  
      ;Change the isosurfaces
      (ti-menu-load-string (format #f "/surface/edit-surface mole-fraction-of-zn-89 molef-zing_g , () , () ~a" (list-ref list i) ())) ;
      )



Viewing 1 reply thread
  • The topic ‘journal file | cx-gui-do | element i from a list’ is closed to new replies.