CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   Scheme Problem (http://www.cfd-online.com/Forums/fluent-udf/106228-scheme-problem.html)

ottandr August 22, 2012 10:27

Scheme Problem
 
Hello!

I have i little problem which should probably easy to solve but i cant find a solution for it.

What the scheme programm should do is the following:
if the scheme variable "udf/marker_geschlossen" is equal to 0 the case and data should be saved in under the specified name.

here is my code that doesnt work:
(if (= (Rpgetvar 'udf/marker_geschlossen) 0)
(file write-case-data "init_trans_test_anfw_4.cas.gz"))

it gives me the following error:
ERROR: eval: unbound variable
ERROR Object: file

if i let the () away in the second line i get the error that i have to many input arguments.

i hope somebody can help me out here as i guess it's a really simply problem that can be solved for sure. Thx in advance!

Yours,
Andi

karthickeyan October 22, 2012 06:24

need to define variable
 
before using your own variable in scheme function u need to define it in fluent

Quote:

Originally Posted by ottandr (Post 378194)
Hello!

I have i little problem which should probably easy to solve but i cant find a solution for it.

What the scheme programm should do is the following:
if the scheme variable "udf/marker_geschlossen" is equal to 0 the case and data should be saved in under the specified name.

here is my code that doesnt work:
(if (= (Rpgetvar 'udf/marker_geschlossen) 0)
(file write-case-data "init_trans_test_anfw_4.cas.gz"))

it gives me the following error:
ERROR: eval: unbound variable
ERROR Object: file

if i let the () away in the second line i get the error that i have to many input arguments.

i hope somebody can help me out here as i guess it's a really simply problem that can be solved for sure. Thx in advance!

Yours,
Andi



All times are GMT -4. The time now is 06:05.