Fluid dynamics for Toddlers
The Navier-Stokes equations are meant to model fluids. I think they are cool. I met one of my best buds on a beach bringing this up as a conversation topic, but he’s now a lawyer.
Anyways, they look complicated and scary. Like seriously, the hell is this:
$$ \rho\left(\frac{\partial \mathbf{v}}{\partial t} + \mathbf{v} \cdot \nabla \mathbf{v}\right) = -\nabla p + \mu \nabla^2 \mathbf{v} + \mathbf{f} $$
In the above, ρ is the density, p is the pressure, v is the velocity field, μ is the viscosity coefficient, and f is any external body force per unit volume — gravity, for instance. p is the pressure gradient (how pressure changes from point to point), and ∇² is the second derivative in space.
The second equation ∇ · v = 0 is the incompressibility condition, which just says the fluid isn’t being squeezed or stretched anywhere — whatever flows into a region flows out.
Confused? Yep, it’s hard to work with.
But here’s a more intuitive way to think about it. I will show you how you can derive and think about this formula in a more natural way. For now, I will ignore the incompressibility assumption and the stress tensor, and focus on the main meat.
Here goes. It all goes back to Newton.
From your high school days you learnt in Newtonian Mechanics, acceleration is equal to the force divided by the mass
$$ \mathbf{a} = \frac{\mathbf{F}}{m} $$
And acceleration is the derivative of velocity. So Newton’s Laws can be rewritten as
$$ \frac{d\mathbf{v}}{dt} = \frac{\mathbf{F}}{m} $$
So what’s the fluids version of this equation?
Well, a fluid isn’t a point mass like in Newtonian mechanics; it’s a field where every point in space has a value associated. At different points in the fluid, we have a vector for the direction of the flow, a number for the pressure, a number for the density and so on.
So the ‘velocity’ of a fluid is a velocity field, where every point in the fluid has a given velocity associated with the flow. The velocity at this point is the velocity that a particle would travel if you placed it there. This is what the velocity field of a river looks like.
So how do we think about a ‘derivative‘ of a field? If you wanted to measure the derivative of a quantity in a field, the most natural approach is to pretend you put some measuring equipment in the flow, let it travel, and then observe the change in the measuring equipment. Imagine putting a thermometer in a river and then reading the change in temperature as it flows.
The change in quantity over time as something moves is called the material derivative. It measures the change in some quantity F, which is a function of a point in space and time, taking into account that the point at which we are measuring changes as well
$$ F(\mathbf{x}(t), t) $$
The change, over a small time δt, is
$$ F(\mathbf{x}(t + \delta t), t + \delta t) - F(\mathbf{x}(t), t) $$
Since the point itself is moving with the flow, its displacement over δt is δx = v δt, where v = dx/dt is the velocity at that point. Taylor expanding F around (x(t), t),
$$ F(\mathbf{x} + \mathbf{v}\,\delta t,\; t + \delta t) \approx F(\mathbf{x}, t) + \frac{\partial F}{\partial t}\,\delta t + (\nabla F) \cdot \mathbf{v}\,\delta t + O(\delta t^2) $$
Don’t worry if the upside down triangles confuse you, these are just the derivatives but in three dimensions. Subtracting F(x, t), dividing by δt, and taking δt → 0, the material derivative is
$$ \frac{DF}{Dt} = \frac{\partial F}{\partial t} + \mathbf{v} \cdot \nabla F = \frac{\partial F}{\partial t} + v_x \frac{\partial F}{\partial x} + v_y \frac{\partial F}{\partial y} + v_z \frac{\partial F}{\partial z} $$
The first term is how F changes at a fixed point in space; the remaining three are how F changes because the probe is being carried along by the flow — one for each spatial direction, weighted by the corresponding component of the velocity.
So the ‘acceleration’ in fluids space is just the material derivative of the velocity field,
$$ \text{acceleration} = \frac{D\mathbf{v}}{Dt} = \frac{\partial \mathbf{v}}{\partial t} + \mathbf{v} \cdot \nabla \mathbf{v} $$
Now what about the other side of the equation? Well Newton said that
$$ \frac{d\mathbf{v}}{dt} = \frac{\mathbf{F}}{m} $$
But we are dealing with a fluid, so mass doesn’t make sense. Instead we should be using the density ρ (mass per unit volume), and so we have the equation
$$ \frac{D\mathbf{v}}{Dt} = \frac{\mathbf{f}}{\rho} $$
But what is the force on a fluid? Well it can be whatever the physical situation calls for. Gravity, friction, whatever you need. But for fluids, one force that always appears is the pressure gradient. Differences in pressure cause particles to move — fluid gets pushed from high pressure to low pressure, so the force per unit volume is −∇p.
Putting that in,
$$ \frac{D\mathbf{v}}{Dt} = -\frac{\nabla p}{\rho} + \frac{\mathbf{f}}{\rho} $$
And then we also have friction. In fluids, friction is known as viscosity. This is a bit more technical, but David Tong has an excellent explanation here about why viscosity takes the form
$$ \mathbf{f}_{\text{visc}} = \mu \nabla^2 \mathbf{v} $$
where μ is the viscosity coefficient and ∇² = ∂²/∂x² + ∂²/∂y² + ∂²/∂z² is the Laplacian. And so we finally have the Navier-Stokes equations,
$$ \frac{D\mathbf{v}}{Dt} = \frac{\partial \mathbf{v}}{\partial t} + \mathbf{v}\cdot\nabla\mathbf{v} = -\frac{\nabla p}{\rho} + \frac{\mu}{\rho}\nabla^2 \mathbf{v} + \frac{\mathbf{f}}{\rho} $$
Or, multiplying through by ρ to match the form at the top,
$$ \rho\left(\frac{\partial \mathbf{v}}{\partial t} + \mathbf{v}\cdot\nabla\mathbf{v}\right) = -\nabla p + \mu \nabla^2 \mathbf{v} + \mathbf{f} $$
Bingo bango. We’re done.


