Learning Objectives
By the end of this section, you will be able to:
- Explain what viscosity physically is — momentum diffusion between adjacent fluid layers — and why a single number captures it for many real fluids.
- Build the 1D Newton law of viscosity from the slope of a velocity profile.
- Promote that scalar relation to the full Cauchy stress tensor , and decompose it into pressure + deviatoric parts.
- Compute the strain-rate tensor and use the Newtonian constitutive law .
- Connect the divergence of the stress tensor to the viscous term in the Navier–Stokes momentum equation.
- Implement the stress tensor in plain Python (finite differences) and again in PyTorch (exact autograd) for a worked Couette-flow case.
Intuition: Why a Tensor at All?
The key idea. Pressure pushes equally in all directions and needs only one number per point. Viscous forces depend on which face you push on and which direction you push. Two directions → a matrix → a tensor.
Imagine a tiny cube of fluid sitting in a flow. Each of its six faces feels a force from the neighbouring fluid. That force has both a normal component (squeeze or pull) and two shear components (sliding sideways). Three faces × three force components gives nine numbers — the entries of the stress tensor .
The first index of labels the face (the normal direction), the second labels the force component. So reads: "on the face whose normal points in , the -component of the force per unit area."
Newton's Law of Viscosity (1D)
Start with the simplest possible setup — the one Newton himself analyzed in the Principia. Two large flat plates sandwich a thin layer of fluid. The bottom plate is fixed. The top plate moves with steady velocity . After a moment of transients, the fluid in between settles into a steady linear velocity profile:
Each fluid layer slides past the one below at a tiny relative speed. There must be a force per unit area between them, because a real fluid resists shearing — that's viscosity. Newton hypothesised that for a great many fluids (water, air, oil) that force is exactly proportional to the slope of the velocity profile:
The constant of proportionality is the dynamic viscosity. Its units fall right out of dimensional analysis:
Intuition: viscosity as momentum diffusion
Pick a horizontal surface inside the fluid. Molecules constantly hop across it. The molecules coming from above carry slightly more horizontal momentum than those coming from below, because the layer above moves slightly faster. Net transfer of horizontal momentum downward = a horizontal force pulling the lower fluid along. That microscopic momentum exchange is macroscopic viscous stress.
The viscosity measures how efficient that hopping is. Air is bad at it ( Pa·s). Honey is great at it ( Pa·s).
| Fluid | μ at 20°C (Pa·s) | How "sticky"? |
|---|---|---|
| Air | 1.8 × 10⁻⁵ | Almost frictionless |
| Water | 1.0 × 10⁻³ | Easy to stir |
| Olive oil | ≈ 0.08 | Pours slowly |
| Glycerine | ≈ 1.4 | Like honey |
| Honey | ≈ 10 | Hangs from a spoon |
| Pitch | ≈ 2 × 10⁸ | Looks solid for years |
Interactive: Couette Flow Explorer
Before doing any heavier math, get a feel for the relationship between the velocity profile, the shear rate, and the stress. Drag the sliders below and watch the slope, the arrows, and the numbers change together.
Things to try
- Double . The slope doubles, so doubles too — that is the linearity of Newton's law in action.
- Halve the gap . The slope doubles even though is unchanged — squeezing the fluid into a thinner layer makes it work harder.
- Switch to shear-thinning. Increase — the stress grows, but more slowly than linearly. That is why ketchup gets easier to pour the harder you shake it.
The Cauchy Stress Tensor
Real flows are three-dimensional, and forces inside the fluid have to be described on every possible face orientation. Cauchy's breakthrough (1822) was the realisation that you do not need a different rule for every plane. Knowing the force per unit area on three mutually perpendicular faces is enough — any other face is a weighted combination.
Cauchy's stress theorem says that the traction vector on a face with unit normal is just . Nine numbers describe stress at any orientation, at any point.
Symmetry: angular-momentum conservation
For a fluid that is not spinning with infinite angular acceleration (i.e. any real fluid), conservation of angular momentum on a vanishing element forces the stress tensor to be symmetric:
That cuts the nine entries down to six independent ones. Geometrically, the symmetric tensor diagonalises in some rotated frame — the principal directions of stress. In those axes there are no shear forces, only pure normal pulls or pushes.
Pressure + Deviatoric Decomposition
Every symmetric tensor splits uniquely into an isotropic part (a scalar times the identity) and a deviatoric traceless part:
We define the pressure as minus one third of the trace (the negative sign keeps it positive for a fluid that is being squeezed):
Everything else — every off-diagonal entry and the diagonal's deviation from being all-equal — is the viscous stress tensor . For an inviscid fluid and the Cauchy equation collapses to Euler's equation.
Why this split matters. Pressure does no work on the fluid's shape — it only changes its size (if it is compressible at all). The deviatoric part is what actually deforms fluid elements and dissipates kinetic energy into heat. The Newtonian assumption is a statement about that part alone.
The Strain-Rate Tensor
What does the fluid actually do at a point? The first thing we can ask is: how does the velocity change as we move infinitesimally? The Taylor expansion of around a point introduces the velocity-gradient tensor with components .
Split into deformation + rotation
Any matrix splits into a symmetric and an antisymmetric part:
The symmetric part describes how a fluid element is stretching or shearing — the geometric distortion. The antisymmetric part is a rigid-body rotation of the element. Rigid rotation costs no internal friction, so only can produce viscous stress.
Strain rate D — fluid deforms
Diagonal entries: rate of stretching along that axis. Off-diagonal entries: rate of angular shear between two perpendicular axes. This is what costs energy.
Vorticity W — fluid spins
Encodes the local angular velocity . No internal friction here.
Trace and incompressibility
The trace of is — the divergence of the velocity. For an incompressible fluid this is zero, so is traceless and the strain rate captures pure shearing, no volume change.
The Newtonian Constitutive Law
We have a kinematic object () and a dynamic object (). A constitutive law connects them. Newton's assumption — generalised by Stokes to 3D — is the simplest possible: stress is a linear, isotropic function of strain rate.
The general (compressible) form
Isotropy plus linearity force the constitutive law to be (up to a sign convention):
The first term is pressure. The second is the shearing response with viscosity . The third (volumetric viscosity ) only matters if the fluid is being compressed or expanded — for almost all liquids we assume and the third term vanishes outright. Stokes' hypothesis is the standard choice for compressible flows when one wants the mean normal stress to equal .
The incompressible form
Setting leaves the clean, memorable form used throughout the rest of this chapter:
Component-wise:
That single line contains all of viscous fluid mechanics for water-like fluids. Every more advanced model — turbulence closures, non-Newtonian rheology, viscoelasticity — replaces or generalises just this constitutive equation.
From Stress Tensor to Navier–Stokes
Cauchy's momentum equation says that the net force on a fluid element is the divergence of the stress tensor plus body forces:
Plug in and grind through the derivatives. Two facts make it collapse to something familiar:
- — the divergence of a scalar-times-identity is just the gradient.
- when .
Substituting yields the incompressible Navier–Stokes momentum equation:
Worked Example: Couette Flow by Hand
Let's compute every tensor for the flow in the explorer. Numbers: , , . Velocity field: .
📝 Click to expand: full hand calculation (try it yourself first)
Step 1 — velocity gradient L = ∇v
Each entry of is . Only is non-zero, and it depends only on . So a single partial survives: . Every other partial is zero. Therefore
Step 2 — strain rate D = ½(L + Lᵀ)
Take the symmetrization. The single non-zero entry splits across both off-diagonal positions:
Step 3 — vorticity W = ½(L − Lᵀ)
The angular velocity vector is rad/s — every fluid element spins clockwise (looking down the z-axis) at 1 rad/s. Yet there is no viscous stress associated with that rotation, because drops out of the constitutive law.
Step 4 — stress tensor σ = −pI + 2μD
Take the gauge pressure to be zero. Then
Step 5 — read off the shear stress on the plates
The top plate's outward normal is . The traction it feels from the fluid is
So the fluid pulls the plate in the direction with 2 N/m². If you keep the plate moving you need to push it forward with 2 N/m² × area. That is exactly Newton's 1D answer — but now it falls out of a full tensorial calculation. The interactive explorer above is producing the same number.
Step 6 — check the Navier–Stokes momentum equation
For this steady, fully developed flow the material derivative is zero. Body force is zero (or balanced by the unknown gauge pressure). The viscous term is . Compute it: . Every term vanishes — momentum is conserved trivially. That is why Couette flow is the simplest exact solution of Navier–Stokes you can write down.
Python: Computing the Stress Tensor
Now lift the hand calculation into code. The Python version uses central differences — pedestrian but transparent. Every value matches what we computed analytically.
tau_xy = 2.0000 Pa agrees with. The diagonal of is all zeros because we chose gauge pressure ; in a real engineering calculation you would replace it with the local pressure measured by a manometer.PyTorch: Strain Rate via Autograd
The finite-difference version is fine for a flow we know analytically. For more complex flows — or as a building block inside a physics-informed neural network — we want exact derivatives. PyTorch's torch.autograd.functional.jacobian gives us in one call, to full machine precision.
Beyond Newton: Non-Newtonian Fluids
Many real fluids violate the linear stress–strain-rate relation. The interactive explorer above lets you toggle between three rheology models. Their -vs- curves look like this:
| Class | τ vs γ̇ | Examples |
|---|---|---|
| Newtonian | τ = μ γ̇ (straight line) | Water, air, gasoline |
| Shear-thinning (pseudoplastic) | n < 1, slope decreases | Blood, ketchup, paint, polymer melts |
| Shear-thickening (dilatant) | n > 1, slope increases | Corn-starch slurry, wet sand |
| Bingham plastic | yield stress τ₀ then linear | Toothpaste, mayonnaise, drilling mud |
| Viscoelastic | stress depends on rate AND history | Polymer solutions, silly putty |
Summary
- Viscosity is microscopic momentum diffusion between fluid layers. One number captures it for Newtonian fluids.
- The 1D Newton law generalises to the Cauchy stress tensor — a symmetric object that describes force per area on every face orientation.
- The stress tensor splits into an isotropic pressure part and a deviatoric viscous part .
- The velocity gradient splits into the symmetric strain-rate (deformation) and the antisymmetric vorticity (rotation). Only produces viscous stress.
- The Newtonian constitutive law is a linear, isotropic relation between stress and strain rate.
- Taking the divergence of in Cauchy's momentum equation produces the familiar viscous term in Navier–Stokes.
- The interactive explorer and the worked Couette-flow example show every tensor collapsing to the same scalar answer .
- Real fluids include shear-thinning, shear-thickening, and yield-stress materials. Swapping the constitutive law is how those models are folded into the same momentum-conservation framework.
Coming next: Section 30.5 looks at boundary conditions in fluid flow — no-slip, free-slip, inlet/outlet — and how they pin down a unique solution of the Navier–Stokes equations.