Rename the walls created by grid interfaces while running journal files- FLUENT-6.1.22


When a grid-interface is created, FLUENT creates two new wall zones/surfaces. These are named like wall-<zone id>. If there are many wall zones already existing in the case, identifying the original wall zones and those created due to grid interface generation is very difficult/time consuming. Instead the walls generated due to grid interfaces can be assigned a different name like wall-<name of the grid interface>-zone-id

e.g If grid interface named "inter1" is created and let the wall zones created due to this be wall-18 and wall-19. The new names of these wall zones will be "wall-inter1-18" and "wall-inter1-19".
A scheme file can be used to rename the walls resulted due to creation of a grid interface. Here is the procedure to be followed while using the scheme file.

(1) Save/keep the scheme file in the current working directory.
(2) Open a FLUENT session. Read the case/mesh file.
(3) Create a grid interface.
(4) Read the scheme file.
(5) Repeat steps (3) and (4) till all the grid interfaces are created.

Step (4)-Read scheme file can be performed in the following two ways.
Option-(1) Just add the following line in the journal file after performing step (3),

(load 'rname-ginter.scm)

Option-(2) Use read-macro option to read in the scheme file, as shown below.

/file/read-macro rname-ginter.scm

The scheme file "rname-ginter.scm" is given below:-

;;****************************************************************************

;;SCHEME FILE TO RENAME THE WALL ZONES CREATED WHILE CREATING A GRID-INTERFACE IN FLUENT-6.1.22
;;
;; PURPOSE :- When a grid-interface is created, FLUENT Creates two new wall zones/surfaces. These are named like wall-<zone id>
;; If there are many wall zones already existing in the case, identifying the original wall zones and those created
;; due to grid interface generation is very difficult/time consuming. Instead the walls generated due to
;; grid interfaces can be assigned a different name like wall-<name of the grid interface>-zone-id
;;
;;
;; e.g If grid interface named "inter1" is created and let the wall zones created due to this be wall-18 and wall-19. The new
;; names of these wall zones will be "wall-inter1-18" and "wall-inter1-19".
;;
;;THE PROCEDURE TO USE THE SCHEME FILE IS AS BELOW
;; (1) Read the case/mesh file
;; (2) Create the grid interfaces
;; (3) Read the scheme file --> the wall zones created will be renamed as wall-<name of the grid interface>-zone-id
;; (4) Repeat steps (2) and (3) till all the grid interfaces are created.


(ti-menu-load-string (format #f "/de bc z-n ~a ~a" (cdr (assq 'bnd1-id (car (rpgetvar 'sliding-interfaces)))) (string-append "wall-" (symbol->string (caar (rpgetvar 'sliding-interfaces))) "-" (number->string (cdr (assq 'bnd1-id (car (rpgetvar 'sliding-interfaces))))))))

(format "nwall zone ~a renamed to ~a" (cdr (assq 'bnd1-id (car (rpgetvar 'sliding-interfaces)))) (string-append "wall-" (symbol->string (caar (rpgetvar 'sliding-interfaces))) "-" (number->string (cdr (assq 'bnd1-id (car (rpgetvar 'sliding-interfaces)))))))
(display "n")

(ti-menu-load-string (format #f "/de bc z-n ~a ~a" (cdr (assq 'bnd2-id (car (rpgetvar 'sliding-interfaces)))) (string-append "wall-" (symbol->string (caar (rpgetvar 'sliding-interfaces))) "-" (number->string (cdr (assq 'bnd2-id (car (rpgetvar 'sliding-interfaces))))))))

(format "nwall zone ~a renamed to ~a" (cdr (assq 'bnd2-id (car (rpgetvar 'sliding-interfaces)))) (string-append "wall-" (symbol->string (caar (rpgetvar 'sliding-interfaces))) "-" (number->string (cdr (assq 'bnd2-id (car (rpgetvar 'sliding-interfaces)))))))
(display "n")

;;*****************************************************************************





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