CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Plot Residuals in each Outer Iteration using foamLog or PyFoam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 29, 2015, 16:52
Default Plot Residuals in each Outer Iteration using foamLog or PyFoam
  #1
Member
 
Sravan Kumar
Join Date: May 2014
Posts: 57
Rep Power: 12
coolcrasher is on a distinguished road
Hi

I am running a transient simulation using pimpleDyMFoam with nOuterCorrectors as more than 5. Hence I would be getting more than 5 Pimple iterations per timestep. Lets take 5 as an example.

Following is for a single timestep:
Code:
Courant Number mean: 0.0768848 max: 0.484731
deltaT = 0.00266306
Time = 0.052065

solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.052065 transformation: ((0 0 0) (0.986653 (0 0 0.162839)))
AMI: Creating addressing and weights between 96 source faces and 96 target faces
AMI: Patch source sum(weights) min/max/average = 1, 1, 1
AMI: Patch target sum(weights) min/max/average = 1, 1, 1
GAMG:  Solving for pcorr, Initial residual = 1, Final residual = 0.0129894, No Iterations 5
time step continuity errors : sum local = 2.20928e-06, global = -6.56531e-08, cumulative = 3.15662e-06
PIMPLE: iteration 1
smoothSolver:  Solving for Ux, Initial residual = 0.0188864, Final residual = 7.25993e-05, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.0188878, Final residual = 7.28449e-05, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.0608934, Final residual = 0.000229068, No Iterations 4
time step continuity errors : sum local = 3.94643e-07, global = 6.55667e-10, cumulative = 3.15728e-06
PIMPLE: iteration 2
smoothSolver:  Solving for Ux, Initial residual = 0.000766973, Final residual = 4.09393e-06, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.000767082, Final residual = 4.09925e-06, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.0288272, Final residual = 0.000196263, No Iterations 4
time step continuity errors : sum local = 3.37737e-07, global = 6.70285e-10, cumulative = 3.15795e-06
PIMPLE: iteration 3
smoothSolver:  Solving for Ux, Initial residual = 0.000125893, Final residual = 9.14868e-06, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 0.000126271, Final residual = 9.24126e-06, No Iterations 1
GAMG:  Solving for p, Initial residual = 0.00483534, Final residual = 3.92075e-05, No Iterations 4
time step continuity errors : sum local = 6.53547e-08, global = 6.82305e-10, cumulative = 3.15863e-06
PIMPLE: iteration 4
smoothSolver:  Solving for Ux, Initial residual = 2.47375e-05, Final residual = 1.8218e-06, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 2.46127e-05, Final residual = 1.8266e-06, No Iterations 1
GAMG:  Solving for p, Initial residual = 0.000999491, Final residual = 9.90021e-06, No Iterations 4
time step continuity errors : sum local = 1.74028e-08, global = 6.82704e-10, cumulative = 3.15931e-06
PIMPLE: iteration 5
smoothSolver:  Solving for Ux, Initial residual = 5.80662e-06, Final residual = 4.36193e-07, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 5.78219e-06, Final residual = 4.34769e-07, No Iterations 1
GAMG:  Solving for p, Initial residual = 0.000251095, Final residual = 5.74394e-07, No Iterations 6
time step continuity errors : sum local = 1.65856e-09, global = 6.83235e-10, cumulative = 3.16e-06
ExecutionTime = 1.58 s  ClockTime = 2 s
I would like to plot final residuals for each pimpleIteration. I am flexible using foamLog or pyFoam also. But I do not know how to use them.

I have seen such plots in openfoamwiki in the following link
https://openfoamwiki.net/index.php/O...hm_in_OpenFOAM

Any suggestions or help please.
coolcrasher is offline   Reply With Quote

Old   October 30, 2015, 10:41
Default
  #2
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15
agustinvo is on a distinguished road
Hi

if I am not wrong, you can use foamLog, and each corrector will be expressed as

Ux_X
UxFinalRes_X ...

where X is the number of the outer corrector (it starts from 0)
agustinvo is offline   Reply With Quote

Reply

Tags
foam, openfoam, plot, pyfoam, residuals every iteration

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
[Tutorials] Tutorial of how to plot residuals ! wolle1982 OpenFOAM Community Contributions 171 February 20, 2024 02:55
plot residuals in multiregion solver val46 OpenFOAM 4 December 12, 2016 06:06
Residuals Plot kamalipour FLUENT 2 December 15, 2011 03:44
URGENT: plot residuals for complete simulation?? Khan FLUENT 1 February 1, 2007 12:35
residuals Karl CFX 2 June 24, 2003 23:13


All times are GMT -4. The time now is 21:02.