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

[OpenFOAM.org] Questions about using the tutorials for OpenFOAM 5.0 on Ubuntu 16.04.3

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 11, 2018, 00:35
Post Questions about using the tutorials for OpenFOAM 5.0 on Ubuntu 16.04.3
  #1
New Member
 
Patrick Isherwood
Join Date: Feb 2018
Posts: 2
Rep Power: 0
pisherwood is on a distinguished road
So I don't have much background with linux so please bear with me. I installed set up a dual boot of ubuntu 16.04.3 on my windows 10 laptop and have attempted to install OpenFOAM. I was able to install OpenFOAM but from what I gather I need to give my user access to the root directory since I have installed it in the opt directory. I couldn't edit or execute the files because they were in a root directory so I moved the tutorials to the home directory. I can now edit the files but wen i run OpenFOAM commands it gives me a 'command cannot be found' error when i try and run a simulation.

my question:

1. is there a easy safe way I can get access to the root directory as a standard user
2. is there an easy way to simply install openfoam in the home directory so I don't have to have root access to access the files
3. is there a piece of this that I am just not understanding (i honestly assume this has to be part of my problem)

again im real new to this. Thanks!!
pisherwood is offline   Reply With Quote

Old   February 12, 2018, 16:51
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick question: Which installation instructions did you follow?
__________________
wyldckat is offline   Reply With Quote

Old   February 12, 2018, 17:45
Default
  #3
New Member
 
Patrick Isherwood
Join Date: Feb 2018
Posts: 2
Rep Power: 0
pisherwood is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick question: Which installation instructions did you follow?
I used these, as far as i know this is the most basic way
https://openfoam.org/download/5-0-ubuntu/
pisherwood is offline   Reply With Quote

Old   February 12, 2018, 17:51
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: Then you don't need to worry about the files having been installed at "/opt". That installation will by default be available for any normal user.

If you run the following command:
Code:
ls -ld /opt/openfoam5
you should see the following:
Code:
drwxr-xr-x 10 root root 4096 Nov  5 23:11 /opt/openfoam5/
Which states that "root" (the first "rwx"), "group" (the first "r-x") and "others" (the second "r-x"), all have reading (r) and execution (x) permissions.

This means that as a normal user, you should be able to use OpenFOAM without problems. All you need to do is execute the following command as a normal user, in order to be able to run OpenFOAM's applications:
Code:
source /opt/openfoam5/etc/bashrc
In other words, follow the instructions given here: https://openfoam.org/download/5-0-ub...-configuration - section "User Configuration", follow them as a normal user and everything should work as intended. Then keep reading the instructions and it should work properly, without any additional root powers .
wyldckat is offline   Reply With Quote

Old   May 27, 2018, 13:57
Default
  #5
New Member
 
CFDpal
Join Date: Mar 2017
Location: Boston, MA
Posts: 20
Blog Entries: 1
Rep Power: 9
CFDpal is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer: Then you don't need to worry about the files having been installed at "/opt". That installation will by default be available for any normal user.

If you run the following command:
Code:
ls -ld /opt/openfoam5
you should see the following:
Code:
drwxr-xr-x 10 root root 4096 Nov  5 23:11 /opt/openfoam5/
Which states that "root" (the first "rwx"), "group" (the first "r-x") and "others" (the second "r-x"), all have reading (r) and execution (x) permissions.

This means that as a normal user, you should be able to use OpenFOAM without problems. All you need to do is execute the following command as a normal user, in order to be able to run OpenFOAM's applications:
Code:
source /opt/openfoam5/etc/bashrc
In other words, follow the instructions given here: https://openfoam.org/download/5-0-ub...-configuration - section "User Configuration", follow them as a normal user and everything should work as intended. Then keep reading the instructions and it should work properly, without any additional root powers .
It is also a good idea to copy some templates (tutorials) into some RUN directory. Then run applications in the run directory. In this case, you would always have ability go back.
CFDpal is offline   Reply With Quote

Reply

Tags
command not found, istallation help, opefoam, root access, ubuntu


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
[OpenFOAM.org] I have trouble installing openfoam 5.0 on ubuntu 16.04 haydii OpenFOAM Installation 5 December 27, 2018 11:56
OpenFOAM 5.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 11 June 6, 2018 00:48
[waves2Foam] Questions about wave2Foam tutorials TXQ OpenFOAM Community Contributions 5 January 10, 2018 02:41
[foam-extend.org] foam-extend 3.2 on Ubuntu 12.04, Floating point exception for tutorials arsalan.dryi OpenFOAM Installation 7 November 14, 2016 18:33
Simple questions regarding CCM+ tutorials daniel1030 STAR-CCM+ 2 December 28, 2014 01:03


All times are GMT -4. The time now is 09:11.