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

Openfoam 2.1 installation in ubuntu 12.04

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 30, 2012, 08:29
Default Openfoam 2.1 installation in ubuntu 12.04
  #1
jsm
Senior Member
 
JSM
Join Date: Mar 2009
Location: India
Posts: 142
Rep Power: 10
jsm is on a distinguished road
Dear All,

I am Fluent user till now. I am more interested in learning openfoam. First I tried in virtual box - ubuntu 11.04 & openfoam 2.1.

It looks more interesting. So I installed ubuntu 12.04 64 bit in my desktop with dual booting. Now I want to install openfoam 2.1.

Here I have question. Is it OK to install openfoam in ubuntu 12.04. Or shall I need to wait for some more time. Openfoam offcial website didn't tell anything about ubuntu 12.04 installation.

Also I want to compile the source pack instead of debian pack. Could anyone tell me about the procedure and in future how to update openfoam for bug fixes. I already read the source pack compiling procedure in website. But I want to know your experience and issues in this.

Thanks in advance
__________________
With regards,
JSM
jsm is offline   Reply With Quote

Old   April 30, 2012, 09:14
Default
  #2
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 128
Rep Power: 6
GerhardHolzinger is on a distinguished road
I don't know about the differences of source pack and repository release. I've installed OF as described at the repository release page http://www.openfoam.org/download/git.php

This worked quite well. Updating is quite easy (when using the git-repository)

Just change to your installation directory (/home/user/OpenFOAM/OpenFoam-2.1-x)
and type

git pull

this downloads only the files, that changed since your last update or when you installed OF. After that, just compile the sources again with

./Allwmake
GerhardHolzinger is offline   Reply With Quote

Old   April 30, 2012, 09:50
Default
  #3
jsm
Senior Member
 
JSM
Join Date: Mar 2009
Location: India
Posts: 142
Rep Power: 10
jsm is on a distinguished road
Hi Gerhard

Are you installed in Ubuntu 12.04 64 bit version? I want to install source pack -http://www.openfoam.org/download/source.php.

If I install source pack installation, then can I use "git pull" to get the latest bug fixes? Question might be silly. But I don't know about this.
__________________
With regards,
JSM
jsm is offline   Reply With Quote

Old   April 30, 2012, 10:29
Default
  #4
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 128
Rep Power: 6
GerhardHolzinger is on a distinguished road
Hi,

I currently use ubuntu 10.04 LTS 64 bit. As I said, I don't know exactly the difference between source pack and repository release. So I hope an experienced user will answer this question.

The OpenFOAM homepage states on this site http://www.openfoam.org/download/ that the repository is updated regularly.

Quote:
Those users compiling from source can receive regular updates to OpenFOAM by downloading the Git repository distribution of OpenFOAM. Known as 2.1.x, this version is managed and updated daily by the OpenFOAM Foundation and can be conveniently “pulled” using the Git distributed revision control system.
It seems as if the source pack is updated less frequently than the repsitory.

Quote:
Source Pack

Version 2.1.0, released 19/12/11
versus

Quote:
Git Repository

Version 2.1.x, updated regularly
GerhardHolzinger is offline   Reply With Quote

Old   April 30, 2012, 10:57
Default
  #5
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,172
Blog Entries: 32
Rep Power: 70
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Greetings to both!

I didn't mention anything here before because Gerhard hasn't be wrong, at least as far as I can tell.
So as an experienced user I can say that: yes, Gerhard is correct and 2.1.x is the version of OpenFOAM that has frequent updates, but there are two important details to keep in mind:
  • As already stated, doing "git pull" is not enough to get the updates. It should be at least:
    Code:
    git pull
    ./Allwmake
  • The git version is usually advised only to more experienced users, namely those who have already built the "source" package a couple of times and feel more comfortable with building OpenFOAM.

    The reason is simple: the latest git version doesn't always build and work as intended. Updates are sometimes done in a fashion that can lead to you having a working solver in one day and not working after the update. Technically, it will be because the solver wasn't properly working before... but also because sometimes there are quick updates that aren't fully tested.
One last tip - run the following command before Allwmake:
Code:
export WM_NCOMPPROCS=4
Where 4 is the number of cores (parallel processes) to be used during the build process, so it will build faster.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   April 30, 2012, 13:55
Default
  #6
jsm
Senior Member
 
JSM
Join Date: Mar 2009
Location: India
Posts: 142
Rep Power: 10
jsm is on a distinguished road
Hi Bruno,

Thanks for your information. Now I understood the difference between source pack and repository pack. I will install openfoam 2.1 from source pack and compile it. I think it will be good starting point.

From your reply, I concluded that Openfoam 2.1 can be installed in Ubuntu 12.04 64 bit without any issues.

I will try and let you know the details.
__________________
With regards,
JSM
jsm is offline   Reply With Quote

Old   April 30, 2012, 13:58
Default
  #7
jsm
Senior Member
 
JSM
Join Date: Mar 2009
Location: India
Posts: 142
Rep Power: 10
jsm is on a distinguished road
Hi Gerhard Holzinger,

Thanks for your comments and quick response
__________________
With regards,
JSM
jsm is offline   Reply With Quote

Old   May 2, 2012, 03:38
Default
  #8
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 128
Rep Power: 6
GerhardHolzinger is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
One last tip - run the following command before Allwmake:
Code:
export WM_NCOMPPROCS=4
Where 4 is the number of cores (parallel processes) to be used during the build process, so it will build faster.

Best regards,
Bruno

This really boosted compilation.
GerhardHolzinger is offline   Reply With Quote

Old   May 2, 2012, 16:55
Default
  #9
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,172
Blog Entries: 32
Rep Power: 70
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Gerhard,

Quote:
Originally Posted by GerhardHolzinger View Post
This really boosted compilation.
In case you're wondering the impact of number of cores vs time it takes to build, here's an old blog post of mine: Build times for OpenFOAM 2.0.x code with Ubuntu 10.10 with its gcc 4.4.5

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   May 6, 2012, 15:19
Default Alternative: install oneiric instead of precise
  #10
New Member
 
Wesley T.
Join Date: Apr 2009
Posts: 13
Rep Power: 7
Wesley is on a distinguished road
Not everybody is comfortable building from the source code. It is not bad for OpenFoam, but it can be a bit daunting if it is the first time you are trying to compile.

It appears the version compiled for the previous version of Ubuntu (11.10, oneiric ocelot) will work on version 12.04 (precise pangolin)

If you followed the instruction on the instruction on the openfoam ubuntu page:
http://www.openfoam.org/download/ubuntu.php

The repository for openfoam was put into your list for your package manager.

If you are using synaptic (I assume the other package managers behave in a similar manner):
  • launch synaptic
  • click on "Settings" in the menu bar
  • click on "Repositories" in that menu
  • in the "Software Sources" window that pops up, click on the tab for "Other Software"
  • select/highlight the line that says "Independent"
  • click "Edit..."
  • Change the line for "Distribution" from "precise" to "oneiric"
That worked for me without the need to compile myself. I have tried the icoFoam tutorial, but other simulations yet.

I hope some people find this to be helpful.

Wes
Wesley is offline   Reply With Quote

Old   May 6, 2012, 17:21
Default
  #11
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,172
Blog Entries: 32
Rep Power: 70
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Wesley,

Good instructions! But I'm not 100% certain if Synaptic is installed by default in 12.04. Therefore, the quickest thing to do would be this:
Code:
sudo sh -c "echo deb http://www.openfoam.org/download/ubuntu oneiric main > /etc/apt/sources.list.d/openfoam.list"
This command line is for replacing the first two command lines from here: http://www.openfoam.org/download/ubuntu.php

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   May 7, 2012, 04:56
Default
  #12
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Stockholm, Sweden
Posts: 344
Rep Power: 10
romant is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Wesley,

Good instructions! But I'm not 100% certain if Synaptic is installed by default in 12.04. Therefore, the quickest thing to do would be this:
Code:
sudo sh -c "echo deb http://www.openfoam.org/download/ubuntu oneiric main > /etc/apt/sources.list.d/openfoam.list"
This command line is for replacing the first two command lines from here: http://www.openfoam.org/download/ubuntu.php

Best regards,
Bruno
You are right, it is not part of the official installation (the Ubuntu Software Center is the standard package manager GUI).
__________________
~roman
romant 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
OpenFOAM 1.7 installation on Redhat linux maxims OpenFOAM Installation 2 November 30, 2012 04:29
openfoam installation javad814 OpenFOAM 7 January 27, 2012 11:31
openfoam installation for algeria (dz) abbes OpenFOAM Installation 4 July 18, 2011 19:16
OpenFOAM 1.7 installation issue in Ubuntu 10.04 hcmadhu OpenFOAM Installation 7 August 24, 2010 16:55
Installing OpenFOAM 1.6 on Ubuntu 10.4 sda OpenFOAM Installation 5 May 27, 2010 20:19


All times are GMT -4. The time now is 23:06.