|
[Sponsors] |
August 31, 2016, 11:44 |
Saving the residuals in a dat file from TUI
|
#1 |
New Member
Join Date: Aug 2015
Posts: 13
Rep Power: 11 |
Hello,
I'm trying to save the residual monitor (with continuity, x/y/z-velocity for example) in a *.dat file. I'm using ANSYS 17.0 with the TUI. From the documentation "ANSYS Fluent Text Command List".(Nov. 2013), I saw that in the menu /solve/monitors/ there are the following sub-menus: force/ residual/ statistic/ surface/ volume/ Unfortunately in my version (v 17.0) I don't see the sub-menu /residual/ These are the entries I see (in my version) in /solve/monitors/ force/ statistic/ volume/ surface/ set-average-over Does anyone observe the same "issue"? Do you know if this sub-menu has migrated somewhere else in the tree? Thank you very much for your help. EmiS |
|
November 24, 2016, 09:19 |
|
#2 |
New Member
Join Date: Aug 2015
Posts: 13
Rep Power: 11 |
Dear All,
I have tried to save the Residual values in a text file using only TUI commands from a Journal file in order to postprocess, later on, the convergence graph in Matlab. Based on the instructions coming from this page: http://www.eureka.im/1087.html, I have written the following command in my journal file: /solve/execute-commands/add-edit save_residuals 1 "iteration" "(define port)(set! port (open-output-file "Residuals.dat"))(do ((i 0 (+ i 1))) ((= i (length (solver-residuals))))(format port "~a ~2t" (cdr (list-ref (solver-residuals) i))))(newline port)" The problem is that the text file gets re-written at each iteration with the new values of the residuals (the old ones don't appear). It seems that the "newline port" command is not executed. On the console window this is what I see: (define port) port (set! port (open-output-file "Residuals.dat")) port (do ((i 0 (+ i 1))) ((= i (length (solver-residuals))))(format port "~a ~2t" (cdr (list-ref (solver-residuals) i)))) #f (newline port) I'm suspicious about the "#f", but I don't exactly what what it stands for. Can anyone give me a hint on this issue? Or if it is not the proper way to go, can someone comment on what should be done (to write the proper command in a TUI Journal file that would save the residuals in a text file)? Thank you very much. EmiS. |
|
December 15, 2022, 13:58 |
|
#3 |
New Member
Luigi Cutrone
Join Date: Mar 2009
Location: Italy
Posts: 3
Rep Power: 17 |
following the tutorial in http://www.eureka.im/1087.html
try this for init.scm -------------------- (define port) (set! port (open-output-file "residuals.dat")) (format port "~a ~2t" 'Iterations ) (do ((i 0 (+ i 1))) ((= i (length (solver-residuals)))) (format port "~a ~2t" (car ( list-ref (solver-residuals) i))) ) (newline port) -------------------- and this for residual.jou -------------------- (format port "~a ~2t" (%iterate 0) ) (do ((i 0 (+ i 1))) ((= i (length (solver-residuals)))) (format port "~a ~2t" (cdr (list-ref (solver-residuals) i))) ) (newline port) -------------------- |
|
December 16, 2022, 10:48 |
|
#4 |
New Member
Zhang Haosen
Join Date: Jun 2020
Posts: 7
Rep Power: 6 |
Did you have the case initialized before issuing the command? Maybe it's because there is no data about the residual.
|
|
December 18, 2022, 03:07 |
|
#5 |
New Member
Luigi Cutrone
Join Date: Mar 2009
Location: Italy
Posts: 3
Rep Power: 17 |
Yes, you need to initialize the case, then you can load the Scheme file (init.scm) and start the run, during with you can execute the journal file.
essentially, the init.scm open the file and write the titles, whereas the residual.jou write the residuals during the iterations. L |
|
Tags |
dat file, journal file, residuals fluent, tui |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
what is swap4foam ?? | AB08 | OpenFOAM | 28 | February 2, 2016 02:22 |
[Other] How to use finite area method in official OpenFOAM 2.2.0? | Detian Liu | OpenFOAM Meshing & Mesh Conversion | 4 | November 3, 2015 04:04 |
SparceImage v1.7.x Issue on MAC OS X | rcarmi | OpenFOAM Installation | 4 | August 14, 2014 07:42 |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 04:23 |
friction forces icoFoam | ofslcm | OpenFOAM | 3 | April 7, 2012 11:57 |