CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM

OpenaFoam 1.6 on MacOs X 10.6

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 30, 2010, 11:37
Default OpenaFoam 1.6 on MacOs X 10.6
  #1
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 454
Rep Power: 8
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
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
lovecraft22 is offline   Reply With Quote

Old   March 30, 2010, 14:49
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,889
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by lovecraft22 View Post
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 View Post
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
gschaider is offline   Reply With Quote

Old   March 30, 2010, 16:17
Default
  #3
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 454
Rep Power: 8
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
I found this:
http://www.ifdmavt.ethz.ch/education...foam/of-macosx

what do you think?
lovecraft22 is offline   Reply With Quote

Old   March 30, 2010, 23:16
Default
  #4
bjr
Member
 
Ben Racine
Join Date: Mar 2009
Location: Seattle, WA, USA
Posts: 62
Rep Power: 7
bjr is on a distinguished road
Send a message via AIM to bjr Send a message via Skype™ to bjr
I had success with that, but have moved onto openfoam-extend or 1.6.x.
bjr is offline   Reply With Quote

Old   March 31, 2010, 09:05
Default
  #5
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 454
Rep Power: 8
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
Is there somewhere a compiled version of open foam 1.6 for mac?
lovecraft22 is offline   Reply With Quote

Old   June 13, 2010, 11:59
Default mac OS X compiled instructions at :
  #6
New Member
 
Join Date: May 2009
Location: Texas
Posts: 10
Rep Power: 7
Kenny is on a distinguished road
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.
Kenny is offline   Reply With Quote

Old   June 24, 2010, 18:33
Default
  #7
New Member
 
Sunny Karnani
Join Date: Apr 2010
Posts: 22
Rep Power: 6
skarnani is on a distinguished road
What is the response when you type in setup_foam?
skarnani is offline   Reply With Quote

Old   June 24, 2010, 23:24
Default Error message trying to run setup foam
  #8
New Member
 
Join Date: May 2009
Location: Texas
Posts: 10
Rep Power: 7
Kenny is on a distinguished road
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?
Kenny is offline   Reply With Quote

Old   June 25, 2010, 01:09
Default
  #9
New Member
 
Sunny Karnani
Join Date: Apr 2010
Posts: 22
Rep Power: 6
skarnani is on a distinguished road
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
skarnani is offline   Reply With Quote

Old   June 27, 2010, 18:41
Default OpenFoam on the Mac - mounting binary images
  #10
New Member
 
Join Date: May 2009
Location: Texas
Posts: 10
Rep Power: 7
Kenny is on a distinguished road
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
Kenny is offline   Reply With Quote

Old   June 27, 2010, 21:03
Default
  #11
New Member
 
Sunny Karnani
Join Date: Apr 2010
Posts: 22
Rep Power: 6
skarnani is on a distinguished road
Hi Kenny,
Just to make sure, are the image and set_up files located in the directory, ~/OpenFOAM/images/

Sunny
skarnani is offline   Reply With Quote

Old   June 27, 2010, 23:53
Default OpenFoam on the Mac - mounting binary images
  #12
New Member
 
Join Date: May 2009
Location: Texas
Posts: 10
Rep Power: 7
Kenny is on a distinguished road
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
Kenny is offline   Reply With Quote

Old   June 28, 2010, 00:48
Default
  #13
New Member
 
Sunny Karnani
Join Date: Apr 2010
Posts: 22
Rep Power: 6
skarnani is on a distinguished road
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
skarnani is offline   Reply With Quote

Old   June 28, 2010, 01:32
Default OpenFoam on the Mac - mounting binary images
  #14
New Member
 
Join Date: May 2009
Location: Texas
Posts: 10
Rep Power: 7
Kenny is on a distinguished road
Good suggestion. I'll try that.

Thanks,
Ken
Kenny 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
k-omega-SST model (OF 1.6) - turbulent flat plate cboss OpenFOAM Running, Solving & CFD 23 November 13, 2011 02:28
install OpenFoam 1.6 by building source: how? niudie OpenFOAM Installation 13 April 26, 2011 01:48
problems in Two Phase flow using twoPhaseEulerFoam with OpenFoam 1.6 raagh77 OpenFOAM Running, Solving & CFD 0 March 6, 2010 06:11
kOmegaSST in openfoam 1.6 Gearb0x OpenFOAM 2 March 3, 2010 07:02
OpenFOAM Version 1.6 Released opencfd OpenFOAM Announcements from ESI-OpenCFD 0 July 27, 2009 18:55


All times are GMT -4. The time now is 05:27.