|
[Sponsors] |
[Tutorials] Tutorial of how to plot residuals ! |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 30, 2009, 09:07 |
Tutorial of how to plot residuals !
|
#1 |
Senior Member
Wolfgang Heydlauff
Join Date: Mar 2009
Location: Germany
Posts: 136
Rep Power: 21 |
Hi all,
since apearantly noone has an idea of how to plot the residuals of a calculation on-the-fly, I will give a small manual on that: Tutorial on "How to plot the residuals (and forces) graphically on screen on-the-fly" Step 1: Start the calculation and make it write out a log-file. for example turbFoam >log"log" is the name of the log-file to be output. It is written into the main-case-folder. Step 2: If desired you can open a new console-window of the main-case-folder and follow the text-output by the command tail -f log"log" is the name of the log-file to be read in. To stop reading the file constantly just use Crtl+C Step 3: To plot the residuals graphically on the screen you can use gnuplot that is delivered with linux already. Within the main-case-folder you have to put a text file with a name e.g. "Residuals" (also see attachments). The file should contain the following gnuplot properties: set logscale yThe pause-command sets the seconds till reload. Deletion makes it faster in some cases. Execute the command gnuplot Residuals -in the main-case-folder. Step 4: Another good indicator for the calculations convergence is the forces-plot. Therefore you have to set the function in the controlDict that calculates the forces and forceCoeffs. See thread http://www.cfd-online.com/Forums/ope...es-of15-3.html or attachments. Be sure to have the properties for gnuplot in the main-case-folder (see attachments). You have the adapt the folder-name where the forceCoeffs.dat is inside before. While the calculation runs you also can use the gnuplot command gnuplot forceCoeffs -in the main-case-folder. When the forces seem to not change any more, the pressure allocation must be constantly what makes the convergent case proofed. Step5: Plotting the real forces is also easy. Proceed identically like in "Step 4" but be sure to set magUInf 1.0; //free stream velocity magnitudein the controlDict. Using the attached text-files, remove the ".txt" first. Hope that helps somebody. Greetings, Wolfgang |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
plot residuals in multiregion solver | val46 | OpenFOAM | 4 | December 12, 2016 06:06 |
To Plot Residuals on the fly. | neeraj | OpenFOAM Running, Solving & CFD | 5 | October 2, 2013 06:23 |
[PyFoam] why pyFoamPlotRunner doesn't plot continuity residuals? | immortality | OpenFOAM Community Contributions | 10 | May 5, 2013 06:13 |
plot of residuals | hawkeye321 | OpenFOAM | 5 | December 7, 2012 09:05 |
[Virtualization] OpenFOAM oriented tutorial on using VMware Player - support thread | wyldckat | OpenFOAM Installation | 2 | July 11, 2012 16:01 |