Animation of steady state particle tracks (scheme-routine)

Here is a feature to create hardcopies of steady state particle tracks with increasing the path length (maximum number of steps) step by step. The result is a series of images which show a similar 'growth' of particle tracks as is seen when particle tracks are displayed through the GUI or like pathline animations.

The tracking is not time accurate (like pathline animations), but can enhance the visibility of 3-dimensional flow features.

Feel free to give this code to customers.

Feedback will be welcome:
Christian Budde

;;; (c) Fluent Deutschland GmbH
;;; Author: Christian Budde,
;;; Create hardcopies of animated particle tracks
;;; in stationary particle tracking
;;; Useage: (p-anim MAXIMUM_STEPS)
;;; This will create several images with increasing path length
;;; Five variables control the behaviour:

; This is the TUI command to change the maximum number of steps.
; The '~a' will be replaced by variable 'schritt' (see below).
(define p-anim/step-str "/def/mod/dpm/num/tp ~a ,,")

; This is the TUI command to create the plot. The example uses a
; macro, which only pushes the 'Display' button in the particle tracks
; window. Change this according to your needs.
(define p-anim/display-str "push-pt-display-button")

. "(cx-gui-do cx-activate-item "Particle Tracks*PanelButtons*PushButton1(OK)")n")))

; This is the TUI command to create a hardcopy.
; The '~a' will be replaced by variable 'schritt' (see below).
; The example presumes that the hardcopy format has been set to 'tif' already.
; Change this according to your needs.
(define p-anim/hc-str "/dis/hc "p-anim-~a.tif"")

; This is a switch to turn hardcopies on or off
(define p-anim/hc? #f)

; This is the increment of the number of steps (at which display is
; updated or hardcopies are written). In Fluent6.2 it could be useful
; to disable accuracy control for a smooth growth of path length
(define p-anim/step-incr 10)

;;; instead of '(set! VARIABLE VALUE)', you can use following aliases
;;; for interactive (TUI-like) modification of variables.
;;; Type the alias _without_ parentheses:
;;; 'ALIAS VALUE' sets the variable
;;; 'ALIAS' prints the current value and prompts for a new one
(alias 'p-anim-set-display-str
(lambda ()

(alias 'p-anim-set-step-str
(lambda ()

(alias 'p-anim-set-hc-str
(lambda ()

(alias 'p-anim-set-step-incr
(lambda ()

(alias 'p-anim-set-hc
(lambda ()

(define p-anim
(lambda (schritte)
((schritt 1)
(lambda (schritt)
((> schritt schritte) #t)
(ti-menu-load-string (format #f p-anim/step-str schritt))
(ti-menu-load-string p-anim/display-str)
(ti-menu-load-string (format #f p-anim/hc-str schritt))
(p-anim-int (+ schritt p-anim/step-incr)))))))
(p-anim-int schritt))))

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