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

Residual plotting

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 28, 2008, 11:25
Default Hi! The warnings are from g
  #21
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi!

The warnings are from gnuplot they mean "you've given me a series (t_n,y_n) were all y_n have the same value, I'll extend the y-range to [y_n-eps,y_+eps]", but something should be plotted anyway (if there are more than two timesteps in the logfile). One problem could be that the watcher waits for a timestep that never comes before plotting. Try playing around with --tail to fix that.

Could you give me more information about the Logfile you're trying to process?

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   February 4, 2009, 10:10
Default Hi , I am using lesInterFOA
  #22
Senior Member
 
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 17
kumar is on a distinguished road
Hi ,
I am using lesInterFOAM to run my simulations. I want to plot my residuals and check if my solution is converged or not.
I found that there are two ways to do that
I used the PyFOAMPlotwatcher.py log_file to plot my log file, but it gave me the three plots
1)Residuals vs time steps (unstaedy calculation)
2)continuity vs cummulative and global
3)Bounded variables (K_min,k_max,K-avg)

I cannot understand the significance of the first two plots, could somebody explain to me the first two plots in terms of convergence with respect to OpenFOAM

I also used the foamlog script to make a directory which has the relevant data. But How do I plot them correctly.

since i am a new user any help will be appreciated
bye
kumar is offline   Reply With Quote

Old   February 4, 2009, 11:29
Default Hi, I used the foamLog com
  #23
Senior Member
 
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 17
kumar is on a distinguished road
Hi,
I used the foamLog command on my log file and I got the logs directory. The directory contains files pd_0,pd_1,pdIters_0,pdIters_1,pdfinalRes_0,pdFinal Res_1

I used xmgrace to plot these files,
but i want to be sure what each of these files correspond to,
for eg if i want to see the final residual of my pressure correction equation and pressure equation(pd) over time step which files do I have to plot.

bye
kumar is offline   Reply With Quote

Old   February 5, 2009, 04:46
Default I have made a residuals plot u
  #24
Senior Member
 
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 17
kumar is on a distinguished road
I have made a residuals plot using the PythonPlotwatcher.py on my log file, but can somebody explain what this script plots from the log file, just a brief explanation is sufficient

if required i can send the plot as well

how do i post my graph on this message space.


bye
with regards
K.Suresh kumar
kumar is offline   Reply With Quote

Old   February 5, 2009, 05:06
Default Hello everybody, I need som
  #25
Senior Member
 
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 17
kumar is on a distinguished road
Hello everybody,

I need some help in understanding the log file. I am using lesInterfoam for simulation of liquid being injected in to a chamber under pressure difference

Courant Number mean: 0.0031196519 max: 0.4989031
deltaT = 8.5500283e-09
Time = 3.770929904e-05

MULES: Solving for gamma
Liquid phase volume fraction = 0.0015046647 Min(gamma) = -5.2829736e-11 Max(gamma) = 1
MULES: Solving for gamma
Liquid phase volume fraction = 0.0015048032 Min(gamma) = -1.0746907e-11 Max(gamma) = 1
MULES: Solving for gamma
Liquid phase volume fraction = 0.0015049417 Min(gamma) = -5.7332803e-11 Max(gamma) = 1
smoothSolver: Solving for k, Initial residual = 0.00045105006, Final residual = 8.3348678e-08, No Iterations 3
bounding k, min: -1.2895711e-09 max: 12308.897 average: 94.35856
smoothSolver: Solving for Ux, Initial residual = 0.01244294, Final residual = 8.2049502e-07, No Iterations 3
smoothSolver: Solving for Uy, Initial residual = 0.0026720077, Final residual = 1.3961205e-07, No Iterations 3
smoothSolver: Solving for Uz, Initial residual = 0.030640138, Final residual = 6.3619817e-08, No Iterations 4
GAMG: Solving for pd, Initial residual = 0.33910157, Final residual = 0.0029885117, No Iterations 12
GAMGPCG: Solving for pd, Initial residual = 0.015574446, Final residual = 6.190298e-07, No Iterations 61
time step continuity errors : sum local = 1.0611522e-11, global = -2.129606e-13, cumulative = -3.2031832e-10
ExecutionTime = 64859.16 s ClockTime = 64890 s

Courant Number mean: 0.003118677 max: 0.49893967
deltaT = 8.5500283e-09
Time = 3.771784907e-05

MULES: Solving for gamma
Liquid phase volume fraction = 0.0015050802 Min(gamma) = -4.7481924e-11 Max(gamma) = 1
MULES: Solving for gamma
Liquid phase volume fraction = 0.0015052187 Min(gamma) = -5.7624764e-12 Max(gamma) = 1
MULES: Solving for gamma
Liquid phase volume fraction = 0.0015053572 Min(gamma) = -1.4955086e-11 Max(gamma) = 1
smoothSolver: Solving for k, Initial residual = 0.00044780268, Final residual = 8.0865222e-08, No Iterations 3
bounding k, min: -1.5803901e-09 max: 12310.74 average: 94.450017
smoothSolver: Solving for Ux, Initial residual = 0.012391458, Final residual = 8.2098518e-07, No Iterations 3
smoothSolver: Solving for Uy, Initial residual = 0.0026448201, Final residual = 1.3871489e-07, No Iterations 3
smoothSolver: Solving for Uz, Initial residual = 0.030546766, Final residual = 6.7991922e-08, No Iterations 4
GAMG: Solving for pd, Initial residual = 0.32492639, Final residual = 0.0031413767, No Iterations 8
GAMGPCG: Solving for pd, Initial residual = 0.014844994, Final residual = 7.1476504e-07, No Iterations 61
time step continuity errors : sum local = 1.2763008e-11, global = 5.349711e-15, cumulative = -3.2031297e-10
ExecutionTime = 64881.31 s ClockTime = 64912 s

From the details of my log file as posted above i can see that my gamma value is bounded between -4.74881 and 1.
the final residual for k shows that k is converging to 8.0e-08. which is fine .

the Ux, Uy and Uz are also fine.

My only concern is about the pd
can anybody explain the first line GAMG:solving for pd where the final residual is 0.00314137767, which i think is not satisfying to me.
also what does the second line GAMGPCG:solving for pd correspond to where the final residual is 7.14e-07.

From the time step continuity errors i understand that my continutiy equation is converged to 1.27e-11. I have also managed to plot the log file using PyFOAMPlotwatcher.py, but i need some idea about the log file.
bye
K.Suresh kumar
kumar is offline   Reply With Quote

Old   April 20, 2009, 05:59
Default
  #26
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
Quote:
Originally Posted by santos View Post
Hi Ivan,

I am using Bernhard PyFoam tools to monitor the residuals in OpenFOAM 1.5 as follows:

simpleFoam > log &
pyFoamPlotWatcher.py log
That's exactly what I need! Thank you Jose, and thank you Bernhard!
__________________
~
Daniel WEI
-------------
Boeing Research & Technology - China
Beijing, China
Email
lakeat is offline   Reply With Quote

Old   May 13, 2009, 03:58
Default
  #27
Senior Member
 
Wolfgang Heydlauff
Join Date: Mar 2009
Location: Germany
Posts: 136
Rep Power: 21
wolle1982 will become famous soon enough
Plotting Residuals (or forces) on the fly with gnuplot without any further pyFOAM problems see my tutorial under http://www.cfd-online.com/Forums/ope...residuals.html
wolle1982 is offline   Reply With Quote

Old   October 7, 2009, 12:37
Default Same Problem
  #28
New Member
 
Jacques
Join Date: Oct 2009
Posts: 15
Rep Power: 16
jackpap is on a distinguished road
PyFoam-bin/lib64/python2.6/site-packages/PyFoam/FoamInformation.py:5: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module.
from popen2 import popen4
Warning: empty x range [1:1], adjusting to [0.99:1.01]
Warning: empty y range [-0.000908794:-0.000908794], adjusting to [-0.000899706:-0.000917882]
Warning: empty y2 range [-0.000908794:-0.000908794], adjusting to [-0.000899706:-0.000917882]
Warning: empty x range [1:1], adjusting to [0.99:1.01]


I'm having the same kind of problem when running pyFoamPlotWatcher
I have just installed the svn version of PyFoam and I'm running Foam 1.5.
I am also running in OpenSuse :

-> Linux 2.6.27.23-0.1-default (openSUSE 11.1)
-> Python 2.6
-> gnuplot 4.2 patchlevel 3

--> Also the funny thing is when I use the options to write out the residuals in a file , the files are output without a problem and list all the timesteps...


Any help appreciated.

Last edited by jackpap; October 7, 2009 at 13:07.
jackpap is offline   Reply With Quote

Old   October 9, 2009, 13:22
Default
  #29
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by jackpap View Post
PyFoam-bin/lib64/python2.6/site-packages/PyFoam/FoamInformation.py:5: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module.
from popen2 import popen4
Warning: empty x range [1:1], adjusting to [0.99:1.01]
Warning: empty y range [-0.000908794:-0.000908794], adjusting to [-0.000899706:-0.000917882]
Warning: empty y2 range [-0.000908794:-0.000908794], adjusting to [-0.000899706:-0.000917882]
Warning: empty x range [1:1], adjusting to [0.99:1.01]


I'm having the same kind of problem when running pyFoamPlotWatcher
I have just installed the svn version of PyFoam and I'm running Foam 1.5.
I am also running in OpenSuse :

-> Linux 2.6.27.23-0.1-default (openSUSE 11.1)
-> Python 2.6
-> gnuplot 4.2 patchlevel 3

--> Also the funny thing is when I use the options to write out the residuals in a file , the files are output without a problem and list all the timesteps...


Any help appreciated.
The deprecated warning shouldn't be a problem (and it will be fixed in the next release). The empty-range stuff is gnuplot (if all the points in a set have the same value). The not-appearing of plot-windows is strange (and usually occurs on SuSe-machines). One test: add the --hardcopy-option and check whether any PNG or PS (depends on the version) are created.

Bernhard
gschaider is offline   Reply With Quote

Old   April 25, 2013, 16:57
Default
  #30
New Member
 
Rajesh Kumar
Join Date: Apr 2009
Posts: 25
Rep Power: 17
rajeshkunwar is on a distinguished road
Hi All.

I am using buoyantPimpleFoam and the residuals of k_0, Ux_0 are fluctuating and does not come down ( I mean below 1e-5). I am running on a very fine mesh. What could be the problem.

Rajesh
rajeshkunwar 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
[OpenFOAM] Plotting residual in paraFoam booz ParaView 3 August 12, 2008 06:35
Real-time residual and results plotting simone Marras Main CFD Forum 6 January 29, 2007 07:57
X-Y plotting Babu FLUENT 1 March 25, 2005 05:45
residual plotting in Prostar Ossi Siemens 15 March 14, 2003 07:54
plotting the value of y-plus Dennis CFX 3 May 16, 2002 13:43


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