|
[Sponsors] |
[Tutorials] Tutorial of how to plot residuals ! |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 4, 2013, 09:09 |
|
#61 |
Member
Martin
Join Date: Dec 2011
Location: Latvia
Posts: 54
Rep Power: 14 |
Awesome tool!
Thank you! P.S. This post was made since it didn't work, but I found my issue seconds after I posted |
|
March 14, 2013, 19:15 |
|
#62 |
New Member
Ben Graves
Join Date: Dec 2012
Posts: 18
Rep Power: 13 |
Thank you very much for this awesome step by step tutorial!
-Ben |
|
April 1, 2013, 08:07 |
Printing subiteration residuals
|
#63 | |
Member
|
Quote:
I tried some tests with gnuplot and discover that better to use something like this: Code:
"< cat log | grep 'Solving for p' | cut -d' ' -f13 | sed -n 10p | tr -d ','" title 'p' with lines Code:
sed -n 10p Anybody could do some curious experiments in terminal copying this step by step Code:
cat log | grep 'Solving for p' Code:
cat log | grep 'Solving for p' | cut -d' ' -f13
__________________
practice makes perfect |
||
April 10, 2013, 10:26 |
|
#64 |
New Member
wan,Bangqi
Join Date: Feb 2013
Posts: 7
Rep Power: 13 |
Code:
DILUPBiCG: Solving for Ux, Initial residual = 0.11902604, Final residual = 0.0070412572, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.1142661, Final residual = 0.0057272586, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 0.11446305, Final residual = 0.0057460693, No Iterations 1 GAMG: Solving for p, Initial residual = 0.48817918, Final residual = 0.0019587405, No Iterations 6 GAMG: Solving for p, Initial residual = 0.49249198, Final residual = 0.0038667108, No Iterations 2 GAMG: Solving for p, Initial residual = 0.059867564, Final residual = 0.00021565867, No Iterations 3 GAMG: Solving for p, Initial residual = 0.010320323, Final residual = 5.6870971e-05, No Iterations 3 time step continuity errors : sum local = 2.0630983e-07, global = -1.0375901e-07, cumulative = 1.3807206e-07 Pressure gradient source: uncorrected Ubar = 0.0010286698, pressure gradient = -1.293371e-05 ExecutionTime = 1.71 s ClockTime = 2 s please could somone tell me how can i plot 'pressure gradient'? |
|
April 10, 2013, 18:12 |
|
#65 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Code:
pGrad { expr "Pressure gradient source: uncorrected Ubar = (%f%), pressure gradient = (%f%)"; titles ( Ubar pGrad); }
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
April 11, 2013, 06:53 |
|
#66 | |
Member
|
Quote:
cat log | grep 'Pressure gradient' and add it to the end of gnuplot file.
__________________
practice makes perfect |
||
April 11, 2013, 08:08 |
|
#67 |
New Member
wan,Bangqi
Join Date: Feb 2013
Posts: 7
Rep Power: 13 |
Thanks,all of you.
i used this and it works Code:
plot "< cat log | grep 'Pressure gradient' | cut -d' ' -f11 | tr -d ','" title 'p' with lines from where should i start to count the pieces? thanks again, you are all good people |
|
July 29, 2013, 11:47 |
Problems with the Force Coefficients
|
#68 |
Member
Join Date: Jul 2013
Posts: 98
Rep Power: 13 |
Hello everybody!!
The threat is very old, but it was helpful anyway. THANK YOU!. I am using paraFOAM just since some weeks ago, and I am still learning the basics. The version that I am using is the 2.2.0 I managed to plot the Residuals and the Forces, but I am not able to get the Force Coefficients... I have the following lines calling to the functions in ControlDict: functions ( #include "forces" //to load the file as a function #include "forceCoeff" ); And the forceCoeff function is as follows: forceCoeffs { type forceCoeffs; enabled true; functionObjectLibs ("libforces.so"); outputControl timeStep; outputInterval 1; patches ("SPHERE"); //change to your patch name pName p; UName U; rhoName rhoInf; log true; rhoInf 998.2; CofR (0 0 0); liftDir (0 1 0); dragDir (1 0 0); pitchAxis (0 0 0); magUInf 0.001; lRef 1; Aref 1; } ); The folder with the required data is not even created! The case is the most simple, just a ball inside a laminar flux, nothing else... It is just to learn using the software. ANY HELP WOULD BE NICE!! THANK YOU VERY MUCH! |
|
July 29, 2013, 14:21 |
|
#69 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
a. Where do you expect the data to be created? Starting with 2.2 such stuff is written to a folder called postProcessing in the case, not the the case-directory itself b. To make sure that the FO is actually read introduce an error that would make it fail (for instance "enabled neitherTrueNorFalse;")
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|||
July 30, 2013, 08:43 |
I got it!
|
#70 |
Member
Join Date: Jul 2013
Posts: 98
Rep Power: 13 |
Yes, you are right gschaider, the data should be in the folder called postProcessing; and actually I managed to achieve it!
When I was changing the "forces" file to check if OF was actually reading it, as you suggested, I noticed that the file was ending like: Code:
... rhoInf 998.2; //Reference density for fluid } ); |
|
August 14, 2013, 00:31 |
How to generate residual plots for transient runs
|
#71 |
New Member
Ravi Duggirala
Join Date: Feb 2013
Posts: 2
Rep Power: 0 |
I have used the same method to plot residuals but how to plot "Time" in x-axis rather than timestep number.
Regards Ravi |
|
September 10, 2013, 21:53 |
Rayleigh Benard Convection Problem
|
#72 |
Member
Lucas Mutti
Join Date: Aug 2013
Posts: 47
Rep Power: 14 |
Hello Wolfgang,
First of all thank you very much for releasing this module that speeds us our research significantly. Second, I recognize that it has been a while since you last posted in this page. I am currently working on simulating a Rayleigh Benard Convection Problem and I am trying to do a mesh convergence analysis so I may know how long it takes my code to converge and consequently approach my stipulated tolerance of 10^-3. After going over your files I have noticed that the Residuals.txt do not include parameters such as temperature. As a beginner in OpenFOAM, I am not sure how I should modify your file to incorporate the temperature distribution. Would you be able to show me how to do so? Also, with regards to your other files (functions and forceCoeffs) are they applicable to every problem in fluid mechanics or only under aerodynamic problems? Thank you very much, Lucas Mutti |
|
September 11, 2013, 04:21 |
|
#73 |
Member
Join Date: Jul 2013
Posts: 98
Rep Power: 13 |
Hello Iramutti:
I am completely new with OpenFOAM too, so I don't know if my reply will be useful. Besides I have never run a case where temperature is involved. Anyway, I guess that you can check the log file, and find the line where the Temperature residual is shown (maybe something like "Solving for T" ???), then, you just have to search for the correct string analogously to the example, with which I am reading the residuals for different variables (you have to remove all the # and all the explanations in the end of each line): Code:
# plot "< cat log | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines,\ # Ux residuals # "< cat log | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines,\ # Uy residuals # "< cat log | grep 'Solving for Uz' | cut -d' ' -f9 | tr -d ','" title 'Uz' with lines,\ # Uz residuals # "< cat log | grep 'Solving for nuTilda' | cut -d' ' -f9 | tr -d ','" title 'nuTilda' with lines,\ # nuTilda residuals # "< cat log | grep 'Solving for omega' | cut -d' ' -f9 | tr -d ','" title 'omega' with lines,\ # omega residuals # "< cat log | grep 'Solving for k' | cut -d' ' -f9 | tr -d ','" title 'k' with lines,\ # k residuals # "< cat log | grep 'Solving for p' | cut -d' ' -f9 | tr -d ','" title 'p' with lines # p residuals Regards |
|
October 24, 2013, 07:32 |
|
#74 |
Member
chen long
Join Date: Dec 2012
Posts: 32
Rep Power: 13 |
where to find the residuals plot? it will generate automatically?
|
|
October 24, 2013, 07:50 |
|
#75 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
In the standard output of the solver
No. That is the point of this whole thread
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
October 25, 2013, 00:14 |
|
#76 |
Member
chen long
Join Date: Dec 2012
Posts: 32
Rep Power: 13 |
Hi Bernhard
Thanks for your reply. Actually when i type the code "gnuplot Residuals", it shws "Residulas", line XXX: warning:skipping data file with no valid points". DO you have any idea about this? |
|
October 27, 2013, 19:12 |
|
#77 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
I don't use the way of plotting described above. Check what is in the Residuals-file
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
February 9, 2014, 16:08 |
|
#78 |
New Member
Stephan
Join Date: Feb 2014
Posts: 2
Rep Power: 0 |
Hey all,
i have a problem according to plotting the residuals. After the command gnuplot Residuals i got the following error: Code:
at: write error: Broken pipe 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 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 8: 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 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 8: 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 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 8: 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 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 8: 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 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 8: x range is invalid Last edited by wyldckat; February 10, 2014 at 17:13. Reason: Added [CODE][/CODE] |
|
February 10, 2014, 02:42 |
|
#79 | |
Member
|
Quote:
Gnuplot documentation will help you. At least you can try to use command promt of GNU Plot and feed it there string by string. The result will surprize you.
__________________
practice makes perfect |
||
February 11, 2014, 05:57 |
does not work any more?
|
#80 |
New Member
fabi
Join Date: Jan 2014
Posts: 5
Rep Power: 12 |
skript does not work with OpenFoam 2.1.1
|
|
|
|
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 |