OpenFOAM-version-7/C2/Installing-OpenFOAM-in-Ubuntu-Linux/English

From Script | Spoken-Tutorial
Revision as of 18:22, 20 July 2020 by Ashleymelvin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Title of the script: Installing OpenFOAM in Ubuntu

Author: Ashley Melvin

Keywords: OpenFOAM, ParaView, Linux, Ubuntu 18.04, video tutorial


Visual Cue Narration
Slide: Opening Slide Welcome to this tutorial on Installing OpenFOAM in Ubuntu Linux OS.
Slide: Learning Objective


In this tutorial, we will learn how to install:
  • OpenFOAM version 7 and
  • ParaView version 5.6.0
Slide: System Specifications This tutorial is recorded using:
  • Ubuntu Linux OS version 18.04
  • A working Internet connection and
  • A text editor
Only Narration We will install OpenFOAM using the terminal.
Highlight Terminal on the machine Open a terminal by pressing Ctrl, Alt and T keys together.


Make sure that you are connected to the Internet.

[Terminal]


sudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -"

A public key needs to be added to the repository.


This key enables the repository to verify OpenFOAM package signatures.


To do this, in the Terminal, carefully type the following command and press Enter.

[Terminal]


Type the password >> Press Enter.

The machine will ask for the system password.


Type the password and press Enter.

Only Narration Let me clear the screen.
[Terminal]


sudo add-apt-repository http://dl.openfoam.org/ubuntu

Now type the following command and press Enter.


This will enable apt to search for dl.openfoam.org in the list of software repositories.

Only Narration Here onwards, please remember to press the Enter key after typing each command.
[Terminal]


sudo apt-get update

Now type the following command to update the apt package list.
[Terminal]


sudo apt-get -y install openfoam7

The repository is updated.


Next let us install OpenFOAM version 7.


To do so, type the following command in the terminal.

[Terminal]


Point to the installation process

The installation may take some time depending upon your internet speed.
[Terminal]


Point to the installation complete message

The installation is done now.
Only Narration Let’s now configure the system to use the installed OpenFOAM package.


Let me clear the screen.

[Terminal]


gedit ~/.bashrc

Open the .bashrc file located in the Home directory in a text editor.


To do so, type the following command.


I will be using the gedit text editor.


You may use any text editor of your choice.

[Text Editor]


source /opt/openfoam7/etc/bashrc

Scroll down to the end of the document.


Add the following line of code as shown.


This will enable us to execute the OpenFOAM commands via terminal.

[Text Editor]


Ctrl + S and close the window

Save and close the file.
Highlight new Terminal on the machine Since the changes to .bashrc file is yet to be registered, we need to open a new terminal.


To open a new terminal, press Ctrl, Alt and T keys together.

[Terminal]


simpleFoam -help

In the new terminal, type the following command.
[Terminal]


‘Usage’ message

A message with the list of options is displayed on the terminal.


This confirms that OpenFOAM 7 is properly installed.

Only Narration Let me clear the screen.
Only Narration Let us now check the installation of ParaView.
[Terminal]


paraview

Type paraview in the terminal.
Highlight ParaView window The ParaView interface opens in a new window.


Close the start-up screen.


This confirms that ParaView is properly installed.

[ParaView]


Click on close

Close this window.
Only narration The installation of OpenFOAM 7 is now complete.


We can access OpenFOAM commands from the terminal now.

Only narration With this we have come to the end of the tutorial.


Let’s summarize.

Slide: Summary In this tutorial, we have learnt how to:
  • Install OpenFOAM version 7
  • Install ParaView version 5.6.0 and
  • Verify the installation
Slide: About the Spoken Tutorial Project The video at the following link summarises the Spoken Tutorial project.


Please download and watch it.

Slide: Spoken Tutorial Workshops We conduct workshops using Spoken Tutorials and give certificates.


Please contact us.

Slide: Spoken Tutorial Forum
  • Do you have questions in THIS Spoken Tutorial?
  • Please visit this site.
  • Choose the minute and second where you have the question
  • Explain your question briefly
  • Someone from our team will answer them
  • You will have to register on this website to ask questions.
Slide: FOSSEE Forum
  • Do you have any general/technical questions?
  • Please visit the forum given in the link.
Slide: FOSSEE Case Study Project
  • The FOSSEE team coordinates solving feasible CFD problems of reasonable complexity using OpenFOAM.
  • We give honorarium and certificates to those who do this.
  • For more details, please visit these sites.
Slide: Spoken Tutorial The Spoken Tutorial project is supported by MHRD, Govt. of India.

The script for this tutorial is contributed by Ashley.

And this is Padmini from IIT Bombay signing off.

Thanks for joining.

Contributors and Content Editors

Ashleymelvin, Nancyvarkey