PhD course in CFD with OpenSource software, Quarter 2, 2008
This PhD course can also be chosen by students in Master Programmes at Chalmers (Check with your coordinator so that they accept it! The Master Programme in Applied Mechanics accepts it.). Such students will be registered under the TME050 Project course, which is a general purpose course code for advanced project courses. PhD students will not be registered under TME050. Industrial participants should contact me at firstname.lastname@example.org.
The course homepage is http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2008
If you are interested in taking the course you should contact me at email@example.com so that I can maintain an e-mail list that will be used for further information until the course starts. A definitive registration to the course should be made by October 20, by e-mail to me. Then I need to know your CID if you have any, or your personal number so that I can arrange the computer accounts. If you already have a CID, make sure that it will be valid throughout the course, and that you can log in to the student computers in MT11. I will help you if you have any problems with this.
The course gives an introduction to the use of OpenSource software for CFD applications. A major project work in OpenFOAM (see the short description below) forms
a large part of the course. The project may be defined according to the
student's special interests. The result of the project should be a
detailed tutorial for a specific application or library of OpenFOAM. The tutorials
will be peer-reviewed and graded by the students, and the tutorials thus
form a part of the course. The tutorials will be made available as
OpenSource, as a contribution to the OpenFOAM community. To pass the
course the student must do the project and peer-review the tutorials from
the other projects. There will also be some compulsory minor tasks. The TME050 Project course requires grading: Fail, 3, 4, 5. PhD students are not registered to TME050, but should reach an equivalence of grade 4 to pass. There will be no written examination, instead there will be some requirements for each grade.
The students will learn on the following subjects:
- Compilation procedures
- Version Control Systems
- Writing reports (in this case a tutorial)
- Peer-reviewing reports
- Teach a tutorial in the form of a small workshop
OpenFOAM (Open Field Operation and Manipulation, www.openfoam.org) is developed and distributed by OpenCFD (http://www.opencfd.co.uk). OpenFOAM is an
object oriented C++ toolbox for solving various systems of partial
differential equations using the finite volume method on arbitrary control
volume shapes and configurations. It includes preprocessing (grid
generator, converters, manipulators, case setup), postprocessing (using
OpenSource Paraview), and many specialized CFD solvers are implemented.
The features in OpenFOAM are comparable to what is available in the major
commercial CFD codes. Some of the more specialized features that are
included in OpenFOAM are: sliding grid, moving meshes, two-phase flow
(Langrange, VOF, Euler-Euler) and fluid-structure interaction. The
strength of OpenFOAM is however the object-oriented approach to generating
specialized solvers, utilities and libraries, using a flexible set of C++
modules. OpenFOAM runs in parallel using automatic/manual domain
decomposition, and the parallelism is integrated at a low level so that
solvers can generally be developed without the need for any
parallel-specific coding. Due to the distribution as an OpenSource code it
is possible to gain control over the exact implementations of different
features, which is essential in research work. It also makes development
and tailoring of the code for the specific application possible. In
addition to the source code, OpenFOAM gives access to an international
community of OpenFOAM researchers through the discussion board at the
OpenFOAM home page.
The course will be given as a number of full-day hands-on workshops, ending with one or two full days of presentations (depending on the number of students). In order not to interfere with the master course in Multiphase Flow (TME160), the course is given mondays and fridays. The students are also expected to work on some minor tasks and their project by themselves.
- First day: Friday, November 7, 9.15-17, MT13
Lectures and hands-on workshop
userGuide_chap1-2 (and some more)
icoFoamCavityTutorial (based on the UserGuide, and some more)
paraFoamTutorial (based on the UserGuide, and some more)
- Second day: Monday, November 10, 9.15-17, MT13
Lectures and hands-on workshop
otherTutorials (based on the UserGuide, and some more)
Download source and binary files from OpenCFD and run
Download source files from OpenCFD, patch, compile and run
UserGuide, chapter 3 (and some more)
Compulsory assignment to be handed in by 30/11!
A short Latex slides tutorial
Some commands for the Latex tutorial (this should work in MT13):
- Third day: Friday, November 21, 9.15-17, MT13
Lectures and hands-on workshop
ProgrammersGuide (and some more)
Copy and compile an application, and a deeper look in icoFoam
Copy and compile a turbulence model, and a deeper look at kOmegaSST
Add a solidParticleCloud to the interFoam/damBreak tutorial
A description of how to do Conjugate Heat Transfer in OpenFOAM (by Pirooz Moradnia)
- Fourth day: Monday, November 24, 9.15-17, MT13
Lectures and hands-on workshop
Copy and compile a boundary condition, and a deeper look at parabolicInlet
Basics of C++, and how it is used in OpenFOAM
Compulsory assignment to be handed in by 7/12!
- Fifth day: Monday, December 1, 9.15-17, MT13
Lectures and hands-on workshop: Advanced usage of OpenFOAM and other OpenSource software.
ercoftacConicalDiffuser (a 'real' case-study, from scratch to validation using OpenSource software)
pyFoam (a user contribution, coupling Python with OpenFOAM)
Debugging using Gdb (based on material from Dr.Fabian Peng-Kärrholm, 2007
Code development using Subversion
Electromagnetics of an electric rod and surrounding air (By Margarita Sass-Tisovskaya)
Introduction to snappyHexMesh (By Olivier Petit)
Compulsory project work to be handed in by 2nd of February!
- iglooWithFridges (From $FOAM_TUTORIALS/snappyHexMesh)
- A disc case
Example of a good peer-review
Example of a good response to a peer-review
Håkans note for next year: Hand in preliminary report before Christmas! Supply LaTeX templates. Project files and documents under svn while work is on-going.
- Presentation days: Tuesday and Wednesday, February 3-4, 2009, 9.15-17, MT13 (or possibly MT12)
Preliminary student-contributed tutorials
These files should at least work for OF-1.4.1, OF-1.4.1-dev, or OF-1.5.x at the student computers in the Mechanical Engineering building at Chalmers, at the time of the presentation days of this course.
Movies with codec avi can be viewed with /chalmers/sw/unsup/vlc-0.8.6i/bin/vlc
Final, peer-reviewed, student-contributed tutorials
These files should work for OF-1.5.x (or another version that is specifically mentioned) at the student computers in the Mechanical Engineering building at Chalmers, at the time of the presentation days of this course.
- Per Carlsson:
Introduction to dieselFoam and reacting flows
Report, Presentation, Movie. Standard tutorial cases used as a base.
- Erik Larsson:
Did not pass
- Zongyuan Gu:
Introduction to ODE solvers and it's application in OpenFOAM
Report, Presentation, Utility
- Erik Bjerklund:
icoDyMFoam in OpenFOAM-1.4.1-dev: movingCone with sliding interface.
Report, Presentation, Library, Case, Movie
- Tim Behrens:
Structure of OpenFoam solvers for linear systems of equations and implementation of a new solver
Report, Presentation, based on standard tutorials
- Eysteinn Helgason:
Point-wise deformation of mesh patches (note that the div(phi,U) scheme is linear, which causes free-stream oscillations. Try Gauss linearUpwind Gauss.)
Report, Presentation, Case and Source Files, Movie
- Praveen Prabhu Baila:
A description of the twoPhaseEulerFoam solver.
Report, Presentation (standard tutorial used)
- Haukur Elvar Hafsteinsson:
A detailed description of how to do simulations with porous media in OpenFOAM, and a modification to cylindrical coordinates.
Report (Errata), Presentation, Case and source files
- Erik Ekedahl:
6DOF solid-body moving meshes
Report, Presentation, kubmesh.tar.gz, kubtest.tar.gz, my6DOFFoam.tar.gz
- Annika Gram:
A multiphaseInterFoam tutorial
Report, Presentation, Case
- Abolfazl Shiri:
Natural convection around a cylinder in a confined tunnel - descriptions of different choises of solvers and boundary conditions
Report, Slides, Coarse Case, Fine Case
- NaiXian LU:
A description and improvement of the interPhaseChangeFoam solver for Large Eddy Simulation of cavitating flow
Report, Presentation, Case, Source Files, Movie
Some hints from me:
- Examples of how to use some mesh patch boundary conditions for moving meshes. Download case files. Run with 'blockMesh' and 'moveMesh'. Visualize with wireframe and a movie in paraFoam. See the implementations of the mesh boundary conditions in: $FOAM_SRC/fvMotionSolver/pointPatchFields/derived
(Most of these topics have been discussed a lot in the forum, so it should be possible to find all the answers there)
- Implement an actuator disk that resembles the effect of a rotating geometry, such as a propeller or a rotatinh honeycomb (ercoftacConicalDiffuser). Ask me for a copy of this and this document. Also see John Bergström's PhD thesis.
- A detailed description of how to do simulations with porous media in OpenFOAM. Also re-write the porous media class to cylindrical coordinates and apply it for modelling the honeycomb of the ercoftacConicaldiffuser case study (see the actuator disk suggestion). Describe how you did it.
- Imlement a new solidBody mesh motion class, provide an example and describe it in high detail. See interDyMFoam.
- Implement a new boundary condition for dynamic meshes, where a patch is projected to some pre-defined surface. Provide examples, and describe in high detail. Test different mesh diffusion alternatives. See the work by Pirooz Moradnia 2007.
- Set up and describe the use of MRFSimpleFoam for the ERCOFTAC centrifugal pump. Test if the sliding mesh works for that case.
- Modify patches: class: repatchPolyTopoChanger. in: createPatch utility
- Implement Walters Gyllenram's ode solver for determining the radial component (as a boundary condition) and the eigenvalues of the coefficient matrix.
There are some different aspects of this project:
If you do this, you should start by describing the ODE solvers in
OpenFOAM, and tell us how to use them for some examples that you make up.
- Describe how to solve ODEs with built-in classes in OpenFOAM
(this could also be useful for other applications, such as Lagrangian
- Set up a case which takes 1D axial and tangential velocity profiles,
either in discrete form (discrete values from file) or as mathematical
functions, and computes the radial velocity component using Walter's
method. If you read discrete values from file, you might have to do
some high-order approximation of the profile before analysing it.
- Implement this as a new boundary condition, and use the
ercoftacConicalDiffuser Case0 set-up to demonstrate how to use it.
- Analyse the coefficient matrix of the discretized problem, and monitor
the three lowest eigenvalues for different swirl numbers.
Then you can move on to the second step above. Ask me for a copy of Walter's Physics of Fluids paper.
- Re-write my Fluent tutorials in MTF113 Heat Transfer for OpenFOAM, but more detailed. Note that there is a conjugate heat transfer tutorial in the development version at sourceForge:
- Implement the fractional-step method in OpenFOAM. Talk to Mohammad Irannezhad (who is also taking the course 2008)
There is no requirement to buy any book. You have to find the information you need to solve your project and the tasks.
The C++ part of the course is based on C++ Direkt, by Jan Skansholm, Studentlitteratur, which is in Swedish. Any introductory C++ book should be fine. Anyone who is doing CFD is recommended to have the introductory book on CFD by Versteeg and Malalasekera. Another useful book is J.H. Ferziger and M. Peric Computational Methods for Fluid Dynamics 3rd ed. Springer 2002. There is also a lot to find on the Internet, for example:
See the homepage of the course given 2007 for more information. The course for 2008 will develop from the one given in 2007. You can also contact me at firstname.lastname@example.org.
Master Thesis propositions
Master Thesis Propositions using OpenFOAM
Volvo Cars Corporation