CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   OpenaFoam 1.6 on MacOs X 10.6 (https://www.cfd-online.com/Forums/openfoam/74346-openafoam-1-6-macos-x-10-6-a.html)

lovecraft22 March 30, 2010 10:37

OpenaFoam 1.6 on MacOs X 10.6
 
Hi;
I know this topic has been discussed many times before but I still got no idea about how to install OpenFoam on a mac though I successfully installed it on linux. I found this:
http://openfoamwiki.net/index.php/Ho...enFOAM_v16_Mac

that's divided into 8 steps:

Quote:

make sure that ~/OpenFOAM is on a case-sensitive file-sytem (either a disk image or a separate partition)
OK

Quote:

git version also available at http://repo.or.cz/r/OpenFOAM-1.6.x.git
What should I download from there? Couldn't I just download the files from the official website?

Quote:

extract the Downloaded -General taballs (OpenFOAM-1.6 and Thirdparty-1.6) there (Note: if using the 1.6.x version, ThirdParty-1.6 must be renamed ThirdParty-1.6.x or etc/bashrc must be modified)

apply the patches
OK

Quote:

adapt the hard-coded compiler (gcc-mp-4.3 and g+-mp-4.3) in etc/bashrc and wmake/rules/darwin* to fit your system

source ~/OpenFOAM/OpenFOAM-1.6/etc/bashrc
what do these mean?

Quote:

Compile OpenFOAM according to the README

Compile ParaView using the makeParaView-script (see the README)
OK

Can you help me?

Thank you guys!

Lorenzo

gschaider March 30, 2010 13:49

Quote:

Originally Posted by lovecraft22 (Post 252312)
What should I download from there? Couldn't I just download the files from the official website?

On the official download page you find a description how to download the git-version and what the benefits of it are

Quote:

Originally Posted by lovecraft22 (Post 252312)
what do these mean?

Different people use different compilers (official Apple-compiler, the one from MacPorts, ...). You'll have to modify that script to suite the one you use

lovecraft22 March 30, 2010 15:17

I found this:
http://www.ifdmavt.ethz.ch/education...foam/of-macosx

what do you think?

bjr March 30, 2010 22:16

I had success with that, but have moved onto openfoam-extend or 1.6.x.

lovecraft22 March 31, 2010 08:05

Is there somewhere a compiled version of open foam 1.6 for mac?

Kenny June 13, 2010 10:59

mac OS X compiled instructions at :
 
http://www.ifdmavt.ethz.ch/education...foam/of-macosx

But I'm having trouble with setup_foam. My system still thinks its text even after renaming it.

skarnani June 24, 2010 17:33

What is the response when you type in setup_foam?

Kenny June 24, 2010 22:24

Error message trying to run setup foam
 
At first I got "command not found". After using Chmod 777 on Setup foam it doesn't give me an error message but doesn't appear to do anything either! Ok, so maybe it worked, but I can't find any new directories that I was expecting. I got the disk image. That looks just fine. Can you help me?

skarnani June 25, 2010 00:09

With the disk image mounted, ideally, there should be a short cut in the ~/OpenFOAM directory that links to /Volumes/OpenFOAM-1.5/

Does this sound familiar?

--Sunny

Kenny June 27, 2010 17:41

OpenFoam on the Mac - mounting binary images
 
Sunny,

No such mounting has taken place as far as I can tell. Still have the images and setup_foam executable under OpenFOAM, but nothing else.

This command that Wilder wrote, do I need to modify it in some way?

test -f ~/.bash_profile && cp ~/.bash_profile ~/.bash_profile.bak_setup_foam_$(date '+%Y%m%d%H%M%S')
echo ". ~/OpenFOAM/images/setup_foam" >> ~/.bash_profile

It runs without error message. Also, after executing setup_foam, there is no message or any indication that it works.

Do I need to set up a case sensitive partition? I don't see the need for that since I have a disk image of the binaries.

Kenny

skarnani June 27, 2010 20:03

Hi Kenny,
Just to make sure, are the image and set_up files located in the directory, ~/OpenFOAM/images/

Sunny

Kenny June 27, 2010 22:53

OpenFoam on the Mac - mounting binary images
 
Yes they are under ~OpenFOAM/images/

So maybe there is a problem with the setup_file. I will list the setup_foam file's contents below:

# INSTRUCTIONS:
#
# - Save this file to ~/OpenFOAM/images/setup_foam (if you choose a different
# place, adjust the follwing instructions accordingly)
#
# - Adapt the lines in between the markers #### CONFIG #### and #### END CONFIG ####
# to your setup.
#
# - Save and close the file.
#
# - Issue the following command:
#
# test -f ~/.bash_profile && cp ~/.bash_profile ~/.bash_profile.bak_setup_foam_$(date '+%Y%m%d%H%M%S')
# echo ". ~/OpenFOAM/images/setup_foam" >> ~/.bash_profile
#
# - Close and re-open Terminal.app
#
# - Every time you first want to use OpenFOAM (i.e. every time you open a new shell
# window or tab) issue the following command:
#
# setup_foam
#
# - And now you should be ready to use OpenFOAM.
#

# Copyright 2008 Michael Wild <wild@ifd.mavt.ethz.ch>

function setup_foam {

### CONFIG ###

# The OpenFOAM version you want to use
OFVERSION=1.5
# Path to the OpenFOAM disk image file. The $OFVERSION variable will be replaced
# with above value. loginuser will be replaced with your short username.
OFIMAGE=~/OpenFOAM/images/OpenFOAM-1.5-MacOSX-10.5-intel.dmg
# Path to the user's own disk image.
OFUSERIMAGE=~/OpenFOAM/images/fewelk-1.5.sparseimage

### END CONFIG ###

function mnt_of_image() {
[ ! -d ~/OpenFOAM ] || mkdir -p ~/OpenFOAM
hdiutil attach -mountroot ~/OpenFOAM $1
}

if [ ! -f $OFIMAGE ]; then
echo "Error: the OpenFOAM disk-image $OFIMAGE does not exist" >&2
return 1
fi

if [ ! -f $OFUSERIMAGE ]; then
echo "Creating user disk-image $OFUSERIMAGE"
mkdir -p `dirname $OFUSERIMAGE`
hdiutil create -size 1t -type SPARSE -fs HFSX -volname "${LOGNAME}-1.5" $OFUSERIMAGE
fi

if [ ! -d ~/OpenFOAM/OpenFOAM-$OFVERSION ]; then
mnt_of_image $OFIMAGE
fi
if [ ! -d ~/OpenFOAM/$LOGNAME-$OFVERSION ]; then
mnt_of_image $OFUSERIMAGE
fi

. ~/OpenFOAM/OpenFOAM-$OFVERSION/etc/bashrc

# do some house-keeping
unset OFVERSION
unset OFIMAGE
unset OFUSERIMAGE

# tell paraFoam where to find ParaView
FOAM_PV3_APP="/Applications/ParaView 3.7.0.app"
export FOAM_PV3_APP

}


Perhaps I need to replace the variables with explicit paths. I have no other ideas.

Thanks,
Kenny

skarnani June 27, 2010 23:48

What does your ~/.bash_profile look like?

There should be a line that reads:
. ~/OpenFOAM/images/setup_foam


This might be of no consequence, but I think you should try to download the setup_foam file again I remember running into issues when making the slightest of modifications.

Sunny

Kenny June 28, 2010 00:32

OpenFoam on the Mac - mounting binary images
 
Good suggestion. I'll try that.

Thanks,
Ken


All times are GMT -4. The time now is 17:44.