Open Source Computational Fluid Dynamics

Similar documents
Introduction To Linux. Rob Thomas - ACRC

Introduction: What is Unix?

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs

Linux Essentials Objectives Topics:

Computer Systems and Architecture

Introduction of Linux

Introduction to Linux

How to get started with OpenFOAM at SHARCNET

Perl and R Scripting for Biologists

UNIX. The Very 10 Short Howto for beginners. Soon-Hyung Yook. March 27, Soon-Hyung Yook UNIX March 27, / 29

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80

CENG393 Computer Networks Labwork 1

A Brief Introduction to the Linux Shell for Data Science

Introduction to Linux Part 1. Anita Orendt and Wim Cardoen Center for High Performance Computing 24 May 2017

Introduction to the Linux Command Line

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Introduction to Linux

Introduction to the UNIX command line

Part 1: Basic Commands/U3li3es

Introduction Into Linux Lecture 1 Johannes Werner WS 2017

Introduction to Supercomputing

Introduction to Linux

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011

Linux Command Line Primer. By: Scott Marshall

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

Introductory OpenFOAM Course From 2 nd to 6 th July, Joel Guerrero University of Genoa, DICAT

BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description:

CENG 334 Computer Networks. Laboratory I Linux Tutorial

Operating Systems. Copyleft 2005, Binnur Kurt

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

The Unix Family. Linux 101. GNU/Linux distributions. Even more. MULTICS MIT/GE/Bell Labs. UNIX AT&T (Bell Labs) Mach, Carnegie Mellon

CISC 220 fall 2011, set 1: Linux basics

Useful Unix Commands Cheat Sheet

Introduction to remote command line Linux. Research Computing Team University of Birmingham

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

Introduction to Linux

Unix Basics. Benjamin S. Skrainka University College London. July 17, 2010

Brief Linux Presentation. July 10th, 2006 Elan Borenstein

Linux Training. for New Users of Cluster. Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala

Lab 1: Introduction to Linux Networking

Computer Systems and Architecture

Week 2 Lecture 3. Unix

On successful completion of the course, the students will be able to attain CO: Experiment linked. 2 to 4. 5 to 8. 9 to 12.

Introduction to UNIX command-line

Lab Working with Linux Command Line

Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p.

The Unix Shell. Pipes and Filters

Introduction to UNIX command-line II

Arkansas High Performance Computing Center at the University of Arkansas

Introduction to the Computer Exercices Turbulence: Theory and Modelling R.Z. Szasz, Energy Sciences, LTH Lund University

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers

CSCI 2132 Software Development. Lecture 4: Files and Directories

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

Chapter-3. Introduction to Unix: Fundamental Commands

2) clear :- It clears the terminal screen. Syntax :- clear

Files and Directories

Introduction to Linux

LAB 8 (Aug 4/5) Unix Utilities

Using Linux as a Virtual Machine

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering

Introduction to Linux Workshop 1

EE516: Embedded Software Project 1. Setting Up Environment for Projects

Command Line Interface The basics

Introduction to Linux (Part I) BUPT/QMUL 2018/03/14

Systems Programming and Computer Architecture ( ) Exercise Session 01 Data Lab

Essential Linux Shell Commands

Lab 2: Linux/Unix shell

Linux at the Command Line Don Johnson of BU IS&T

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018

CS Fundamentals of Programming II Fall Very Basic UNIX

Introduction to Linux

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

Introduction to the basics of UNIX

A Brief Introduction to Unix

Introduction to Linux

CS 25200: Systems Programming. Lecture 11: *nix Commands and Shell Internals

LAB 8 (Aug 4/5) Unix Utilities

Introduction to Linux. Roman Cheplyaka

Introduction to Linux for BlueBEAR. January

Introduc)on to Linux Session 2 Files/Filesystems/Data. Pete Ruprecht Research Compu)ng Group University of Colorado Boulder

Using UNIX. -rwxr--r-- 1 root sys Sep 5 14:15 good_program

The Unix Shell & Shell Scripts

Files

Virtual Machine. Linux flavor : Debian. Everything (except slides) preinstalled for you.

Lecture 3. Unix. Question? b. The world s best restaurant. c. Being in the top three happiest countries in the world.

The Linux Command Line & Shell Scripting

EECS2301. Lab 1 Winter 2016

Introduction to Unix: Fundamental Commands

Laboratory 1 Semester 1 11/12

LAB #7 Linux Tutorial

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

CS 3410 Intro to Unix, shell commands, etc... (slides from Hussam Abu-Libdeh and David Slater)

Reading and manipulating files

Basic Linux (Bash) Commands

CSC209H Lecture 1. Dan Zingaro. January 7, 2015

Transcription:

Open Source Computational Fluid Dynamics An MSc course to gain extended knowledge in Computational Fluid Dynamics (CFD) using open source software. Teachers: Miklós Balogh and Zoltán Hernádi Department of Fluid Mechanics, Budapest University of Technology and Economics

Course description Introduction to OpenFOAM simulations (and linux, gnuplot, paraview). Installation on several Linux distributions and virtual systems. Solution of simple fluid dynamics problems using OpenFOAM. Detailed introduction to OpenFOAM software components: pre-processing (meshing tools and utilities) solving (standard applications, user applications) post-processing (ParaView). Single phase stationary and transient flows, turbulence, compressible flows. Multiphase and reactive flows. Extension of OpenFOAM capabilities by program code development in C++. Individual projects using OpenFOAM. Further open source CFD tools. Course website http://www.ara.bme.hu/~hernadi/openfoam

Planned schedule week 1: introduction to OpenFOAM, installing week 2: solving simple fluid flow problems week 3: studying software components week 4: stationary and transient flows week 5: turbulent and compressible flows week 6: multiphase and reactive flows, individual project proposals week 7: OpenFOAM programming (C++), individual project declarations week 8: mid-term exam week 9-11: further open source software (e.g. Palabos, Octave, Git) week 12-14: presentations of individual projects Final grade The grading is based on 1 mid-term exam (50% in final grade) and an individual project (50% in final grade). In-class activity will be rewarded by bonus points.

Introduction to OpenFOAM Open source Field Operation And Manipulation C++ toolbox, mainly designed for Computational Fluid Dynamics Linux is fully supported by OpenFOAM.

Linux operating system Linux comes in different flavours: distributions. Most popular Linux distributions are e.g. Arch Linux, CentOS, Debian, Fedora, Mageia, Linux Mint, opensuse, PCLinuxOS, Slackware, Ubuntu. Different distributions have different desktop environments, but the linux command-line in very similar. The command-line can be accessed through a terminal emulator, e.g. gnome-terminal, LXTerminal, rxvt, xterm.

Commands for navigating in file system ls list directory contents ls -l (use a long listing format) ls -ltr (long listing, sort by time, reverse order) ls --help (to see other options) man ls manual of ls command (to exit press q) cd.. change directory to parent (relative to $PWD) cd /bin change directory to /bin (absolute position) cd ~/OpenFOAM change directory to $HOME/OpenFOAM pwd print name of current/working directory echo HOME display a line of text: HOME echo $HOME display a variable: $HOME cd change directory to $HOME find -name OpenFOAM find files or directories named OpenFOAM man find manual of find command (to exit press q) which ls locate a command

Commands for texts in files cd $WM_PROJECT_DIR change directory to OpenFOAM installation cat Allwmake print file content less Allwmake print file content and scroll (exit: q) (type /sys to search "sys") (type n for next, N for previous) wc Allwmake print newline, word, and byte counts wc -w Allwmake print word counts man wc manual for wc command head Allwmake output first part of file tail Allwmake output last part of file grep echo Allwmake print lines matching a pattern sort Allwmake sort lines of text sort -r Allwmake sort lines of text, reverse order tac Allwmake print file content, reverse order grep -ri piso src find files with content (-i: ignore case) sort Allwmake uniq omit reported lines in sorted output man sed; man awk manuals of more advanced text processing

Commands for manipulating files cp Allwmake ~/test1 mv ~/test1 ~/test2 mv ~/test2 ~/OpenFOAM/ rm ~/OpenFOAM/test2 mkdir ~/test rmdir ~/test man rm sort Allwmake >~/test sort Allwmake >~/test sort <~/test >>~/sorted sort <~/test >>~/sorted chmod 000 ~/test chmod u+rw ~/test copy file rename file move file remove file make directory remove empty directory manual for rm command (see -r option!) create file by redirecting overwrite file by redirecting sort redirected input and save output sort redirected input and add output change file mode (check with ls -l) change file mode (check with ls -l) Note Read (4), write (2), execute (1). E.g. rwxr-xr-x = 755, rw-r--r-- = 644.

Job control and performance monitoring ps ps aux less top kill free -h df -h du -sh list current processes list all processes interactive display of processes kill/terminate process report free memory report disk space usage estimate file space usage Tip Use TAB button for auto-completion of commands! Visit http://linuxcommand.org for learning more commands. Note Recommended text editor GUI: gedit

Installing OpenFOAM Linux is fully supported by OpenFOAM. On non-linux systems, you can use a virtualization platform, e.g. VirtualBox. You can download a VirtualBox image file from the course website: http://www.ara.bme.hu/~hernadi/openfoam/virtualbox.html If you have Linux installed, you can install OpenFOAM from http://www.openfoam.org/download/ Easy installation is possible on Ubuntu, SuSE or Fedora. For these systems, you don't need to compile OpenFOAM source code. Source pack distribution can be downloaded and compiled. If you use Git version control system, you can compile OpenFOAM source code with the latest fixes. Warning Compiling OpenFOAM from source usually take several hours! Be patient!

Testing OpenFOAM installation If OpenFOAM is installed, several Linux environment variables are available, e.g $WM_PROJECT_DIR $FOAM_RUN $FOAM_TUTORIALS OpenFOAM installation directory OpenFOAM user directory OpenFOAM tutorials directory Note You can list other environment variables by echo $FOAM_<TAB><TAB> env grep 'WM\ FOAM' less The usual way of testing OpenFOAM is to run a simple simulation: mkdir -p $FOAM_RUN cp -r $FOAM_TUTORIALS $FOAM_RUN cd $FOAM_RUN/tutorials/incompressible/icoFoam/cavity blockmesh icofoam parafoam

OpenFOAM cases The basic directory structure:

How OpenFOAM solvers work Partial differential equation ½U t +r ÁU r ¹rU = rp is represented using high-level C++ syntax inside the solver: solve ( fvm::ddt(rho,u) + fvm::div(phi,u) - fvm::laplacian(mu,u) == - fvc::grad(p) ); Numerical treatment settings (discretization schemes and linear-solvers) are inside OpenFOAM cases (fvschemes, fvsolution). divschemes { default div(phi,u) } none; bounded Gauss linearupwind grad(u);