Computational Fluid Mechanics Work
15/01/2026: Revisiting Notes: Key Points
'Computational Fluid Mechanics' is a more accurate term because it involves dynamics and kinematics. Kinematics is a purely mathematical description of the motion of continua.
Aristotle thought force was proportional to velocity. Newton wrote purely in Latin describing his laws in words and geometry, not mathematics. There is also the fourth law of superposition of Newton which is often forgotten. Newton's second law, force equals rate of change in momentum, is only applicable to point masses.
Euler extended the law to continua. He popularised formalising Newton's discoveries in mathematical terms. The substantial derivative was advanced from a point wise variation in space and time to a continua based variation in the Leibniz-Reynolds transport theorem. We essentially have Newton's second law, with the substantial derivative of velocity on one side and a force balance on the other, of body and surface forces. We get the general momentum equation, which is also called the Cauchy equation, and is applicable to any type of continuum. The Navier Stokes equations involve a constitutive relation for the viscous stress tensor which is but a hypothesis. It is a relatively simple hypothesis based on Hooke's law.
Other notes. Potential flow theory was used effectively for much of the 20th century. Assumed inviscid, incompressible, irrotational outside the viscous, rotational boundary layer. Fatal disadvantage is the inability to predict separation. You solve a second order Laplace equation and another equation using an algorithm.
Vector analysis and tensor calculus is the mathematical tool used to describe physical reality. We are far from perfect in describing physical reality in many cases. A scalar has a gradient. A vector has a divergence. A second rank tensor is a vector vector linear function, or the dyad product of two vectors relating two vector fields. The curl of the velocity gives the vorticity which is a purely a kinematic definition. The gradient of a vector is the dyad product of the Hamilton operator and the vector field, and the result is a tensor.
15/01/2026: Update
Currently working on incompressible solvers and advancing the vector potential-vorticity method. Currently writing the pressure-Poisson approach for a simple case.
Eventually, will focus on the artificial compressibility approach because you can use Godunov methods and solve discontinuities. In this case the governing equations are hyperbolic.
21/10/2025: Cranfield Thesis
I worked on incompressible flow modelling for my thesis at Cranfield. That means you can neglect density variation of the fluid medium, which usually means low speed. It means the divergence of velocity is zero. This is kind of an ideal, pure mathematical system which can sometimes be used to map reality accurately.
I wrote the streamfunction-vorticity formulation first, which is only applicable to two dimensions. This is because the streamfunction only exists in two dimensions. I validated the results produced by my code using the lid-driven square cavity benchmark (2D), comparing centreline velocities. The code was written in Python and is currently public. Link.
The figure above shows divergence of velocity for the vector potential-vorticity formulation. It is a slice of the centreplane of a cube, where the cube is full of continuous fluid, and the lid is moving from left to right. This is a standard benchmark against which to test the results of your code. The results are well-known. In both the streamfunction-vorticity formulation (2D) and the vector-potential vorticity formulation (3D), the divergence of velocity is satisfied explicitly. Hence why divergence above is small. This is the advantage of vorticity formulations over, say, the primitive variable approach. The main focus of my thesis was the vector-potential vorticity formulation, which is harder to implement. This method requires more work to be workable. The open source code is available: Link.
In layman's terms:
Imagine a solid cube full of any fluid - air, water, Coca-Cola. Now imagine moving the upper surface in some direction. How would the fluid in the container move? What pattern would it make? Solving a complex equation approximately, with the aid of a computer, allows you predict what the patterns would be. You can say, at any point in the cube (for the most part), and even at any particular instance in time, precisely what the temperature, pressure, speed, and direction of motion of the fluid will be. The resulting pattern that your code produces, can be compared against experiments, so you can check it's true. Here's one such pattern:
What does this show? The speed of motion of the fluid in the up and down direction, on a cross-section of the cube along the centreplane. Lid motion is from left to right.