The Navier-Stokes equation is used to describe the motion of a viscous fluid and was named after Claude-Louis Navier, a French scientist, and George Stokes, an Irish scientist. To derive the equation, let’s consider the flow of an incompressible fluid through an infinitesimal cubic control volume* depicted in the diagram below.

* the control volume here refers to the volume of an object in the fluid.
The x-component of the velocity of the fluid is a function of x, y, z and t, i.e. ux (x, y, z, t) where t is time. The total differential of ux is:

Dividing the equation by dt and letting dx/dt = ux, dy/dt = uy, dz/dt = uz, we have:
)

Let’s analyse the hydrostatic and hydrodynamic forces acting on each face of the infinitesimal control volume in the x-direction (see diagram above where point C is the origin). They are summarised as follows:
Face
|
Force per unit area |
Force
|
BDFH
|
σxx(x + dx) |
σxx(x + dx)dydz |
ACEG
|
σxx(x) |
σxx(x)dydz |
ABHG
|
τyx(y + dy) |
τyx(y + dy)dxdz |
CDFE
|
τyx(y) |
τyx(y)dxdz |
ABDC
|
τzx(z) |
τzx(z)dxdy |
GHFE
|
τzx(z + dz) |
τzx(z + dz)dxdy |
σxx = F/A , i.e. the force F acting on a unit area of the x-plane in the x-direction, thereby the double-x subscript. The notation σxx(x) refers to σxx evaluated at a distance of (x) while σxx(x + dx) is evaluated at a distance of (x + dx). A different notation τ is given to the forces that act parallel to the faces of the control volume, e.g. τyx(y + dy) is the force acting on a unit area of the y-plane in the x-direction that is evaluated at a distance of (y + dy).
With reference to the defined directions of the forces, FH the sum of hydrostatic and hydrodynamic forces acting on the infinitesimal control volume in the positive x-direction is:
dydz-\sigma_{xx}(x)dydz+\tau_{yx}(y+dy)dxdz\\&-\tau_{yx}(y)dxdz+\tau_{zx}(z+dz)dxdy-\tau_{zx}(z)dxdy\end{align})
In addition to hydrostatic and hydrodynamic forces, an inertia force Fg (gravitational force) also acts on the infinitesimal control volume in the x-direction:

where ρ is the density of the fluid and gx is the x-component of the acceleration due to gravity.
The total force FT acting on the infinitesimal control volume in the x-direction is therefore:
)
Next, by i) substituting FH and Fg and eq24 in eq25; ii) dividing the substituted equation by dxdydz and iii) letting dx, dy, dz → 0 for an infinitesimal control volume, we have:
=\frac{\partial&space;\sigma_{xx}}{\partial&space;x}&space;+\frac{\partial&space;\tau_{yx}}{\partial&space;y}&space;+\frac{\partial&space;\tau_{zx}}{\partial&space;z}&space;+\rho&space;g_x\;&space;\;&space;\;&space;\;&space;\;&space;\;&space;\;&space;(26))
Using the same logic and repeating the above steps, we have for the y-direction and the z-direction:
=&space;\frac{\partial&space;\sigma_{yy}}{\partial&space;y}+\frac{\partial&space;\tau_{zy}}{\partial&space;z}+\frac{\partial&space;\tau_{xy}}{\partial&space;x}+\rho&space;g_y\;&space;\;&space;\;&space;\;&space;\;&space;\;&space;\;&space;(27))
=&space;\frac{\partial&space;\sigma_{zz}}{\partial&space;z}+\frac{\partial&space;\tau_{xz}}{\partial&space;x}+\frac{\partial&space;\tau_{yz}}{\partial&space;y}+\rho&space;g_z\;&space;\;&space;\;&space;\;&space;\;&space;\;&space;\;&space;(28))
From the articles on constitutive relation,
. We therefore substitute
,
and
in eq26, noting that
(see eq14) to give:
=\rho&space;g_x-\frac{\partial&space;p}{\partial&space;x}+\mu\left&space;(&space;\frac{\partial^2&space;u_x}{\partial&space;x^2}&space;+\frac{\partial^2&space;u_x}{\partial&space;y^2}+\frac{\partial^2&space;u_x}{\partial&space;z^2}\right&space;)\;&space;\;&space;\;&space;\;&space;\;&space;\;&space;\;&space;(29))
Using the same logic and repeating the above step for eq27 and eq28, we have:
=\rho&space;g_y-\frac{\partial&space;p}{\partial&space;y}+\mu\left&space;(&space;\frac{\partial&space;^2u_y}{\partial&space;x^2}+\frac{\partial&space;^2u_y}{\partial&space;y^2}&space;+\frac{\partial&space;^2u_y}{\partial&space;z^2}\right&space;)\;&space;\;&space;\;&space;\;&space;\;&space;\;&space;\;&space;(30))
=\rho&space;g_z-\frac{\partial&space;p}{\partial&space;z}+\mu\left&space;(&space;\frac{\partial&space;^2u_z}{\partial&space;x^2}+\frac{\partial&space;^2u_z}{\partial&space;y^2}&space;+\frac{\partial&space;^2u_z}{\partial&space;z^2}\right&space;)\;&space;\;&space;\;&space;\;&space;\;&space;\;&space;\;&space;(31))
Eq29, eq30 and eq31 are the Cartesian form of the Navier-Stokes equations, which when multiplied throughout by the unit vectors
,
and
respectively and summed, becomes the vector form:
)
where

is the convective derivative defined as 
is the gradient defined as 
is the vector Laplacian defined as 
is the viscosity of the fluid
