CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Special Topics > Visualization & Post-Processing

How to plot residuals vs iterations using pyFoam...

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 16, 2017, 01:06
Default How to plot residuals vs iterations using pyFoam...
  #1
New Member
 
ata
Join Date: Feb 2015
Posts: 3
Rep Power: 7
ata313ata is on a distinguished road
Hi foamers,
How can I plot application solver residuals versus iterations using pyFoam libraries?
For example for the pimpleFoam solver, that uses outer corrections to couple pressure-momentum, using following command:
pyFoamPlotRunner.py pimpleFoam
just plots residuals versus time, and so, do not show the convergence of the outer loops.
I think the solution is to plot residuals vs iterations. but how???
Thanks in advance for any reply...
Regards,
Ata.
ata313ata is offline   Reply With Quote

Old   February 6, 2018, 04:34
Default
  #2
Member
 
Lennart
Join Date: Feb 2016
Posts: 46
Rep Power: 6
elmo555 is on a distinguished road
Have a look at the customRegexp file for pyFoam. You can add your own regular expressions to scan for data in a log file, e.g. to plot the iterations the internal solver (here for Ux) needs:

Code:
solverIterations
{
	expr ".+Solving for Ux.+No Iterations (%f%)";
	theTitle "Solver Iterations";
	titles
	(
		Ux
	);
}
In your case, modify the regular expression so it captures your residuals.
elmo555 is offline   Reply With Quote

Reply

Tags
iterations, pyfoam, pyfoamplotrunner, residual

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maximum number of iterations exceeded chtmultiregionsimpleFoam Moncef OpenFOAM Running, Solving & CFD 26 May 28, 2020 10:02
Segmentation fault when using reactingFOAM for Fluids Tommy Floessner OpenFOAM Running, Solving & CFD 4 April 22, 2018 12:30
Free surface issues with interDyMFoam for hydroturbine oumnion OpenFOAM Running, Solving & CFD 0 October 6, 2017 14:05
Wrong fluctuation of pressure in transient simulation caitao OpenFOAM Running, Solving & CFD 2 March 5, 2015 21:33
calculation stops after few time steps sivakumar OpenFOAM Running, Solving & CFD 7 March 17, 2013 06:37


All times are GMT -4. The time now is 18:45.