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

[PyFoam] gives unexpected output

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 21, 2012, 12:39
Default gives unexpected output
  #1
New Member
 
Florian
Join Date: Mar 2012
Location: Munich
Posts: 13
Rep Power: 14
Flor is on a distinguished road
Hi All,

I want to use pyFoam for getting some plots like timeStep and Courant number. When I type

Code:
pyFoamPlotWatcher.py --progress out.dat
I get a plot of the residuals and that's it. When I close the plot of the residuals I am stuck in the command line with the time output. On control-c some more windows pop up for a moment. In the folder out.dat.analyzed I only have a file pickledPlots, but no other data files. I am using Python 2.6.2.

Any idea how to solve this?

Best regards,
Florian
Flor is offline   Reply With Quote

Old   November 21, 2012, 15:04
Default
  #2
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 Flor View Post
Hi All,

I want to use pyFoam for getting some plots like timeStep and Courant number. When I type

Code:
pyFoamPlotWatcher.py --progress out.dat
I get a plot of the residuals and that's it. When I close the plot of the residuals I am stuck in the command line with the time output. On control-c some more windows pop up for a moment. In the folder out.dat.analyzed I only have a file pickledPlots, but no other data files. I am using Python 2.6.2.

Any idea how to solve this?

Best regards,
Florian
The behaviour (only Control-C stops the watcher) is perfectly normal and desirable (the simulation writing that file still might be running). The windows that pop up when terminating usually are a sign for datasets where data only exist for one time-step (pyFoam only starts plotting when at least data for two timesteps is in a set and only replots datasets where during a timestep new data has been added ... if the simulation is sufficiently large. If it isn't then only every X seconds the plots are redone. The reason for this is that otherwise the plotting would "eat" the whole CPU and leave no time for the simulation.

All this behaviour (and also the writing of datafiles) can be controlled by options: the --help-option is your friend and will tell you all there is to know about these (I can't stress enough that the documentation of the PyFoam-utilities is "hidden in plain sight" with that option: if you think a utility "should be able to do this" check there first)
__________________
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   November 28, 2012, 05:24
Default
  #3
New Member
 
Florian
Join Date: Mar 2012
Location: Munich
Posts: 13
Rep Power: 14
Flor is on a distinguished road
Ok, thank you for the quick reply. The --with-all option did the job.

By the way, is there a size limit for log files? I have a log file with 1.3GB and pyFoamPlotWatcher gets stuck after 28% of it. Same command works perfectly fine for a log file with 66MB.

Regards,
Florian
Flor is offline   Reply With Quote

Old   November 28, 2012, 06:11
Default
  #4
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 Flor View Post
Ok, thank you for the quick reply. The --with-all option did the job.

By the way, is there a size limit for log files? I have a log file with 1.3GB and pyFoamPlotWatcher gets stuck after 28% of it. Same command works perfectly fine for a log file with 66MB.

Regards,
Florian
No. There is no limit that I know of. Maybe you ran out of memory/disk quota/etc. Check with top or so for the memory usage (if it is excessive I'll consider it a bug)

Did 1Gig logs some time ago with the watcher. The experience lead to the development of a new feature: pyFoamRunner.py (and other utils) writes in the *.analyzed-directory a file called pickledPlots. This contains all the data collected during the run. With the utility pyFoamRedoPlots.py you can produce the plots in an instance (this only works for plots that were defined during the running: the stuff you get with --with-all and customRegexp. If you add stuff to customRegexp AFTER the run you've got to rerun the watcher)

Anyway: Because of this feature I don't have experience with current versions of PyFoam+large logs+pyFoamWatcher.py
__________________
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   November 28, 2012, 06:32
Default
  #5
New Member
 
Florian
Join Date: Mar 2012
Location: Munich
Posts: 13
Rep Power: 14
Flor is on a distinguished road
I don't observe any excessive memory usage, and disk space is also still available. But I will resort to the pyFoamRunner and pyFoamRedoPlots process in the future.

Thanks again for your help and the useful pyFoam-toolbox!

Regards,
Florian
Flor is offline   Reply With Quote

Old   November 28, 2012, 07:54
Default
  #6
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 Flor View Post
I don't observe any excessive memory usage, and disk space is also still available. But I will resort to the pyFoamRunner and pyFoamRedoPlots process in the future.

Thanks again for your help and the useful pyFoam-toolbox!

Regards,
Florian
Just make sure that before you go into production that pyFoamRunner.py doesn't show a similar behaviour with the run that produced the 1.3Gig log. Although the only thing that could be a problem with pyFoam is a counter variable for the lines, but that is a long so it shouldn't be a problem ... I think
__________________
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

Reply

Tags
pyfoam


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
ANSYS Workbench on "Uncertified" Linux Distros hsr CFX 289 April 20, 2023 10:23
[swak4Foam] outputTime in Swak function immortality OpenFOAM Community Contributions 20 October 6, 2022 13:08
FLUENT installation on UBUNTU 12.04 (LTS) teymourj FLUENT 2 March 1, 2017 23:24
error 262144 and unexpected disconnect when run on 2 nodes Emily1412 SU2 Installation 1 April 10, 2014 18:08
writing execFlowFunctionObjects immortality OpenFOAM Post-Processing 30 September 15, 2013 07:16


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