CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Can't use some OpenFOAM facilities (http://www.cfd-online.com/Forums/openfoam-installation/101435-cant-use-some-openfoam-facilities.html)

Mister_K May 3, 2012 20:46

Can't use some OpenFOAM facilities
 
I asked my engineering supervisor about why some of the in-built 'Foam's (like icoFoam) just don't seem to work when I try to execute them in my ubuntu 11.10 32 bit on Oracle VM VirtualBox.

We discussed a few topics, and came up with the problem being that I am not the owner of the ubuntu OS, yet I only made 1 account, which says its an administrator, which results in me having to 'sudo -s' to log in to the root account, which apparently isn't the best thing to do.

There doesn't seem to be any ownership or admin privileges I can set during the ubuntu installation, how can I remedy this 'non-owner' situation?

wyldckat May 4, 2012 03:53

Greetings Ken,

That is somewhat of a vague description of the problem. Once OpenFOAM is installed, you shouldn't need to run things as root. That would only happen if you messed up the installation.

So, a few questions:
  1. What instructions did you follow to install OpenFOAM and on which Ubuntu version?
  2. Where exactly are you trying to use icoFoam?
  3. Are you following the instructions from the OpenFOAM User Guide on how to run the tutorials?
And a friendly warning: do not share directly the folders where you run your cases from inside the VM, with the real machine. In other words, use the VM's virtual hard-drive and copy to the folder shared with the real machine, only after the case has completed execution! The explanation is shown here in the forum somewhere... search for "virtualbox" here on the forum.


Best regards,
Bruno

Mister_K May 4, 2012 05:50

Thank you for your reply Bruno,

My supervisor has also warned me about using 'sudo -s' as I shouldn't ever have to touch that command if I was the owner of the OS.

1) I followed all of the instructions stated in the official 'Ubuntu Deb Pack Installation' on openfoam.org [http://www.openfoam.org/download/ubuntu.php]

I installed official Ubuntu version 11.10 'oneiric' .iso file in 32 bit onto VirtualBox version 4.1.14r77440

'selected Install Ubuntu'

'unchecked download updates while installing & install this third-party software [was connected to internet, had the free space]'

'selected erase disk and install Ubuntu'

'the entire disk will be used: Ubuntu /dev/sda (ext 4) 8.6GB [SCSI3 (0,0,0) (sda) - 8.6GB ATA VBOX HARDDISK]'

After Ubuntu successfully installed, I did not proceed to download/install any updates, and I installed OpenFOAM as mentioned above, and just changed the wallpaper.

2) 'icoFoam' was not the specific subroutine, I believe it was one of the 'MRF' Foam example files, however I believe the source of my problems is because 'I am not the owner, I cannot edit these files'

3) I have successfully finished tutorials 1 and 3, the dam break and lid driven cavity flow, but have not ventured into the tutorials in the manual, but I have downloaded it and browsed it.

I have also yet to share a folder from my win7 x64 home prem. with VirtualBox, but I will get to doing it :o

Hisham May 5, 2012 07:01

Hi Mister_K

I think it would be better if you give exactly which command you give and what is the error produced (copy and paste from terminal). Otherwise, no one will really be able to help.

Regards
Hisham

wyldckat May 5, 2012 08:35

Greetings to all!

Hisham is right: without error messages, you're only making us try to guess what the problem is.

Nonetheless, my diagnosis is this:
  1. If you ran the tutorials, then everything should be working well.
  2. If you are indeed having permission restrictions it's either because:
    1. You're trying to run a command directly in "/opt/openfoam210", which you should not do.
    2. Or you copied the tutorials folder using "sudo", but then tried to run things in the copy version as normal user.
  3. Or you are simply not interpreting properly the error message shown to you. For example, if it says this:
    Code:

    --> FOAM FATAL IO ERROR:
    cannot find file

    file: /home/user/OpenFOAM/system/controlDict at line 0.

        From function regIOobject::readStream()
        in file db/regIOobject/regIOobjectRead.C at line 73.

    FOAM exiting

    Then it's because you aren't running the command in the correct folder! In this example, it says "cannot find file" and specifies which file isn't being found!
Best regards,
Bruno


All times are GMT -4. The time now is 07:38.