CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   transient animation (http://www.cfd-online.com/Forums/fluent/27762-transient-animation.html)

Kai Kang June 28, 2000 10:17

transient animation
 
Hi all, this is a kind of old topic but I am not sure if anybody has a solution:

For a transient simulation which usually has tens of data/case files. Is there any scripting commands for Fluent journal file such that without listing everything, I can just do something like this---

string name //each case like name000i

for i = 1 to Max

string filename = name+i

f rcd filename q

//...do stuff,contour, hardcopy, etc.

hardcopy to filename%t.tif

continue;

Thanks a lot,

Kai


Chris July 3, 2000 10:56

Re: transient animation
 
I sometimes use a function like this:

(transient-do "~/test/xxx0*.cas*" "~/test/xxxhc.jou")

to repeatedly read in case/data files and run
the specified journal file for each of them.
The code for transient-do is appended below.
Note that you could replace the cx-read-journal
line with more ti-menu-load-string lines to
explicitly run more text interface commands.



;;
;; transientdo.scm
;;
;; (transient-do fnpattern journal)
;;
;; Given a filename pattern (using shell wildcards)
;; and a journal file name, iteratively reads in each
;; filename (using read-case-data) and executes the
;; specified journal.
;; Currently only works on unix and processes the
;; files in the order the shell returns them.
;;

(define (transient-do fnpattern journal)
(set! *cx-overwrite-prompt?* #f)
(let loop ((files (file-pattern-exists? fnpattern)))
(if (pair? files)
(begin
(ti-menu-load-string (format #f "rcd ~a" (car files)))
(cx-read-journal journal)
(loop (cdr files))))))


;; Override to get rid of prompts

(define (ok-to-discard-case?) #t)
(define (ok-to-discard-data?) #t)

Volker Pawlik August 10, 2000 10:49

Re: transient animation
 
I used the following way:

1. create a list file of all case or data files by: ls > list.dat (on a UNIX system)

2. then use the "find and change" functionallity of your editor to add the necessary commands before and behind the file name. Just add what you want to add, mark and paste it into the corresponding window (carriage returns included)

3. The only thing you might have to correct by hand is the numbering of the hardcopy files. But there are ways to avoid this (small fortran or c program)


All times are GMT -4. The time now is 22:42.