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

how to change run directory

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By Mojtaba.a

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 22, 2011, 03:53
Default how to change run directory
  #1
Senior Member
 
Join Date: Mar 2009
Posts: 138
Rep Power: 17
camoesas is on a distinguished road
HI,

Some time ago I created the foam run directory using:
Code:
mkdir -p $FOAM_RUN
as said in the tutorial. Now I want to change the run directory (to local drive) but deleting and creating it new didnt work. I´ve also tried to create a second run directory using simultaneously:
Code:
mkdir -p $FOAM_RUN2
Neither worked.
Somebody knows a solution?

Thanks Camoesas
camoesas is offline   Reply With Quote

Old   August 22, 2011, 05:05
Default
  #2
Member
 
Jan Goebel
Join Date: Mar 2009
Location: Mannheim, Baden Wuerttemberg, Germany
Posts: 35
Rep Power: 17
jango is on a distinguished road
Hi Camoesas,

$FOAM_RUN is the declaration for an environment variable that ist defined somewhere in the openfoam config files. So you have to find the file, with the entry:

export $FOAM_RUN={directory path} and change it to your new directory path. I would suggest to use the grep command to find the config files, what should be something like:

cd (openfoam_installdir)
grep -r -l FOAM_RUN (or grep -r -l 'FOAM_RUN')

I' m 100% shure, so take a look at the description for the grep command

have fun,

Jan
jango is offline   Reply With Quote

Old   August 22, 2011, 15:53
Default
  #3
Senior Member
 
Mohammad
Join Date: Feb 2010
Location: Shiraz, Iran
Posts: 108
Rep Power: 16
m2montazari is on a distinguished road
Hi Camoesas,
you can change foam_run directory in openfoam installated directory/etc/setting.sh and after editing that and save, simply run with "sh setting.sh" to have desired directory as foam_run directory. now mkdir $FOAM_RUN would make directory as you described in setting.sh
test and tell about the result
yours,
mohammad
m2montazari is offline   Reply With Quote

Old   August 23, 2011, 02:23
Default
  #4
Senior Member
 
Join Date: Mar 2009
Posts: 138
Rep Power: 17
camoesas is on a distinguished road
HI Guys,

Thanks for the replys. A long and exhausting search with grep showed no results. grep just didnt find it.
In the end I found it in
installed_directory/etc/config/settings.sh
and could change it. run it with sh settings.sh didn't work but it works anyway...

thanks for the help!
camoesas is offline   Reply With Quote

Old   July 7, 2013, 06:28
Default
  #5
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 15
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Quote:
Originally Posted by camoesas View Post
HI Guys,

Thanks for the replys. A long and exhausting search with grep showed no results. grep just didnt find it.
In the end I found it in
installed_directory/etc/config/settings.sh
and could change it. run it with sh settings.sh didn't work but it works anyway...

thanks for the help!
Hi,
Although this is almost an old thread, but just in case I found the solution.
in order to have a new command for any directory, it is just enough to edit the file aliases.sh within Of_install_dir/etc/config by running the command:

Quote:
sudo gedit OF_install_dir/etc/config/aliases.sh
just add the following line into it:

Quote:
alias command='cd PATH'
and source your OF again. now by typing "command", terminal takes you to the PATH.

I hope it helps,
Best Wishes
Mojtaba
kiddmax, vsammartano and hsmao like this.
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a 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
How to change Gambit's default directory alemenchaca ANSYS Meshing & Geometry 13 December 14, 2016 21:54
[snappyHexMesh] jagged, ragged edges... ziemowitzima OpenFOAM Meshing & Mesh Conversion 138 July 23, 2012 23:41
Working directory via command line Luiz CFX 4 March 6, 2011 20:02
OpenFoam install script Error during paraFoam installation SePe OpenFOAM Installation 10 June 19, 2010 15:15
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01


All times are GMT -4. The time now is 19:39.