We may earn an affiliate commission when you visit our partners.
Robert Spall
  • This course is a follow-up to my Introduction to Computational Fluid Dynamics course. In this course we extend the capabilities of the two-dimensional, incompressible Navier-Stokes solver developed in the first course to include enhancements such as unsteady flow capabilities, second-order and blended interpolations for the convection terms, pressure, symmetry, and periodic boundary conditions, mesh clustering, the energy equation, and perhaps other topics as deemed appropriate.

  • All codes are written in Fortran90 and are available for download, as are the course notes. Upon successful completion of the course students should be able to develop their own codes or modify the available codes to solve problems of varying complexity. To get the maximum benefit from this course, I recommend that students complete the first course, or have an equivalent background.

  • Recently added the description of a finite-difference-based Poisson solver using red/black iteration scheme with OpenMP for parallelization.

  • Recently added a collocated grid approach to the finite volume formulation of the incompressible Navier-Stokes equations. In the collocated variable approach, the velocity control volumes are not staggered, but are coincident with the scalar control volumes. Although we limit our approach to structured Cartesian meshes, most commercial CFD solvers utilize a collocated variable approach using Cartesian velocity components on unstructured grids.

  • A new section on two-equation k-epsilon turbulence modelling using wall functions has been added.

  • The course is such that one can generally pick and choose which sections/lectures to watch.

Enroll now

Here's a deal for you

We found an offer that may be relevant to this course.
Save money when you learn. All coupon codes, vouchers, and discounts are applied automatically unless otherwise noted.

What's inside

Learning objectives

  • Implementation of additional types of boundary conditions
  • Implementation of second-order interpolation for convection terms
  • Coding for unsteady flows
  • Mesh clustering
  • Energy equation
  • Collocated variable approach
  • Two-equation turbulence modelling

Syllabus

Introduction
Index Notation
Solver

BASE_CODE.f90 is the base level code all others are derived from.

BASE_CODE_OMP.f90 is a very simple implementation of OpenMP into the pressure solver.
The pressure correction solver loop is changed from SOR to Jacobi to accommodate the parallel operations.
Need fine meshes to see significant speedup.

Read more
Driven Cavity Results
Get Your Base Code Working
Jet In Crossflow

Some questions regarding the base-level code.

Different Boundary Conditions
Periodic Boundary Conditions
Periodic Boundary Condition Code
Periodic Boundary Condition Results
Pressure Boundary Conditions
Pressure Boundary Condition Code
Pressure Boundary Condition Results
Symmetry Boundary Conditions
Symmetry Boundary Condition Code
Symmetry Boundary Condition Results
Higher Order Interpolation of Convection Terms
Blended 1st Order Upwind and Second Order Central Interpolation
Modifications to Base Code
Understand how to add time dependence to their CFD code.
Added Unsteady Terms
Addition of Terms to Base Code
Shedding From a Square Cylinder in a Channel
Mesh Clustering
Background Information
Implementation into Base Code
Channel Flow Results Using Mesh Clustering
Energy Equation
Discretization of Energy Equation
Addition to Base Code
Driven Cavity Results with Heat Transfer
Buoyancy Using the Boussinesq Approximation
Adding Boussinesq Approximation to the Code
Boussinesq Approximation Results
Develop additional flow solutions using their code.
Pressure Driven Flow
Buoyancy Driven Flow via Heat Source
Parallel Jets
Miscellaneous Topics
Red-Black Iteration Scheme for Loop-Level Parallelization

Download the Poisson solver and experiment with speedups as a function of number of threads and number of unknowns (i.e., mesh size).

Formulate the finite volume method using collocated variables rather than variables on a staggered mesh.

We will formulate the problem using collocated variables on a Cartesian mesh.

A look into the collocated variable finite volume code set up for the driven cavity problem.  The code may be downloaded (next lecture).

Running the code for the driven cavity problem and observing the mass imbalance dropping to machine zero.
Code is included in "downloadable materials."  A version for a channel flow is also downloadable.

Using ParaView to plot velocity vectors for driven cavity flow.  Data file (.csv) as formatted in the downloadable collocated grid CFD code used to solve the driven cavity problem.

Understand the basics of turbulence modelling, implement a k-epsilon model in their own code, and use a turbulence model in a commercial CFD code.

A brief review of the momentum equations and a description of some necessary statistical quantities.

A complete copy of the Section notes may be downloaded from this lecture.

Reynolds-Averaging Process
Boussinesq Approximation
Two-Equation k-epsilon Model
Viscous Sublayer and Log-Law Layer
Wall Function Approach
Implementation into CFD Code

We briefly go over the code set up for channel flow.  This code may be downloaded.

Running the Code
Channel Flow Results
Applicability of k-epsilon model
Commercial CFD Solvers

Save this course

Save Computational Fluid Dynamics 2 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 Computational Fluid Dynamics 2 with these activities:
Review Fundamentals of Fluid Mechanics
Reinforce your understanding of fundamental fluid mechanics concepts, including viscosity, pressure, and boundary layers, to better grasp the advanced topics covered in this course.
Browse courses on Navier-Stokes Equations
Show steps
  • Review your notes from introductory fluid mechanics courses.
  • Work through practice problems related to fluid properties and flow regimes.
  • Focus on topics like the Navier-Stokes equations and boundary layer theory.
Read 'Numerical Computation of Internal and External Flows'
Deepen your understanding of numerical methods used in CFD by studying a comprehensive textbook.
Show steps
  • Obtain a copy of 'Numerical Computation of Internal and External Flows'.
  • Read the chapters related to finite volume and finite difference methods.
  • Pay close attention to the sections on boundary condition implementation.
Implement a New Boundary Condition
Solidify your understanding of boundary conditions by implementing a new type of boundary condition (e.g., a wall with specified heat flux) in the provided Fortran90 code.
Show steps
  • Choose a boundary condition not already implemented in the base code.
  • Modify the Fortran90 code to incorporate the new boundary condition.
  • Test the implementation with a relevant flow problem.
  • Document your implementation and results.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Experiment with OpenMP Parallelization
Gain hands-on experience with parallel computing by experimenting with the OpenMP implementation in the provided code.
Show steps
  • Download the BASE_CODE_OMP.f90 code.
  • Run the code with different numbers of threads.
  • Analyze the speedup as a function of thread count and mesh size.
  • Document your findings.
Create a Visualization of a Flow Solution
Enhance your understanding of flow physics by creating a visualization of a flow solution obtained from the CFD code using ParaView or a similar tool.
Show steps
  • Run the CFD code for a specific flow problem.
  • Export the solution data in a format compatible with ParaView.
  • Create a visualization of the velocity field, pressure distribution, or other relevant quantities.
  • Write a short description of the flow physics illustrated by the visualization.
Study 'Turbulent Flows' by Pope
Expand your knowledge of turbulence modeling by studying a comprehensive textbook on turbulent flows.
View Turbulent Flows on Amazon
Show steps
  • Obtain a copy of 'Turbulent Flows' by Pope.
  • Focus on the chapters related to Reynolds-averaged Navier-Stokes (RANS) equations and turbulence models.
  • Pay attention to the discussion of the k-epsilon model and its limitations.
Contribute to an Open-Source CFD Project
Apply your knowledge and skills by contributing to an open-source CFD project, such as OpenFOAM or SU2.
Show steps
  • Identify an open-source CFD project that aligns with your interests.
  • Familiarize yourself with the project's codebase and contribution guidelines.
  • Identify a bug to fix or a feature to implement.
  • Submit a pull request with your changes.

Career center

Learners who complete Computational Fluid Dynamics 2 will develop knowledge and skills that may be useful to these careers:
Computational Fluid Dynamics Engineer
The role of a Computational Fluid Dynamics Engineer involves using software to simulate the behavior of fluids. This course, with its focus on extending a two-dimensional, incompressible Navier-Stokes solver, directly aligns with the core responsibilities of a Computational Fluid Dynamics Engineer. The course delves into enhancements like unsteady flow capabilities, second-order and blended interpolations, and different boundary conditions. These are all crucial elements in developing and utilizing CFD models for various engineering applications. The emphasis on coding in Fortran90 and the ability to modify existing codes to solve complex problems are particularly valuable for a Computational Fluid Dynamics Engineer. Furthermore, the sections on turbulence modeling and the collocated variable approach within the finite volume method are of great benefit.
CFD Software Developer
A CFD Software Developer designs, develops, and maintains computational fluid dynamics software. This course is particularly valuable as it provides hands-on experience with extending and modifying a Fortran90-based Navier-Stokes solver. The focus on implementing advanced numerical methods, boundary conditions, and physical models, such as turbulence modeling and the energy equation, directly translates to the skills required for developing robust and accurate CFD software. The inclusion of parallelization techniques using OpenMP is also highly relevant for modern CFD software development. The hands-on practice with the collocated variable approach will be particularly beneficial for any CFD Software Developer.
Simulation Engineer
Simulation Engineers create and run computer models to simulate physical phenomena. This course helps build practical skills in fluid dynamics simulation by extending a basic solver with important features like unsteady flow capabilities, higher-order interpolation schemes, and custom boundary conditions. The course enables the simulation engineer to handle more complex and realistic fluid flow scenarios. Topics such as mesh clustering, the energy equation, and turbulence modelling are critical for enhancing the accuracy and reliability of simulations. The experience gained modifying and extending Fortran90 codes is highly beneficial.
Research Scientist
A Research Scientist in fluid mechanics or a related field uses computational tools to investigate fluid behavior and develop new models. This course is especially suitable for any research scientist because it focuses on extending the capabilities of a fluid dynamics solver. The course enables the research scientist to implement advanced numerical methods, such as second-order interpolation and blended interpolations, and to handle complex boundary conditions. The inclusion of topics like the energy equation and turbulence modeling, as well as parallelization using OpenMP, makes the course particularly relevant for conducting advanced research in fluid dynamics. The knowledge of the red-black iteration scheme also helps with loop-level parallelization.
Thermal Engineer
Thermal Engineers focus on heat transfer and thermodynamics in various engineering systems. This course will be useful to thermal engineers through its coverage of the energy equation and its application to fluid flow simulations. The course helps thermal engineers refine simulations of heat exchangers, cooling systems, and thermal management in electronic devices. The inclusion of buoyancy using the Boussinesq approximation helps build skills in modeling natural convection. The section on turbulence modeling is also relevant for simulating turbulent heat transfer.
Mechanical Engineer
Mechanical Engineers often use computational fluid dynamics to analyze and optimize the performance of mechanical systems. This course is exceptionally useful because it builds upon introductory concepts and delves into advanced topics like unsteady flow, higher-order interpolation, and mesh clustering. It also provides hands-on experience with implementing different boundary conditions and the energy equation. The skills learned are transferable to a wide array of mechanical engineering applications, such as heat exchanger design, fluid machinery analysis, and internal combustion engine simulation. The two-equation k-epsilon turbulence modeling further enhances the practical value for mechanical engineering projects.
Aerospace Engineer
As an Aerospace Engineer, you might use computational fluid dynamics to analyze airflow around aircraft and spacecraft. This course helps build a foundation in CFD by extending a Navier-Stokes solver to include features necessary for aerospace simulations. The coverage of unsteady flows, higher-order interpolation methods, and boundary conditions are directly applicable to modeling aerodynamic phenomena. By working through the course, an aerospace engineer can refine simulations related to aircraft design, engine efficiency, and space vehicle performance. The inclusion of turbulence modelling and the energy equation are relevant for high-speed aerodynamics and thermal analysis, making this course valuable.
Automotive Engineer
Automotive Engineers use computational fluid dynamics for aerodynamic analysis, engine cooling simulation, and thermal management of vehicle components. This course enables automotive engineers to refine their skills in these areas by teaching them to implement unsteady flow simulations, employ higher-order interpolation schemes, and model complex boundary conditions. The inclusion of the energy equation and turbulence modeling is highly relevant for simulating heat transfer and turbulent flows within and around vehicles. The hands-on experience with Fortran90 coding is valuable for customizing simulation tools.
Hydraulic Engineer
Hydraulic Engineers design and analyze systems that involve the flow of water and other fluids, such as pipelines, dams, and irrigation systems. This course is most useful because it extends the capabilities of a Navier-Stokes solver to include features relevant to hydraulic engineering, such as unsteady flow, higher-order interpolation, and various boundary conditions. The knowledge of mesh clustering enables hydraulic engineers to optimize the computational grid for accurate simulations of complex geometries. The section on turbulence modeling is also helpful for simulating turbulent flows in hydraulic systems.
Naval Architect
Naval Architects design and oversee the construction and repair of ships and other marine vessels. This course is useful due to its focus on extending a two-dimensional, incompressible Navier-Stokes solver, which is directly applicable to simulating fluid flow around ship hulls. By learning to implement unsteady flow capabilities, higher-order interpolation schemes, and different boundary conditions, the naval architect refines simulations of hydrodynamic performance, wave resistance, and propeller design. The course helps the naval architect perform increasingly accurate analyses.
Environmental Engineer
Environmental Engineers use computational fluid dynamics to model air and water flow for pollution control and environmental impact assessments. This course helps environmental engineers refine their skills in these areas by including unsteady flow simulations. The inclusion of the energy equation and turbulence modeling can be relevant for simulating pollutant dispersion and transport in complex environments. The experience gained by modifying Fortran90 codes enables environmental engineers to customize simulation tools for specific applications. The different types of boundary conditions will be useful for developing simulations with different fluid properties.
Civil Engineer
Civil Engineers design and oversee the construction of infrastructure, including water distribution systems, wastewater treatment plants, and flood control structures. This course enables civil engineers to model and analyze fluid flow in these systems with more precision. The different boundary conditions help with simulating hydraulic structures and open channel flow. The parallelization using OpenMP is valuable for large-scale simulations. While not always required, a strong understanding of fluid dynamics helps civil engineers design more efficient and reliable infrastructure.
Product Development Engineer
Product Development Engineers are involved in the design and development of new products, often utilizing simulation tools to optimize performance and functionality. This course may be useful for product development engineers working on fluid-related products, such as pumps, valves, or fluid handling systems. The course enables product development engineers to refine simulations of fluid flow behavior and optimize product designs for improved performance and efficiency. While CFD may be just one part of the role, understanding how to modify existing code enables engineers to customize simulation tools for specific applications.
Process Engineer
Process Engineers design, develop, and optimize processes involving chemical or physical transformations of matter. This course may be helpful for process engineers involved in designing and optimizing fluid flow processes, such as mixing, separation, and heat transfer. The course enables process engineers to model complex fluid flow phenomena in process equipment. Although this course is unlikely to be a core requirement, understanding the principles of computational fluid dynamics can provide a deeper understanding of process behavior.
Data Scientist
Data Scientists analyze complex data sets to extract meaningful insights and build predictive models. While seemingly distinct, this course may be helpful for data scientists working with fluid dynamics data. The course enables data scientists to understand the underlying principles of fluid flow simulations and how different numerical methods affect the results. This knowledge can be valuable when dealing with large datasets generated from CFD simulations. The elements of parallelization and high performance computing in the course may be helpful.

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 Computational Fluid Dynamics 2.
Provides a comprehensive overview of numerical methods used in CFD, including finite volume and finite difference methods. It is particularly useful for understanding the discretization techniques and boundary condition implementations discussed in the course. This book valuable reference for students looking to deepen their understanding of the underlying numerical schemes used in CFD solvers. It is commonly used as a textbook in graduate-level CFD courses.
Provides a rigorous treatment of turbulence modeling, including the k-epsilon model discussed in the course. It is an excellent resource for students who want to delve deeper into the theoretical foundations of turbulence modeling. While not required for the course, it provides a more complete and advanced treatment of the topic. It is often used as a graduate-level textbook.

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