How to get a value from a data file bound to a variable in Scheme?
I am a student from Germany and have the following problem.
During the simulation Fluent is writing the current of each iteration into a data file "I_anode.out".
I now want the value back into scheme to be able to do some calculations with it and feed Fluent a new mass-flow-rate befor the next iteration step.
I have found a an example how to read values back into scheme by Mirko Javurek and changed it for my purpose.
((p (open-input-file "I_anode.out")))
((x (read p) (read p)))
(or (number? x) (eof-object? x))
(if (number? x) x #f)
The problem is that only the number is shown in the TUI and I do not have a variable to do calculations with. I tried a few ideas myself but was not able to bind the current value to a variable.
I would really appreciate if someone could help me to rewrite the program so I could to do some further calculations.
Thank you for your help!
Thank you very much!
|All times are GMT -4. The time now is 18:11.|