Flow Lab

Syllabus / Module 11: Fluid Dynamics: Navier–Stokes and Beyond

Lesson 11.2

Conservation of Mass: The Continuity Equation

Deriving ∂ρ/∂t + ∇·(ρu) = 0 two ways; incompressibility; Reynolds transport theorem.

Written byClaude Opus

🌊
Why this matters for simulation: The constraint Stam's projection step enforces.

By the end of this lesson you can…

  • Balance the mass crossing the faces of a control volume and turn it into the continuity equation $\partial_t\rho + \nabla\cdot(\rho\mathbf u) = 0$ with the divergence theorem.
  • Rewrite continuity as $D\rho/Dt = -\rho\,\nabla\cdot\mathbf u$ and read $\nabla\cdot\mathbf u$ as a parcel's fractional rate of volume growth, checked by tracking parcels with RK4.
  • State the Reynolds transport theorem, sketch it in one dimension, and use it to get continuity for a moving parcel.
  • Judge incompressibility with the Mach number: 4.4% density change at Mach 0.3, 26% at Mach 0.8.
  • Apply $u_1A_1 = u_2A_2$ to a wind-tunnel contraction, and build divergence-free 2D flows from a stream function $\psi$ whose differences are flow rates (2U on top of a cylinder).
On this page
·
  1. Control volumes and flux
  2. Worked example: a box in a contraction
  3. From the box to a PDE
  4. The parcel’s point of view
  5. Worked example: parcels that grow and parcels that don’t
  6. The Reynolds transport theorem
  7. Incompressibility and when it holds
  8. Streamtubes and the wind tunnel
  9. The stream function
  10. Worked example: flow past a cylinder
  11. Computing it
  12. Concept checks
  13. Problems
  14. Key Takeaways

The last lesson ended on a question. Over the crest of its wing-like contraction the centreline air sped up by 30%30\%, and the field had a vertical part, v=−yf′(x)v = -y f'(x), pulling air toward the centreline. Where does the air go? Sideways. A streamline that starts one unit above the centreline is only 0.7690.769 units above it over the crest, and 1/0.769=1.31/0.769 = 1.3. The strip between the centreline and that streamline carries the same air per second everywhere, so where it narrows by 1.31.3 the air in it moves 1.31.3 times faster. That bookkeeping is conservation of mass, and over a wing it reads the same: the streamtubes above the upper surface narrow, and the air in them is faster.

Notice what it does not say. Continuity ties narrowing to speed-up but names no force; the push is pressure, the next lesson. Here we write the bookkeeping three ways: a balance on a box, a PDE, and a function ψ\psi whose contours are streamtubes. The tools are the divergence (2.7 Divergence: Sources & Sinks), the divergence theorem (2.10 Green, Stokes & the Divergence Theorem) and the material derivative (11.1 Continuum Hypothesis & Flow Kinematics).

▶ Video Mass flowing through the faces of a box, a parcel that keeps its area, a wind-tunnel contraction, and streamtubes squeezing over a cylindercaptions only
Transcript
  1. The last lesson ended on a question. Over the crest of the contraction the centreline air sped up thirty percent. Where does the air go? Sideways. The streamline one unit above the centreline is only zero point seven six nine units above it over the crest, and one over zero point seven six nine is one point three. That strip carries the same air per second everywhere, so where it narrows by one point three, the air in it moves one point three times faster. That bookkeeping is conservation of mass.
  2. First, a balance on a box. Take a box one metre deep, air at one point two kilograms per cubic metre, flowing in at the left, out at the right, and squeezed from the top and bottom. The four faces give minus twelve, fourteen point four, minus one point two and minus one point two kilograms per second, and the net is zero. Delete the squeeze and the net outflow is two point four kilograms per second: the box must lose density. Speeding-up air is drawn in from the sides, or it thins out.
  3. Shrink the box and the divergence theorem gives continuity. Following a parcel, D rho by D t equals minus rho times the divergence of u: the divergence is the fractional rate at which a parcel's volume grows. Tracking parcels with RK4, the diverging flow, divergence zero point seven five, grows the area to four point four eight one seven. A shear keeps the area at one point zero zero zero zero. So does the source, though its streamlines fan out. Spreading streamlines are not divergence.
  4. If every parcel keeps its density, the divergence of u is zero. That is a property of the flow, judged by the Mach number. For air brought smoothly to rest, the density ratio is one plus point two M squared, to the minus two and a half. At Mach point three it is zero point nine five six four, a four point four percent change. At Mach point eight it is zero point seven four zero zero, a twenty-six percent change. So incompressible means below Mach point three, and an airliner near Mach point eight is far outside it.
  5. A streamtube's wall is made of streamlines, so what enters one end leaves the other: u one A one equals u two A two. A tunnel draws air slowly through a wide settling chamber, then squeezes it through a contraction. With a contraction ratio of nine, five metres per second becomes forty-five. The compressible model gives forty-five point four zero at Mach zero point one three three six, with density point eight eight percent below the inlet: incompressible is good to one percent.
  6. Run it faster. At twenty-one point one metres per second, incompressible gives one hundred eighty-nine point nine zero. The compressible model gives two hundred fifty-five point seven nine at Mach point seven nine eight one, thirty-four point seven percent faster, with density point seven four two four of the inlet value. Both conserve mass; they split the trade between density and speed differently. Past about twenty-two metres per second, the contraction chokes: no subsonic flow can push that much mass through the throat.
  7. In two dimensions, build incompressibility in: u is partial psi by partial y, and v is minus partial psi by partial x. The divergence is psi y x minus psi x y, which is zero. Streamlines are curves of constant psi, and the flow between two is the difference of psi, so where contours crowd, the air is fast. For a cylinder, psi is U y times one minus a squared over x squared plus y squared. At the top the speed is two U. With U and a equal to one, psi of B minus psi of A is one point five zero zero zero.
  8. Continuity ties narrowing to speed-up. The streamtubes squeeze over the crest, so the air in them must move faster. But it names no force. Something has to push a parcel from slow air into fast air, and that something is pressure. Next lesson, the Euler equations and Bernoulli's principle turn this speed-up into the pressure difference that holds a wing up.

Control volumes and flux

Fix a region VV, a control volume, and let the air flow through it. Mass in VV changes only by crossing its boundary SS. Through a patch dAdA with outward normal n\mathbf n, the volume crossing per second is u⋅n dA\mathbf u\cdot\mathbf n\,dA; only the normal component carries anything through. Weight by density and add the patches:

ddt∫Vρ dV=−∮Sρ u⋅n dA.\frac{d}{dt}\int_V \rho\,dV = -\oint_S \rho\,\mathbf u\cdot\mathbf n\,dA .

This is the integral form of conservation of mass; ρu\rho\mathbf u is the mass flux, and the minus sign is there because u⋅n>0\mathbf u\cdot\mathbf n \gt 0 means leaving.

Worked example: a box in a contraction

Take the box 0<x<10 \lt x \lt 1, −0.5<y<0.5-0.5 \lt y \lt 0.5 (metres, one metre deep), air at ρ=1.2\rho = 1.2 kg/m3^3, and u=(10+2x, −2y)\mathbf u = (10 + 2x,\ -2y) m/s: speeding up in xx, squeezed in yy. Outflow per face:

  • Left, u=10u = 10: −1.2⋅10=−12-1.2\cdot10 = -12 kg/s (inflow).
  • Right, u=12u = 12: +1.2⋅12=14.4+1.2\cdot12 = 14.4 kg/s.
  • Top, v=−1v = -1, into the box: −1.2-1.2 kg/s. Bottom, v=+1v = +1, also in: −1.2-1.2 kg/s.

Net outflow: −12+14.4−1.2−1.2=0-12 + 14.4 - 1.2 - 1.2 = 0. The extra 2.42.4 kg/s leaving on the right enters through top and bottom. Delete the squeeze, u=(10+2x, 0)\mathbf u = (10 + 2x,\ 0), and the net outflow is 2.42.4 kg/s: the box, one cubic metre, must lose density at 2.42.4 kg/m3^3 per second. Air that speeds up must either be drawn in from the sides (the contraction) or thin out (compressibility). Lab part A evaluates the four face integrals and prints these numbers.

From the box to a PDE

The divergence theorem turns the surface integral into ∫V∇⋅(ρu) dV\int_V \nabla\cdot(\rho\mathbf u)\,dV, and the box is fixed, so the time derivative moves inside:

∫V(∂ρ∂t+∇⋅(ρu)) dV=0for every box V.\int_V \Big(\frac{\partial\rho}{\partial t} + \nabla\cdot(\rho\mathbf u)\Big)\,dV = 0 \quad\text{for every box } V.

If the continuous integrand were positive somewhere, a tiny box there would give a positive integral. So it vanishes everywhere:

∂ρ∂t+∇⋅(ρ u)=0,\frac{\partial\rho}{\partial t} + \nabla\cdot(\rho\,\mathbf u) = 0 ,

the continuity equation. Check it on the unsqueezed box: ∇⋅(ρu)=1.2⋅2=2.4\nabla\cdot(\rho\mathbf u) = 1.2\cdot2 = 2.4, so ∂tρ=−2.4\partial_t\rho = -2.4 kg/m3^3/s, as the faces said.

The parcel’s point of view

With ∇⋅(ρu)=u⋅∇ρ+ρ ∇⋅u\nabla\cdot(\rho\mathbf u) = \mathbf u\cdot\nabla\rho + \rho\,\nabla\cdot\mathbf u, the first term joins ∂tρ\partial_t\rho to make the material derivative of the last lesson:

DρDt=−ρ ∇⋅u.\frac{D\rho}{Dt} = -\rho\,\nabla\cdot\mathbf u .

A parcel of volume δV\delta V is always the same molecules, so ρ δV\rho\,\delta V is constant along it: δV Dρ/Dt+ρ D(δV)/Dt=0\delta V\,D\rho/Dt + \rho\,D(\delta V)/Dt = 0, and therefore

1δVD(δV)Dt=∇⋅u.\frac{1}{\delta V}\frac{D(\delta V)}{Dt} = \nabla\cdot\mathbf u .

The divergence is the fractional rate at which a parcel’s volume grows (area, in 2D), and the density falls exactly as fast.

Worked example: parcels that grow and parcels that don’t

Lab part B follows a small square parcel’s boundary with RK4 and measures its area with the shoelace formula.

  • Diverging flow u=(x/2, y/4)\mathbf u = (x/2,\ y/4): ∇⋅u=0.75\nabla\cdot\mathbf u = 0.75, so δA=δA0e0.75t\delta A = \delta A_0e^{0.75t}, which is e1.5=4.4817e^{1.5} = 4.4817 at t=2t = 2. The RK4 parcel: 4.48174.4817.
  • Shear (y,0)(y, 0): divergence 00. The parcel becomes a parallelogram twice as wide, area 1.00001.0000: the “area factor 1.00001.0000” of the last lesson’s sim, now explained.
  • Source r/∣r∣2\mathbf r/|\mathbf r|^2: the streamlines fan out, yet ∇⋅u=0\nabla\cdot\mathbf u = 0 for r>0r \gt 0 (Problem 3). The parcel from (1,0)(1, 0) is squashed radially (width ×0.613\times0.613) and stretched sideways (height ×1.854\times1.854); its area stays 1.00001.0000.

The source is the trap: spreading streamlines are not divergence. The air slows as it spreads, and the slowing pays for the spreading exactly.

The Reynolds transport theorem

A control volume stands still; a parcel moves and deforms. The Reynolds transport theorem connects them. For a smooth f(x,t)f(\mathbf x, t) and a material volume V(t)V(t) moving with the flow,

ddt∫V(t)f dV=∫V(t)∂f∂t dV+∮S(t)f u⋅n dA.\frac{d}{dt}\int_{V(t)} f\,dV = \int_{V(t)} \frac{\partial f}{\partial t}\,dV + \oint_{S(t)} f\,\mathbf u\cdot\mathbf n\,dA .

The 3D statement is quoted without proof; in 1D it is the Leibniz rule of Calc II. A material interval [a(t),b(t)][a(t), b(t)] has ends moving with the flow, a′=u(a,t)a' = u(a, t), b′=u(b,t)b' = u(b, t), so

ddt∫a(t)b(t)f dx=∫ab∂f∂t dx+f(b) u(b)−f(a) u(a):\frac{d}{dt}\int_{a(t)}^{b(t)} f\,dx = \int_a^b \frac{\partial f}{\partial t}\,dx + f(b)\,u(b) - f(a)\,u(a):

change inside, plus ground swept at the moving ends. In 3D the ends become S(t)S(t) and uu becomes u⋅n\mathbf u\cdot\mathbf n. Put f=ρf = \rho: a material volume keeps its mass, so the left side is zero, and at the instant it coincides with a fixed box the right side is the box balance. With f=ρuf = \rho\mathbf u the same theorem turns Newton’s second law into the momentum equation, next lesson.

Incompressibility and when it holds

If every parcel keeps its density, Dρ/Dt=0D\rho/Dt = 0 and continuity becomes

∇⋅u=0,\nabla\cdot\mathbf u = 0 ,

incompressibility: every parcel keeps its volume. It is a property of the flow, not the gas. Air squeezes easily in a piston, yet the flow round a light aircraft is nearly incompressible, because its speeds change the pressure only slightly. The yardstick is the Mach number M=∣u∣/aM = |\mathbf u|/a, speed over the speed of sound.

For air (γ=1.4\gamma = 1.4) brought smoothly from rest (density ρ0\rho_0) to Mach MM without heat exchange or friction, gas dynamics gives the isentropic relation (quoted from memory; the compressible-flow lesson, 11.12, derives it):

ρρ0=(1+γ−12M2)−1/(γ−1)=(1+0.2M2)−2.5.\frac{\rho}{\rho_0} = \Big(1 + \frac{\gamma - 1}{2}M^2\Big)^{-1/(\gamma - 1)} = (1 + 0.2M^2)^{-2.5}.

At M=0.3M = 0.3: 1.018−2.5=0.95641.018^{-2.5} = 0.9564, a 4.4%4.4\% change. At M=0.8M = 0.8: 1.128−2.5=0.74001.128^{-2.5} = 0.7400, a 26%26\% change. The rule incompressible below Mach 0.3 accepts about 4%. An airliner cruising near Mach 0.8 is far outside it: the oncoming air is a quarter less dense than air brought to rest on the nose, and ∇⋅u=0\nabla\cdot\mathbf u = 0 is simply wrong there. The channel sim’s bottom plot draws this curve with both points labelled.

Streamtubes and the wind tunnel

A streamtube is the bundle of streamlines through a small closed loop. Its wall is made of streamlines, so no air crosses it, and in steady flow what enters one end leaves the other: ρ1u1A1=ρ2u2A2\rho_1u_1A_1 = \rho_2u_2A_2, with uu the mean speed over each section. At constant density,

u1A1=u2A2.u_1A_1 = u_2A_2 .

That is how a wind tunnel makes its speed. Air drifts through a wide settling chamber (where screens calm it), then a contraction squeezes it into the test section. With contraction ratio CR=A1/A2=9\mathrm{CR} = A_1/A_2 = 9 (a typical value for low-speed tunnels, from memory), 55 m/s becomes 9⋅5=459\cdot5 = 45 m/s. The sim’s compressible model (the isentropic relation plus the area-Mach relation of gas dynamics, both quoted) gives 45.4045.40 m/s at Mach 0.13360.1336, with density 0.88%0.88\% below the inlet: incompressible is good to 1%1\%.

◆ Interactive A wind-tunnel contraction: compressible air above the centreline, the incompressible model below; dot density is density

Loading simulation…

Drag the inlet speed to 21.121.1 m/s. Incompressible: 9⋅21.1=189.909\cdot21.1 = 189.90 m/s. Compressible: 255.79255.79 m/s at Mach 0.79810.7981, 34.7%34.7\% faster, with density 0.74240.7424 of the inlet value. The upper dots thin out and outrun the lower ones, yet the mass-flux curve ρuA\rho uA stays flat at 11 in both models, because both conserve mass; they split the trade between ρ\rho and uu differently. Past about 2222 m/s at this ratio the readout reports choked: no subsonic flow can push that much mass through the throat.

The stream function

In 2D, incompressibility can be built in. Take any smooth ψ(x,y)\psi(x, y) and set

u=∂ψ∂y,v=−∂ψ∂x.u = \frac{\partial\psi}{\partial y}, \qquad v = -\frac{\partial\psi}{\partial x}.

Then ∇⋅u=ψyx−ψxy=0\nabla\cdot\mathbf u = \psi_{yx} - \psi_{xy} = 0 because mixed partials are equal (2.1 Functions of Several Variables & Partial Derivatives). Two more facts:

  • Streamlines are curves ψ=\psi = const. Along (dx,dy)(dx, dy), dψ=−v dx+u dyd\psi = -v\,dx + u\,dy, zero exactly when (dx,dy)(dx, dy) is parallel to (u,v)(u, v).
  • Flow rate is a difference of ψ\psi. The volume per second (per metre of depth) crossing any curve from AA to BB is ∫AB(u dy−v dx)=ψ(B)−ψ(A)\int_A^B (u\,dy - v\,dx) = \psi(B) - \psi(A).

So equally spaced contours split the flow into channels carrying equal flow, and where contours crowd, the air is fast. The last lesson’s contraction is ψ=y f(x)\psi = y\,f(x) with f=1+0.3e−x2f = 1 + 0.3e^{-x^2}, since then u=fu = f and v=−yf′v = -yf'. Its streamline ψ=1\psi = 1 runs at y=1y = 1 upstream and y=1/1.3=0.769y = 1/1.3 = 0.769 over the crest: the opening of this lesson.

Worked example: flow past a cylinder

The stream function of a uniform stream UU past a cylinder of radius aa (from memory; the potential-flow lesson, 11.7, builds it) is

ψ=U y(1−a2x2+y2).\psi = U\,y\Big(1 - \frac{a^2}{x^2 + y^2}\Big).

With r2=x2+y2r^2 = x^2 + y^2 and ∂yr−2=−2y/r4\partial_y r^{-2} = -2y/r^4, by hand:

u=ψy=U(1−a2r2)+2Ua2y2r4=U(1−a2(x2−y2)r4),v=−ψx=−2Ua2xyr4.u = \psi_y = U\Big(1 - \frac{a^2}{r^2}\Big) + \frac{2Ua^2y^2}{r^4} = U\Big(1 - \frac{a^2(x^2 - y^2)}{r^4}\Big), \qquad v = -\psi_x = -\frac{2Ua^2xy}{r^4}.

Far away u→(U,0)\mathbf u \to (U, 0). On r=ar = a, ψ=0\psi = 0: the surface is a streamline, so no air enters the cylinder. The divergence, term by term:

ux=−Ua2 2x r2−4x(x2−y2)r6,vy=−2Ua2x r2−4y2r6,u_x = -Ua^2\,\frac{2x\,r^2 - 4x(x^2 - y^2)}{r^6}, \qquad v_y = -2Ua^2x\,\frac{r^2 - 4y^2}{r^6},

and the numerators add to −2Ua2x (2r2−2x2−2y2)=0-2Ua^2x\,(2r^2 - 2x^2 - 2y^2) = 0.

At the top, (0,a)(0, a): u=U(1+a4/a4)=2Uu = U(1 + a^4/a^4) = 2U, v=0v = 0. The air moves twice as fast over the top as in the free stream. In streamtube terms: the streamline through (0,2a)(0, 2a) has ψ=2Ua⋅34=1.5Ua\psi = 2Ua\cdot\tfrac34 = 1.5Ua, so far upstream, where ψ→Uy\psi \to Uy, it sits 1.5a1.5a up. The tube between it and the surface carries 1.5Ua1.5Ua through a gap of 1.5a1.5a upstream but only aa at the top: mean speed UU, then 1.5U1.5U, peaking at 2U2U on the body.

◆ Interactive Stream-function contours: click two points to measure the flow between their streamlines; hover for the numerical divergence

Loading simulation…

With U=a=1U = a = 1, A=(0,1)A = (0, 1) and B=(0,2)B = (0, 2) the readout gives ψ(B)−ψ(A)=1.5000\psi(B) - \psi(A) = 1.5000, and the line integral of u dy−v dxu\,dy - v\,dx along ABAB, computed separately from the hand-derived velocity, also 1.50001.5000. The shaded tube is 1.6401.640 wide at x=−3x = -3 (the cylinder’s influence fades only like a2/r2a^2/r^2) and 1.0001.000 at the top; mean speed 0.9140.914, then 1.5001.500. The top reads u=2.0000u = 2.0000, v=0.0000v = 0.0000, and the largest ∣∇⋅u∣|\nabla\cdot\mathbf u| over the grid is of order 10−810^{-8}, the central-difference error at step 10−410^{-4}. This is the seed of the airfoil story: a curved body narrows the streamtubes over it, and the flow there is faster. The airfoil lesson adds the circulation that makes the top faster than the bottom.

Computing it

🐍 PythonLab: the box balance (A), parcel areas with RK4 (B), the sampled cylinder velocity (C)
⌘/Ctrl + Enter
🧪 Coding exerciseExercise: velocity from a stream function by finite differences, its divergence, and the flow rate between two streamlines
⌘/Ctrl + Enter

The grid is the cylinder (U=a=1U = a = 1) with h=0.01h = 0.01, −3≤x≤3-3 \le x \le 3, 0.9≤y≤30.9 \le y \le 3; the top (0,1)(0, 1) is u[9, 299]. The divergence must be below 10−910^{-9}; the solution prints about 2.5×10−142.5\times10^{-14}, round-off on ψ\psi values near 33 divided by (2h)2(2h)^2. Differencing the exact velocity instead (lab part C) lands near 10−310^{-3} and would fail. The top speed and flow rate carry truncation error of order h2h^2 (the solution prints 2.00012.0001 and 1.500041.50004), so they are graded to 10−310^{-3}.

Concept checks

✅ Concept check

Using $\rho/\rho_0 = (1 + 0.2M^2)^{-2.5}$, by what percentage is the density below its at-rest value at Mach 0.3? (two decimals)

✅ Concept check

In the 2D source flow $\mathbf u = \mathbf r/|\mathbf r|^2$ the streamlines spread apart. Away from the origin, a parcel's area

✅ Concept check

A low-speed tunnel has contraction ratio 9 and settling-chamber speed 5 m/s. What test-section speed does $u_1A_1 = u_2A_2$ predict, in m/s?

✅ Concept check

Streamlines $\psi = 0, 0.25, 0.5, \ldots$ are drawn for a 2D incompressible flow. Where two neighbouring lines are half as far apart as elsewhere,

Problems

✏️ Pen & paperSizing a tunnel●○○

A tunnel has contraction ratio 6 and a settling-chamber speed of 10 m/s. (a) Find the test-section speed from u1A1=u2A2u_1A_1 = u_2A_2. (b) The sim’s compressible model gives 60.9560.95 m/s at Mach 0.17970.1797 with ρ2/ρ1=0.9845\rho_2/\rho_1 = 0.9845. Explain the size of the incompressible error. (c) Should the error grow or shrink if the tunnel runs faster?

Show worked solution

(a) u2=6⋅10=60u_2 = 6\cdot10 = 60 m/s.

(b) 60.95/60=1.01660.95/60 = 1.016, so the incompressible answer is 1.6%1.6\% low. Mass conservation, ρ2u2A2=ρ1u1A1\rho_2u_2A_2 = \rho_1u_1A_1, makes the true speed the incompressible one divided by ρ2/ρ1\rho_2/\rho_1, and 1/0.9845=1.0161/0.9845 = 1.016. Below Mach 0.3, as here, that stays under a few percent.

(c) Grow: for small MM, (1+0.2M2)−2.5≈1−0.5M2(1 + 0.2M^2)^{-2.5} \approx 1 - 0.5M^2, so the density drop, and with it the error, grows like M2M^2. At 21.121.1 m/s inflow the sim’s error is 34.7%34.7\%.

✏️ Pen & paperThe cylinder by hand●●○

For ψ=Uy(1−a2/r2)\psi = Uy(1 - a^2/r^2): (a) derive uu, vv and show ∇⋅u=0\nabla\cdot\mathbf u = 0; (b) find the velocity at (0,a)(0, a) and at (−a,0)(-a, 0); (c) find the flow rate between the surface and the streamline through (0,2a)(0, 2a).

Show worked solution

(a) As in the worked example: u=U(1−a2(x2−y2)/r4)u = U(1 - a^2(x^2 - y^2)/r^4), v=−2Ua2xy/r4v = -2Ua^2xy/r^4, and the numerators of uxu_x and vyv_y sum to −2Ua2x(2r2−2x2−2y2)=0-2Ua^2x(2r^2 - 2x^2 - 2y^2) = 0. It had to: ux+vy=ψyx−ψxyu_x + v_y = \psi_{yx} - \psi_{xy}.

(b) At (0,a)(0, a): u=U(1+1)=2Uu = U(1 + 1) = 2U, v=0v = 0. At (−a,0)(-a, 0): u=U(1−1)=0u = U(1 - 1) = 0, v=0v = 0, the stagnation point on the nose, where locally the flow looks like ψ=kxy\psi = kxy turned to face the stream.

(c) The surface has ψ=0\psi = 0 and ψ(0,2a)=2Ua⋅34=1.5Ua\psi(0, 2a) = 2Ua\cdot\tfrac34 = 1.5Ua, so 1.5Ua1.5Ua per unit depth; the sim (with U=a=1U = a = 1) reads 1.50001.5000 both as a ψ\psi difference and as a line integral.

✏️ Pen & paperParcels and the source●●○

(a) For u=(x/2, y/4)\mathbf u = (x/2,\ y/4) solve the pathline equations and show a parcel’s area grows like e0.75te^{0.75t}. (b) Show u=r/∣r∣2\mathbf u = \mathbf r/|\mathbf r|^2 is divergence-free for r>0r \gt 0, find a stream function, and the flow rate out through any circle around the origin.

Show worked solution

(a) X=X0et/2X = X_0e^{t/2}, Y=Y0et/4Y = Y_0e^{t/4}: horizontal lengths scale by et/2e^{t/2}, vertical ones by et/4e^{t/4}, area by e3t/4e^{3t/4}, which is 4.48174.4817 at t=2t = 2 (lab part B). Consistently, ∇⋅u=0.75\nabla\cdot\mathbf u = 0.75.

(b) ux=(r2−2x2)/r4u_x = (r^2 - 2x^2)/r^4 and vy=(r2−2y2)/r4v_y = (r^2 - 2y^2)/r^4 sum to 00. The polar angle works: ψ=atan2(y,x)\psi = \mathrm{atan2}(y, x) has ψy=x/r2=u\psi_y = x/r^2 = u, −ψx=y/r2=v-\psi_x = y/r^2 = v. Through a circle, ∣u∣⋅2πr=2π|\mathbf u|\cdot2\pi r = 2\pi, the jump in ψ\psi once around: all the divergence sits at the origin, where the air is injected. The sim’s source-sink uses m=4m = 4, so its ψ\psi jumps by 44.

Key Takeaways

  • A fixed box gains mass only through its faces; the divergence theorem turns that into ∂tρ+∇⋅(ρu)=0\partial_t\rho + \nabla\cdot(\rho\mathbf u) = 0.
  • For a parcel, Dρ/Dt=−ρ ∇⋅uD\rho/Dt = -\rho\,\nabla\cdot\mathbf u, and ∇⋅u\nabla\cdot\mathbf u is the fractional rate of volume growth. Spreading streamlines (the source) are not divergence.
  • Reynolds transport theorem (stated; in 1D the Leibniz rule): derivatives of integrals over moving parcels become fixed control-volume balances. Next lesson it yields the momentum equation.
  • ∇⋅u=0\nabla\cdot\mathbf u = 0 is a property of the flow: density changes 4.4%4.4\% at Mach 0.3, 26%26\% at Mach 0.8. Airliner cruise is compressible.
  • Streamtubes obey u1A1=u2A2u_1A_1 = u_2A_2: a contraction ratio of 9 turns 5 m/s into 45 m/s, but at 21.1 m/s inflow the compressible speed is 35% higher, and a little faster the contraction chokes.
  • In 2D, u=ψyu = \psi_y, v=−ψxv = -\psi_x is divergence-free by construction; ψB−ψA\psi_B - \psi_A is the flow between two streamlines, and matched central differences keep the discrete divergence at round-off.
  • Over a cylinder the tubes narrow and the top speed is 2U2U. Continuity says the air must speed up there, not what pushes it. That force is pressure: next, the Euler equations and Bernoulli’s principle turn the speed-up into the pressure difference that holds a wing up.
Finished this lesson?

Mark it complete to track your progress (saved in this browser). Reading every section does this for you.

Where this leads

These later lessons build directly on this one: