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

plot residuals in multiregion solver

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 4, 2012, 05:53
Default plot residuals in multiregion solver
  #1
Member
 
Join Date: Nov 2009
Location: Germany
Posts: 96
Rep Power: 7
val46 is on a distinguished road
Hello,

I would like to plot the residuals from a logfile with gnuplot.
A nice tutorial for that can be found here.
With single region solvers it works nice but not with multiregion solvers.

As an example, here is a timestep of a tutorial case:

Code:
Time = 0.0469758

Solving for fluid region bottomAir
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG:  Solving for Ux, Initial residual = 0.05933919, Final residual = 1.875811e-09, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 0.07216778, Final residual = 2.727341e-09, No Iterations 2
DILUPBiCG:  Solving for Uz, Initial residual = 0.06497582, Final residual = 2.468975e-09, No Iterations 2
DILUPBiCG:  Solving for h, Initial residual = 0.1391416, Final residual = 5.374545e-08, No Iterations 2
Min/max T:300 319.7154
GAMG:  Solving for p_rgh, Initial residual = 0.1779339, Final residual = 0.0008159564, No Iterations 3
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (bottomAir): sum local = 5.094676e-07, global = -1.166084e-10, cumulative = -1.841265e-07
GAMG:  Solving for p_rgh, Initial residual = 0.008835792, Final residual = 2.173498e-07, No Iterations 1000
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (bottomAir): sum local = 1.498523e-10, global = -2.259186e-12, cumulative = -1.841288e-07

Solving for fluid region topAir
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG:  Solving for Ux, Initial residual = 0.08491977, Final residual = 4.188711e-09, No Iterations 4
DILUPBiCG:  Solving for Uy, Initial residual = 0.1317485, Final residual = 9.808667e-08, No Iterations 4
DILUPBiCG:  Solving for Uz, Initial residual = 0.094053, Final residual = 3.943191e-08, No Iterations 4
DILUPBiCG:  Solving for h, Initial residual = 0.00873557, Final residual = 9.642108e-08, No Iterations 3
Min/max T:299.9996 300
GAMG:  Solving for p_rgh, Initial residual = 0.03020841, Final residual = 0.0001659505, No Iterations 2
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (topAir): sum local = 3.574824e-07, global = -2.221026e-07, cumulative = 0.0002244136
GAMG:  Solving for p_rgh, Initial residual = 0.003304726, Final residual = 8.552481e-08, No Iterations 13
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (topAir): sum local = 2.001775e-10, global = -5.684051e-11, cumulative = 0.0002244136

Solving for solid region heater
DICPCG:  Solving for T, Initial residual = 0.05991691, Final residual = 1.506036e-08, No Iterations 2
DICPCG:  Solving for T, Initial residual = 2.892845e-06, Final residual = 8.470107e-10, No Iterations 1
Min/max T:min(T) [0 0 0 1 0 0 0] 300 max(T) [0 0 0 1 0 0 0] 500

Solving for solid region leftSolid
DICPCG:  Solving for T, Initial residual = 0.9645239, Final residual = 1.318008e-07, No Iterations 2
DICPCG:  Solving for T, Initial residual = 1.649023e-05, Final residual = 5.392089e-09, No Iterations 1
Min/max T:min(T) [0 0 0 1 0 0 0] 300 max(T) [0 0 0 1 0 0 0] 300

Solving for solid region rightSolid
DICPCG:  Solving for T, Initial residual = 0.6954516, Final residual = 1.022314e-07, No Iterations 2
DICPCG:  Solving for T, Initial residual = 1.153665e-05, Final residual = 3.904825e-09, No Iterations 1
Min/max T:min(T) [0 0 0 1 0 0 0] 300 max(T) [0 0 0 1 0 0 0] 300
ExecutionTime = 3.04 s  ClockTime = 3 s

I'm struckling to plot for example Tmax of the heater region.

Any hint is appreciated.

Best Regards,
Toni
__________________
"When I meet God, I am going to ask him two questions: Why relativity? And why turbulence? I really believe he will have an answer for the first." Werner Heisenberg
val46 is offline   Reply With Quote

Old   September 5, 2012, 10:29
Default
  #2
New Member
 
Unnikrishnan Mohankumar
Join Date: Apr 2011
Posts: 29
Rep Power: 6
unnikrsn is on a distinguished road
Dear Tony.

Did you find an answer. I now at this positions.
I want to plot the temperature in each Region ( solid & Fluid )
But couldnt find a GNUplot code for including the next line..

Solving for solid region led_oben
DICPCG: Solving for T, Initial residual = 1, Final residual = 0.04405201, No Iterations 2
Min/max T:406.8886 580.7125

Solving for solid region led_unten
DICPCG: Solving for T, Initial residual = 1, Final residual = 0.04022057, No Iterations 2
Min/max T:407.0093 580.5514

Solving for solid region kuehlkoerper
DICPCG: Solving for T, Initial residual = 1, Final residual = 0.01958096, No Iterations 2
Min/max T:300 439.3916

Thanks & Regards
Unni

Last edited by unnikrsn; September 5, 2012 at 10:29. Reason: improving
unnikrsn is offline   Reply With Quote

Old   September 6, 2012, 02:35
Default
  #3
Member
 
Join Date: Nov 2009
Location: Germany
Posts: 96
Rep Power: 7
val46 is on a distinguished road
Hi,

it won't work just with gnuplot.
You need an additional script to extract the desired values before running gnuplot.

It should look somehow like this:
Code:
grep 'Solving for T:' log.chtMultiRegionFoam >log_new2
awk '(NR+1)%3==0' log_new2 >log_new3

Best Regards,

Toni
__________________
"When I meet God, I am going to ask him two questions: Why relativity? And why turbulence? I really believe he will have an answer for the first." Werner Heisenberg
val46 is offline   Reply With Quote

Old   September 7, 2012, 02:59
Default
  #4
New Member
 
Unnikrishnan Mohankumar
Join Date: Apr 2011
Posts: 29
Rep Power: 6
unnikrsn is on a distinguished road
Thanks for the reply.. It was very helpful...

Thanks & Regards
Unni
unnikrsn 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
thobois class engineTopoChangerMesh error Peter_600 OpenFOAM 4 August 2, 2014 09:52
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
Help for constructing an Unstructured Incompressible solver moomba Main CFD Forum 0 February 25, 2010 16:38
solver settings, residuals plateau for a long time Mumawalde CFX 2 December 17, 2007 09:49
Error during Solver cfd guy CFX 4 May 8, 2001 06:04


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