CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Importing Multiple Mesh Files Using Scheme (https://www.cfd-online.com/Forums/fluent-udf/231902-importing-multiple-mesh-files-using-scheme.html)

berkozaydin November 23, 2020 04:35

Importing Multiple Mesh Files Using Scheme
 
Hi guys,

I tried to import some mesh files using scheme coding. However, I got this error and this was my thousands of trials :) Here is my code:

file/set-tui-version "20.2"

(define nameVector (vector "dhw_plate2.msh.gz" "dhw_plate1.msh.gz" "dhw_channel.msh.gz" "ch_plate.msh.gz" "ch_channel.msh.gz"))

(do ((x 0 (+ x 1))) ((> x 4))
(begin (define a (vector-ref nameVector x)))
(display a)
(begin (file read-case a)))

And this is my error:

dhw_plate2.msh.gz
Error: eval: unbound variable
Error Object: file

Warning: An error or interrupt occurred while reading the journal file.
Some commands may not have been completed.

So, what can I do to fix this issue? Thanks a lot!

AlexanderZ November 23, 2020 06:43

Code:

(define nameVector (vector "dhw_plate2.msh.gz" "dhw_plate1.msh.gz" "dhw_channel.msh.gz" "ch_plate.msh.gz" "ch_channel.msh.gz"))

(do ((x 0 (+ x 1))) ((> x 4))
(begin
(ti-menu-load-string (format #f "file read-case ~a" (vector-ref nameVector x)))
)



All times are GMT -4. The time now is 01:38.