|
[Sponsors] |
[Tutorials] Tutorial of how to plot residuals ! |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 28, 2009, 09:19 |
|
#21 |
Member
Bernard Esterhuyse
Join Date: Mar 2009
Location: Pretoria, South Africa
Posts: 50
Rep Power: 17 |
Hi
Thanks for this excellent script. Is it possible to zoom into a section of the residual plot? |
|
November 29, 2009, 03:27 |
Tutorial of how to plot residuals
|
#22 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Hi every one
When I try to plot residuals with gnuplot I got this error: plot "< cat log | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines,"< cat log | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines,"< cat log | grep 'Solving for Uz' | cut -d' ' -f9 | tr -d ','" title 'Uz' with lines,"< cat log | grep 'Solving for omega' | cut -d' ' -f9 | tr -d ','" title 'omega' with lines,"< cat log | grep 'Solving for k' | cut -d' ' -f9 | tr -d ','" title 'k' with lines,"< cat log | grep 'Solving for p' | cut -d' ' -f9 | tr -d ','" title 'p' with lines ^ "Residuals", line 10: warning: Skipping data file with no valid points plot "< cat log | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines,"< cat log | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines,"< cat log | grep 'Solving for Uz' | cut -d' ' -f9 | tr -d ','" title 'Uz' with lines,"< cat log | grep 'Solving for omega' | cut -d' ' -f9 | tr -d ','" title 'omega' with lines,"< cat log | grep 'Solving for k' | cut -d' ' -f9 | tr -d ','" title 'k' with lines,"< cat log | grep 'Solving for p' | cut -d' ' -f9 | tr -d ','" title 'p' with lines ^ "Residuals", line 10: warning: Skipping data file with no valid points plot "< cat log | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines,"< cat log | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines,"< cat log | grep 'Solving for Uz' | cut -d' ' -f9 | tr -d ','" title 'Uz' with lines,"< cat log | grep 'Solving for omega' | cut -d' ' -f9 | tr -d ','" title 'omega' with lines,"< cat log | grep 'Solving for k' | cut -d' ' -f9 | tr -d ','" title 'k' with lines,"< cat log | grep 'Solving for p' | cut -d' ' -f9 | tr -d ','" title 'p' with lines ^ "Residuals", line 10: warning: Skipping data file with no valid points plot "< cat log | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines,"< cat log | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines,"< cat log | grep 'Solving for Uz' | cut -d' ' -f9 | tr -d ','" title 'Uz' with lines,"< cat log | grep 'Solving for omega' | cut -d' ' -f9 | tr -d ','" title 'omega' with lines,"< cat log | grep 'Solving for k' | cut -d' ' -f9 | tr -d ','" title 'k' with lines,"< cat log | grep 'Solving for p' | cut -d' ' -f9 | tr -d ','" title 'p' with lines Can any body help me? Regards Ata |
|
November 29, 2009, 03:27 |
Tutorial of how to plot residuals
|
#23 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Hi every one
When I try to plot residuals with gnuplot I got this error: plot "< cat log | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines,"< cat log | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines,"< cat log | grep 'Solving for Uz' | cut -d' ' -f9 | tr -d ','" title 'Uz' with lines,"< cat log | grep 'Solving for omega' | cut -d' ' -f9 | tr -d ','" title 'omega' with lines,"< cat log | grep 'Solving for k' | cut -d' ' -f9 | tr -d ','" title 'k' with lines,"< cat log | grep 'Solving for p' | cut -d' ' -f9 | tr -d ','" title 'p' with lines ^ "Residuals", line 10: warning: Skipping data file with no valid points plot "< cat log | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines,"< cat log | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines,"< cat log | grep 'Solving for Uz' | cut -d' ' -f9 | tr -d ','" title 'Uz' with lines,"< cat log | grep 'Solving for omega' | cut -d' ' -f9 | tr -d ','" title 'omega' with lines,"< cat log | grep 'Solving for k' | cut -d' ' -f9 | tr -d ','" title 'k' with lines,"< cat log | grep 'Solving for p' | cut -d' ' -f9 | tr -d ','" title 'p' with lines ^ "Residuals", line 10: warning: Skipping data file with no valid points plot "< cat log | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines,"< cat log | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines,"< cat log | grep 'Solving for Uz' | cut -d' ' -f9 | tr -d ','" title 'Uz' with lines,"< cat log | grep 'Solving for omega' | cut -d' ' -f9 | tr -d ','" title 'omega' with lines,"< cat log | grep 'Solving for k' | cut -d' ' -f9 | tr -d ','" title 'k' with lines,"< cat log | grep 'Solving for p' | cut -d' ' -f9 | tr -d ','" title 'p' with lines ^ "Residuals", line 10: warning: Skipping data file with no valid points plot "< cat log | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines,"< cat log | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines,"< cat log | grep 'Solving for Uz' | cut -d' ' -f9 | tr -d ','" title 'Uz' with lines,"< cat log | grep 'Solving for omega' | cut -d' ' -f9 | tr -d ','" title 'omega' with lines,"< cat log | grep 'Solving for k' | cut -d' ' -f9 | tr -d ','" title 'k' with lines,"< cat log | grep 'Solving for p' | cut -d' ' -f9 | tr -d ','" title 'p' with lines Can any body help me? Regards Ata |
|
January 14, 2010, 10:18 |
|
#24 |
New Member
Robin Koldeweij
Join Date: Nov 2009
Posts: 19
Rep Power: 17 |
It just means you are trying to extract fields from the 'log' file, which don't exist. May be you don't have a turbulence model and try to extract k and eps in example. Change your residual.txt file accordingly.
|
|
January 15, 2010, 02:16 |
|
#25 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Hello RBj
Thanks. It seems so. Best Regards Ata |
|
April 1, 2010, 10:17 |
|
#26 |
Senior Member
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18 |
Dear Openfoamers,
Wolfgang tool is very useful. However, I have a question. I usually start my computation with 3 nonOrthogonalCorector loops and then decreased to 0. if I use the script of wolfgang with the following line: "< cat log | grep 'Solving for p' | cut -d' ' -f9 | sed -n 'p;N;N' | tr -d ','" title 'p' with lines the line of p residual just stop on the graph when I decrease the number of p loops. how would it be possible to handle that? regards, Vincent |
|
November 13, 2010, 07:35 |
|
#28 |
New Member
Sarah Köhler
Join Date: Jun 2010
Location: Leoben
Posts: 11
Rep Power: 16 |
Thanks for the code, its great ...
can i use it as well to plot the time step continuity errors? tried to exchange it, but i always get an error ... thanks in advance ... |
|
November 14, 2010, 03:10 |
|
#29 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
November 15, 2010, 16:11 |
listing please
|
#30 |
Member
Thomas Wolfanger
Join Date: Mar 2009
Location: South West Germany
Posts: 62
Rep Power: 17 |
||
November 29, 2010, 12:31 |
|
#31 |
Senior Member
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 449
Rep Power: 20 |
hi,
i´m using the gnuplot approach quite a while and it is really helpful. But how about this: i want to know where the residuals are high and not convergent and want to look at the residual-fields (u,v,w, final p e.g.) in paraview. Basically it´s easy, just create field for each residualvalue and store them BUT i do not know how to manage smth. like residuals (u,v,w,p).write. Any ideas? neewbie |
|
December 2, 2010, 15:02 |
|
#32 |
New Member
Join Date: Oct 2010
Posts: 23
Rep Power: 16 |
hello,
I've followed thew instruction of the tutorial to plot the forces.dat file with the forces of my simulation, generated by simpleFoam. here is my problem: gnuplot, only plots some of the columns, for example 1:3 (time versus Fy) but not 1:2 (time versus Fx) it gives me the following: Warning : skipping data file with no valid points attached there's the file. any ideas?? thanks! Michele ps thanks to Wolfgang for the thread! |
|
December 2, 2010, 15:26 |
|
#33 |
New Member
Join Date: Oct 2010
Posts: 23
Rep Power: 16 |
I think the problem is due to the parentesis in my file..there's a way to convert the .dat file in order to be read properly by gnuplot?
EDIT: solved here: http://www.cfd-online.com/Forums/ope...-brackets.html |
|
December 3, 2010, 04:16 |
|
#34 |
Senior Member
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 449
Rep Power: 20 |
hi,
good to know about the previous post. I solved it with plot "..." using ... '%lf ( %lf %lf %lf) ( %lf %lf %lf)' but this only works up to 10 x %lf ...so max. 3 Vectors + first row. neewbie |
|
June 8, 2011, 08:22 |
|
#35 |
Senior Member
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 16 |
hi
thank you |
|
July 7, 2011, 08:46 |
|
#37 |
Member
Tibo
Join Date: Jun 2011
Posts: 68
Rep Power: 15 |
Awesome.
Thx Wolfgang. Tibo |
|
July 26, 2011, 12:04 |
|
#38 |
Senior Member
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 18 |
it's an old topic but still i feel like i need to thank, it surely speeds things up
|
|
August 16, 2011, 07:42 |
|
#39 |
New Member
Suhas
Join Date: Jul 2011
Location: Pune
Posts: 21
Rep Power: 15 |
Thanks for the script,
One additional information is, the sequence of residuals reading in command line for gnuplot also to be same as solved by that particular solver. Hope it helps someone. ThankYou. Regards Suhas |
|
November 17, 2011, 20:10 |
|
#40 |
Member
Robin Gilbert
Join Date: Jan 2010
Posts: 66
Rep Power: 16 |
Hi everyone,
I tried this: Code:
set logscale y set title "Residuals" set ylabel 'Residual' set xlabel 'Iteration' plot "< cat log | grep 'Solving for Ux' | cut -d' ' -f9 | sed -n 'Ux;N' | tr -d ','" title 'Ux' with lines,\ "< cat log | grep 'Solving for Uy' | cut -d' ' -f9 | sed -n 'Uy;N' | tr -d ','" title 'Uy' with lines,\ "< cat log | grep 'Solving for Uz' | cut -d' ' -f9 | sed -n 'Uz;N' | tr -d ','" title 'Uz' with lines,\ "< cat log | grep 'Solving for k' | cut -d' ' -f9 | sed -n 'k;N'| tr -d ','" title 'k' with lines,\ "< cat log | grep 'Solving for p' | cut -d' ' -f9 | sed -n 'p;N;N;N' | tr -d ','" title 'p' with lines pause 1 reread Last edited by robingilbert; November 17, 2011 at 21:13. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
plot residuals in multiregion solver | val46 | OpenFOAM | 4 | December 12, 2016 07:06 |
To Plot Residuals on the fly. | neeraj | OpenFOAM Running, Solving & CFD | 5 | October 2, 2013 07:23 |
[PyFoam] why pyFoamPlotRunner doesn't plot continuity residuals? | immortality | OpenFOAM Community Contributions | 10 | May 5, 2013 07:13 |
plot of residuals | hawkeye321 | OpenFOAM | 5 | December 7, 2012 10:05 |
[Virtualization] OpenFOAM oriented tutorial on using VMware Player - support thread | wyldckat | OpenFOAM Installation | 2 | July 11, 2012 17:01 |