|
[Sponsors] |
March 31, 2016, 11:20 |
Plot Residuals in Postprocessing
|
#1 |
New Member
Join Date: Mar 2016
Posts: 1
Rep Power: 0 |
Hello,
I want to plot the residuals after the calculation is done. I am doing the calculation on a linux server without the graphical user interface where you can monitor the residuals. That's why i need to examine them afterwards. Has anyone an idea ? Thanks. |
|
April 2, 2016, 00:52 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,747
Rep Power: 66 |
One way is to save the output to a text file.
|
|
April 2, 2016, 03:58 |
|
#3 | |
New Member
Avijit Singh
Join Date: Jun 2014
Location: India
Posts: 1
Rep Power: 0 |
Quote:
http://www.gnuplot.info/ |
||
October 17, 2016, 12:51 |
|
#4 | |
New Member
Join Date: Nov 2015
Posts: 8
Rep Power: 10 |
Quote:
Dog766, did you managed to plot your residuals from old runs? I don't use Linux but Windows and I'm also looking for a way to plot old run residuals. My computer stopped and switched off during calculation due to external issues and I lost the graph on the Fluent window monitoring from iteration 0 (I have large number of iterations). I restarted the simulation from the last data file saved but I can only see the last iterations. My residuals converge very slowly and with the last data file saved I'm not able to see if the curve is constant or is still changing. I attach a photo. I'm not able to open the data files in text mode (maybe too heavy files?). Would you have any other suggestion? Thanks in advance! |
||
October 17, 2016, 13:37 |
|
#5 |
Member
Join Date: May 2014
Posts: 30
Rep Power: 12 |
Hi, if you did not save your output to a textfile, there is no way to recover all the residuals, I think. Fluent by default stores the last 1000 iterations but that's it. You can change that value if you want but better save output to a file, so you have reference to what happend at any time. However, I think your case needs some revision, I think your model does not converge, maybe due to a poor quality mesh
Good luck! |
|
October 18, 2016, 06:16 |
|
#6 | |
New Member
Join Date: Nov 2015
Posts: 8
Rep Power: 10 |
Quote:
Thanks mome I'm not sure about your comment: "saving my output to a textfile"... do we have to specify that on Fluent? I save my output in a .dat file, I thought this was the only way. I see there are options to export solution data on different file formats but it's per cell or node and for like physical quantities, not residuals. However, I finally solved my problem about plotting... I did specified in "monitors" -> "residuals" to store up to 100000 iterations but I hadn't updated the "iterations to plot" box... so silly! Now I can see all the residuals from iteration 0 in the graph but, is still any possibility to have the numeric data (eg, the maximum residual value for each equation so we can compare to the actual value and evaluate convergence)? Concerning the convergence problems, I'm not sure that it's due to the quality of the mesh, I thought my mesh quality values were not so bad: Analyse mesh ICEM 0.137 Min equi-skew 0.45 Min quality 0.607 Min angle 40.8 Max mesh expansion factor 19.38 Min ortogonal quality 0.5487 Analyse mesh FLUENT 0.549 Max aspect ratio 13.47 Any other hints why my calculation might diverge? Thanks in advance! |
||
October 18, 2016, 08:25 |
|
#7 |
Member
Join Date: May 2014
Posts: 30
Rep Power: 12 |
good that you got what you wanted! anyway, it's really handy if you get used to it:
i did not mean the data file, but a text file containing what fluent would return to the console. on windows, I think you have to start a transcript for what you want to record. that would also be the way to go if you already started an interactive session and realise you want to log your text output to a file. you can do that by the TUI command \file\start-transcript filename.out and stop it by \file\stop-transcript filename.out this file will even contain all your actions in the GUI as scheme code for interactive sessions, but you can also just use it in your journal file to run in the background. if you are using a linux system even better, you can just pipe your output to a file upon launch from command line, this is common to do if you run a job in the background, e.g. "fluent -g 2ddp < 2dcase.jou > 2dcase.out 2>&1" 2dcase.jou defines what you want fluent to do, 2dcase.out contains what fluent returns. there is info about this in the manual, if you are not so familiar with it. it think that's all there is to it.. ..about your convergence, that is a big topic you are opening and I don't think I can give you a general answer, sorry. the mesh metrics are not the only thing to consider, it depends how the actual flow is resolved etc. , could arise from boundary conditions and your numerical set-up. maybe read a little bit about it and try to imporve your solution by changing your schemes, solver settings and the mesh. I'm sure you'll get there. M |
|
April 6, 2022, 21:21 |
|
#8 |
Senior Member
alberto
Join Date: Apr 2016
Location: Mexico
Posts: 119
Rep Power: 10 |
Did you find a way to plot your fluent residuals ?
|
|
March 23, 2023, 13:52 |
plot residuals and save the plot to file
|
#9 |
New Member
Join Date: Oct 2019
Posts: 7
Rep Power: 7 |
If you are going to run the case in Fluent batch mode, you can add a command to the case file to write the residuals plot to a file; to do this, when you are setting up the case using Fluent GUI, enter the following TUI command in the Console:
/solve/execute-commands/add-edit command-1 no 10 iteration "/solve/monitors/residual/plot? yes /display/set-window-by-name residuals /display/save-picture residual.png" This will create the command "command-1". Command-1 will execute repeatedly every 10 iterations. The residuals will be plotted and saved to the file residual.png When you run Fluent batch mode, the would need the flag -gu For example fluent 3ddp -gu -ssh -t4 -i input.jou |
|
Tags |
plot, residuals |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Tutorials] Tutorial of how to plot residuals ! | wolle1982 | OpenFOAM Community Contributions | 171 | February 20, 2024 03:55 |
[swak4Foam] Foam warnings - related to swak4Foam | Salam-H | OpenFOAM Community Contributions | 20 | August 2, 2015 16:40 |
plot residuals | pigna | OpenFOAM Running, Solving & CFD | 2 | December 19, 2014 03:32 |
How to plot residuals of all iterations in Fluent | FJSJ | FLUENT | 4 | September 20, 2013 10:47 |
Residuals Plot | kamalipour | FLUENT | 2 | December 15, 2011 04:44 |