Scheme file to create tif files for pathline animation

This is a workaround that will allow the animation of pathlines in v6.0.12. However, it may also be useful in later versions of the software as something that can be included in a journal file to generate the tiff files for an animation. The way it works is to generate a hardcopy file for each individual step in a pathline display. The user is responsible for creating an animation file from the hardcopy images written by the scheme file
The scheme
file can be used as follows:
1. Display pathlines from the GUI using the maximum number of steps desired for
the animation
2. Manipulate the image in the GUI window to the view desired for the animation.

3. Do not modify anything in the display window
4. Open the Graphics Hardcopy panel (File > Hardcopy), select "tif" on the
right, select color option and resolution and click "Apply"
5. Load the scheme file through the GUI (File > Read > Scheme)

The text of the scheme file is seen below:

;; 1. Open Graphics Hardcopy panel (File > Hardcopy),
;; select desired settings for tif files and click Apply
;; 2. Display pathlines with maximum desired number of steps
;; from the GUI, along with grid display (if desired).
;; 3. Manipulate view in the display window to the view that is
;; desired for the pathline animation
;; 4. Edit this file to reflect settings desired for pathline display

;; The following values can be changed

;; Number of tif files to create
(define iMax 100)

;; Beginning of the output filename.
(define string6 "pathline-")

;; Command for setting max pathline steps
(define string7 "di/se/pl/max ")

;; Command for pathline display
;; The TUI command should not be changed
;; It is not possible to display pathlines from the TUI
;; in my test case in v6.0.12 if they are to be colored by particle ID
;; This might not be true for all cases.
;; Current maximum value of 1 for time may not be appropriate for all
;; cases. Some trial and error may be necessary to determine an
;; appropriate value. If pathlines are colored by a quantity other than
;; time, trial and error may be necessary to determine appropriate
;; minimum and maximum values

;; TUI command
(define string8 "di/p-l ")
;; color particles by string 8
(define string9 "time ")
;; Surface where pathlines originate
(define string10 "pressure_inlet.4 ")
;; number of surfaces to skip
(define string11 "3 ")
;; minimum value for quantity in string8
(define string12 "0 ")
;; maximum value for quantity in string8
(define string13 "1")
(define PathLineDisplay (string-append string8 string9 string10 string11 string12 string13))

(define string5 ".tif")

;; The do-loop goes from 2 to iMax
;; All the format statements can be commented out if it is not
;; desired to to have the output printed in the Fluent
;; console

(do ((i 1 (+ i 1)))
((= i iMax))
(format "i ~an" i)
(define num (+ i 1))
(format "~an" num)
(define string2 (number->string num))
(define MaxStepCommand (string-append string7 string2))
(ti-menu-load-string MaxStepCommand)
(ti-menu-load-string PathLineDisplay)
(define FileNameHC (string-append string6 string2 string5))
(format "file name ~an" FileNameHC)
(define HardCopyCommand (string-append "di hc " FileNameHC ))
(ti-menu-load-string HardCopyCommand)
(format "n")

Show Form
No comments yet. Be the first to add a comment!