CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   residual storage in FLUENT (http://www.cfd-online.com/Forums/fluent/46096-residual-storage-fluent.html)

sophie September 20, 2007 21:45

residual storage in FLUENT
 
residual storage in FLUENT?

i can't find residual values in my dat files,what's wrong???

can anyone tell me why?

thanks a lot!

Joe September 21, 2007 05:08

Re: residual storage in FLUENT
 
you need to tell fluent to store the residuals in the dat file.

sophie September 21, 2007 05:11

Re: residual storage in FLUENT
 
how to tell fluent to store the residuals in the dat file?

i'm not so familar with the TUI,can you tell me?


mAx September 21, 2007 06:08

Re: residual storage in FLUENT
 
The following steps can be used to write the solution residuals to a text file.

1. Read the case/data files in FLUENT.

2. Read the Scheme file (init.scm) using the File-->Read-->Scheme command. The content of the Scheme file should be as follows (please copy the content between the dashed line into a text file and save it as 'init.scm'):

-------------------------------------------------------------- (define port) (set! port (open-output-file "residuals.dat"))

(do ((i 0 (+ i 1))) ((= i (length (solver-residuals)))) (format port "~a ~2t" (car (list-ref (solver-residuals) i))) ) (newline port) ---------------------------------------------------------------

3. Set the following execute command at every iteration using Solve --> Execute Commands:

file read-journal residual.jou

The content of the journal file (residual.jou) should be as follows (please copy the content between the dashed line into a text file and save it as 'residual.jou'):

--------------------------------------------------------------- (do ((i 0 (+ i 1))) ((= i (length (solver-residuals)))) (format port "~a ~2t" (cdr (list-ref (solver-residuals) i))) ) (newline port) ---------------------------------------------------------------

4. Now compute the solution using the Solve->Iterate command. This will write out a text file ('residuals.dat') containing the solution residual history.

sophie September 21, 2007 23:48

Re: residual storage in FLUENT
 
thanks a lot!

that really works well!

but how to write these scheme command lines?

or must i learn the scheme language?

i have some german document,but i don't say german...

any suggestions?

sophie September 24, 2007 21:02

Re: residual storage in FLUENT
 
new question:

now i have to execute the storage process through TUI, but it interrupts with the following error message:

Error: A journal is currently open for input or output. You cannot read and write a journal at the same time, or read two journals simultaneously. Error Object: #f

can anybody give me some advices?

urgent sophie

sophie September 24, 2007 21:17

Re: residual storage in FLUENT
 
now i want to describe me error exactly:

i want to store the residual which print in console to be a file,but my process is executed though TUI,i write these commands in my journal file:

;-------------------------------------------------------------- (define port) (set! port (open-output-file "residuals.dat"))

(do ((i 0 (+ i 1))) ((= i (length (solver-residuals)))) (format port "~a ~2t" (car (list-ref (solver-residuals) i))) ) (newline port)

(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*CheckButton6")

(cx-gui-do cx-set-text-entry "Execute Commands*Frame2*Table2*TextEntry10" "(do ((i 0 (+ i 1))) ((= i (length (solver-residuals)))) (format port "~a ~2t" (cdr (list-ref (solver-residuals) i))) ) (newline port)")

(cx-gui-do cx-activate-item "Execute Commands*PanelButtons*PushButton1(OK)")

(cx-gui-do cx-activate-item "Solution Initialization*PanelButtons*PushButton2(Cancel)")

solve/initialize/compute-defaults/pressure-far-field

solve/iterate 20 ;--------------------------------------------------- but the error message:

Error: eval: unbound variable Error Object: ~a

Warning: An error or interrupt occurred while reading the journal file. Some commands may not have been completed.

if i change the line contain ~a to be:

(cx-gui-do cx-set-text-entry "Execute Commands*Frame2*Table2*TextEntry10" "file read-journal residual.jou")

and in the content of the residual.jou is as follows

;--------------------------------------------------------------- (do ((i 0 (+ i 1))) ((= i (length (solver-residuals)))) (format port "~a ~2t" (cdr (list-ref (solver-residuals) i))) ) (newline port) ;---------------------------------------------------------------

the error message: file read-journal Error: A journal is currently open for input or output. You cannot read and write a journal at the same time, or read two journals simultaneously. Error Object: #f residual.jou invalid command [residual.jou]

can you give me some advices?

thanks a lot!

sophie


mostafadehghani.62 May 12, 2014 02:24

i have this problem too. there is any alternative for using "" in scheme?


All times are GMT -4. The time now is 13:11.