0% found this document useful (0 votes)
235 views12 pages

7 - OpenFOAM

This document provides information on OpenFOAM, an open source CFD software package. It discusses what OpenFOAM is, why it is useful for CFD, and how to install it alongside Ubuntu on a Windows system. OpenFOAM can solve a wide range of CFD problems and its open source nature allows for customization. However, it requires users to understand CFD principles as everything is manual. Instructions are given on partitioning a drive for Ubuntu, installing prerequisites, setting environment variables, compiling the software and tutorials.

Uploaded by

hicham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
235 views12 pages

7 - OpenFOAM

This document provides information on OpenFOAM, an open source CFD software package. It discusses what OpenFOAM is, why it is useful for CFD, and how to install it alongside Ubuntu on a Windows system. OpenFOAM can solve a wide range of CFD problems and its open source nature allows for customization. However, it requires users to understand CFD principles as everything is manual. Instructions are given on partitioning a drive for Ubuntu, installing prerequisites, setting environment variables, compiling the software and tutorials.

Uploaded by

hicham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

CFD

Eslam Reda
OpenFOAM
How to
Meet
Why
How to
Meet
Why
OpenFOAM?
OpenFOAM
install
OpenFOAM?
OpenFOAM
install

Fi
Fi
rs
t
pr
pr
o
bl
e
m
w
it
h
O
p
e
n
F
O
A
M
Meet OpenFOAM
• OpenFOAM = Open Field Operation And
Manipulation
• Can solve almost any CFD problem using any CFD
method.
• Can solve: (in)compressible flows, multiphase flows,
combustion, buoyancy-driven flows, conjugate heat
transfer… etc.
• Utilizes almost all turbulence models.
Why OpenFOAM (OF)?

• Free, open source CFD software package.


• OF doesn’t have as many outstanding functionalities as ANSYS, but
it allows users to customize and extend its existing functionality.
• OF doesn’t have such “everything manual” as ANSYS. However,
it’s supported with a solved example for almost every utility.
• It requires the user to take care of every single detail in the solution
procedure. This helps with better understanding of CFD principles.
• It has a very strong community on the web and the user can usually
get an answer from the forums (especially CFD-online).
• It is the best choice to teach CFD or learn it on your own.
How to install
• Unfortunately, there is NO official full version of OF running on
Windows. It is built solely for Linux.
• Just like OF, Linux and almost all software running on it are FREE.
• The version I use of Linux is Ubuntu LTS 15.10 and of OF is
OpenFOAM 3.0.1.
• You can use whatever couple of versions you wish provided their
compatibility is assured.
Installing Ubuntu alongside with Windows
1. Log onto http://www.ubuntu.com/download/desktop

2. Download the Ubuntu version you want (15.10).

3. Burn to DVD or USB:

• Make an image on a DVD (you can use a freeware like Infra Recorder).

• Make a bootable USB (using a software like Unetbootin).

4. Download a partition editing software like MiniTool Partition Wizard.

Backup the important data on your PC/Laptop.

5. Open MiniTool, cut part from C drive (> 40 GB) and make a new drive of type Primary or Logical.

6. Cut another part from C drive (> your RAM size e.g. 2 GB) and make a new drive of type Linux SWAP, apply changes, (this will
cause a system restart).

7. Insert DVD/USB, restart again, enter Boot options (e.g. press F12 in Dell).

8. Choose booting from DVD/USB.

9. Log onto the Ubuntu installation wizard, chose to install manually (“something else”).

10. Choose the 40 GB partition, convert to “Ext4” type, choose “ / ” mounting point, INSTALL.

The whole process should take less than 60 minutes!!!


Installing Ubuntu alongside with Windows
(CONT.)
The wireless connection may not work.
1. Use a wired internet connection.
2. Click the Ubuntu icon… search for “System update”.

3. Install updates.
4. Click the Ubuntu icon… search for “Software & Updates”.
5. Open the “Additional Drivers” tab.

6. Check “Using Broadcom…”.


7. “Apply changes” and “close”.
Installing OF
1. Start Ubuntu, log onto OF website (http://www.openfoam.org/download/source.php).

2. Download both the OF package (OpenFOAM-3.0.1.tgz) and the third party package (ThirdParty-3.0.1.tgz).

3. Move the downloaded packages from the “Download” directory to a new “OpenFOAM” directory inside the “Home”
directory. Then extract the packages in place.

4. Install system requirements (dependent packages):


• Open a new terminal window (Alt + Ctr + T) or click the Ubuntu icon and search for it.

• In the terminal window: type “sudo -s”.

• Type your password.

• Back to the OF website, under the “System Requirements” section, copy the lines and paste them to the terminal window (one by one).

• Type “exit”.

5. Set environmental variables


• Type “gedit .bashrc”.

• Add this line (from website also) to the end of the opened file: “source $HOME/OpenFOAM/OpenFOAM-3.0.1/etc/bashrc”, save and
close.

• Type “. .bashrc”

• Check: type “cd $FOAM_INST_DIR”, this should send you to the OpenFOAM directory.

• Type “cd” to move back to the home directory.


Installing OF (CONT.)
6. “cd $WM_THIRD_PARTY_DIR”

7. “./Allwmake” (takes 20 minutes)

8. “./makeParaView4” (takes two hours)

9. “cd $WM_PROJECT_DIR”

10. “./Allwmake” (takes 6-8 hours)

11. “cd”

12. “mkdir –p $FOAM_RUN”

13. “cp –r $FOAM_TUTORIALS $FOAM_RUN”

14. Check your installation: “foamInstallationTest”


Removing Ubuntu
1. Log onto Windows.
2. Download Boot-repair-disk.
3. Make a bootable USB for Boot-repair-disk by Unetbootin
4. Use MiniTool Partition Wizard to delete both Ubuntu partitions (Linux
SWAP and the system partition)
5. Insert the Boot-repair-disk USB and restart your computer.

6. Enter Boot options (e.g. F12), chose boot from USB.


7. Run “recommended boot repair”.
8. Restart, Windows opens directly, use MiniTool to add the freed space to
either drive (e.g. C).
First problem with OpenFOAM
Lid-driven cavity flow

)
pr nite
m
le
-D fi
ob
(2 In
U0 = 1 m/s

Engine oil
ν = 10,000 CSt

0.1 m
= 0.01 m2/s

0.1 m
SEE YOU INSHA'ALLAH

You might also like