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

how to change run directory

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

Like Tree2Likes
  • 2 Post By Mojtaba.a

Reply
 
LinkBack Thread Tools 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: 8
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. Ive 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
New Member
 
Jan Goebel
Join Date: Mar 2009
Location: Mannheim, Baden Wuerttemberg, Germany
Posts: 24
Rep Power: 8
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: 7
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: 8
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: Zanjan, Iran
Posts: 233
Rep Power: 7
Mojtaba.a is on a distinguished road
Send a message via Yahoo 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 and hsmao like this.
__________________
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

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
jagged, ragged edges... ziemowitzima OpenFOAM Native Meshers: snappyHexMesh and Others 138 July 23, 2012 23:41
How to change Gambit's default directory alemenchaca ANSYS Meshing & Geometry 12 October 31, 2011 06:18
Working directory via command line Luiz CFX 4 March 6, 2011 21: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 11:22.