|
[Sponsors] |
How to export iteration steps as well as residual |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 6, 2007, 07:20 |
How to export iteration steps as well as residual
|
#1 |
Guest
Posts: n/a
|
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! |
|
December 6, 2007, 07:22 |
Re: How to export iteration steps as well as resid
|
#2 |
Guest
Posts: n/a
|
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! |
|
December 6, 2007, 07:26 |
Re: How to export iteration steps as well as resid
|
#3 |
Guest
Posts: n/a
|
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! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extrusion with OpenFoam problem No. Iterations 0 | Lord Kelvin | OpenFOAM Running, Solving & CFD | 8 | March 28, 2016 11:08 |
How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 8 | August 27, 2013 15:33 |
Orifice Plate with a fully developed flow - Problems with convergence | jonmec | OpenFOAM Running, Solving & CFD | 3 | July 28, 2011 05:24 |
Differences between serial and parallel runs | carsten | OpenFOAM Bugs | 11 | September 12, 2008 11:16 |
Unknown error | sivakumar | OpenFOAM Pre-Processing | 9 | September 9, 2008 12:53 |