Users want to obtain graphics in batch mode with color ramp based on local range


Users have reported their desire to produce graphics - contour plots - in batch mode - running Fluent journals -
with color ramp based on the local minimum and maximum of the quantity. While GUI menu allows de-selecting
the global range, TUI menu doesn't currently have this functionality (although a certain range can be imposed
through TUI commands, that is not the local range, but a user imposed min-max).
A Scheme function implementing this feature is listed below. Usage is described in the beginning of the file.
Please make sure that you are copying and paste the exact syntax as below. Scheme commands can
be affected by broken lines resulting from formatted text.

;;; This Scheme function allows the user to
;;; create contour images in the batch mode
;;; with local Range option
;;; Usage:

;;; 1) Load the Scheme function
;;;
;;; File>Read>Scheme ...
;;;
;;; or in text command mode
;;;
;;; (load "locorange.scm")

;;; 2) display the images you want

;;; 3) type

;;; (locorange)

;;; in the console window of Fluent.
;;; The graphic will adjust itself
;;; to the min and max for the surfaces displayed and you will
;;; get a message in the console / transcript file
;;; as well with the min and max for the surface(s)
;;; selected for that quantity.

;;; Do not change below this line without calling for support
;;; =========================================================
(define (locorange)
(let ((min 1e12)(max 1e-12)
(min-max
(cx-surface-get-min-max
(cxgetvar 'render/surfaces *cx-render/name*) #f)))
(set! min (car min-max))
(set! max (cadr min-max))
(cxsetvar 'render/min min)
(cxsetvar 'render/max max)
(re-render-generic)
(format "Local Minim=~a t Local Max=~a n" min max)))





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