OpenFOAM Workshop Yağmur Gülkanat Res.Assist.
Introduction to OpenFOAM
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.. Introduction to OpenFOAM 23.01.2014 2
Two development lines for OpenFOAM 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 Introduction to OpenFOAM 23.01.2014 3
History 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 Introduction to OpenFOAM 23.01.2014 4
Capabilities 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, postprocessing, etc. Solvers : Designed for specific classes of problems, e.g., incompressible flow, compressible flow, multiphase flow, etc. Introduction to OpenFOAM 23.01.2014 5
File Structure Introduction to OpenFOAM 23.01.2014 6
Applications = Solvers + Utilities Solvers For solving a specific continuum mechanics problem with a specific system of PDEs. Utilities For performing tasks that involve data handling and manipulation eg. CFD, Stress Analysis etc. eg. Meshing, case setup, solution monitoring, data export etc. Exploring the OpenFOAM environment 23.01.2014 7
Location of applications source code Allwmake used to compile all the applications solvers contains the source code of the solvers utilities contains the source code of the utilities test contains the source code for testing specific features of OpenFOAM Exploring the OpenFOAM environment 23.01.2014 8
Solvers in OpenFOAM
Solvers in OpenFOAM Exploring the OpenFOAM environment 23.01.2014 9
Frequently Used Standart Solvers Exploring the OpenFOAM environment 23.01.2014 10
Frequently Used Standart Solvers Exploring the OpenFOAM environment 23.01.2014 11
Frequently Used Standart Solvers Exploring the OpenFOAM environment 23.01.2014 12
icofoam Solver Exploring the OpenFOAM environment 23.01.2014 13
Utilities in OpenFOAM
Utilities in OpenFOAM Exploring the OpenFOAM environment 23.01.2014 14
Frequently Used Standart Utilities Exploring the OpenFOAM environment 23.01.2014 15
Frequently Used Standart Utilities Exploring the OpenFOAM environment 23.01.2014 16
Frequently Used Standart Utilities Exploring the OpenFOAM environment 23.01.2014 17
Frequently Used Standart Utilities Exploring the OpenFOAM environment 23.01.2014 18
A Simple Example
The Lid-driven Cavity Tutorial 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 19
Overview: Description of the Problem 20
Overview: Description of the Problem 21
Part 1: Pre-processing 22
Part 1: Pre-processing 23
Part 1: Pre-processing 24
Part 1: Pre-processing Mesh Generation 25
Part 1: Pre-processing Mesh Generation 26
Part 1: Pre-processing Mesh Generation 27
Part 1: Pre-processing Mesh Generation 28
Part 1: Pre-processing Mesh Generation 29
Part 1: Pre-processing Mesh Generation 30
Part 1: Pre-processing Mesh Generation 31
Part 1: Pre-processing Mesh Generation 32
Part 1: Pre-processing Mesh Generation 33
Part 1: Pre-processing Mesh Generation 34
Part 1: Pre-processing Mesh Generation 35
Part 1: Pre-processing Mesh Generation 36
Part 2: Initial and Boundary Conditions 37
Dimensional Units 38
Part 2: Initial and Boundary Conditions 39
Part 2: Initial and Boundary Conditions 40
Part 3: Physical Properties 41
Part 4: Solver Controls 42
Part 4: Solver Controls 43
Part 4: Solver Controls - fvschemes 44
Numerical schemes 45
Interpolation schemes 46
Surface normal gradient schemes 47
Gradient schemes 48
Divergence schemes 49
Laplacian schemes 50
Time schemes 51
Part 4: Solver Controls - fvsolution 52
Linear solver control 53
Preconditioned conjugate gradient solvers 54
Smooth solvers 55
Smooth solvers 56
Part 5: Processing 57
Part 5: Post Processing 58
References 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) References 23.01.2014 59
Q & A