|
|

楼主 |
发表于 2010-5-28 20:40:33
|
显示全部楼层
从fluent scheme 脚本语言中查到了程序,但是不太会用,请高手指点
Scheme program:
(let
(
(p (open-output-file "fluxes.txt")) ;; open output text file
(n 0)
(surfaces !(
stahl-bodenplatte
stahl-kokille
stahl-schlacke
haube-schlacke
elektrode-schlacke
schlacke-innen
schlacke-aussen
aufsatz-schlacke
haube-kuehlung
))
)
(For-each
(lambda (filename)
(if (zero? (Modulo n 2));; only take every second datafile
(begin
(ti-menu-load-string
(format # f "file read-data ~ a" filename))
(ti-menu-load-string "file / start-transcript temp.trn")
(ti-menu-load-string "report / heat-transfer")
(ti-menu-load-string "file / stop-transcript" )
(define data ;; transcriptfile in "data" download
(let ((p (open-input-file "temp.trn")))
(let f ((x (read p)))
(if (eof-object? x)
(begin
(close-input-port p)
'())
(cons x (f (read p)))
)
)
)
)
(ti-menu-load-string "! temp.trn rm")
(display (time) p)
(display " " p)
(for-each
(lambda (zone)
(begin
(display (list-ref (member (list zone) data) 2) p) ;; fluxwert area identified by (display "" p)
)
)
surfaces
) |
|