![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Way Too Much Ubuntu
![]() Join Date: Mar 2006
Location: Sheffield, UK
Beans: 322
|
I wrote this when using Ubuntu Breeze Badger. Now I am using Hardy (32Bit)... note that version 1.5 has been recently released.
update 13-Septempber-2008: OpenFOAM release 1.5 is slightly different but easier to install in a stand alone configuration, I will describe the steps here but the old guide (v1.4.1 and older) will still be found in this document just for reference. One of the main changes is the discontinuation of FoamX, from now on the configuration files are to be modified by using your favorite text editor. The other main change is the use of paraview 3.0 The instruccions for installation are: (1)Create the OpenFOAM folder in you home (2)navigate to the OpenFOAM webpage and download from there the five installation files: OpenFOAM-1.5.General.gtgz, OpenFOAM-1.5.linuxGccDPOpt.gtgz, OpenFOAM-1.5.linuxGccSPOpt.gtgz, ThirdParty.General.gtgz, ThirdParty.linuxGcc.gtgz (3)Extract the files in this location in starting with those marked as *general* (4)You will see that two new folders are created: OpenFOAM-1.5 and ThirParty (5)Update your environment variables by adding the following line to our .bashrc script Code:
. $HOME/OpenFOAM/OpenFOAM-1.5/etc/bashrc Code:
source ~/.bashrc Code:
./foamInstallationTest This is all you need to do, OpenFOAM is ready to run. Please see the documentation since some syntax has been changed. I found one problem: After finishing a case a file called file.OpenFOAM containing your computation is created which is supposed to open fine when paraview is called, however an error when reading these type of files arises when one is trying to load them. The quick fix is to export the file to VTK by using the 'foamToVTK' utility and then opening the exported file normally with paraview. Cheers j update 25-february-2008: WIndows users willing to install OpenFoam under XP/Vista read this guide and the advice by "Florante" from the andLinux forum here: http://www.andlinux.org/forum/viewtopic.php?t=44 this will solve the the paraView visualisation problem... date:23-february-2008: Note to **Windows** users: You may try to install OpenFOAM on Windows XP/VISTA via andLinux (http://www.andlinux.org) (colinux+Ubuntu) and following the guide below. I've made an attempt and the solvers are working just fine. However paraView for any reason is not working properly. The GUI works OK but the visualisation window is not displaying anything at all (at least on my computer). I will try to check this in the future and/or install any alternative such as OpenDX and post the results here... Thanks everybody for your comments... enjoy * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This Thread/Howto is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD), CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modeled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale protitype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly... Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily. There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics (I have already dowloaded but not playing around with it!), OpenFOAM and many others. Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background (this is a plus) Well, after that boring introduction, this is the ultimate guide to install OpenFOAM in an Ubuntu System, I decided to this because (1) I do really need a CFD software to experiment with. (2) Commercial software is expensive (you know as a student you've got a very limited budget, I would have to spend all my year savings only for a one year license!!!!) (3) Help the scientific/student community with freely available tools. (4) Understand more about the world/nature around us... * * * Step One * * * * First of all System requirements (well based on my PC!!!!) -An x86 processor or equivalent. I am using a Core 2 Duo T5600 and running great!) -640 MB (The web page states nothing, but everybody knows the more, the better) -1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc -broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you... -Ubuntu LINUX 6.10 Edgy Eft (it works also in Dapper and Breeze) , if you download the AMD64 version then use the 64bit LINUX kernel 2 * * * * * * * * * * * * * Enter to OpenFOAM web page http://www.openfoam.org or http://www.opencfd.co.uk 3 * Click on download 4 * Select your version 5 * Dowload all the packges to your Desktop (very advance LINUX users can avoid obvious steps) Code:
~/Desktop N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours... second I did install everything in my home folder which is ~/ it is the recommended option from the web site 6 * create a folder caller OpenFOAM in ~/ using mkdir copy OpenFOAM-1.4.General.gtgz OpenFOAM-1.4.linuxGcc4DPOpt.gtgz OpenFOAM-1.4.linuxGcc4SPOpt.gtgz which are on ~/Desktop to the folder you've just created ~/OpenFOAM 7 * create the following folder (remember LINUX is case sensitive) Code:
~/OpenFOAM/linux gcc-4.1.1.linux.tgz paraview-2.4.4.linux.tgz j2sdk1.4.2.os.linux.tgz which are in ~/Desktop to ~/OpenFOAM/linux 9 * untar avery single file in the following order OpenFOAM-1.4.General.gtgz OpenFOAM-1.4.linuxGcc4DPOpt.gtgz OpenFOAM-1.4.linuxGcc4SPOpt.gtgz gcc-4.1.1.linux.tgz paraview-2.4.4.linux.tgz j2sdk1.4.2.os.linux.tgz using Code:
tar -xzvf <filename> 10 * after finishing you will see new directories created in ~/OpenFOAM 11 * now look for foamSystemCheck which is located at Code:
~/OpenFOAM/OpenFOAM-1.4/bin type Code:
chmod -v 555 foamSystemCheck Code:
export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.4/bin/ Code:
foamSystemCheck At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!) type Code:
chmod -v 755 foamSystemCheck 12 * * * * * * Now you have to set the environment variables for a correct file access The environment variable settings are stored in Code:
~/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4 type Code:
echo $SHELL now type Code:
gedit ~/.bashrc & Code:
. ~/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/bashrc select Code:
file>save and then file>quit Code:
. ~/.bashrc the environment variables are updated, you can see this if you type Code:
echo $PATH 13 **** Now test the installation look for foamInstallationTest it is located at Code:
~/OpenFOAM/OpenFOAM-1.4/bin type Code:
chmod -v 555 foamInstallationTest in this case you don't need to export the path, since you have already done it... now type Code:
foamInstallationTest here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this: test_rsh unsuccessful_conection_refused* test_ssh unsuccessful_conection_refused* FATAL: No remote shell available (blah, blah, blah, blah, etc....) It is very simple: who cares, just ignore it..... well for this new version of openFoam is likely that FoamX does not run in your system if you don't have the libssl.so.o.9.7 installed. A simple look at synaptic solve this problem... (thanks for orodoni_le for this). O course you can use OpenFoam without FoamX if you feel comfortable editing text files... And it's done!!!!!!! Now open Code:
~/OpenFOAM/OpenFOAM-1.4/doc/Guides-a4 This section applies only to WIndows users Alternative method for installing OpenFOAM in a windows system (2000/XP/VISTA) using andLinux(colinux+Ubuntu). This method requires to install andLinux which is basically colinux(a linux kernel implementation for windows) xming(an X-server for windows) and Ubuntu. Once andLinux is installed it uses the Windows desktop instead of GNOME/KDE/etc... Files you need to get: The andLinux installer. For simplicity I decided to install the minimal version HTML Code:
http://www.andlinux.org/downloads.php HTML Code:
http://www.straightrunning.com/XmingNotes/ -The first step is to install andLinux (which is straight forward). After the installation you will notice that the default installation size of andLinux is 2GB so we need to increase the size of the virtual drive for the OpenFOAM installation and also for any other applications you may need. To do this go to the installation directory of andLinux Code:
c:\Program Files\andLinux Then look for Code:
ImageResizeTool.zip Code:
toporesize.bat Code:
c:\Program Files\andLinux\Drives Now navigate to the xming directory at: Code:
c:\Program Files\andLinux\xming Now install the mesa version of xming. Once the installation finishes go to installation directory Code:
c:\Program Files\xming Code:
c:\Program Files\andLinux\xming Now install OpenFOAM as described in the guide... __ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Well that's all, have fun * * * * * derjames * * * * * Last edited by derjames; September 13th, 2008 at 08:54 AM.. |
|
|
|
|
|
#2 |
|
Way Too Much Ubuntu
![]() Join Date: Mar 2006
Location: Sheffield, UK
Beans: 322
|
Re: HowTo: Scientific Ubuntu - Installing OpenFOAM CFD software
And some screenshots... the first three are running on Linux, the last one running on Windows/andLinux/ubuntu
Last edited by derjames; May 9th, 2008 at 12:43 PM.. |
|
|
|
|
|
#3 |
|
100% Pure Ubuntu
![]() |
Re: HowTo: Scientific Ubuntu - Installing OpenFOAM CFD software
Thanks for the great post!
|
|
|
|
|
|
#4 |
|
Gee! These Aren't Roasted!
![]() Join Date: Jan 2005
Location: South Africa
Beans: 201
Ubuntu 9.10 Karmic Koala
|
Re: HowTo: Scientific Ubuntu - Installing OpenFOAM CFD software
great howto - why don't you post it on the wiki (wiki.ubuntu.com)?
|
|
|
|
|
|
#5 |
|
Way Too Much Ubuntu
![]() Join Date: Mar 2006
Location: Sheffield, UK
Beans: 322
|
Re: HowTo: Scientific Ubuntu - Installing OpenFOAM CFD software
Hello there, I did update the wiki page, just some aesthetic changes ... well back to work...
https://wiki.ubuntu.com/HowTo_instal...%28OpenFOAM%29 Cheers |
|
|
|
|
|
#6 |
|
Skinny Soy Caramel Ubuntu
![]() Join Date: Sep 2005
Location: Cedar Rapids, IA, USA
Beans: 594
Ubuntu 6.10 Edgy
|
Re: HowTo: Scientific Ubuntu - Installing OpenFOAM CFD software
I'm going to try this when I get home even though I should wait until Dapper is released since I'm going to upgrade when it's stable. But since /opt on my laptop is a separate partition, I might do it anyway since it shouldn't change too much.
derjames, have you tried any of the converting Fluent/Gambit meshes to openFoam yet? I'm assuming that it doesn't do mesh generation as that's what I got from the site. Please correct me if I'm wrong.
__________________
#399784 | Ubuntu User #287 | My Blog *** If you're going to program, install the damn build-essential package *** There is no such thing as Ubuntu specific programming Save the electrons - if you quote, trim! |
|
|
|
|
|
#7 |
|
Way Too Much Ubuntu
![]() Join Date: Mar 2006
Location: Sheffield, UK
Beans: 322
|
Re: HowTo: Scientific Ubuntu - Installing OpenFOAM CFD software
Hi xtacocorex
You can convert Gambit grids to OpenFOAM format by using the utilities included in the distribution... also you can create grids using other CAD/solvers packages such as: CFX, EnSight, FieldView, I-deas, Star-CD andconvert them with the plugins (all are included in the distribution)... OpenFOAM includes a pretty basic mesh generator, which does not have GUI, i.e. you have to create and modify the mesh information file by hand (in a text file), and then use the mesh tool included which works well for my applications (Flow in microchannels), I know it is a bit tedious but it's OK once you get use to it... hope this helps |
|
|
|
|
|
#8 | |
|
A Carafe of Ubuntu
![]() Join Date: Nov 2004
Location: Italy
Beans: 151
Dapper Drake Testing/
|
Re: HowTo: Scientific Ubuntu - Installing OpenFOAM CFD software
Quote:
Hello, I simply want to thank you for the excellent job! My institute has just bought a licence for a commercial code (not exactly a CFD code, but something a PDE solver). However, OpenFOAM looks like a good tool and I can use free on my laptop. I am not sure, though, that it will be so easy to jump into modelling (well, I am someone who comes from a different background; it could be different for someone already experienced). Cheers Larry
__________________
"I can calculate the motions of heavenly bodies, but not the madness of people." - Isaac Newton |
|
|
|
|
|
|
#9 |
|
Just Give Me the Beans!
![]() Join Date: Jun 2006
Beans: 74
|
Re: HowTo: Scientific Ubuntu - Installing OpenFOAM CFD software
I have successfully installed this on a 64 bit Dapper build.
Key things to note: I had to edit ~/OpenFOAM/OpenFOAM-1.3/.bashrc to have in it at the top Code:
WM_64="on" ~/OpenFOAM/OpenFOAM-1.3/.... it always went ~/OpenFOAM/... so to fix this I manually added the extra directory where it was necessary (for me, that was in the export of JAVA_HOME, where gcc is exported, and in the bashrc file in ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/apps/paraview/bashrc Feel free to add that to your wiki.
__________________
Desktop: Opty 165 @ 289x9, 1.38v | 2x1GB G.Skill, 3-4-4-8, 2.6v | nVidia 7600GT | Sound Blaster Audigy 2 Laptop: Intel Centrino Duo T2300 | 2 GB Ram | Intel 945GM Graphics | Intel 3945ABG Wireless Last edited by mkw87; July 25th, 2006 at 07:52 PM.. |
|
|
|
|
|
#10 |
|
Way Too Much Ubuntu
![]() Join Date: Mar 2006
Location: Sheffield, UK
Beans: 322
|
Re: HowTo: Scientific Ubuntu - Installing OpenFOAM CFD software
Hey, cheers for this...
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|