|May 22, 2013, 07:20||
How to do a counter to exit loop in scheme language?
Join Date: Aug 2012
Posts: 23Rep Power: 6
Hi all! I need help with this code scheme.
I want that in each iteration, Fluid expected to create a profile (1.prof), and then, when there is this file, read the file 1.prof, and got on a correct boundary condition. After this, another profile is deleted.
At the moment, my code wait 1.prof file creation, and when this file exists, read 1.prof profile and put in the boundary condition I want. However, this process is repeated again and again and never get to clear another profile and continue to the next iteration.
To make the wait for the file to each iteration, I put the file.smc as a command that repeats at each iteration.
Does anyone know how to make a counter waiting for the profile creation 1.prof repeat x times, then leave the "loop"?
Thanks in advance =)
My scheme code is this:
(define nit 1) (let loop () ; to continue, must exist profile 1.prof (if (file-exists? "C:\path\1.prof") (ti-menu-load-string "file read-profile C:\path\1.prof")) ;if file exists --> put the profile in the bc (if (file-exists? "C:\path\1.prof") (ti-menu-load-string "define/boundary-conditions/..."")) ; set profile in bc (if (file-exists? "C:\path\1.prof") (set! nit (+ nit 1))) ; counter (cx-pause 1) (loop)) ;delete other profile (if (file-exists? ""C:\path\5.prof") (system "del C:\path\5.prof")) ;
|Thread||Thread Starter||Forum||Replies||Last Post|
|Problem with Gmsh||nishant_hull||Open Source Meshers: Gmsh, Netgen, CGNS, ...||23||August 5, 2015 02:09|
|my stl surface is seen as just a line||rcastilla||OpenFOAM Meshing & Mesh Conversion||2||January 6, 2010 02:30|
|Scheme lprogramming language question||Hendawi||FLUENT||2||October 3, 2008 03:15|
|NACA0012 geometry/design software needed||Franny||Main CFD Forum||13||July 7, 2007 15:57|
|FLUENT scheme language||Luca||FLUENT||2||October 21, 2004 04:51|