CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

How to export iteration steps as well as residual

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   December 6, 2007, 08:20
Default How to export iteration steps as well as residual
  #1
sophie
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!
  Reply With Quote

Old   December 6, 2007, 08:22
Default Re: How to export iteration steps as well as resid
  #2
sophie
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!

  Reply With Quote

Old   December 6, 2007, 08:26
Default Re: How to export iteration steps as well as resid
  #3
sophie
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!

  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
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
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM 6 April 12, 2011 11: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


All times are GMT -4. The time now is 18:25.