Please check this page regularly for notes and updates for APMA0119.
Formal office hours will be held 9-11 Wednesday mornings (Room 028 in the basement of 182 George St). Please contact through email to arrange independent meetings as necessary.
Syllabus
- Course description
This course will provide students with an overview of the subjects necessary to perform robust
simulations of computational fluid dynamics (CFD) problems. After an initial overview of the finite
volume method and fluid mechanics, students will use the finite volume library OpenFOAM to explore
the different research areas that make up a modern CFD code (discretization, linear algebra,
timestepping, boundary conditions, splitting schemes, and multiphysics).
- Objectives
Provide senior undergraduate students with context for studying advanced numerical methods in future graduate studies.
Provide engineering oriented students to use production level CFD software while developing a foundation for what's happening under the hood.
Develop a sense of how numerical methods are incorporated in a large scale piece of software.
- Grading
15% quizzes, 65% homework assignments, 20% final project
Getting started with C++ quickly
The main challenge in this course is going to be quickly getting started writing code in C++. To do this, we will be following the text "Accelerated C++" by Andrew Koenig. While the formal workload of this course is designed to be lighter than most classes, in the first month of the class it will be necessary to quickly get up to speed and this will require a degree of self-motivation and academic maturity from students.
For those with no C/C++ experience, I suggest as free options either Code::blocks or using the gcc command line compiler. An overview of the compilation process will be provided on the first day of class, but as a starting point I suggest getting a compiler set up and running on your own computer as soon as possible by following the following tutorials.
Getting "Hello World" running using Code::blocks
Handling multiple cpp files within Code::blocks
- Compiling a Code::blocks project In class we will discuss how to handle multiple cpp files using gcc - this is a good tutorial for how to compile a hello world split between two cpp files if you want to follow along with Code::blocks.
Announcements
Schedule
We will update this section with more schedule details as they become available.
Please note the following important events:
- Class 1: Feb. 1 : Course overview, some logistics, introduction to conservation laws, and the finite difference method
- Class 2: Feb. 8 : (Snow day - Continue working in Koenig - if you have been unable to get started get in touch with Prof. Trask to arrange for extra C++ help)
- Class 2: Feb. 15 : The finite difference method, assignment one, and C++ crash course
- No class: Feb. 22 : University holiday
- Class 3: Feb. 29 : Integral equations for fluid flow, conservation, the finite volume method, and an introduction to OpenFOAM.
- Class 4: Mar. 7 : Conservation of momentum, Burger's equation, an introduction to the compressible Navier-Stokes equations, and an OpenFOAM tutorial session.
- Class 5: Mar. 14 : Molecular motivation, the continuum hypothesis, conservation of energy, inviscid compressible flow with the Euler equations, OpenFOAM tutorial part 2 (compiling user-defined solvers).
- Class 6: Mar. 21 : Characteristics of the compressible Euler equations, an intuitive detour through the shallow water equations, shockwaves+shocktubes, OpenFOAM tutorial part 3: Writing a 3D solver for the Euler equations
- Class 7: Apr. 4 : von Neumann stability analysis, explicit/implicit schemes for the advection/diffusion problem, iterative methods for solving sparse linear systems, implicit discretization in OpenFOAM
- Class 8: Apr. 11 : The incompressible Navier-Stokes equations, projection methods for handling incompressibility constraint, an introduction to complex geometry
- Class 9: Apr. 18 : Selection of final projects, lift/drag, an introduction to turbulence modelling, drag over a sphere at high/low Reynolds numbers
- Class 10: Apr. 25 : The k-epsilon turbulence model, navigating the OpenFoam source code, introducing turbulence models to your incompressible NS solver, 3D meshes using snappy hex mesh
- Reading period: May 2 : Final project workshop (attendance optional). I can prepare tutorials by request as needed for final projects - please send requests ASAP.
- Reading period: May 9 : Final project presentations.
Class Notes/Links/References/Files
Class 1
Class 2
Class 3
Class 4
Class 5
Class 6
Class 7
Class 8
Class 9
Class 10
Class 11 (Reading period extra material)