FLUENT - Adding the case file name in the graphics display window

The graphics window normally displays the description of the type of display e.g. Contours of Velocity Magnitude, pressure etc. In addition, you may want to add the case file name. The manual way to do it is to go use the following TUI command:-
/display/set/title "casefilename.cas" OR "casfilename.cas.gz"

Instead of typing the latest case file as shown in the problem discription, it is possible to achieve this by running a journal file. Put the following commands in a text file and save it with extension ".jou". RUN this journal file before displaying any graphics. The name of the latest case file will appear on the graphics window. If you have saved the case file with some other name it is required to run this journal file again.
The contents of the journal file are:-
;;***********start of the journal file***********************************
(string-append (strip-directory (in-package cl-file-package rc-filename)) ".cas" (in-package cl-file-package comp-suffix))
;;*********** end of the journal file ***********************************In resolution-1, one needs to load the scheme file and execute the journal file manually to get the desired name in the graphics window.

One can also get the above effect through .fluent file. This can be achieved by placing the following scheme commands in the .fluent file.

(define (set-title)
(ti-menu-load-string "/display/set/title
(string-append (strip-directory (in-package cl-file-package rc-filename))
".cas" (in-package cl-file-package comp-suffix))"))
(cx-add-dependent 'read-case #f set-title)

What this will do?

Whenever one opens a FLUENT session, the above code will extract the case file name when the case is read in and put that name in the graphics window. This is more automated that the resolution-1.

One limitation, if one reads a mesh file, it will show the file name with .cas extension.

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