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

Plotting residual in OpenFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   February 27, 2013, 15:20
Question Plotting residual in OpenFoam
  #1
New Member
 
AndreiCFD
Join Date: Nov 2012
Posts: 27
Rep Power: 4
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, 16:58
Default
  #2
Senior Member
 
Join Date: Mar 2010
Location: Germany
Posts: 118
Rep Power: 7
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, 17:18
Default
  #3
Senior Member
 
Sasan Ghomi
Join Date: Sep 2012
Location: Iran - Tehran
Posts: 185
Rep Power: 4
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, 08:08
Default
  #4
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
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, 08:13
Default
  #5
New Member
 
AndreiCFD
Join Date: Nov 2012
Posts: 27
Rep Power: 4
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, 08:15
Default
  #6
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
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, 09:24
Default
  #7
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,511
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Quick answer: Tutorial of how to plot residuals !
cutter likes this.
wyldckat is offline   Reply With Quote

Old   March 1, 2013, 09:00
Default
  #8
Member
 
Martin
Join Date: Nov 2011
Posts: 30
Rep Power: 5
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: 4
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: 52
Rep Power: 7
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

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 15:37.