Mesh generation is an optimisation problem.
Yet most Engineers use the first mesh that succeeds...here's how I think about it.
The most consuming task of the CFD simulation process is generating a mesh.




And there’s good reason too…
A poor mesh can:
introduce artificial diffusion
ruin any turbulence modeling
destroy numerical convergence
de-stabilise linear, time-dependent solvers
create non-physical pressure/velocity fields
force you to use unnecessarily small time-steps, making the simulation take longer to complete
Therefore, experienced Engineers have realised this is where the time should be spent.
What a CFD mesh actually does in the computational world
The mesh is a representation of your CAD geometry in 3D space, made up of vertices, connecting edges and nodes.
It discretises the space / domain that you’re interested in - kind of like saying “this section of my green field is what I’m interested in. Now break it into small pieces so I can solve do a little mathematics across each one.”
Seriously, this is all it is.
And whilst this is what it is, many just stop there and proceed with auto “generating” a mesh with some mesh generation tool like snappyHexMesh without much in the way of critical analysis of the process and end result.
Representing your geometry digitally
Turning geometry into the finite, small pieces that the computer can work with is done by creating typical cell types:
Notice, all of these can be decomposed / built-up from triangles, yes a rectangle can have two triangles! - and computers (graphics and physics engines) absolutely love them.
Where the problems start
If you’re a regular reader of my newsletter, you’d know I like to reiterate a few of the physics regularly.
Remember, each cell approximates:
gradients
fluxes
divergence
diffusion
convection
pressure coupling
And the shape and arrangement of cells directly affects those approximations.
You might want to have a read of this article I wrote if you want to understand how the traditional method of modelling fluids works.
(I walked through this too on my YouTube channel, click here)
Mesh generation is an optimisation problem
You can have tiny cells everywhere and it’ll usually give you the most accurate results. Conversely, a mesh with large coarse cells will be quick and cheap, yet mostly useless.
So, like most things in Engineering, this is something that needs to be a compromise and iteratively optimised!
Orthogonality
Engineers gloss over this, yet it’s arguably the most important quality metric.
Why, you ask?
Here’s why: the physics terms like diffusion are calculated using the normal vectors of the shared faces between cells. If it’s not completely orthogonal (which is common), correction terms need to be applied to the calculated flux.
Remember this.
Skewness and the aspect ratio are the metrics next in line of importance and I’ll cover them in future posts.
I hope you learnt something from this post today.
See you soon. 👋
Nasser






