We may earn an affiliate commission when you visit our partners.
Robert Spall

This course will cover the basics of the finite volume method for incompressible flows on two-dimensional Cartesian grids. Topics include the discretization procedure, interpolation techniques, boundary conditions, flow visualization using ParaView, and CFD errors and uncertainty.  Students will write three codes; the first code solves a pure diffusion problem, the second solves a pure convection problem, and the third solves the Navier-Stokes equations using the SIMPLE pressure-velocity coupling procedure.  The Navier-Stokes solver will be used to solve the "driven cavity" problem, and a problem involving the developing flow in a channel.  These three codes are also available for download to, for instance, study the solution procedure, or help in debugging a student written code.  (Both Fortran and Python versions of the codes are available for students to download.) Upon completion of the course students will be familiar with the basics of the finite volume method, enabling a more effective use of a commercial CFD solver, and possess the background necessary to study more advanced CFD techniques.  To get the most benefit from the course, a student should be familiar with fluid dynamics as taught at the university undergraduate level, and be comfortable working with Fortran, Python, or a comparable scientific programming language.

Enroll now

What's inside

Learning objective

The basics of computational fluid dynamics using the finite volume method.

Syllabus

Description

Students should gain a basic understanding of CFD applications and the overall steps involved in a CFD analysis.  Sites to download Fortran compilers included at the end of the downloadable notes.

Read more
Assignment 1: Download/Install a Programming Language and Visualization Software

A preview of some flows computed using computational (hardware) resources that would generally be available to most students.  Software used includes the open source solver OpenFoam.

Derive finite difference approximations of derivatives and their associated truncation errors using Taylor series expansions. Understand Jacobi, Gauss-Seidel, and SOR iterative solution techniques.

Shows students how to derive finite difference approximations using Taylor series expansions. Students should be able derive approximations for various derivatives after viewing this lecture. You can download the notes under "resources" below.

Derive a Finite Difference Approximation

Students will understand the basics of Jacobi, Gauss-Seidel, and SOR iterative techniques for solving systems of equations.  SOR will represent the primary solution technique applied throughout the course.

Finite Volume Method for Diffusion Problems

This lecture introduces the diffusion equation, its integration over control volumes, and conversion of a volume integral to a surface integral using the divergence theorem. You can download the complete set of notes for this section under "resources" below.

This lecture describes the process for discretizing the surface and volume integrals, and arranging the resulting equations into a form suitable for an iterative solution procedure.

This lecture shows you how to modify the discretized equations around the domain perimeter where boundary conditions must be implemented.

This lecture introduces the diffusion problem we will be solving with our own codes.

Write a Program to Solve the Example DIffusion Problem

Have a better understanding of how the code may be written.  You can also download the Fortran code.

Recently added a Python version of the code.

Describes a short section of the Fortran code to output a .csv file for input into ParaView.

In this lecture we will use ParaView to construct contours of the numerical solution to our example problem.

Finite Volume Method for Convection Problems

This lecture discusses integration of convection terms over a control volume and conversion to surface integral. Reveals the necessity for interpolation schemes. You can download the all the notes for this section under "resources" below.

In this lecture we discuss a "central differencing" interpolation option to obtain values of the unknown function on cell faces based on values at adjacent cell centers.

An alternative interpolation technique known as 1st order upwinding, or the "donor-cell" method is discussed.

Discuss a method to blend the upwinding and central difference approximations to achieve most of the benefits of each method.

Introduction of the example problem for pure convection.

Coefficients for first order upwinding around perimeter (boundary) cells.

Central Differencing Component Boundary Conditions for Example Problem

Coefficients for corner cells are shown (both first and second order interpolations).

Write a Program to Solve the Example Convection Problem of Lecture 16

The lecture provides an explanation of the Fortran code statements and procedure.  You can also download the Fortran code.

Recently added Python version of the code.

Contour and line plots for the convection example comparing the results obtained using 1st order upwinding, 2nd order central, and a blending of the two.

Linear Upwind and QUICK interpolation schemes.

Formal derivation of interpolation scheme truncation errors using Taylor series expansions.

Generalization of interpolations schemes and the total variation diminishing (TVD) property.

In this lecture we look at some desirable properties of discretization schemes, particularly the interpolation options.

We look at the like-sign coefficient requirement for a one-dimensional combined convection/diffusion problem for both 1st order upwinding and linear interpolation (2nd order central) for the convection terms.

Finite Volume Method for the Navier-Stokes Equations

In this lecture we look at the form of the Navier-Stokes equations that we will utilize when applying the finite-volume method.

You may download all the notes for this section under "downloadable materials" below.

Staggered Grid Arrangement of Variables
The SIMPLE Procedure for Pressure-Velocity Coupling
Discretization of the X-Momentum Equation: Part 1
Underrelaxation of the Momentum Equations
The Velocity Correction Equations
The Discretized Continuity Equation

A description of the index notation used in the Fortran code to follow.

Write a Program to Solve the Navier-Stokes Equations

In this lecture we will go over the main components of the Navier Stokes solver code.  Although it is written in Fortran, conversion to a language of your choice should not be difficult.  You can also download the Navier-Stokes solver below.  (Note a new version was uploaded on 4/11/2020 to fix an indexing bug in the x-momentum solver.) Recently added Python version of code.

This lecture introduces the driven cavity and developing flow in a channel problems which we will solve using our Navier-Stokes code.

Demonstration of how to plot velocity vectors for driven cavity problem using ParaView. Downloadable vector plot of results.

Results for channel flow at Re=100 using ParaView. Included are a contour plot and a line plot along the centerline of velocity magnitude.

Pressure boundary conditions; Symmetry boundary conditions; Procedure to obtain a fully-developed flow; Blocking out regions to simulate more complex geometries

How to build streamlines in ParaView using driven cavity results as an example.  Driven cavity data set can be downloaded.

This section provides a brief introduction to errors inherent in CFD calculations.

A short description of errors and uncertainty inherent in a CFD simulation.

Save this course

Save An Introduction to Computational Fluid Dynamics (CFD) to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in An Introduction to Computational Fluid Dynamics (CFD) with these activities:
Review Undergraduate Fluid Dynamics
Solidify your understanding of fundamental fluid dynamics concepts. This will provide a strong foundation for understanding the more advanced computational techniques covered in the course.
Browse courses on Fluid Dynamics
Show steps
  • Review your undergraduate fluid mechanics textbook.
  • Work through example problems related to viscous flow and pressure gradients.
  • Familiarize yourself with the Navier-Stokes equations and their physical meaning.
Brush Up on Scientific Programming
Sharpen your programming skills in Fortran or Python. This will enable you to effectively implement the finite volume method and debug your CFD codes.
Browse courses on Fortran
Show steps
  • Review basic syntax and data structures in your chosen language.
  • Practice writing functions and subroutines for numerical calculations.
  • Familiarize yourself with file input/output operations for data visualization.
Read 'Numerical Computation of Internal and External Flows: The Fundamentals of Computational Fluid Dynamics' by Charles Hirsch
Gain a deeper understanding of the finite volume method. This book provides a comprehensive treatment of the subject and can serve as a valuable reference.
Show steps
  • Read the chapters related to the finite volume method and discretization techniques.
  • Study the examples and exercises provided in the book.
  • Compare the book's approach to the methods presented in the course lectures.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Implement Finite Difference Approximations
Reinforce your understanding of finite difference approximations. This will help you better understand the discretization process used in the finite volume method.
Show steps
  • Derive finite difference approximations for first and second derivatives using Taylor series expansions.
  • Write code to implement these approximations and test their accuracy.
  • Compare the results with analytical solutions for simple functions.
Document Your Code
Improve your understanding of your own code by documenting it thoroughly. This will also help you debug and maintain your code more effectively.
Show steps
  • Add comments to your code explaining the purpose of each section.
  • Create a README file that describes the code's functionality and usage.
  • Write unit tests to verify the correctness of your code.
Extend the Navier-Stokes Solver
Deepen your understanding of CFD by extending the Navier-Stokes solver. This will challenge you to apply your knowledge to solve more complex problems.
Show steps
  • Implement a different boundary condition, such as a Neumann boundary condition.
  • Modify the code to solve a different flow problem, such as flow over a cylinder.
  • Implement a higher-order discretization scheme to improve accuracy.
Read 'CFD Vol 1' by Klaus Hoffmann
Gain a deeper understanding of the finite volume method. This book provides a comprehensive treatment of the subject and can serve as a valuable reference.
Show steps
  • Read the chapters related to the finite volume method and discretization techniques.
  • Study the examples and exercises provided in the book.
  • Compare the book's approach to the methods presented in the course lectures.

Career center

Learners who complete An Introduction to Computational Fluid Dynamics (CFD) will develop knowledge and skills that may be useful to these careers:
Fluid Mechanics Engineer
A Fluid Mechanics Engineer specializes in the study and application of fluid behavior. This course helps build a foundation in the finite volume method for solving fluid flow problems. This can provide the skills needed to understand and apply computational fluid dynamics in various engineering applications. By writing codes to solve diffusion, convection, and the Navier-Stokes equations, the course provides hands-on experience directly applicable to simulations. The course is also helpful because it provides familiarity with flow visualization using ParaView, a valuable tool for interpreting simulation results. Furthermore, learning about CFD errors and uncertainty, as covered in the course, ensures a critical approach to simulation results. It is particularly helpful to cover a Navier-Stokes solver in the course, as it can be applied to solve problems such as driven cavity and developing flow in a channel.
Computational Fluid Dynamics Engineer
A Computational Fluid Dynamics Engineer uses software to simulate the behavior of fluids, such as air and water, in various engineering applications. This course helps build a foundation in the finite volume method and its application to incompressible flows, which are essential for this role. By writing codes to solve diffusion, convection, and Navier-Stokes equations, you gain hands-on experience directly applicable to CFD simulations. Furthermore, this course provides familiarity with flow visualization using ParaView, a valuable skill for interpreting and presenting simulation results. Learning about CFD errors and uncertainty, as covered in the course, helps you critically evaluate simulation results. This course is especially helpful, given its coverage of the Navier-Stokes solver, which can be applied to solve problems such as driven cavity and developing flow in a channel.
Simulation Engineer
Simulation Engineers create and run computer models of physical systems. This course helps build skills for simulating fluid behavior using computational fluid dynamics. The course's focus on the finite volume method and the Navier-Stokes equations is useful in various engineering applications. By writing codes to solve diffusion, convection, and Navier-Stokes equations, the course provides hands-on experience that directly applies to simulation. The course also provides familiarity with flow visualization using ParaView, which is helpful for interpreting simulation results. Learning about CFD errors and uncertainty helps with critical evaluation of simulation results. In particular, the Navier-Stokes solver, which can be applied to solve problems such as driven cavity and developing flow in a channel, is covered in this course.
Research Scientist
Research Scientists conduct experiments and analyze data to advance scientific knowledge. This course helps build a foundation in computational fluid dynamics, which is useful for modeling and simulating fluid flows in various research areas, such as environmental science, biomedical engineering, and materials science. Specifically, this course's coverage of the finite volume method and the Navier-Stokes equations is useful for the simulations. By writing your own CFD codes and learning to visualize flow using ParaView, students gain skills that make them more effective in this role. The course is helpful for gaining an understanding of CFD errors and uncertainty, enabling a more critical evaluation of simulation results. It is also helpful to know that a Navier-Stokes solver, which can be applied to solve problems such as driven cavity and developing flow in a channel, is covered in the course. Note that a research scientist position typically requires an advanced degree.
Heat Transfer Engineer
Heat Transfer Engineers analyze and design systems for managing heat. This course may be useful because it provides skills in computational fluid dynamics, which is applicable for modeling heat transfer in fluids. The course's emphasis on the finite volume method and solving diffusion and convection problems is particularly relevant. By writing your own CFD codes, you can gain a deeper understanding of the underlying principles, which helps you to better utilize commercial CFD software. Visualizing flow using ParaView and understanding CFD errors and uncertainty are also helpful skills. It is also good to know that the Navier-Stokes solver, which can be applied to solve problems such as driven cavity and developing flow in a channel, is covered in the course.
Aerospace Engineer
Aerospace Engineers design, develop, and test aircraft and spacecraft. This course may be useful by providing a background in computational fluid dynamics, a crucial tool for analyzing airflow around aircraft and optimizing aerodynamic designs. The course's emphasis on the finite volume method for incompressible flows and the solution of the Navier-Stokes equations are directly relevant to aerodynamic simulations. By writing your own CFD codes, you gain a deeper understanding of the underlying principles, which helps you to interpret and validate results from commercial CFD solvers. Learning to visualize flow using ParaView and understand CFD errors and uncertainty are also skills that support success as an aerospace engineer. It is especially helpful if you work in propulsion or aerodynamics. By solving the driven cavity problem, and a problem involving flow in a channel, this course helps you better simulate flows around aircraft and spacecraft.
Mechanical Engineer
Mechanical Engineers design and develop mechanical systems and devices. This course may be useful because it provides a foundation in computational fluid dynamics, useful in analyzing fluid flow in various mechanical systems, such as pumps, turbines, and heat exchangers. The course's coverage of the finite volume method and its application to incompressible flows is directly relevant to many mechanical engineering problems. By writing their own CFD codes, students can gain a deeper understanding of the underlying principles, helping them to better utilize commercial CFD software. The course is also helpful in learning to visualize flow using ParaView and understand CFD approximations and errors, which are useful skills for any mechanical engineer. It is helpful that the Navier-Stokes solver, which can be applied to solve problems such as driven cavity and developing flow in a channel, is covered in this course.
Automotive Engineer
Automotive Engineers are involved in the design, development, and manufacturing of vehicles. This course may be useful because it provides knowledge of computational fluid dynamics, a critical tool for optimizing vehicle aerodynamics, engine cooling, and HVAC systems. The course's focus on the finite volume method for incompressible flows and the solution of the Navier-Stokes equations provides strong simulations. By writing your own CFD codes, you gain hands on experience that can be applied to commercial software. Learning to visualize flow using ParaView and understanding CFD errors and uncertainty also helps you perform well as an automotive engineer. The course is helpful if you work in aerodynamics or heat transfer. By solving the driven cavity problem, and a problem involving flow in a channel, this course can help you better simulate flows around vehicles.
Software Developer
Software Developers design and develop software applications. This course may be useful for developers interested in creating or working with computational fluid dynamics software. The course provides an understanding of the finite volume method, discretization procedures, interpolation techniques, and boundary conditions used in CFD. By writing codes to solve diffusion, convection, and Navier-Stokes equations, students can gain practical experience in implementing CFD algorithms. Familiarity with Fortran and Python, which are used in the course, is also valuable for software development. Furthermore, understanding CFD errors and uncertainty, as covered in the course, helps you critically evaluate simulation results. The Navier-Stokes solver, which can be applied to solve problems such as driven cavity and developing flow in a channel, is covered in the course.
Energy Engineer
Energy Engineers work to improve energy efficiency and develop new energy technologies. This course may be useful because it provides a foundation in computational fluid dynamics, which is applicable for modeling fluid flow and heat transfer in energy systems. The course's emphasis on the finite volume method and solving diffusion and convection problems is particularly relevant. By writing your own CFD codes, you can gain a deeper understanding of the underlying principles, which helps you to better utilize commercial CFD software. Visualizing flow using ParaView and understanding CFD errors and uncertainty are also useful skills. It is also good to know that the Navier-Stokes solver, which can be applied to solve problems such as driven cavity and developing flow in a channel, is covered in the course.
Environmental Engineer
Environmental Engineers develop solutions to environmental problems. This course may be useful because it provides the skills in computational fluid dynamics to model and simulate the transport of pollutants in air and water. The course's coverage of the finite volume method and the Navier-Stokes equations is directly relevant to environmental modeling. By gaining experience writing your own CFD codes, you gain a deeper understanding of the underlying principles, which can help you to better utilize commercial softwares. Learning to visualize flow using ParaView and understanding CFD errors and uncertainty are also helpful skills. It is also useful that the Navier-Stokes solver, which can be applied to solve problems such as driven cavity and developing flow in a channel, is covered in the course.
Product Development Engineer
A Product Development Engineer is involved in the design and development of new products. This course may be useful because it provides skills in computational fluid dynamics, helpful for optimizing the design of products involving fluid flow, heat transfer, or aerodynamics. The course's coverage of the finite volume method and the Navier-Stokes equations is useful. By writing CFD codes, students gain an understanding of the underlying principles, helping them to better interpret and validate results from commercial softwares. Learning to visualize flow using ParaView and understanding CFD errors and uncertainty also helps in this career. It is worth noting that Navier-Stokes solvers, which can be applied to solve problems such as driven cavity and developing flow in a channel, is covered in this course, which makes it more relevant to product development.
Engineering Consultant
Engineering Consultants provide expert advice and solutions to engineering problems. This course may be useful because it provides skills in computational fluid dynamics, which is applicable to a wide range of engineering problems involving fluid flow, heat transfer, and aerodynamics. The course's coverage of the finite volume method and the Navier-Stokes equations is directly relevant, as well as hands on practice with softwares. Furthermore, writing your own CFD codes, you can gain a deeper understanding of the underlying principles, which helps you to better communicate with clients. Learning to visualize flow using ParaView and understanding CFD errors and uncertainty are also helpful skills. The Navier-Stokes solver, which can be applied to solve problems such as driven cavity and developing flow in a channel, is covered in the course.
Data Scientist
Data Scientists analyze and interpret complex data sets. This course may be useful for data scientists working with data generated from computational fluid dynamics simulations. The course provides an understanding of the finite volume method, discretization procedures, interpolation techniques, and boundary conditions used in CFD. By writing codes to solve diffusion, convection, and Navier-Stokes equations, students can gain practical experience in generating and processing CFD data. Familiarity with flow visualization using ParaView, helps you communicate findings effectively. Furthermore, understanding CFD errors and uncertainty, as covered in the course, helps you critically evaluate simulation results. The Navier-Stokes solver, which can be applied to solve problems such as driven cavity and developing flow in a channel, is covered in the course.
Teacher
Teachers educate students in various subjects. This course may be useful because it provides a solid foundation in computational fluid dynamics, which can be valuable for teaching fluid mechanics or related engineering courses. The course's coverage of the finite volume method and the Navier-Stokes equations is directly relevant. By writing your own CFD codes, you can gain a deeper understanding of the underlying principles, which helps you to better communicate the concepts to students. Visualizing flow using ParaView and understanding CFD errors and uncertainty are also helpful skills. The Navier-Stokes solver, which can be applied to solve problems such as driven cavity and developing flow in a channel, is covered in the course.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in An Introduction to Computational Fluid Dynamics (CFD).
Provides a comprehensive introduction to the finite volume method, covering both theoretical aspects and practical implementation details. It valuable resource for understanding the underlying principles of CFD and developing your own solvers. While not required, it offers a deeper dive into the mathematical foundations of the methods used in the course. This book is best used as additional reading to supplement the course materials.
Provides a comprehensive introduction to the finite volume method, covering both theoretical aspects and practical implementation details. It valuable resource for understanding the underlying principles of CFD and developing your own solvers. While not required, it offers a deeper dive into the mathematical foundations of the methods used in the course. This book is best used as additional reading to supplement the course materials.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser