0% found this document useful (0 votes)
17 views

OpenFOAM Installation_ Windows 10

This document provides a step-by-step guide for installing OpenFOAM on Windows 10, including prerequisites like updating Windows and installing PowerShell and WSL. It details the installation process for Ubuntu, OpenFOAM, and additional applications, along with commands to execute in the terminal. The guide also includes instructions for setting up the graphical interface using VcXsrv and testing the installation.

Uploaded by

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

OpenFOAM Installation_ Windows 10

This document provides a step-by-step guide for installing OpenFOAM on Windows 10, including prerequisites like updating Windows and installing PowerShell and WSL. It details the installation process for Ubuntu, OpenFOAM, and additional applications, along with commands to execute in the terminal. The guide also includes instructions for setting up the graphical interface using VcXsrv and testing the installation.

Uploaded by

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

OpenFOAM Installation

Windows 10

OpenFOAM Tutorials, P Sunthar, Department of Chemical Engineering, IIT Bombay


What you must do What you see on the screen

(Actions appear here) (Screen visuals appear here)

OpenFOAM Tutorials, P Sunthar, Department of Chemical Engineering, IIT Bombay


Updating Windows
What you must do What you see on the screen
1. You must be running Windows 10 1
version 2004 or higher
2. Update windows
a. Start > Settings > Windows Update >
2
Check for updates
b. Install updates
c. Restart windows (may be more than
once)
3. Windows logo key + R, type winver,
select OK (to check latest windows 3
version installed)

OpenFOAM Tutorials, P Sunthar, Department of Chemical Engineering, IIT Bombay


Installing PowerShell
What you must do What you see on the screen
1. Search for “PowerShell” on windows 1
task bar
2. Right click on the App
3. Run as administrator 2
4. “Yes” to allow app to make changes to 3

your device
5. Look for a window terminal with a
shell prompt 5

OpenFOAM Tutorials, P Sunthar, Department of Chemical Engineering, IIT Bombay


Installing WSL (Windows Subsystem Linux)
What you must do What you see on the screen
1. Increase the font size if needed 1 1b
a. Right click on the blue icon left top of
powershell > Properties
b. Font tab > Size
2. Type the following on the prompt
> wsl --install
(> is the prompt, don’t type that. Note double minus
sign) 2
3. Restart windows after WSL and
installation
4. Repeat from 2 till ‘reboot’ message 3
goes away (usually twice)

OpenFOAM Tutorials, P Sunthar, Department of Chemical Engineering, IIT Bombay


Installing Ubuntu
What you must do What you see on the screen
1. Search for the Store app on windows 1

2. Search for Ubuntu and select the latest


version (22.04 or above)
3. Click on “Get” (downloads) 2

4. Click on Open (this will unpack the


distro, may take several minutes)

3 4

OpenFOAM Tutorials, P Sunthar, Department of Chemical Engineering, IIT Bombay


Setting up Ubuntu
What you must do What you see on the screen
1. Select the language as “English” 1

a. Use keyboard cursor keys to move


through the options
b. Press “Enter” to select
2 4
2. Use default “Mount location” /mnt
3. Move the cursor, Select “Done”, Enter
4. Profile setup
a. Enter your Full Name
b. username (short one word)
c. Password 3
d. Press “Enter” on “Done”

OpenFOAM Tutorials, P Sunthar, Department of Chemical Engineering, IIT Bombay


Launching and Updating Ubuntu
What you must do What you see on the screen
1. Windows icon > Search Ubuntu app 1 2
2. Select to open Ubuntu terminal
3. Type the following on the prompt
(prompt is your username@computername:~$)
$ sudo apt update
(enter your password)
$ sudo apt -y upgrade

(do not type $, that is end of the 3a


prompt)
This will download all latest upgrades
to ubuntu and install them. 3b

OpenFOAM Tutorials, P Sunthar, Department of Chemical Engineering, IIT Bombay


Installing OpenFOAM
1. Copy (Ctrl-c) one by one of the following commands
2. Paste (using right mouse click) on the Ubuntu terminal prompt
$ sudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -"
$ sudo add-apt-repository -y http://dl.openfoam.org/ubuntu
$ sudo apt update
$ sudo apt-get install openfoam10

OpenFOAM Tutorials, P Sunthar, Department of Chemical Engineering, IIT Bombay


Initialise OpenFOAM
1. On the terminal prompt copy-paste the following (one time only)
$ echo ". /opt/openfoam10/etc/bashrc" >> $HOME/.bashrc
$ source $HOME/.bashrc

2. Test if OpenFOAM installation is successful


$ simpleFoam -help 2

(Usage instructions appear)

OpenFOAM Tutorials, P Sunthar, Department of Chemical Engineering, IIT Bombay


Installation of VcXsrv (X-Server) and XLaunch
What you must do What you see on the screen
1. Download latest VcXsrv and install 1
https://sourceforge.net/projects/vcxsrv/files/vcxsrv/

3a
2. From taskbar open: XLaunch

3. Use default installation selections

a. Multiple windows

4. Extra settings
4
a. Uncheck “Native opengl”

b. Check “Disable access control”

OpenFOAM Tutorials, P Sunthar, Department of Chemical Engineering, IIT Bombay


Opening Ubuntu GUI on XLaunch
1. On Ubuntu terminal copy-paste
$ echo "export DISPLAY=\$(awk '/nameserver / {print \$2; exit}'
/etc/resolv.conf 2>/dev/null):0" >> ${HOME}/.bashrc
$ . $HOME/.bashrc

OpenFOAM Tutorials, P Sunthar, Department of Chemical Engineering, IIT Bombay


Additional Ubuntu Helper Applications
$ sudo apt install -y gedit gedit-plugins
$ sudo apt install -y gnuplot gnuplot-x11 gnuplot-doc libgd-tools
$ sudo apt install -y mplayer mencoder

Test graphics
$ paraview

This will open a graphical user interface


of paraview

OpenFOAM Tutorials, P Sunthar, Department of Chemical Engineering, IIT Bombay


● Updating Windows

Summary ● Installing WSL Ubuntu


● Installing OpenFOAM and
related applications
OpenFOAM on Windows 10

OpenFOAM Tutorials, P Sunthar, Department of Chemical Engineering, IIT Bombay


WSL Installation Progress

OpenFOAM Tutorials, P Sunthar, Department of Chemical Engineering, IIT Bombay


Installing Ubuntu App
What you must do What you see on the screen

OpenFOAM Tutorials, P Sunthar, Department of Chemical Engineering, IIT Bombay


What you must do What you see on the screen

OpenFOAM Tutorials, P Sunthar, Department of Chemical Engineering, IIT Bombay

You might also like