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

residual storage in FLUENT

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

Like Tree6Likes
  • 5 Post By mAx
  • 1 Post By sophie

Reply
 
LinkBack Thread Tools Display Modes
Old   September 20, 2007, 21:45
Default residual storage in FLUENT
  #1
sophie
Guest
 
Posts: n/a
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!
  Reply With Quote

Old   September 21, 2007, 05:08
Default Re: residual storage in FLUENT
  #2
Joe
Guest
 
Posts: n/a
you need to tell fluent to store the residuals in the dat file.
  Reply With Quote

Old   September 21, 2007, 05:11
Default Re: residual storage in FLUENT
  #3
sophie
Guest
 
Posts: n/a
how to tell fluent to store the residuals in the dat file?

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

  Reply With Quote

Old   September 21, 2007, 06:08
Default Re: residual storage in FLUENT
  #4
mAx
Guest
 
Posts: n/a
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.
stuart23, elcino, FJSJ and 2 others like this.
  Reply With Quote

Old   September 21, 2007, 23:48
Default Re: residual storage in FLUENT
  #5
sophie
Guest
 
Posts: n/a
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?
  Reply With Quote

Old   September 24, 2007, 21:02
Default Re: residual storage in FLUENT
  #6
sophie
Guest
 
Posts: n/a
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
mostafadehghani.62 likes this.
  Reply With Quote

Old   September 24, 2007, 21:17
Default Re: residual storage in FLUENT
  #7
sophie
Guest
 
Posts: n/a
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

  Reply With Quote

Old   May 12, 2014, 02:24
Default
  #8
New Member
 
mostafa
Join Date: Jan 2014
Posts: 1
Rep Power: 0
mostafadehghani.62 is on a distinguished road
i have this problem too. there is any alternative for using "" in scheme?
mostafadehghani.62 is offline   Reply With Quote

Old   April 5, 2016, 22:22
Default How to add time step or time flow before the residuals??
  #9
New Member
 
Abdullatif A. Gari
Join Date: Feb 2016
Posts: 3
Rep Power: 2
agari is on a distinguished road
Quote:
Originally Posted by mAx
;145582
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.

=================
Thank you very much.
Doing the above commands writes a list of residuals without the time flow or time step. Is there a way to do that?

How to add time step or time flow before the residuals?? (Either one)
agari is offline   Reply With Quote

Old   April 6, 2016, 09:02
Default
  #10
Senior Member
 
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 1,291
Rep Power: 20
LuckyTran will become famous soon enough
Quote:
Originally Posted by agari View Post
=================
Thank you very much.
Doing the above commands writes a list of residuals without the time flow or time step. Is there a way to do that?

How to add time step or time flow before the residuals?? (Either one)
You can just edit the scheme so far and tell it to print the time-step and flow-time. The scheme variable names for these are time-step and flow-time.
LuckyTran is offline   Reply With Quote

Old   April 6, 2016, 12:29
Default
  #11
New Member
 
Abdullatif A. Gari
Join Date: Feb 2016
Posts: 3
Rep Power: 2
agari is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
You can just edit the scheme so far and tell it to print the time-step and flow-time. The scheme variable names for these are time-step and flow-time.
Thanks. But not familiar with c++ prog so where to put it? Like this:

(do ((i 0 (+ i 1))) ((= i (length (flow-time, solver-residuals)))) (format port "~a ~2t" (car (list-ref (solver-residuals) i))) ) (newline port)
agari is offline   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
alphaEqn.H in twoPhaseEulerFoam cheng1988sjtu OpenFOAM Bugs 15 May 1, 2016 16:12
Velocity blows up suddenly after 30,000+ iterations lordvon OpenFOAM Running, Solving & CFD 15 October 19, 2015 13:52
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Low Mach number Compressible jet flow using LES ankgupta8um OpenFOAM Running, Solving & CFD 7 January 15, 2011 14:38
MRFSimpleFoam amp cyclic patches david OpenFOAM Running, Solving & CFD 36 October 21, 2008 21:55


All times are GMT -4. The time now is 17:56.