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

pyfoamPlotRunner and Watcher do not show any plots, only terminal outputs

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 15, 2022, 04:21
Default pyfoamPlotRunner and Watcher do not show any plots, only terminal outputs
  #1
New Member
 
Marrie
Join Date: Dec 2014
Posts: 13
Rep Power: 0
manle0312 is on a distinguished road
I am running the Vortex Shedding c2 case. I run my case using the following commands:


Code:
foamCleanTutorials
Code:
fluent3DMeshesToFoam ../../../meshes_geometries/vortex_shedding/ascii.msh
Code:
checkMesh
Code:
renumberMesh -overwrite
Code:
icoFoam | tee log.icofoam
Code:
pyFoamPlotWatcher.py log.icofoam
Code:
gnuplot scripts0/plot_coeffs
Code:
paraFoam
I managed to run the case using icoFoam, plot the coefficients and visualize it using openFoam. However, I am unable to get
Code:
pyFoamPlotWatcher.py log.icofoam
to show any plots.
I made sure that my simulation does have a lot of time step data (350 seconds in total, and plot_coeffs do have a lot of time data). I also tried to use
Code:
pyFoamPlotRunner.py icoFoam
. But, both of these only give terminal outputs and no plots.



So, to sum up:
Code:
pyFoamPlotWatcher.py log.icofoam
gives these output:
https://pastebin.com/iKqkDD07


Code:
pyFoamPlotRunner.py icoFoam
gives these output:
https://pastebin.com/nzJPPzCr


I see no plot outputs popping up. I am on Arch Linux and also tried to switch Desktop Environment to see if it helps, still didnt get any plots.

Also, i made sure that my
Code:
gnuplot
command works.



Any help is appreciated.
manle0312 is offline   Reply With Quote

Old   August 26, 2022, 09:43
Default
  #2
Member
 
Hyun Ko
Join Date: Jun 2009
Posts: 35
Rep Power: 17
hyunko is on a distinguished road
Do you use openfoam10?
In OF10, I have a same issue for PyFoam.
hyunko is offline   Reply With Quote

Old   August 29, 2022, 04:19
Default
  #3
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
Trigger warning: this posting may contain sarcasm. Don't read if you find that disturbing



Quote:
Originally Posted by hyunko View Post
Do you use openfoam10?
In OF10, I have a same issue for PyFoam.

Yeah. It is OF10


PyFoam needs to the detect the current time to do the plotting. For the last 20 years OF printed out the time in this format
Code:
Time = 42
Now it seems that the Foundation found out that one of the major problems that made using OpenFOAM hard was that people thought this might 42 years. So it seems that they changed it to
Code:
Time = 42s
to make things easier for the user. Unfortunately the extra "s" means that PyFoam doesn't recognize it as Time and therefore doesn't plot anything


As a temporary fix you can create a file ~/.pyFoam/pyfoamrc.d/of10.cfg with the content
Code:
[SolverOutput]
timeregexp: ^(Time =|Iteration:) (.+)s$
This makes PyFoam recognize the time format of OF10 but breaks it for all distros that value backwards-compatibility (and also OF9 and earlier)


For the next PyFoam-version I'll hardcode a time-expression that
- works for older versions (because I think that backwards-compatibility is courtesy towards the user)
- recognizes the alternate format
- does not accept everything that has "Time =" in it as a valid time (this is the hard part because there are outputs like "ExecutionTime =" that should not fit)
__________________
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   August 29, 2022, 07:52
Default
  #4
Member
 
Hyun Ko
Join Date: Jun 2009
Posts: 35
Rep Power: 17
hyunko is on a distinguished road
Thanks for your kind explanation.
hyunko 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



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