When we read any mesh file in FLUENT, wall/wall-shadow pairs are created for all the wall zones having cells on both sides. The creation of the wall/wall-shadow pair is dependent on the face normals. Many a times, it happens that, the zone name contains "-shadow", for a zone neighboring a fluid zone. One of the ways to change this is to adjust the face normals in Tgrid before entering/reading the mesh in FLUENT. However, it is not always possible. The following scheme function makes sure that the zone neighbouring the solid zone has "-shadow" in the zone name. The scheme function skips all the wall/wall-shadow pairs that are having same zone type around them. Thus the walls immersed in fluid or solid are skipped and their names are not altered. ;; *****************************scheme function starts********************************* ;; This is a scheme function that renames the wall-wall shadow wall pairs such that, ;; the wall zone neighbouring the solid zone, carries the name "-shadow" ;; Present Logic of the Implementation: ;; (1) The scheme function checks the wall/wall-shadow pairs in the existing case ;; (2) Checks the name of the wall/wall-shadow pair and identifies, whether the ;; wall-shadow zone neighbours the fluid zone or not ;; (3) If it does, then the string "-shadow" is removed from the name of the zone ;; (4) In the same way, if the wall zone (without the shadow in the name) neighbours ;; any fluid zone, then the string "-shadow" is removed from the zone name ;; (5) This scheme will skip all the wall/wall-shadow pairs having same zone (solid or fluid) ;; on either side of the pair. It works only on the wall/wall-shadow pairs ;; that have fluid and solid zones on either side ;; (6) The scheme function assumes that, there are no manual edits done in the ;; zone names before using the scheme function or after reading the mesh/case ;; file in FLUENT ;; (7) It is only tested on serial FLUENT session ;; In such cases the naming pattern changes singnificantly ;; This scheme function needs modification to handle those situations ;; Written by: Aas**** Wa**** (aas****.wa****@ansys.com) ;; ;; ;; How to use? ;; After reading the case file, read this scheme file from File-->Read-->Scheme manu ;; Now on the FLUENT command prompt, issue the following scheme command (including brackets) ;; (rename-shadow-walls-adv) (define (rename-shadow-walls-adv) (define wall-th-ids (list ) ) (set! wall-th-ids (map thread-id (get-threads-of-type 'wall) ) ) (define w-lst-len (length wall-th-ids) ) (define coupled-w-lst '() ) (do ((i 0 (+ i 1)) ) ((> i (- w-lst-len 1))) (if (integer? (list-ref (inquire-adjacent-threads (list-ref wall-th-ids i)) 2) ) (set! coupled-w-lst (list-add coupled-w-lst (list-ref wall-th-ids i)) ) ) ) ;; (define w-c-w-name-lst (list )) (define w-c-w-str-lst (list )) (define c-w-str-len-lst '()) (set! w-c-w-name-lst (map thread-id->name coupled-w-lst)) (define c-w-lst-len (length coupled-w-lst)) (do ((i 0 (+ i 1))) ((> i (- c-w-lst-len 1))) (begin (set! w-c-w-str-lst (list-add w-c-w-str-lst (symbol->string (list-ref w-c-w-name-lst i))) ) (set! c-w-str-len-lst (list-add c-w-str-len-lst (string-length (list-ref w-c-w-str-lst i))) ) ) ) (do ((i 0 (+ i 1))) ((> i (- c-w-lst-len 1))) (begin (if (and (eq? 'fluid (thread-type (get-thread (list-ref (inquire-adjacent-threads (list-ref coupled-w-lst i)) 0))) ) (eq? 'solid (thread-type (get-thread (list-ref (inquire-adjacent-threads (list-ref coupled-w-lst i)) 1))) ) ) (begin (if (and (> (list-ref c-w-str-len-lst i) 7) (equal? "-shadow" (substring (list-ref w-c-w-str-lst i) (- (list-ref c-w-str-len-lst i) 7) (list-ref c-w-str-len-lst i)) ) ) (begin (define s1 (substring (list-ref w-c-w-str-lst i) 0 (- (list-ref c-w-str-len-lst i) 7))) (define sm "/def/bc/mz/zone-name/ ") (define s2 " ") (define smnew (string-append sm (number->string (list-ref coupled-w-lst i)) s2 s1)) (ti-menu-load-string smnew) ) ) ) ) (if (and (eq? 'solid (thread-type (get-thread (list-ref (inquire-adjacent-threads (list-ref coupled-w-lst i)) 0))) ) (eq? 'fluid (thread-type (get-thread (list-ref (inquire-adjacent-threads (list-ref coupled-w-lst i)) 1))) ) ) (begin (if (not (equal? "-shadow" (substring (list-ref w-c-w-str-lst i) (- (list-ref c-w-str-len-lst i) 7) (list-ref c-w-str-len-lst i)) ) ) (begin (define s1 "-shadow") (define s2 " ") (define sm "/def/bc/mz/zone-name/ ") (define smnew (string-append sm (number->string (list-ref coupled-w-lst i)) s2 (list-ref w-c-w-str-lst i) s1)) (ti-menu-load-string smnew) ) ) ) ) ) ) )