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

[PyFoam] On Windows: Setup

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By tmik

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 23, 2018, 07:56
Default On Windows: Setup
  #1
New Member
 
Thomas M
Join Date: Aug 2018
Posts: 20
Rep Power: 7
tmik is on a distinguished road
Hi all,


I'm trying to get a good setup for monitoring the residuals from my solve using OpenFOAM for Windows.

Typically people use foamMonitor (https://cfd.direct/openfoam/user-gui...hs-monitoring/), gnuplot (Tutorial of how to plot residuals !), or PyFoam (pyFoamPlotWatcher.py; Using pyFoamPlotWatcher.py To Plot Residuals)


However! I can't get any of these to work inside windows.
So far the best I can do is open the residual.dat file in excel and update manually.


Any suggestions on a nicer tool to use? Perhaps a python script for plotting?


-Thomas
tmik is offline   Reply With Quote

Old   August 23, 2018, 15:09
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Thomas and welcome to the forum!

Please provide more details to which "OpenFOAM for Windows" installation instructions you've followed.
I ask this because nowadays there are 2 to 5 different ways to install OpenFOAM on Windows... and each will have a different way to install PyFoam...

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   August 23, 2018, 15:16
Default
  #3
New Member
 
Thomas M
Join Date: Aug 2018
Posts: 20
Rep Power: 7
tmik is on a distinguished road
Hi Bruno! Thanks!


I'm using OpenFOAM4Windows v1806.0 (using docker), on windows 10.
I've got python 3.7.0 installed via PyCharm IDE with the PyFoam 0.6.10 package.

Update: As a work-around I've gotten excel to do the plotting for me.

I've used the "Get External Data" > "From Text". From here, I've used tab separated text columns, and plotted the columns on a scatter plot.


Seems to work alright for a windows hack!
Attached Images
File Type: jpg 1.jpg (65.1 KB, 64 views)
File Type: jpg 2.jpg (143.6 KB, 48 views)
wyldckat likes this.

Last edited by wyldckat; August 23, 2018 at 15:33. Reason: merged posts that were a few minutes apart
tmik is offline   Reply With Quote

Old   August 23, 2018, 15:40
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: If you still want to use PyFoam for plotting the residuals, then please run the following script and provide its output:
Code:
pyFoamVersion.py
It will tell us what features are available and which aren't.


Furthermore, what error messages do you get when you try to run PyFoam's plotting scripts?
wyldckat is offline   Reply With Quote

Old   January 22, 2021, 05:40
Default
  #5
New Member
 
Join Date: Dec 2020
Posts: 26
Rep Power: 5
OlivierM is on a distinguished road
hello

I have exactly the same issue: the only way for me to plot residuals is through excel from the dat. files.
I have spent days to try making it with foamMonitor, gnuplot, pyFoam but no success at all !

I have installed PyFoam using pip3

#
$ pip3 install PyFoam
Requirement already satisfied: PyFoam in ./.local/lib/python3.8/site-packages (2020.5)
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from PyFoam) (1.17.4)
#

and this is what I got when asking for pyFoam version:

$ pyFoamVersion.py
Traceback (most recent call last):
File "/usr/local/bin/pyFoamVersion.py", line 4, in <module>
__import__('pkg_resources').run_script('PyFoam==20 20.5', 'pyFoamVersion.py')
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 667, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1452, in run_script
raise ResolutionError(
pkg_resources.ResolutionError: Script 'scripts/pyFoamVersion.py' not found in metadata at '/home/<USER>/.local/lib/python3.8/site-packages/PyFoam-2020.5.dist-info'
#

would you have any idea of what could be the problem ?

I am running OFv2012 on Unbuntu 20.04 LTS wl2

many thanks
OlivierM is offline   Reply With Quote

Old   January 24, 2021, 18:14
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 OlivierM View Post
hello

I have exactly the same issue: the only way for me to plot residuals is through excel from the dat. files.
I have spent days to try making it with foamMonitor, gnuplot, pyFoam but no success at all !

I have installed PyFoam using pip3

#
$ pip3 install PyFoam
Requirement already satisfied: PyFoam in ./.local/lib/python3.8/site-packages (2020.5)
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from PyFoam) (1.17.4)
#

and this is what I got when asking for pyFoam version:

$ pyFoamVersion.py
Traceback (most recent call last):
File "/usr/local/bin/pyFoamVersion.py", line 4, in <module>
__import__('pkg_resources').run_script('PyFoam==20 20.5', 'pyFoamVersion.py')
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 667, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1452, in run_script
raise ResolutionError(
pkg_resources.ResolutionError: Script 'scripts/pyFoamVersion.py' not found in metadata at '/home/<USER>/.local/lib/python3.8/site-packages/PyFoam-2020.5.dist-info'
#

would you have any idea of what could be the problem ?

I am running OFv2012 on Unbuntu 20.04 LTS wl2

many thanks

You already the asked the question in Using pyFoamPlotWatcher.py To Plot Residuals Please don't crosspost
__________________
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


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
SU2 windows setup options esco_rep SU2 Installation 3 August 20, 2015 19:56
CFX Parallel Setup on windows 7 x64 SlicedBread CFX 1 November 14, 2011 17:06
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 18:56
setup windows cluster radiatn STAR-CD 2 March 30, 2009 13:52
PVM RSH parallel setup problem Windows XP abe CFX 11 January 30, 2006 05:10


All times are GMT -4. The time now is 20:38.