038782 – Computational Fluid Dynamics

Course Number: 038782
Computational Fluid Dynamics
Fall 2016

Tuesday’s 12:30-15:30, Farkas Computer Classroom, 0th Floor, Dan Kahn Building

Prof. Steve (Chaim) Frankel

Computational Fluid Dynamics or CFD involves numerical integration of the governing equations
of fluid dynamics and heat transfer, which in general form a non-linear system of partial differential equations or PDEs, using a computer. The general procedure involves discretization of the
continuous physical domain and the relevant governing PDEs for the problem of interest into a system of algebraic equations for the values of the dependent flow variables, subject to appropriate
initial and boundary conditions, on a set of discrete mesh or grid points (in space and time). There are a wide variety of possible numerical methods available including finite-di erence, finite-volume, finite-element and spectral methods each involving a di fferent type of trade-off with regard to aspects of accuracy and efficiency. CFD expertise requires knowledge of fundamental uid dynamics and heat transfer physics, theoretical and applied mathematics and analysis, basic and advanced numerical methods and scienti c computing, including parallel computing and computer graphics – and you gotta love it! To really learn the algorithms there is nothing better than coding it up your-self. Hence, learning how to write programs, debug, and run them and also how to post-process the results are important skills to develop. Challenges remain with regard to providing accurate and efficient algorithms for complex multi-physics ow problems involving turbulent flows, combustion,
multiphase flow, and acoustics, as well as fluid-structure interaction problems. The experience and excitement of going from mathematical equations to beautiful computer graphics of some complex flow solution, and everything in between, is unique in science and engineering – after all you are simply manipulating a bunch of 0’s and 1’s!!!

Course Description
This course off ers an introduction to CFD with an emphasis on finnite-di fference and, to a lesser extent finite-volume methods. It is comprehensive in that it begins with classi cation of PDEs and
basic representations of derivatives via finite-di fference approximations and proceeds to consider discretizations for model PDEs, the Euler equations for inviscid ow, and the incompressible and compressible Navier-Stokes equations for viscous ows. Both basic and advanced methods, including introductions to high-order and advanced upwind schemes, are covered. A range of computer
programming assignments are featured and o er a unique hands-on learning experience for the student. Exposure to modern programming languages like modern Fortran and Python and various open-source Linux tools/packages used for scienti c computing and technical report writing, such as vi, gnuplot, LATEX, etc., as well as to advanced computer graphics visualization software packages, e. g. gnuplot, xmgrace, Tecplot, . . . , provides opportunities for further learning and greatly
enhancing your scienti c computing skills.

Previous classes in fluid dynamics, numerical methods, and computer programming are recommended but the course is self-contained in that material related to these subjects will be covered
in lecture including an introduction to modern Fortran programming language and the computing environment.

The course lectures are scheduled for Tuesday’s from 12:30AM-15:30PM in the Farkas Computer Classroom on the 0th floor of the Dan Kahn Mechanical Engineering building. Most likely lectures
will proceed in 50 minute intervals with two 10 minute breaks in between. A unique aspect of this class is you will have access to a Linux workstation on your desk for writing and compiling your
programs. To break up the lectures we will occasionally use these computers for in-class practice.
You will also have after hours (outside lecture time) and remote access to work from home.

J.C. Tannehil, D.A. Anderson, and R.H. Pletcher, Computational Fluid Mechanics and Heat Trans-
fer, 3rd Edition, CRC Press, 2011. A copy is on reserve in the library for our class.

Course Topics:
Below is an itemized list of the main topics to be covered in this class with the approximate number
of classes (estimated as 50 minute units) alloted:
 Introduction to CFD (1 class)
 Introduction to modern Fortran, Python, and programming environment (2 classes)
 Classi cation of PDEs (2 classes)
 Finite-Di fference Approximation of Derivatives (2 classes)
 Numerical Methods for Linear Hyperbolic PDEs (4 classes)
 Numerical Methods for Parabolic PDEs (3 classes)
 Numerical Methods for Elliptic PDEs (3 classes)
 Numerical Methods for Nonlinear Hyperbolic PDEs (5 classes)
 Governing Equations of Fluid Dynamics and Heat Transfer (2 classes)
 Numerical Methods for Euler Equations (4 classes)
 Numerical Methods for Compressible Navier-Stokes Equations (3 classes)
 Numerical Methods for Incompressible Navier-Stokes Equations (5 classes)
 Advanced Topics (3 classes or time permitting)

Homework, Computer Projects, and Reporting
You will be given homework assignments each week taken from the textbook or outside sources.
After a few weeks into the semester computer projects will be assigned, initially complementing, but eventually replacing, analytical homework assignments. It is strongly recommended that you take this opportunity to learn modern Fortran or Python programming and write your codes in Fortran or Python. Another newer exciting option is Julia. However, this is NOT a requirement and you may use either Fortran, C++, Python, or MATLAB. Hence, please consider using the fi rst week or two to brushup on or learn modern Fortran or Python programming (suggested references will
be mentioned in lecture). A sample (template) modern Fortran and Python code will be provided for your use. You will simply need to modify subroutines to implement di erent methods for each
There are many programs available on the Internet in many languages and you may be tempted to try and find one that matches the requirements of a given HW assignment but please resist the temptation. If you are caught trying to pass off someone else’s work for your own you will get a grade of zero for that assignment and your name may be turned over the Dean of Students for
consideration of further punitive action. That said, web searches to learn more can be a complement to class work and you are encouraged to discuss the numerical methods and class projects with your fellow students, and of course with me, to help you clarify the material and complete the assignment – but in the end your work must be your own! Each project will also involve writing
a short word processed technical report (I recommend using LATEX) describing the problem being solved, the numerical method being used, your code, and a presentation and discussion of your
results. Detailed formatting instructions for this will be provided with the first project.

Computing Environment
It is highly recommended that you develop, test/debug, run, and post-process all your codes/computer projects using the Unix or Linux environment. This is NOT a requirement. To facilitate this, an
account will be created for you on one of the Farkas Computer Classroom computers with the Linux operating system already installed. This machine will have a Fortran compiler, Python, and advanced graphics packages e.g. Tecplot. We will provide information on how to access this machine from your home PC/laptop. You may also be interested in setting up your own Linux environment on your home PC/laptop1. For those of you who are new to Unix/Linux a nice Unix tutorial can be found online2. I recommend the vi text editor for development and a nice tutorial can be found online. There are more references related to the computing environment on the course website
(under construction). For much, much more Google is your friend!

Course Grade
Your course grade will be based on your homework, which I will grade, for 50%, an in-class midterm
for 25%, and a final exam for 25%. A straight curve or better will be applied to convert your numerical grade to a letter grade.