64
OpenFOAM Workshop Yağmur Gülkanat Res.Assist.

OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Embed Size (px)

Citation preview

Page 1: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

OpenFOAM Workshop

Yağmur Gülkanat

Res.Assist.

Page 2: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Introduction to OpenFOAM

Page 3: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

What is OpenFOAM?

• FOAM = Field Operation And Manipulation

• OpenFOAM is a free-to-use open-source numerical simulation software with

extensive CFD and multi-physics capabilities

• Free-to-use means using the software without paying for license and support,

including massively parallel computers: free CFD license!

• Toolbox for Computational Mechanics, primarily CFD

• Open-source, written in C++

• Generic and programmable

• Solves of discrete partial differential eqns on unstructed grids

• Finite volume, finite element, lagrangian particle tracking, and more..

23.01.2014Introduction to OpenFOAM 2

Page 4: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Two development lines for OpenFOAM

23.01.2014Introduction to OpenFOAM 3

OpenCFD Ltd. (2004)

acquired by SGI (2011)

Led by Henry Weller

openfoam.com

Wikki Ltd. (2004)

Led by Hrvoje Jasak

Extend Project

extend-project.de

Page 5: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

History

23.01.2014Introduction to OpenFOAM 4

• Late 1980’s: Imperial College, Prof. David Gosman’s research group

• 1996: H. Jasak. PhD Thesis, Imperial College, University of London (1st PhD thesis on OF)

• 2000-2004: Nabla, Ltd, markets commercial product, FOAM

• 2004: Nabla makes OpenFOAM GPL

• 2004: OpenCFD, Ltd (Henry Weller) and Wikki, Ltd (Hrv Jasak)

• Jan 2006: 1st OpenFOAM Workshop

• Nov 2007: 1st OpenFOAM Conference (Open-source CFD Conference)

• 2009: FOAM Documentation Project was shut-down

• Aug 2011: SGI purchases OpenCFD, Ltd.

• Sep 2012: ESI Group purchases OpenCFD from SGI

Page 6: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Capabilities

23.01.2014Introduction to OpenFOAM 5

• OpenFOAM is a CFD Toolbox written in C++

Software :

Liberal use of C++ abstraction

Run-time selection of libraries

Five basic classes

Libraries : Numerical algorithms and physical models

Utilities: Meshing, pre-processing, parallel computing, post-

processing, etc.

Solvers : Designed for specific classes of problems, e.g.,

incompressible flow, compressible flow, multiphase flow, etc.

Page 7: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

File Structure

23.01.2014Introduction to OpenFOAM 6

Page 8: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Applications = Solvers + Utilities

23.01.2014Exploring the OpenFOAM environment 7

eg. CFD, Stress Analysis etc. eg. Meshing, case setup, solution monitoring, data export etc.

Solvers

For solving a specific continuum mechanics problem with a specific

system of PDEs.

Utilities

For performing tasks that involve data handling and

manipulation

Page 9: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Location of applications’ source code

23.01.2014Exploring the OpenFOAM environment 8

utilities

• contains the source code of the utilities

test

• contains the source code for testing specific features of OpenFOAM

solvers

• contains the source code of the solvers

Allwmake

• used to compile all the applications

Page 10: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Solvers in OpenFOAM

Page 11: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Solvers in OpenFOAM

23.01.2014Exploring the OpenFOAM environment 9

Page 12: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Frequently Used Standart Solvers

23.01.2014Exploring the OpenFOAM environment 10

Page 13: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Frequently Used Standart Solvers

23.01.2014Exploring the OpenFOAM environment 11

Page 14: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Frequently Used Standart Solvers

23.01.2014Exploring the OpenFOAM environment 12

Page 15: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

icoFOAM Solver

23.01.2014Exploring the OpenFOAM environment 13

Page 16: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Utilities in OpenFOAM

Page 17: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Utilities in OpenFOAM

23.01.2014Exploring the OpenFOAM environment 14

Page 18: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Frequently Used Standart Utilities

23.01.2014Exploring the OpenFOAM environment 15

Page 19: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Frequently Used Standart Utilities

23.01.2014Exploring the OpenFOAM environment 16

Page 20: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Frequently Used Standart Utilities

23.01.2014Exploring the OpenFOAM environment 17

Page 21: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Frequently Used Standart Utilities

23.01.2014Exploring the OpenFOAM environment 18

Page 22: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

A Simple Example

Page 23: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

The Lid-driven Cavity Tutorial

23.01.2014A Simple Example 19

Problem Contents

• Overview: Description of the problem

• Part 1: Mesh Generation

• Part 2: Initial & Boundary Conditions

• Part 3: Setting Physical Properties

• Part 4: Solver Control

Page 24: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Overview: Description of the Problem

23.01.2014A Simple Example 20

Page 25: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Overview: Description of the Problem

23.01.2014A Simple Example 21

Page 26: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 1: Pre-processing

23.01.2014A Simple Example 22

Page 27: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 1: Pre-processing

23.01.2014A Simple Example 23

Page 28: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 1: Pre-processing

23.01.2014A Simple Example 24

Page 29: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 1: Pre-processing – Mesh Generation

23.01.2014A Simple Example 25

Page 30: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 1: Pre-processing – Mesh Generation

23.01.2014A Simple Example 26

Page 31: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 1: Pre-processing – Mesh Generation

23.01.2014A Simple Example 27

Page 32: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 1: Pre-processing – Mesh Generation

23.01.2014A Simple Example 28

Page 33: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 1: Pre-processing – Mesh Generation

23.01.2014A Simple Example 29

Page 34: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 1: Pre-processing – Mesh Generation

23.01.2014A Simple Example 30

Page 35: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 1: Pre-processing – Mesh Generation

23.01.2014A Simple Example 31

Page 36: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 1: Pre-processing – Mesh Generation

23.01.2014A Simple Example 32

Page 37: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 1: Pre-processing – Mesh Generation

23.01.2014A Simple Example 33

Page 38: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 1: Pre-processing – Mesh Generation

23.01.2014A Simple Example 34

Page 39: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 1: Pre-processing – Mesh Generation

23.01.2014A Simple Example 35

Page 40: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 1: Pre-processing – Mesh Generation

23.01.2014A Simple Example 36

Page 41: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 2: Initial and Boundary Conditions

23.01.2014A Simple Example 37

Page 42: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Dimensional Units

23.01.2014A Simple Example 38

Page 43: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 2: Initial and Boundary Conditions

23.01.2014A Simple Example 39

Page 44: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 2: Initial and Boundary Conditions

23.01.2014A Simple Example 40

Page 45: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 3: Physical Properties

23.01.2014A Simple Example 41

Page 46: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 4: Solver Controls

23.01.2014A Simple Example 42

Page 47: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 4: Solver Controls

23.01.2014A Simple Example 43

Page 48: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 4: Solver Controls - fvSchemes

23.01.2014A Simple Example 44

Page 49: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Numerical schemes

23.01.2014A Simple Example 45

Page 50: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Interpolation schemes

23.01.2014A Simple Example 46

Page 51: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Surface normal gradient schemes

23.01.2014A Simple Example 47

Page 52: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Gradient schemes

23.01.2014A Simple Example 48

Page 53: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Divergence schemes

23.01.2014A Simple Example 49

Page 54: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Laplacian schemes

23.01.2014A Simple Example 50

Page 55: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Time schemes

23.01.2014A Simple Example 51

Page 56: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 4: Solver Controls - fvSolution

23.01.2014A Simple Example 52

Page 57: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Linear solver control

23.01.2014A Simple Example 53

Page 58: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Preconditioned conjugate gradient solvers

23.01.2014A Simple Example 54

Page 59: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Smooth solvers

23.01.2014A Simple Example 55

Page 60: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Smooth solvers

23.01.2014A Simple Example 56

Page 61: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 5: Processing

23.01.2014A Simple Example 57

Page 62: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Part 5: Post Processing

23.01.2014A Simple Example 58

Page 63: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

References

23.01.2014References 59

• OpenFOAM® Documentation, http://www.openfoam.org/docs/

• Nilsson, H. (2009), http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2009

PhD course in CFD with OpenSource software.

• David A. Boger (2011), Getting Started with OpenFOAM ®,

6th OpenFOAM Workshop

• User Forum (http://www.cfd-online.com/Forum/)

• Wiki (http://openfoamwiki.net)

Page 64: OpenFOAM Workshop - İTÜtraining.uhem.itu.edu.tr/files/belgeler/belgeler-dosya... · • OpenFOAM is a free-to-use open-source numerical simulation software with ... Meshing, pre-processing,

Q & A