CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Plotting residual in OpenFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 27, 2013, 14:20
Question Plotting residual in OpenFoam
  #1
Member
 
AndreiCFD
Join Date: Nov 2012
Posts: 47
Rep Power: 13
andrei.cimpoeru is on a distinguished road
Has anyone any idea how to plot the residuals in OpenFoam from a >.log file ?

Many thanks

Andrei
andrei.cimpoeru is offline   Reply With Quote

Old   February 27, 2013, 15:58
Default
  #2
Senior Member
 
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16
cutter is on a distinguished road
Hi,

you could try pyFoamPlotWatcher.py from the PyFoam utilities.

cutter
cutter is offline   Reply With Quote

Old   February 27, 2013, 16:18
Default
  #3
Senior Member
 
Sasan Ghomi
Join Date: Sep 2012
Location: Denmark
Posts: 292
Rep Power: 14
sasanghomi is on a distinguished road
Hi ,

Copy the code in a txt file and set it in the case directory,
Code:
set logscale y
set title "Residuals"
set ylabel 'Residual'
set xlabel 'Iteration'
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
pause 1
reread

gnuplot Residuals -
Now type (in the terminal):
Code:
gnuplot residual
It needs gnuplot ...

Sasan.
sasanghomi is offline   Reply With Quote

Old   February 28, 2013, 07:08
Default
  #4
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
Quote:
Originally Posted by andrei.cimpoeru View Post
Has anyone any idea how to plot the residuals in OpenFoam from a >.log file ?
The foamLog utility is designed for it. It will extract the residuals and put them in different files.
Bernhard is offline   Reply With Quote

Old   February 28, 2013, 07:13
Default
  #5
Member
 
AndreiCFD
Join Date: Nov 2012
Posts: 47
Rep Power: 13
andrei.cimpoeru is on a distinguished road
I used the foamLog and I have the files I used excel package which comes with ubuntu 11.10 but i want to something which is automatically ........
andrei.cimpoeru is offline   Reply With Quote

Old   February 28, 2013, 07:15
Default
  #6
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
Then you should dig into the first answer you got.
Bernhard is offline   Reply With Quote

Old   February 28, 2013, 08:24
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: http://www.cfd-online.com/Forums/ope...residuals.html
cutter likes this.
__________________
wyldckat is offline   Reply With Quote

Old   March 1, 2013, 08:00
Default
  #8
Member
 
Martin
Join Date: Nov 2011
Posts: 35
Rep Power: 14
wernsen is on a distinguished road
pyFoamPlot... is the best to do this job ad its simple too!
wernsen is offline   Reply With Quote

Old   October 24, 2013, 06:31
Default
  #9
Member
 
chen long
Join Date: Dec 2012
Posts: 32
Rep Power: 13
Jackie Chen is on a distinguished road
Quote:
Originally Posted by wernsen View Post
pyFoamPlot... is the best to do this job ad its simple too!
no command found. is this a valid command?thanks
Jackie Chen is offline   Reply With Quote

Old   October 24, 2013, 06:45
Default
  #10
Member
 
Eysteinn Helgason
Join Date: Sep 2009
Location: Gothenburg, Sweden
Posts: 53
Rep Power: 16
eysteinn is on a distinguished road
Quote:
Originally Posted by Jackie Chen View Post
no command found. is this a valid command?thanks
You need to install pyFoam:
http://openfoamwiki.net/index.php/Contrib_PyFoam
eysteinn is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with Min/max rho tH3f0rC3 OpenFOAM 8 July 31, 2019 09:48
Velocity blows up suddenly after 30,000+ iterations lordvon OpenFOAM Running, Solving & CFD 15 October 19, 2015 13:52
SLTS+rhoPisoFoam: what is rDeltaT??? nileshjrane OpenFOAM Running, Solving & CFD 4 February 25, 2013 04:13
Orifice Plate with a fully developed flow - Problems with convergence jonmec OpenFOAM Running, Solving & CFD 3 July 28, 2011 05:24
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 14:09


All times are GMT -4. The time now is 23:39.