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

[PyFoam] PyFoam Installation Problems

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 18, 2022, 16:53
Default PyFoam Installation Problems
  #1
New Member
 
Nolan Dyck
Join Date: Dec 2013
Posts: 13
Rep Power: 11
njdyck is on a distinguished road
Hi, I have installed PyFoam version 2021.6 using pip on Ubuntu 20.04.4 LTS.

The only wrinkle I encountered so far was that my system installed the scripts at $HOME/.local/bin instead of /usr/local/bin. I solved this by adding it to my path in ~/.bashrc.

It recognizes OpenFOAM v8 when I run pyFoamVersion.py

I copied the tutorial case $FOAM_TUTORIALS/incompressible/icoFoam/cavity/cavity into $HOME, constructed the mesh, and ran icoFoam to confirm the case was setup properly.

Then I executed:
Code:
username@DESKTOP-7R3L17E:~/cavity$ pyFoamPlotRunner.py --clear --progress --auto auto
Clearing out old timesteps ....
 Warning in /home/username/.local/bin/pyFoamPlotRunner.py : Replacing solver 'auto' with icoFoam in arguments
 PyFoam WARNING on line 37 of file /home/username/.local/lib/python3.8/site-packages/PyFoam/Infrastructure/ServerBase.py : No certficate file /home/username/.pyFoam/foamServerCertificate.cert exists. Therefor no SSL-connection for the FoamServer possible
 To generate a private key:
    openssl genrsa -out /home/username/.pyFoam/foamServerCertificate.key 2048
Then generate the cerificate that is valid for 3 years with
    openssl req -new -x509 -key /home/username/.pyFoam/foamServerCertificate.key -out /home/username/.pyFoam/foamServerCertificate.cert -days 1095
Traceback (most recent call last):
  File "/home/username/.local/bin/pyFoamPlotRunner.py", line 5, in <module>
    PlotRunner()
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/Applications/PlotRunner.py", line 65, in __init__
    PyFoamApplication.__init__(self,
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/Applications/PyFoamApplication.py", line 496, in __init__
    result=self.run()
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/Applications/PlotRunner.py", line 122, in run
    run=GnuplotRunner(argv=self.replaceAutoInArgs(self.parser.getArgs()),
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/Execution/GnuplotRunner.py", line 197, in __init__
    GnuplotCommon.__init__(self,
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/Execution/GnuplotRunner.py", line 67, in __init__
    self.createPlots(persist=persist,
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/Execution/AnalyzedCommon.py", line 261, in createPlots
    plots["linear"]=createPlotTimelinesDirect("linear",
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/Basics/PlotTimelinesFactory.py", line 105, in createPlotTimelinesDirect
    return createPlotTimelines(timelines,ci,
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/Basics/PlotTimelinesFactory.py", line 56, in createPlotTimelines
    return lookupTable[implementation](timelines,
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/Basics/GnuplotTimelines.py", line 43, in __init__
    Gnuplot.__init__(self, persist=self.spec.persist, quiet=quiet)
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/ThirdParty/Gnuplot/_Gnuplot.py", line 179, in __init__
    self.gnuplot = gp.GnuplotProcess(persist=persist, quiet=quiet)
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/ThirdParty/Gnuplot/gp_unix.py", line 189, in __init__
    if not test_persist():
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/ThirdParty/Gnuplot/gp_unix.py", line 136, in test_persist
    (not response) or (string.find(response[0], '-persist') == -1))
AttributeError: module 'string' has no attribute 'find'
Exception ignored in: <function GnuplotProcess.__del__ at 0x7fefe30b9430>
Traceback (most recent call last):
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/ThirdParty/Gnuplot/gp_unix.py", line 214, in __del__
    self.close()
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/ThirdParty/Gnuplot/gp_unix.py", line 209, in close
    if self.gnuplot is not None:
AttributeError: 'GnuplotProcess' object has no attribute 'gnuplot'
Exception ignored in: <function Gnuplot.__del__ at 0x7fefc2527af0>
Traceback (most recent call last):
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/ThirdParty/Gnuplot/_Gnuplot.py", line 200, in __del__
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/ThirdParty/Gnuplot/_Gnuplot.py", line 195, in close
AttributeError: 'GnuplotTimelines' object has no attribute 'gnuplot'
username@DESKTOP-7R3L17E:~/cavity$ ls
0  Gnuplotting.analyzed  PyFoamServer.info  cavity.foam  constant  system
username@DESKTOP-7R3L17E:~/cavity$ vi PyFoamServer.info
Any help would be appreciated!
njdyck is offline   Reply With Quote

Reply

Tags
openfoam 8, pyfoam installation

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[PyFoam] Problems with installing PyFoam Christoph_84 OpenFOAM Community Contributions 34 October 26, 2021 12:25
[OpenFOAM.com] v1606+ Problems of installation on iMac Intercooled OpenFOAM Installation 4 November 15, 2016 21:22
Problems installing SVN in Ubuntu (for later installing PyFoam for OpenFOAM) immortality Lounge 2 May 24, 2014 04:05
Problems with installation batta31 OpenFOAM Installation 2 September 4, 2012 08:01
installation problems on upgrade from win 3.26 to mic Siemens 5 June 20, 2007 10:40


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