CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

PyFoam problem

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 16, 2013, 05:25
Default PyFoam problem
  #1
New Member
 
pratap
Join Date: Nov 2013
Posts: 21
Rep Power: 5
cfdsat is on a distinguished road
I have installed PyFoam on my machine which has python 2.4 using the following command
python setup.py install --prefix=/home/nonroot/my_python

Included the below in my .bashrc file
export PYTHONPATH=/home/nonroot/my_python/lib/python-2.3/site-packages:$PYTHONPATH

export PATH=/home/nonroot/my_python/bin:$PATH
checked pyFoam installations by issuing the following commands
import PyFoam
import PyFoam.FoamInformation
print PyFoam.FoamInformation.foamTutorials()

But still pyFoamVersion.py command gives me the following

Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'pyFoamVersion' is not defined

Please let me know what is missing.
cfdsat is offline   Reply With Quote

Old   June 6, 2014, 19:48
Default
  #2
Member
 
Vignesh
Join Date: Oct 2012
Location: Darmstadt, Germany
Posts: 63
Rep Power: 6
vigneshTG is on a distinguished road
After PyFoam installation, I typed the three commands given in the installation webpage given below
import PyFoam
import PyFoam.FoamInformation
print PyFoam.FoamInformation.foamTutorials()

I get a blank message instead of the message (/home/nonroot/OpenFOAM/OpenFOAM-1.2-devel/tutorials) given in the webpage

Can someone help ??


Thanks and Regards
Vignesh TG
vigneshTG is offline   Reply With Quote

Old   June 7, 2014, 06:59
Default
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,971
Rep Power: 41
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by vigneshTG View Post
After PyFoam installation, I typed the three commands given in the installation webpage given below
import PyFoam
import PyFoam.FoamInformation
print PyFoam.FoamInformation.foamTutorials()

I get a blank message instead of the message (/home/nonroot/OpenFOAM/OpenFOAM-1.2-devel/tutorials) given in the webpage

Can someone help ??


Thanks and Regards
Vignesh TG
Probably no OF-version is initialized on that shell (environment variable FOAM_TUTORIALS is not set). Then this is the correct behaviour

Try pyFoamVersion.py for more info
__________________
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   June 7, 2014, 14:57
Default
  #4
Member
 
Vignesh
Join Date: Oct 2012
Location: Darmstadt, Germany
Posts: 63
Rep Power: 6
vigneshTG is on a distinguished road
Thank you for the quick reply Gschaider !!

Now it works


Regards
Vignesh TG
vigneshTG is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with interFoam; Wave/wiggle alpha1 behavior JonW OpenFOAM 3 February 23, 2013 21:41
UDF compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 04:43
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 14:52


All times are GMT -4. The time now is 14:03.