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

How to change $FOAM_USER_APPBIN ?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 24, 2017, 20:30
Default How to change $FOAM_USER_APPBIN ?
  #1
Member
 
Vedamt Chittlangia
Join Date: Feb 2016
Posts: 64
Rep Power: 9
vcvedant is an unknown quantity at this point
Hello,

I am working on HPC clusters and don't have permission to install new solvers at $FOAM_APPBIN.
When I tried to change Make/files
EXE = $(FOAM_USER_APPBIN)/mySolver

it gives an error that the directory does not exist. So, where and how do I define the user bin directory in my home folder?

Thanks.
vcvedant is offline   Reply With Quote

Old   July 25, 2017, 13:00
Default
  #2
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16
babakflame is on a distinguished road
Hey

You should have a folder named mySolver in the related directory. Most likely, you have mySolver.C file, however, the name of the folder is not mySolver.
babakflame is offline   Reply With Quote

Old   July 26, 2017, 17:05
Default
  #3
Member
 
Join Date: May 2016
Posts: 31
Rep Power: 10
MakisH is on a distinguished road
What you are doing is correct, at least for a local computer.

Verify that you have this variable set and you can access this directory from the login node:
Code:
ls $FOAM_USER_APPBIN
If not, then probably you are not loading the OpenFOAM environment properly. You should source the openfoam bashrc file.

I assume that you are compiling from the login node. If you maybe are trying to compile using another node, then make sure that the OpenFOAM environment is also loaded there.
MakisH is offline   Reply With Quote

Old   July 27, 2017, 12:56
Default
  #4
Member
 
Vedamt Chittlangia
Join Date: Feb 2016
Posts: 64
Rep Power: 9
vcvedant is an unknown quantity at this point
Hello MakisH,

Thanks for the response. But I have problem following how to source bashrc.
I am not the root user of the system and OpenFOAM is installed in a different directory than my home directory. How and what should I change in the bashrc to add these commands?
vcvedant is offline   Reply With Quote

Old   July 27, 2017, 13:16
Default
  #5
Member
 
Join Date: May 2016
Posts: 31
Rep Power: 10
MakisH is on a distinguished road
What happens if you run the following anywhere? If it displays the help message of blockMesh, then OpenFOAM's bashrc is loaded correctly. If you get an error, then it is not.

Code:
blockMesh -help
Wherever OpenFOAM is installed, you should have the permission to read OpenFOAM's bashrc file. Therefore, you need to find it and source it. For example, if you had OpenFOAM 4 installed in the /opt/ directory, then you should run:

Code:
source /opt/openfoam4/etc/bashrc
Find where OpenFOAM is installed for you. You need the ./etc/bashrc file from there. What happens if you try to source this file?

You can add this command in your own ~/.bashrc file (which you should have the permission to read and edit), so that it will be executed every time you login. After you edit and save your own ~/.bashrc file, you need to open a new terminal or source it again, so that the environment is reloaded.
MakisH is offline   Reply With Quote

Old   August 1, 2017, 11:32
Default
  #6
Member
 
Vedamt Chittlangia
Join Date: Feb 2016
Posts: 64
Rep Power: 9
vcvedant is an unknown quantity at this point
Thank you for your help.

I installed OpenFOAM in my home directory and instead used the source command to load bashrc each time I would open terminal.
vcvedant is offline   Reply With Quote

Old   April 30, 2019, 16:11
Default Answer
  #7
New Member
 
Athanasios Niotis
Join Date: Aug 2018
Posts: 12
Rep Power: 8
thanosniotis is on a distinguished road
Hello,
I had the same issue regarding HPC and the $FOAM_USER_APPBIN.
For this reason, I compiled my new solver (mySolver) in one different directory
lets say "/users/myName/OpenFOAM/myApps"
then I created a new alias with the name of the solver which targets its location.
alias mySolver="/users/myName/OpenFOAM/myApps/mySolver"
Then if you go to the case typing nySolver and it runs.. hopefully..
BR
Thanos
thanosniotis is offline   Reply With Quote

Old   May 1, 2019, 13:20
Default
  #8
Member
 
Join Date: Nov 2009
Posts: 43
Rep Power: 17
aerospaceman is on a distinguished road
My two cents:
AFAIK, this alias is defined here:
Code:
$FOAM_ETC/config/settings.sh
You ought to be able to change the path to some writable place..
aerospaceman is offline   Reply With Quote

Reply

Tags
bashrc, openfoam 2.2.2, solver error, user defined


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
change the under-relaxation factors hotboy FLUENT 4 May 28, 2015 23:25
Mass Transfer without Phase Change in InterPhaseChangeFoam Parisa_Khiabani OpenFOAM Running, Solving & CFD 5 May 26, 2015 10:40
No density change - rhoSimplecFoam krapic OpenFOAM 1 November 29, 2014 19:39
Help with writing a macro/UDF_file/script to change BC at regular time step intervals Codophobia Fluent Multiphase 0 April 24, 2014 11:07
Old OpenFOAM Users, Read This if you Want to Change Username pete Site Help, Feedback & Discussions 0 March 16, 2009 05:29


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