open source computational fluid dynamics using openfoam. humberto... · open source computational...
TRANSCRIPT
![Page 1: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/1.jpg)
Open Source Computational Fluid
Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,
Sophie Porter, Svetlana Aleksandrova and Steve Benjamin
![Page 2: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/2.jpg)
Outline
Introduction
Computational Fluid Dynamics (CFD)
Introduction to OpenFOAM
Getting started (Myths)
Some examples
![Page 3: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/3.jpg)
Introduction and motivation
Why open source?
Challenges?
Motivation? To promote the use of OpenFOAM and encourage its use by the light aircraft
design “community” by providing practical advice to avoid typical pitfalls and
stressing benefits
![Page 4: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/4.jpg)
Computational Fluid Dynamics
• Firstly, the equations that describe the system are derived and/or approximated
• This requires significant mathematical understanding
• System understanding is also essential
• Equations are discretised in space (approximation)
• For example:
• Take a reference frame
• And the actual solution of the system
• Choose discrete points of interest in space
• CFD finds the solution to this discrete system
• We are left with an approximated solution
• Limitation?
• We do not know the solution…
• …so the next shape could also be a solution!
Space
Velocity
![Page 5: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/5.jpg)
Computational Fluid Dynamics
Mesh and boundary conditions
Free-stream
Aerofoil (wall) Inlet Outlet
Free-stream
![Page 6: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/6.jpg)
Approaches used in CFD
• DNS Direct Numerical Simulation
• Very good results
• Extremely expensive
• Used for mostly for fundamental research
• Not suitable for engineering applications
• LES Large Eddy Simulation
• Less expensive than DNS as some flow features are modelled (below inertial sub-
range)
• Difficult to set up i.e. especial boundary conditions and filters
• Practical engineering problems have been solved successfully but mostly research
• Future?
Copyright © Dr Humberto Medina
![Page 7: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/7.jpg)
Approaches used in CFD
• DES Detached Eddy Simulation • Mixed approached
• Slightly less expensive than LES
• Implementation of new models is still a challenge
• RANS Reynolds-Averaged Navier-Stokes • Industry standard
• Inexpensive for most engineering applications
• Well established with numerous models available
• Limited to steady state solutions
• Requires a significant modelling effort to close the system of equations
![Page 8: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/8.jpg)
Approaches used in CFD
RANS
LES
DNS
RANS
LES
DNS
100% modelled turbulence
Turbulence model required
Industrial “workhorse”
Large scales of turbulence (resolved)
Small scales of turbulence (modelled)
Restrictive industrial applications
100% resolved turbulence
Strictly restrictive to industrial
applications for at least the next few
decades
Increasing computational cost &
method accuracy
▬ Figure 2: RANS, LES & DNS comparison - zpg flat plate
![Page 9: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/9.jpg)
The classic CFD workflow
![Page 10: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/10.jpg)
Introduction to OpenFOAM
• Collection of libraries (c++)
• Open source and free to use (GNU GPL) • Large user base
• Development managed by the OpenFOAM Foundation
• Users can contribute new code
• Fast (very fast) development
• Bug reporting system and GIT repositories make code
traceable and trackable
• Offers many, many features! (see paper & website)
![Page 11: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/11.jpg)
Introduction to OpenFOAM
• If OpenFOAM is that great why is not everyone using it?
• Steep learning curve
• No native Graphical User Interface (GUI)
• Case configuration via text files
• It offers so much freedom that it can be overwhelming for
new users
• Native mesh generation tools are powerful but need
refinement
• Pre-processing a current bottleneck of the purely open
source CFD solution (but some very capable solutions do
exist!!!)
![Page 12: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/12.jpg)
Getting started (Myths)
Myth 1: Linux is inaccessible
Myth 2: No documentation
Myth 3: No mesh generation tools
Myth 4: No Graphical User Interface (GUI)
Myth 5: Difficult to post-process
![Page 13: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/13.jpg)
Getting started (Myths)
Myth 1: Linux is inaccessible Many Linux distribution e.g. Ubuntu, Fedora, Debian, Mint, etc.
• Ubuntu download and installation
http://www.ubuntu.com/download/desktop
• Introduction to the Linux terminal
https://help.ubuntu.com/community/UsingTheTerminal
• Community support
https://help.ubuntu.com/ (Ubuntu, similar sites for other distros)
![Page 14: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/14.jpg)
Getting started (Myths)
Myth 1: Linux is inaccessible
![Page 15: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/15.jpg)
Getting started (Myths)
Myth 2: No documentation Sources of information (incl. unofficial)
• Official documentation
http://cfd.direct/openfoam/user-guide/
• Source code information
http://www.openfoam.org/docs/cpp/ (under modules)
https://github.com/OpenFOAM (GitHub repositories)
• Community support
http://www.cfd-online.com/ (CFD online forum)
![Page 16: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/16.jpg)
Getting started (Myths)
Myth 3: No mesh generation tools Virtually all commercial mesh generators can be used.
• Some open-source alternatives
– OpenFOAM (blockMesh and snappyHexMesh)
– cfMesh has enormous potential (issues with boundary layer generation)
– Netgen algorithm is versatile (GUI not intuitive)
– SALOME the most complete solution (some RAM memory issues)
• Includes a very capable CAD module
![Page 17: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/17.jpg)
Getting started (Myths)
Myth 3: No mesh generation tools (Salome)
![Page 18: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/18.jpg)
Getting started (Myths)
Myth 4: No GUI available (Helyx-os)
![Page 19: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/19.jpg)
Getting started (Myths)
Myth 5: Difficult to post-process (ParaView)
![Page 20: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/20.jpg)
Getting started (Myths)
![Page 21: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/21.jpg)
Getting started (Myths)
![Page 22: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/22.jpg)
Getting started (Myths)
![Page 23: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/23.jpg)
Getting started (Myths)
![Page 24: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/24.jpg)
Post-processing
![Page 25: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/25.jpg)
Examples: Plat plate
back
inle
t
wall (plate) leading edge
x
y z
freestream freestream
outl
et
front
U: Dirichlet condition
p: Neumann condition
Turbulent quantities: Dirichlet condition
U: Neumann condition
p: Dirichlet condition
Turbulent quantities: Neumann condition
U: Dirichlet (no slip) condition
p: Neumann condition
Turbulent quantities: Dirichlet condition
U: Neumann condition
p: Neumann condition
Turbulent quantities: Neumann condition
Boundary Conditions
![Page 26: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/26.jpg)
Examples: Plat plate
Skin friction prediction over a flat plate • 3% Turbulence intensity level
• Experimental results (ERCOFTAC)
Launder-Sharma K-Epsilon K-Omega Transition Model (Walters 2008)
![Page 27: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/27.jpg)
Examples: Porous medium
𝑈𝑠
Δ𝑃
𝑆 = − 𝜇𝐷 +1
2𝜌𝑈𝐹 𝑈
Δ𝑃
𝐿= 𝛼𝑈𝑠 + 𝛽𝑈𝑠
2
![Page 28: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/28.jpg)
Examples: Planar diffuser
𝑆 = − 𝜇𝐷 +1
2𝜌𝑈𝐹 𝑈
![Page 29: Open Source Computational Fluid Dynamics using OpenFOAM. Humberto... · Open Source Computational Fluid Dynamics using OpenFOAM Humberto Medina, Abhinivesh Beechook, Jonathan Saul,](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accfbc17f8b9a875a8d435a/html5/thumbnails/29.jpg)
Any Questions?