How to export iteration steps as well as residual
Hello, everybody!
I want to export iteration steps and residual values in the following format: iter continuity x-velocity y-velocity z-velocity energy 1 ... ... ... ... ... 2 ... ... ... ... ... ... ... ... ... ... ... And below is my .jou file: ; (define (write_residuals) (do ((i 0 (+ i 1))) ((= i (length (solver-residuals)))) (format port "~a ~2t" (cdr (list-ref (solver-residuals) i))) ) (newline port) (ti-menu-load-string "solve/initialize/compute-defaults/pressure-far-field") ) (cx-gui-do cx-activate-item "MenuBar*SolveMenu*Execute Commands...") (cx-gui-do cx-set-integer-entry "Execute Commands*IntegerEntry1 (Defined Commands)" 1) (cx-gui-do cx-activate-item "Execute Commands*IntegerEntry1(Defined Commands)") (cx-gui-do cx-set-toggle-button "Execute Commands*Frame2*Table2*CheckButton6" #f) (cx-gui-do cx-activate-item "Execute Commands*Frame2*Table2*IntegerEntry8") (cx-gui-do cx-set-integer-entry "Execute Commands*Frame2*Table2*IntegerEntry8" 1) (cx-gui-do cx-activate-item "Execute Commands*Frame2*Table2*CheckButton6") (cx-gui-do cx-set-text-entry "Execute Commands*Frame2*Table2*TextEntry10" "(write_residuals)") (cx-gui-do cx-activate-item "Execute Commands*PanelButtons*PushButton1(OK)") (open-output-file "residuals.dat" #f) (define port (open-file "residuals.dat" "a")) (do ((i 0 (+ i 1))) ((= i (length (solver-residuals)))) (format port "~a ~2t" (car (list-ref (solver-residuals) i))) ) (newline port) solve/initialize/compute-defaults/pressure-far-field solve/iterate 4000 ; Now the content of the output "residuals.dat": continuity x-velocity y-velocity z-velocity energy ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... I just want to add iteration number at the first column,can anyone give me some clue? cause I have little idea about the SCHEME language. Thanks a lot! |
Re: How to export iteration steps as well as resid
Hello, everybody!
I want to export iteration steps and residual values in the following format: iter continuity x-velocity y-velocity z-velocity energy 1 ... ... ... ... ... 2 ... ... ... ... ... ... ... ... ... ... ... And below is my .jou file: ; (define (write_residuals) (do ((i 0 (+ i 1))) ((= i (length (solver-residuals)))) (format port "~a ~2t" (cdr (list-ref (solver-residuals) i))) ) (newline port) (ti-menu-load-string "solve/initialize/compute-defaults/pressure-far-field") ) (cx-gui-do cx-activate-item "MenuBar*SolveMenu*Execute Commands...") (cx-gui-do cx-set-integer-entry "Execute Commands*IntegerEntry1 (Defined Commands)" 1) (cx-gui-do cx-activate-item "Execute Commands*IntegerEntry1(Defined Commands)") (cx-gui-do cx-set-toggle-button "Execute Commands*Frame2*Table2*CheckButton6" #f) (cx-gui-do cx-activate-item "Execute Commands*Frame2*Table2*IntegerEntry8") (cx-gui-do cx-set-integer-entry "Execute Commands*Frame2*Table2*IntegerEntry8" 1) (cx-gui-do cx-activate-item "Execute Commands*Frame2*Table2*CheckButton6") (cx-gui-do cx-set-text-entry "Execute Commands*Frame2*Table2*TextEntry10" "(write_residuals)") (cx-gui-do cx-activate-item "Execute Commands*PanelButtons*PushButton1(OK)") (open-output-file "residuals.dat" #f) (define port (open-file "residuals.dat" "a")) (do ((i 0 (+ i 1))) ((= i (length (solver-residuals)))) (format port "~a ~2t" (car (list-ref (solver-residuals) i))) ) (newline port) solve/initialize/compute-defaults/pressure-far-field solve/iterate 4000 ; Now the content of the output "residuals.dat": continuity x-velocity y-velocity z-velocity energy ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... I just want to add iteration number at the first column,can anyone give me some clue? cause I have little idea about the SCHEME language. Thanks a lot! |
Re: How to export iteration steps as well as resid
what's the matter with the format???
Hello, everybody! I want to export iteration steps and residual values in the following format: iter continuity x-velocity y-velocity z-velocity energy 1 ... ... ... ... ... 2 ... ... ... ... ... ... ... ... ... ... ... And below is my .jou file: ; (define (write_residuals) (do ((i 0 (+ i 1))) ((= i (length (solver-residuals)))) (format port "~a ~2t" (cdr (list-ref (solver-residuals) i))) ) (newline port) (ti-menu-load-string "solve/initialize/compute-defaults/pressure-far-field") ) (cx-gui-do cx-activate-item "MenuBar*SolveMenu*Execute Commands...") (cx-gui-do cx-set-integer-entry "Execute Commands*IntegerEntry1 (Defined Commands)" 1) (cx-gui-do cx-activate-item "Execute Commands*IntegerEntry1(Defined Commands)") (cx-gui-do cx-set-toggle-button "Execute Commands*Frame2*Table2*CheckButton6" #f) (cx-gui-do cx-activate-item "Execute Commands*Frame2*Table2*IntegerEntry8") (cx-gui-do cx-set-integer-entry "Execute Commands*Frame2*Table2*IntegerEntry8" 1) (cx-gui-do cx-activate-item "Execute Commands*Frame2*Table2*CheckButton6") (cx-gui-do cx-set-text-entry "Execute Commands*Frame2*Table2*TextEntry10" "(write_residuals)") (cx-gui-do cx-activate-item "Execute Commands*PanelButtons*PushButton1(OK)") (open-output-file "residuals.dat" #f) (define port (open-file "residuals.dat" "a")) (do ((i 0 (+ i 1))) ((= i (length (solver-residuals)))) (format port "~a ~2t" (car (list-ref (solver-residuals) i))) ) (newline port) solve/initialize/compute-defaults/pressure-far-field solve/iterate 4000 ; Now the content of the output "residuals.dat": continuity x-velocity y-velocity z-velocity energy ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... I just want to add iteration number at the first column,can anyone give me some clue? cause I have little idea about the SCHEME language. Thanks a lot! |
All times are GMT -4. The time now is 08:28. |