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:
Quote:
Quote:
Quote:
Quote:
Can you help me? Thank you guys! Lorenzo |
Quote:
Quote:
|
|
I had success with that, but have moved onto openfoam-extend or 1.6.x.
|
Is there somewhere a compiled version of open foam 1.6 for mac?
|
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. |
What is the response when you type in setup_foam?
|
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?
|
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 |
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 |
Hi Kenny,
Just to make sure, are the image and set_up files located in the directory, ~/OpenFOAM/images/ Sunny |
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 |
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 |
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. |