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

[PyFoam] problems with pyFoamSamplePlot.py

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 6, 2009, 12:34
Default
  #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
Quote:
Originally Posted by Thomas Baumann View Post

But now there is the following (using pyFoamPlotWatcher) message:

Warning: empty x range [1:1], adjusting to [0.99:1.01]
Warning: empty y range [5.60322e-06:5.60322e-06], adjusting to [5.54719e-06:5.65925e-06]
Warning: empty y2 range [5.60322e-06:5.60322e-06], adjusting to [5.54719e-06:5.65925e-06]
Warning: empty x range [1:1], adjusting to [0.99:1.01]

Two gnuplot pop-ups open, but no graphs are displayed.
These messages come from Gnuplot. They mean "You have only given me one data point until now. I'm stretching that point a bit so that it becomes a range". Usually that has two reasons:

a) There was only one time-step yet (in your case that would be t=1)
b) there is more than one time-step but pyFoam doesn't recognize it. This happened in the past (certain solvers use a different annotation for the time-steps)

Could you tell me
a) which solver you're using (and which version of OF)
b) could you provide me with the complete output of two or three time-steps so that I can try to reproduce the problem

Quote:
Originally Posted by Thomas Baumann View Post
I have searched in the forum and I found the same problem description in
http://www.cfd-online.com/Forums/ope...-pyfoam-5.html

Has the problem been solved yet?
Honestly, I don't know (because I can't remember). Judging from the thread I'd say no, because I never could reproduce it

Quote:
Originally Posted by Thomas Baumann View Post
I installed the pyFoam Version from https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Breede r/other/scripting/PyFoam, but nothing changed.

By the way, when starting pyFoamPlotRunner.py I get the same message.
The version on the SVN is virtually the same as the one distributed via the Wiki (no bug-fixes yet).

Bernhard
gschaider is offline   Reply With Quote

Old   April 7, 2009, 08:59
Default
  #22
Senior Member
 
Join Date: Apr 2009
Location: Karlsruhe, Germany
Posts: 103
Rep Power: 17
Thomas Baumann is on a distinguished road
Hi Bernhard,

I got the error message for example with the solver icoFoam by solving the tatorial-file from the tutorial icoFoam/cavity.

The OpenFOAM version is the git version (OpenFOAM-1.5.x.git)

Here is the output from the log file:


Quote:
create time

Create mesh for time = 0

Reading transportProperties

Reading field p

Reading field U

Reading/calculating face flux field phi

Starting time loop

Time = 0.005

Courant Number mean: 0 max: 0
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 2.96338e-06, No Iterations 8
DILUPBiCG: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0
DICPCG: Solving for p, Initial residual = 1, Final residual = 7.55402e-07, No Iterations 35
time step continuity errors : sum local = 5.03809e-09, global = 4.40722e-19, cumulative = 4.40722e-19
DICPCG: Solving for p, Initial residual = 0.523591, Final residual = 9.72352e-07, No Iterations 34
time step continuity errors : sum local = 1.07766e-08, global = 2.93897e-19, cumulative = 7.34619e-19
ExecutionTime = 0.03 s ClockTime = 0 s

Time = 0.01

Courant Number mean: 0.0514108 max: 0.585722
DILUPBiCG: Solving for Ux, Initial residual = 0.148584, Final residual = 7.15711e-06, No Iterations 6
DILUPBiCG: Solving for Uy, Initial residual = 0.256618, Final residual = 8.94127e-06, No Iterations 6
DICPCG: Solving for p, Initial residual = 0.379232, Final residual = 3.38648e-07, No Iterations 34
time step continuity errors : sum local = 3.15698e-09, global = 1.94222e-19, cumulative = 9.28841e-19
DICPCG: Solving for p, Initial residual = 0.286937, Final residual = 5.99637e-07, No Iterations 33
time step continuity errors : sum local = 6.08774e-09, global = 5.80474e-19, cumulative = 1.50932e-18
ExecutionTime = 0.03 s ClockTime = 0 s

Time = 0.015

Courant Number mean: 0.0761501 max: 0.758286
DILUPBiCG: Solving for Ux, Initial residual = 0.0448669, Final residual = 2.39894e-06, No Iterations 6
DILUPBiCG: Solving for Uy, Initial residual = 0.0782408, Final residual = 1.45948e-06, No Iterations 7
DICPCG: Solving for p, Initial residual = 0.109591, Final residual = 5.81093e-07, No Iterations 32
time step continuity errors : sum local = 4.70049e-09, global = -5.90607e-20, cumulative = 1.45025e-18
DICPCG: Solving for p, Initial residual = 0.0826507, Final residual = 7.26561e-07, No Iterations 31
time step continuity errors : sum local = 5.95385e-09, global = -5.75718e-20, cumulative = 1.39268e-18
ExecutionTime = 0.04 s ClockTime = 0 s
I checked the log file with an ubuntu system, but another version of OpenFOAM (1.5 64bit compiled download version) and everything worked.

Regards, Thomas
Thomas Baumann is offline   Reply With Quote

Old   April 7, 2009, 14:09
Default
  #23
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 Thomas!

Strange. Could you try the watcher on that file with the option --tail=0 ?

Bernhard
gschaider is offline   Reply With Quote

Old   April 8, 2009, 02:51
Default
  #24
Senior Member
 
Join Date: Apr 2009
Location: Karlsruhe, Germany
Posts: 103
Rep Power: 17
Thomas Baumann is on a distinguished road
Hi Bernhard,

with pyFoamPlotWatcher.py --tail=0 logfile I get nearly the same massage:

Quote:
/usr/local/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 [0.005:0.005], adjusting to [0.00495:0.00505]
Warning: empty y range [4.40722e-19:4.40722e-19], adjusting to [4.36315e-19:4.45129e-19]
Warning: empty y2 range [4.40722e-19:4.40722e-19], adjusting to [4.36315e-19:4.45129e-19]
Warning: empty x range [0.005:0.005], adjusting to [0.00495:0.00505]
Warning: empty y range [1:1], adjusting to [0.99:1.01]
Python 2.6 is installed with GCC 4.3.2.
I installed pyFoam as root, too, but nothing changed.

Regards, Thomas
Thomas Baumann is offline   Reply With Quote

Old   April 8, 2009, 11:00
Default
  #25
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 Thomas Baumann View Post
Hi Bernhard,

with pyFoamPlotWatcher.py --tail=0 logfile I get nearly the same massage:



Python 2.6 is installed with GCC 4.3.2.
I installed pyFoam as root, too, but nothing changed.

Regards, Thomas
OK. The --tail=0 was to check if there is a timing problem. No such luck.

Have I understood you correctly:

- OpenSuse with Python 2.6: Not working
- Ubuntu with Python2.6 on 64 Bit: working (other posting)

Weird. I think the problem is that the regular expression for "Time =" is not correctly matched on the Suse-system. I have a number of suspicions that involve stuff like Unicode and other encoding issues (nevertheless this would be a very weird problem). I'll try to come up with a test that helps to show what the problem might be, but it'll take some time.

Just another weird idea: You're using Suse and your surname sounds german: could you try this again with a user with English locales (Keyboard can stay ) - if you're using non-english locales. This is one of the "other encoding"-ideas

Bernhard

BTW: Pointing out other peoples typos is the sign of a very simple mind, but the "I get nearly the same massage" was one of the highlights of this day. One of these days I really should try OpenSuse ....
gschaider is offline   Reply With Quote

Old   April 9, 2009, 11:08
Default
  #26
Senior Member
 
Join Date: Apr 2009
Location: Karlsruhe, Germany
Posts: 103
Rep Power: 17
Thomas Baumann is on a distinguished road
Hi,

you're right, I'm from Germany (that's the reason for my bad English.. )

I have changed to English locales, but the problem still exists.

The Ubuntu System uses Python 2.5.1 with GCC 4.1.3. But the log-file, which has been created in the Suse system, works. So you can use the log file (created in Suse) and plot it in Ubuntu.

Happy Easter!
Thomas
Thomas Baumann is offline   Reply With Quote

Old   April 14, 2009, 15:35
Default
  #27
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 Thomas Baumann View Post
Hi,

you're right, I'm from Germany (that's the reason for my bad English.. )
It was not the English (yours is quite good .... from an Austrians point of view ) it was the name that led me to that conclusion

Quote:
Originally Posted by Thomas Baumann View Post
I have changed to English locales, but the problem still exists.
Thanks for checking

Quote:
Originally Posted by Thomas Baumann View Post
The Ubuntu System uses Python 2.5.1 with GCC 4.1.3. But the log-file, which has been created in the Suse system, works. So you can use the log file (created in Suse) and plot it in Ubuntu.
Very strange. Everything points to a problem with regular expressions. I will have a look

Bernhard
gschaider is offline   Reply With Quote

Old   April 27, 2009, 16:35
Default
  #28
Member
 
Nugroho Adi
Join Date: Mar 2009
Location: norway
Posts: 79
Rep Power: 17
mahaputra is on a distinguished road
Quote:
Originally Posted by gschaider View Post
It was not the English (yours is quite good .... from an Austrians point of view ) it was the name that led me to that conclusion



Thanks for checking



Very strange. Everything points to a problem with regular expressions. I will have a look

Bernhard
Dear Bernhard Gschaider


did you prepare simple tutorial how to install and run pyFoam?

i read this thread, and seems interesting

but i dont know how to start with your script

please show me any link how to start from the simple work with pyFoam

and what is the latest ''feature'' of pyFoam has right now?

please so be kind to teach me

danke
mahaputra is offline   Reply With Quote

Old   April 28, 2009, 12:36
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
Hi!

Quote:
Originally Posted by mahaputra View Post
Dear Bernhard Gschaider


did you prepare simple tutorial how to install and run pyFoam?

i read this thread, and seems interesting
The most up-to-date documentation is found on the Wiki-page. For installing this would be:
http://openfoamwiki.net/index.php/Co...m#Installation
Quote:
Originally Posted by mahaputra View Post
but i dont know how to start with your script

please show me any link how to start from the simple work with pyFoam

and what is the latest ''feature'' of pyFoam has right now?
There is also an almost complete list with all the utilities on the page. To get a complete list type "pyFoam" on the Command line and then use the TAB-key to give you a list of all the installed utilities (assuming that your shell supports command completion)

Every utility has documentation that is shown when calling it with the --help-option

Sorry. That's all the documentation there is.

Bernhard
gschaider is offline   Reply With Quote

Old   October 5, 2009, 10:13
Default
  #30
Senior Member
 
Rasmus Hemph
Join Date: Mar 2009
Location: Sweden
Posts: 108
Rep Power: 17
hemph is on a distinguished road
Hi.
Curious. Did this problem find its solution? I am experiencing the same error messages about empty ranges as Thomas did. The system I am using is 64 bit OpenSUSE 11.1 and OpenFOAM 1.6.x.

Kindly,
Rasmus
hemph is offline   Reply With Quote

Old   October 7, 2009, 08:24
Default Was this problem sorted?
  #31
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Hi,

Firstly pyFoam is a great utility.

But I sometimes, using pyFoamPlotWatcher, get a similar error to that posted above, and a blank gnuplot appears.

Code:
Warning: empty x range [1:1], adjusting to [0.99:1.01]
Warning: empty y range [1:1], adjusting to [0.99:1.01]
And then it starts printing out the latest log entries.

The strange thing is that 'pyFoamPlotWatcher' works for me on similar cases... strange.


I just recently downloaded pyFoam from using svn from the link on the wiki.

Was this problem figured out?


Philip

BTW: I am using OpenSUSE 11.0 32 bit and OF-1.4.1-dev

EDIT: When I try run the pyFoamPlotWatcher on the same case later, it works. I think the reason I got the error is because the first timestep hasn't been completed yet. I have many corrector steps within each timestep and didn't realise it was still on the first step. So problem solved from my perspective... i think/hope.

Last edited by bigphil; October 7, 2009 at 10:18. Reason: Problem figured out I think
bigphil is offline   Reply With Quote

Old   October 9, 2009, 12:42
Default
  #32
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 bigphil View Post
Hi,

Firstly pyFoam is a great utility.

But I sometimes, using pyFoamPlotWatcher, get a similar error to that posted above, and a blank gnuplot appears.

Code:
Warning: empty x range [1:1], adjusting to [0.99:1.01]
Warning: empty y range [1:1], adjusting to [0.99:1.01]
And then it starts printing out the latest log entries.

The strange thing is that 'pyFoamPlotWatcher' works for me on similar cases... strange.


I just recently downloaded pyFoam from using svn from the link on the wiki.

Was this problem figured out?


Philip

BTW: I am using OpenSUSE 11.0 32 bit and OF-1.4.1-dev

EDIT: When I try run the pyFoamPlotWatcher on the same case later, it works. I think the reason I got the error is because the first timestep hasn't been completed yet. I have many corrector steps within each timestep and didn't realise it was still on the first step. So problem solved from my perspective... i think/hope.
The message above is Gnuplots way of saying "I have only one data-point and can't draw a line". No easy way to get rid of this message and I don't want to because it helps finding other problems

Bernhard
gschaider is offline   Reply With Quote

Old   October 9, 2009, 12:50
Default
  #33
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Thanks for the reply Bernhard,

I understand now.

Philip
bigphil is offline   Reply With Quote

Old   October 21, 2009, 07:21
Default pyFoamPlotWatcher with python 2.6?
  #34
Senior Member
 
Rasmus Hemph
Join Date: Mar 2009
Location: Sweden
Posts: 108
Rep Power: 17
hemph is on a distinguished road
Is it confirmed that pyFoamPlotWatcher works with python 2.6? I am asking because I just saw that there is no problem with plotting residuals on my server where python 2.3.5 is installed as default.

Running pyFoamPlotWatcher.py on the very same logfile on my own computer (with python 2.6) spits out the *wrong* error messages about empty x and y ranges. As Bernhard points out in a post above, it appears to be something related to pattern matching.

Best,
Rasmus
hemph is offline   Reply With Quote

Old   October 21, 2009, 07:39
Default
  #35
Member
 
olivier Petit
Join Date: Mar 2009
Location: Göteborg, Sweden
Posts: 67
Rep Power: 17
olivier is on a distinguished road
Hello Bernhard!!

I have a small problem when installing the latest of PyFoam: when I try to compile it (as a regular user, not as root, on Gnome), I get this following error:

Neither numpy nor Numeric python-package installed. Plotting won't work.

And indeed, if I want to use PyFoamPlotWatcher.py utility, it doesn't work.

Any idea if I am missing some package, or how I can go around this error message?

Thank you very much!
Olivier
olivier is offline   Reply With Quote

Old   October 21, 2009, 13:02
Default
  #36
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 olivier View Post
Hello Bernhard!!

I have a small problem when installing the latest of PyFoam: when I try to compile it (as a regular user, not as root, on Gnome), I get this following error:

Neither numpy nor Numeric python-package installed. Plotting won't work.

And indeed, if I want to use PyFoamPlotWatcher.py utility, it doesn't work.

Any idea if I am missing some package, or how I can go around this error message?

Thank you very much!
Olivier
There is no way around it: the Gnuplot-Library needs one of those packages (which are API-equivalent) to be able to plot.
They are quite common and almost any python-software that does large numerical array uses them.
Talk to your friendly neighborhood admin about installing one of them

Bernhard
gschaider is offline   Reply With Quote

Old   October 21, 2009, 13:06
Default
  #37
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 hemph View Post
Is it confirmed that pyFoamPlotWatcher works with python 2.6? I am asking because I just saw that there is no problem with plotting residuals on my server where python 2.3.5 is installed as default.

Running pyFoamPlotWatcher.py on the very same logfile on my own computer (with python 2.6) spits out the *wrong* error messages about empty x and y ranges. As Bernhard points out in a post above, it appears to be something related to pattern matching.
I think the publicly available version SHOULD work, but I'm not sure (I use another version internally that I will publish once I have gotten it to work with Paraview 3.6. That one definitly works with Python 2.6)
gschaider is offline   Reply With Quote

Old   October 21, 2009, 14:32
Default
  #38
Member
 
olivier Petit
Join Date: Mar 2009
Location: Göteborg, Sweden
Posts: 67
Rep Power: 17
olivier is on a distinguished road
Thank you for the answer Bernhard,

I actually found some NumPy installed somewhere in the system, but I think it is not at the right place so that PyFoam doesn't find it.

Would you happen to know where you specify the path of NumPy in PyFoam? I guess somewhere before the compilation there is a file that is read where NumPy's path is given.

If I could change this path to the one that I have, I guess there would be no problems.

Cheers,

Olivier
olivier is offline   Reply With Quote

Old   October 21, 2009, 14:43
Default
  #39
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 olivier View Post
Thank you for the answer Bernhard,

I actually found some NumPy installed somewhere in the system, but I think it is not at the right place so that PyFoam doesn't find it.

Would you happen to know where you specify the path of NumPy in PyFoam? I guess somewhere before the compilation there is a file that is read where NumPy's path is given.

If I could change this path to the one that I have, I guess there would be no problems.

Cheers,

Olivier
The path to non-standard Python-Libraries is specified by the PYTHONPATH-environment-variable (use like the usual PATH-variable)

Bernhard
gschaider is offline   Reply With Quote

Old   October 21, 2009, 14:48
Default
  #40
Member
 
olivier Petit
Join Date: Mar 2009
Location: Göteborg, Sweden
Posts: 67
Rep Power: 17
olivier is on a distinguished road
Then I am missing something, because I am poiting at the NumPy installation in the PYTHONPATH. I will try to have a look at it tomorrow. I hate when I am not admin...

Olivier
olivier 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
[ICEM] Problems with coedge curves and surfaces tommymoose ANSYS Meshing & Geometry 6 December 1, 2020 11:12
[mesh manipulation] Problems with rotational cyclic boundaries TReviol OpenFOAM Meshing & Mesh Conversion 8 July 11, 2014 03:45
Needed Benchmark Problems for FSI Mechstud Main CFD Forum 4 July 26, 2011 12:13
Two-phase air water flow problems by activating Wall Lubrication Force challenger85 CFX 5 November 5, 2009 05:44
Help required to solve Hydraulic related problems aero CFX 0 October 30, 2006 11:00


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