Hands-on mesh generation using blockMesh, Classyblocks, snappyHexMesh, cfMesh, and Gmsh
High-quality meshes are the foundation of accurate, stable, and efficient CFD simulations. This course provides a practical, hands-on introduction to CFD mesh generation using widely adopted open-source tools within the OpenFOAM ecosystem. Instead of focusing on theory alone, the course emphasizes real meshing workflows, common pitfalls, and best practices that directly impact solver performance and numerical stability.
What you’ll learn
- Understand and distinguish between structured, semi-structured, and unstructured meshing approaches used in CFD.
- Generate CFD-ready meshes using open-source tools including blockMesh, Classyblocks, snappyHexMesh, cfMesh, and Gmsh.
- Import and prepare 2D geometries for meshing within an OpenFOAM-based workflow.
- Apply local and surface refinement strategies to accurately capture flow features.
- Create and control boundary layer meshes suitable for viscous flow simulations.
- Evaluate mesh quality using standard CFD mesh metrics (orthogonality, skewness, aspect ratio, non-orthogonality).
- Select appropriate meshing strategies based on problem physics, solver requirements, and computational cost.
- Identify and fix common meshing issues that lead to solver instability or poor convergence.
- Build reproducible meshing pipelines using case files and best practices for OpenFOAM simulations.
Course Content
- Introduction to Meshing –> 1 lecture • 1min.
- Overview of Gmsh: script and python API –> 3 lectures • 30min.
- classyBlock: A geometry based block meshing tool –> 1 lecture • 14min.
- blockMesh: A fundamental tools in OpenFOAM –> 1 lecture • 15min.
- snappyHexMesh: Snap your way to complex geometry meshing –> 3 lectures • 1hr 3min.
- cfMesh: A powerful alternative to snappy –> 2 lectures • 49min.

Requirements
High-quality meshes are the foundation of accurate, stable, and efficient CFD simulations. This course provides a practical, hands-on introduction to CFD mesh generation using widely adopted open-source tools within the OpenFOAM ecosystem. Instead of focusing on theory alone, the course emphasizes real meshing workflows, common pitfalls, and best practices that directly impact solver performance and numerical stability.
You will learn how to generate both structured and unstructured meshes using tools such as blockMesh, Classyblocks, snappyHexMesh, cfMesh, and Gmsh. Through carefully designed 2D examples, the course demonstrates how different meshing strategies influence solution accuracy, convergence behavior, and computational cost. These simplified cases allow you to focus on meshing fundamentals while still reflecting real CFD challenges.
The course combines video lectures, additional reading material, and ready-to-run case files, enabling you to follow along and experiment independently. You will explore techniques for geometry preparation, surface refinement, boundary layer generation, and mesh quality assessment using standard CFD metrics. Each topic is reinforced with practical examples that highlight how poor meshing choices can lead to instability and how to fix them effectively.
By the end of the course, you will be able to confidently select and apply the right meshing tool and strategy for a given CFD problem, build reproducible preprocessing workflows, and generate meshes that lead to reliable and efficient OpenFOAM simulations. This course is ideal for students, researchers, and professionals who want to strengthen their meshing skills using fully open-source CFD tools.