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

beginner - compilation question userguide chapter3

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 22, 2010, 19:21
Default beginner - compilation question userguide chapter3
  #1
Member
 
Naveen
Join Date: Feb 2010
Location: Los Angeles
Posts: 65
Rep Power: 16
vetnav is on a distinguished road
Hi,

I am trying to learn OpenFOAM (I installed Ubunt/Debian package), in the user guide chapter 3, there is a compilation example (3.2.4), in that on page U-79 it says "The user can compile pisoFoam by going to the $FOAM_CFD/pisoFoam directory and typing..." what is this $FOAM_CFD directory, I could not find this directory, when I type "cd $FOAM_CFD" or "echo $FOAM_CFD" there is no response in the shell.

So without wasting my time I went to "/opt/openfoam170/applications/solvers/incompressible/pisoFoam" and then typed wmake, I got following errors

mkdir: cannot create directory `linux64GccDPOpt': Permission denied
/bin/sh: cannot create linux64GccDPOpt/options: Directory nonexistent
make: *** [linux64GccDPOpt/options] Error 2
/opt/openfoam170/wmake/MakefileFiles:39: linux64GccDPOpt/options: No such file or directory
make: *** No rule to make target `linux64GccDPOpt/options'. Stop.
wmake error: file 'Make/linux64GccDPOpt/objectFiles' could not be created

can anyone please tell me whether I am doing this wmake in the correct directory?

Thanks
Naveen
vetnav is offline   Reply With Quote

Old   July 23, 2010, 05:02
Default
  #2
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
My guess is that you installed OF to /opt using root privileges, and now you are trying to compile as a regular user. This fails, because naturally compiling involves writing data to the folder which you do not have access to. You should try compiling as root, or move OF to your home directory.
akidess is offline   Reply With Quote

Old   July 23, 2010, 07:25
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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 to all!

Quote:
Originally Posted by vetnav View Post
I am trying to learn OpenFOAM (I installed Ubunt/Debian package), in the user guide chapter 3, there is a compilation example (3.2.4), in that on page U-79 it says "The user can compile pisoFoam by going to the $FOAM_CFD/pisoFoam directory and typing..." what is this $FOAM_CFD directory, I could not find this directory, when I type "cd $FOAM_CFD" or "echo $FOAM_CFD" there is no response in the shell.
Hmmm... looks like a typo! It should be "$FOAM_APP/solvers/incompressible/pisoFoam" like is has at the beginning of that section. I can deduce that it happened to either one of at least two reasons:
  • since they talk about fvCFD.H a few lines back, in the writing frenzy, the writer's mind mangled FOAM_APP and fvCFD into a single word, and voilá... FOAM_CFD!
  • the other possibility is that this still has some remnants of text from earlier versions of OpenFOAM, way back when FOAM_CFD was some help variable or something like that...
Now, as for the Debian package: that version is meant to be shared between users! It's great for teaching classes or putting in servers! But when it comes to a single user in a dedicated machine, it can be a bit daunting at first.
So, as for solutions, you have plenty to choose from and here are a few:
  • You can do a hostile takeover of the folder /opt/openfoam170 by running the following command:
    Code:
    sudo chown -R $USERNAME:$USERNAME /opt/openfoam170
    And voilá, the OpenFOAM folder is now yours to torture and mangle
  • You can do a full copy of the folder /opt/openfoam170 into your home folder:
    Code:
    cp -r /opt/openfoam170 $HOME/OpenFOAM/OpenFOAM-1.7.0
    Then you will have to edit the file "$HOME/OpenFOAM/OpenFOAM-1.7.0/etc/bashrc" and change the line that says:
    Code:
    foamInstall=/opt
    To:
    Code:
    foamInstall=$HOME/$WM_PROJECT
    And finally, change in your home .bashrc file to point to this very same file! Start a nwe terminal and you are set to go!
  • You can partially follow the instructions available on this wiki page: http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam
    I say partially, assuming you don't want to add temperature just yet After copying the solver folder, the key point is changing the last line in the file Make/files in the solver folder, from this:
    Code:
    EXE = $(FOAM_APPBIN)/icoFoam
    To this:
    Code:
    EXE = $(FOAM_USER_APPBIN)/my_icoFoam
    So, pretty much you just copy the folder and edit the Make/files file and your ready to compile your own solver.
    I also recently posted about this on this thread: http://www.cfd-online.com/Forums/ope...tml#post268384
Best regards and good luck!
Bruno
__________________
wyldckat 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
A beginner question walk_and_see OpenFOAM 3 March 8, 2011 04:58
Beginner Question me.ouda FLOW-3D 2 May 3, 2010 18:47
Beginner question :(. Turning on and off zones? Cjlaumans FLUENT 6 September 2, 2009 16:44
LES beginner question Shuo Main CFD Forum 4 July 9, 2007 09:40
Beginner question – mesh generation. Oleg Melnik Siemens 2 February 26, 2001 03:39


All times are GMT -4. The time now is 10:52.