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

Questions about using the tutorials for OpenFOAM 5.0 on Ubuntu 16.04.3

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

Reply
 
LinkBack Thread Tools 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
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,222
Blog Entries: 39
Rep Power: 113
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
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
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,222
Blog Entries: 39
Rep Power: 113
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
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   Today, 12:57
Default
  #5
New Member
 
Join Date: Mar 2017
Posts: 7
Rep Power: 3
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

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
OpenFOAM 5.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 2 August 4, 2017 04:08
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 19:06.