Flow Lab

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

Lesson 11.13

Particle & Lattice Methods: SPH and Lattice Boltzmann

Alternatives to grid-based Navier–Stokes: smoothed particle hydrodynamics and the lattice Boltzmann method.

Written byClaude Opus

🌊
Why this matters for simulation: LBM is a popular, GPU-friendly way to build a wind tunnel; SPH dominates splashy liquids.

By the end of this lesson you can…

  • Build an SPH fluid: a normalized kernel, density as a sum, pressure from a stiff equation of state, artificial viscosity and leapfrog.
  • Choose an SPH speed of sound and time step from the Mach rule and the CFL limit.
  • Write one lattice Boltzmann D2Q9 collide-and-stream step, recover density and velocity as moments, and explain exact mass conservation.
  • Verify $\nu = c_s^2(\tau - \tfrac12)$ with a decaying shear wave, and use it with the Mach limit to set up a cylinder run at a chosen Reynolds number.
  • Measure a shedding Strouhal number, carry it to a landing-gear strut by similarity, and choose between SPH, LBM, projection and finite-volume solvers.
On this page
·
  1. SPH: a field as a sum over particles
  2. Pressure from a stiff equation of state
  3. The dam break
  4. Lattice Boltzmann: populations on a lattice
  5. Viscosity from the relaxation time
  6. A cylinder sheds a vortex street
  7. When to use which
  8. Computing it
  9. Concept checks
  10. Problems
  11. Key Takeaways

Every solver in this module so far has been a PDE on a grid: Stable Fluids solved a Poisson equation in fixed cells, and last lesson’s finite volumes pushed fluxes through fixed faces. Here are two other ways. Smoothed particle hydrodynamics (SPH) has no grid: the fluid is a cloud of particles, and every derivative becomes a weighted sum over neighbours. The lattice Boltzmann method (LBM) keeps a grid but solves no Navier–Stokes equation on it: populations of imaginary molecules hop between nodes and collide, and Navier–Stokes comes out on average. Both borrow 11.12’s idea: let the fluid squeeze a little, and pressure comes from density through a speed of sound, with no Poisson solve.

Tools: 11.12 Compressible Flow & Shocks, 11.11 Stam's Stable Fluids, Step by Step, 11.4 Viscosity & the Navier–Stokes Equations, 11.5 Non-dimensionalization & the Reynolds Number (Strouhal), 11.6 Vorticity Dynamics & Circulation and 4.7 Energy & Symplectic Integrators (leapfrog).

▶ Video A water column collapses as a cloud of SPH particles, each feeling its neighbours through a smoothing kernel; then nine populations per lattice node collide and stream, and a cylinder in the lattice sheds a Kármán vortex streetcaptions only
Transcript
  1. Every solver here so far solved a PDE on a grid: Poisson in fixed cells, fluxes through fixed faces. Here are two other ways. Smoothed particle hydrodynamics has no grid at all. The lattice Boltzmann method keeps a grid, but solves no Navier-Stokes equation on it. Both let the fluid squeeze a little, so pressure comes from density, with no Poisson solve.
  2. SPH smears each particle over a smoothing kernel: a bump of width h that integrates to 1 and vanishes beyond 2h. The normalization is exact: the integral is 1.000000, and on a lattice with h equal to 1.3 spacings the sum is 0.999947. Density is then a sum over neighbours, and since particles carry their mass, mass is exact.
  3. Pressure comes from density through a stiff equation of state, so the water squeezes a little. The speed of sound, 80 metres per second, is a numerical choice: it keeps the Mach number below 0.1 and density changes near 1 percent. The time step is a CFL limit, 1.625 times ten to the minus four seconds. Real water's 1480 would need steps 18.5 times smaller.
  4. Release a column of water, 1 metre wide and 2 tall: 800 particles. The front passes 2.0 metres at 0.373 seconds and 3.5 metres at 0.655: 5.32 metres per second. Shallow-water theory, Ritter's, gives 8.86, so we run at 60 percent of it. Ritter's tip has no thickness and no resistance: an upper bound.
  5. SPH has honest weaknesses. A free-surface particle has neighbours on one side only, so its density reads low and its pressure goes negative: tension. Unclamped, top particles reach 10.6 metres per second in 0.02 seconds, where free fall gives 0.2, and particles clump. Pressure is noisy, so pressure on a body is its weak spot. SPH shines at free surfaces and splashes.
  6. Lattice Boltzmann keeps a grid, with nine populations at each node, moving along nine lattice velocities with weights four ninths, one ninth and one thirty-sixth. Density and velocity are their moments. A step collides, relaxing each population toward equilibrium, then streams, hopping one link. The weights give c s squared equal to one third: an equation of state, so it is weakly compressible too.
  7. The relaxation time sets the viscosity: nu is c s squared times tau minus one half. Check it with a decaying shear wave. At tau 0.6 the measured viscosity is 0.033436, 0.31 percent high; at 0.8 it is 0.100206. At tau 1.5 the error is 0.99 percent on a box 32 wide, four times smaller with each doubling: second order.
  8. Walls use bounce-back: a population that would enter the cylinder is sent back reversed, giving no-slip with no equation to solve. At Reynolds number 40 there is no street. From 100 the bubbles take turns breaking off: a Karman vortex street. The Strouhal number is 0.191 at Re 100, 0.206 at 150 and 0.214 at 200: a little high, but the street is right.
  9. By similarity, lattice numbers apply to hardware. A 5 centimetre strut at 50 metres per second has Reynolds number 1.71 times ten to the 5, where the Strouhal number is still about 0.2. It sheds at 200 hertz, so its side force alternates at 200. A 3 millimetre wire sheds at 3333 hertz. Near a natural frequency, lock-in can cause fatigue.
  10. Which method? Projection for incompressible flow and smoke; finite volumes for shocks; SPH for free surfaces and splashes; lattice Boltzmann for complex geometry and wakes. For aircraft, grid solvers remain the workhorses. Next, Module 12 takes these tools into the air. In 12.1, a wing makes lift from circulation: the Kutta condition fixes how much, and the lift is rho V gamma.

SPH: a field as a sum over particles

Give each particle bb a mass mm, a position xb\mathbf x_b and a density ρb\rho_b. Any field AA is estimated by smearing each particle’s value over a small blob:

A(x)≈∑bmρb Ab W(∣x−xb∣,h).A(\mathbf x) \approx \sum_b \frac{m}{\rho_b}\,A_b\,W(|\mathbf x - \mathbf x_b|, h).

m/ρbm/\rho_b is the particle’s volume and WW the smoothing kernel, a bump of width hh that integrates to 11, vanishes beyond 2h2h and is smooth. We use the 2D cubic spline, with q=r/hq = r/h:

W=107πh2{1−32q2+34q3,0≤q<1,14(2−q)3,1≤q<2,0,q≥2.W = \frac{10}{7\pi h^2}\begin{cases}1 - \tfrac32q^2 + \tfrac34q^3, & 0 \le q \lt 1,\\ \tfrac14(2 - q)^3, & 1 \le q \lt 2,\\ 0, & q \ge 2.\end{cases}

The constant 10/(7πh2)10/(7\pi h^2) is the normalization. Lab block A checks it: 2π∫02hW r dr=1.0000002\pi\int_0^{2h}W\,r\,dr = 1.000000, and on a square lattice of spacing Δx\Delta x with h=1.3 Δxh = 1.3\,\Delta x the sum ∑W Δx2=0.999947\sum W\,\Delta x^2 = 0.999947. The sim sets the particle mass so this lattice sum gives exactly ρ0=1000\rho_0 = 1000 kg/m3^3.

Put A=ρA = \rho and the ρb\rho_b cancel: density is a sum,

ρa=∑bm W(∣xa−xb∣,h).\rho_a = \sum_b m\,W(|\mathbf x_a - \mathbf x_b|, h).

No continuity equation is solved: particles carry their mass, so mass is exact. Gradients use the exact ∇W\nabla W in the same sum.

Pressure from a stiff equation of state

Weakly compressible SPH lets the water squeeze slightly and reads pressure off density with the Tait equation of state (from memory):

p=B[(ρρ0)7−1],B=ρ0c027.p = B\Big[\Big(\frac{\rho}{\rho_0}\Big)^7 - 1\Big], \qquad B = \frac{\rho_0 c_0^2}{7}.

Linearized, p≈c02(ρ−ρ0)p \approx c_0^2(\rho - \rho_0), so by 11.12’s c2=dp/dρc^2 = dp/d\rho, c0c_0 is the speed of sound. 11.12 also priced compressibility: density changes by about M2/2M^2/2. So c0c_0 is a numerical choice, large enough that vmax⁡/c0v_{\max}/c_0 stays below about 0.10.1 and density changes stay near 1%1\%. Real water’s 14801480 m/s (from memory) would ruin the time step.

The time step is a CFL limit. Sound must not cross more than a fraction of a kernel per step, so the sim takes

Δt=0.2 hc0+vmax⁡,\Delta t = \frac{0.2\,h}{c_0 + v_{\max}},

1.625×10−41.625\times10^{-4} s at the start of the dam break (h=0.065h = 0.065 m, c0=80c_0 = 80 m/s), and 18.518.5 times smaller with c0=1480c_0 = 1480 m/s (lab B). As in 11.12, sound sets the step even when the flow is slow.

The pressure force. Euler’s equation is Du/Dt=−∇p/ρ+gD\mathbf u/Dt = -\nabla p/\rho + \mathbf g. The naive kernel sum for ∇p\nabla p gives pair forces that are not equal and opposite, so instead write ∇p/ρ=∇(p/ρ)+(p/ρ2)∇ρ\nabla p/\rho = \nabla(p/\rho) + (p/\rho^2)\nabla\rho and estimate each term with the kernel:

duadt=−∑bm(paρa2+pbρb2+Πab)∇aWab+g.\frac{d\mathbf u_a}{dt} = -\sum_b m\Big(\frac{p_a}{\rho_a^2} + \frac{p_b}{\rho_b^2} + \Pi_{ab}\Big)\nabla_a W_{ab} + \mathbf g .

The bracket is symmetric in aa and bb and ∇aWab=−∇bWab\nabla_a W_{ab} = -\nabla_b W_{ab}, so pair forces obey Newton’s third law and momentum is conserved to round-off.

Viscosity. Πab\Pi_{ab} is Monaghan’s artificial viscosity (from memory):

Πab=−α h c0 (ua−ub)⋅(xa−xb)ρˉab (rab2+0.01h2)when the pair approaches, else 0.\Pi_{ab} = -\frac{\alpha\,h\,c_0\,(\mathbf u_a - \mathbf u_b)\cdot(\mathbf x_a - \mathbf x_b)}{\bar\rho_{ab}\,\big(r_{ab}^2 + 0.01h^2\big)} \quad\text{when the pair approaches, else } 0 .

It acts only on approaching pairs, damping impacts like 11.12’s Rusanov diffusion. It acts as a kinematic viscosity of about αhc0/8\alpha h c_0/8 (from memory): 0.03250.0325 m2^2/s at α=0.05\alpha = 0.05 (lab B), over thirty thousand times water’s 10−610^{-6}. At this resolution SPH is a stabilized inviscid model.

Leapfrog. Each step is kick, drift, forces, kick:

u+=12Δt a,x+=Δt u,a=a(x,u),u+=12Δt a.\mathbf u \mathrel{+}= \tfrac12\Delta t\,\mathbf a, \quad \mathbf x \mathrel{+}= \Delta t\,\mathbf u, \quad \mathbf a = \mathbf a(\mathbf x, \mathbf u), \quad \mathbf u \mathrel{+}= \tfrac12\Delta t\,\mathbf a .

That is velocity Verlet from 4.7 Energy & Symplectic Integrators: one force evaluation per step, symplectic for conservative forces, so energy oscillates instead of drifting over the thousands of steps the acoustic CFL demands.

The dam break

The sim’s first tab releases a water column 11 m wide and H=2H = 2 m tall in a 44 m tank: 800800 particles at Δx=0.05\Delta x = 0.05 m, with three layers of fixed wall particles that join the density sums and push back through the equation of state.

◆ Interactive SPH dam break: change the speed of sound and the artificial viscosity, colour by speed or pressure, and allow tension; the second tab is the lattice Boltzmann cylinder wake

Loading simulation…

A number to compare with. Shallow-water theory (hydrostatic pressure in a thin layer) behaves like gas dynamics with depth as density. Its dam break is a rarefaction like Sod’s, along which u+2ghu + 2\sqrt{gh} is constant (a Riemann invariant, from memory). At the tip the depth is zero, so the front runs at Ritter’s speed 2gH=8.862\sqrt{gH} = 8.86 m/s (lab B), drawn in red dashes.

With the defaults (c0=80c_0 = 80 m/s, α=0.05\alpha = 0.05) the front passes 2.02.0 m at t=0.373t = 0.373 s and 3.53.5 m at 0.6550.655 s: 5.325.32 m/s, 60%60\% of Ritter’s. The numerical knobs hardly move it:

c0c_0 (m/s)α\alphafront speed (m/s)max Machmax compression
1200.055.210.0520.60%
800.055.320.0801.05%
400.055.420.1612.15%
200.055.370.3275.48%
800.015.470.0831.17%
800.204.900.0710.70%

(Maxima until the front reaches 3.53.5 m, the readout’s last line.) So the gap is not the speed of sound. Ritter’s tip has zero thickness and no resistance, his reservoir is infinite, and his water starts at full speed; ours is a short column that must first fall, its tip slowed by artificial viscosity (4.904.90 m/s at α=0.2\alpha = 0.2) and the bumpy particle wall. Ritter is an upper bound; tank experiments are slower too (from memory).

The compression column is the Mach rule at work. Hydrostatics alone gives gH/c02=0.31%gH/c_0^2 = 0.31\% at c0=80c_0 = 80 (lab B); impacts and particle noise push the peak higher. It grows as c0c_0 falls, though more slowly than 1/c021/c_0^2, because the noisiest particle sets it.

Lattice Boltzmann: populations on a lattice

Now a fixed lattice, but no Navier–Stokes solve. Each node holds nine numbers fif_i, the fluid moving with lattice velocity ci\mathbf c_i. In D2Q9 these are rest, four axis neighbours and four diagonals, with weights wi=4/9w_i = 4/9, 1/91/9 (four) and 1/361/36 (four), in lattice units Δx=Δt=1\Delta x = \Delta t = 1.

Density and velocity are moments, the zeroth and first:

ρ=∑ifi,ρ u=∑icifi.\rho = \sum_i f_i, \qquad \rho\,\mathbf u = \sum_i \mathbf c_i f_i .

One step is collide, then stream. With the BGK (Bhatnagar–Gross–Krook) collision,

fi(x+ci, t+1)=fi+1τ(fieq−fi),f_i(\mathbf x + \mathbf c_i,\ t + 1) = f_i + \frac{1}{\tau}\big(f_i^{\text{eq}} - f_i\big),

each population relaxes a fraction 1/τ1/\tau toward equilibrium, then hops one link along ci\mathbf c_i. The equilibrium is a low-Mach expansion of a Maxwell–Boltzmann distribution (from memory):

fieq=wi ρ(1+ci⋅ucs2+(ci⋅u)22cs4−∣u∣22cs2),cs2=13.f_i^{\text{eq}} = w_i\,\rho\Big(1 + \frac{\mathbf c_i\cdot\mathbf u}{c_s^2} + \frac{(\mathbf c_i\cdot\mathbf u)^2}{2c_s^4} - \frac{|\mathbf u|^2}{2c_s^2}\Big), \qquad c_s^2 = \frac13 .

Where cs2=1/3c_s^2 = 1/3 comes from. The weights give ∑wi=1\sum w_i = 1 and ∑wicix2=2⋅19+4⋅136=13\sum w_i c_{ix}^2 = 2\cdot\tfrac19 + 4\cdot\tfrac1{36} = \tfrac13 (lab C). Then ∑fieq=ρ\sum f_i^{\text{eq}} = \rho, ∑cifieq=ρu\sum \mathbf c_i f_i^{\text{eq}} = \rho\mathbf u, and the momentum flux ∑cixciyfieq\sum c_{ix}c_{iy}f_i^{\text{eq}} is ρcs2 δxy+ρuxuy\rho c_s^2\,\delta_{xy} + \rho u_xu_y: a pressure p=ρcs2p = \rho c_s^2 plus momentum carried by the flow. That is an equation of state with sound speed 1/31/\sqrt3: LBM is weakly compressible too, with Ma=∣u∣3\mathrm{Ma} = |\mathbf u|\sqrt3.

Why mass is exact. feqf^{\text{eq}} has the same ρ\rho and ρu\rho\mathbf u as the ff it was built from, so collision changes neither, and streaming only moves numbers. Mass is conserved to round-off (the exercise checks it), with no Poisson equation anywhere.

Viscosity from the relaxation time

The Chapman–Enskog expansion (stated, not derived; from memory) gives

ν=cs2(τ−12)=τ−123.\nu = c_s^2\Big(\tau - \frac12\Big) = \frac{\tau - \tfrac12}{3}.

Heuristically, a momentum-flux disturbance shrinks by 1−1/τ1 - 1/\tau per collision, so it survives about τ\tau steps, leaking momentum sideways at a rate set by cs2c_s^2; the −12-\tfrac12 is the hop’s own second-order discretization error, a negative diffusion worth half a step (from memory).

Check it with a shear wave. Take ux=Usin⁡(ky)u_x = U\sin(ky), uy=0u_y = 0 on a periodic box. Its nonlinear term ux ∂xuxu_x\,\partial_x u_x vanishes, so 11.4’s Navier–Stokes reduces to the heat equation ∂tux=ν ∂y2ux\partial_t u_x = \nu\,\partial_y^2 u_x and the amplitude decays as e−νk2te^{-\nu k^2 t}: the decay rate measures ν\nu. On a 32×3232\times32 lattice, timing the decay from step 100100 to 500500, the exercise’s solution finds

τ\tau(τ−12)/3(\tau - \frac12)/3measured ν\nuerror
0.60.0333330.033436+0.31%
0.80.1000000.100206+0.21%
1.00.1666670.166666−2.8×10−6-2.8\times10^{-6}
1.50.3333330.330031−0.99%-0.99\%

At τ=1.5\tau = 1.5 the error is −4.27%-4.27\% on a 1616-wide box, −0.99%-0.99\% at 3232, −0.24%-0.24\% at 6464: a factor four per halving, second order. Mass changes by under 10−1010^{-10}.

Stability and the Mach limit. τ>12\tau \gt \tfrac12 is required for ν>0\nu \gt 0; as τ→12\tau \to \tfrac12 the collision overshoots equilibrium (the factor 1/τ1/\tau nears 22) and BGK grows fragile. The equilibrium is a low-Mach expansion, so errors grow like Ma2\mathrm{Ma}^2. They fight over Re=UD/ν\mathrm{Re} = UD/\nu: more Re at fixed UU, DD pushes τ\tau toward 12\tfrac12; more UU raises Ma. The sim fixes U=0.1U = 0.1 (Ma=0.173\mathrm{Ma} = 0.173, errors of a few percent) and D=20D = 20, so τ=3UD/Re+12\tau = 3UD/\mathrm{Re} + \tfrac12: 0.560.56 at Re 100100, 0.540.54 at 150150 (lab C). Higher Re needs more nodes.

Walls by bounce-back. A population that would stream into a solid node is sent back, reversed. Each wall link then carries equal and opposite momentum, so the velocity vanishes about halfway to the solid node: no-slip with no equation to solve. A curved body becomes a staircase.

A cylinder sheds a vortex street

The second tab is a 400×120400\times120 lattice with a D=20D = 20 cylinder in a far field U=0.1U = 0.1 (inlet, top and bottom rows held at equilibrium) and a copy-the-neighbour outlet. A probe 3D3D behind it records the cross-stream velocity vv; the time between upward zero crossings is the period, and St=fD/U\mathrm{St} = fD/U.

◆ Interactive Lattice Boltzmann D2Q9: a cylinder in a channel at a chosen Reynolds number; vorticity shows the Kármán street, and the probe measures the Strouhal number

Loading simulation…

At Re =40= 40 two bubbles stay attached and the probe settles to ∣v∣/U=0.003|v|/U = 0.003: no street. From Re 100100 the bubbles take turns breaking off. With the readout settled (by step 20 00020\,000):

Reτ\tauSt (sim)
1000.56000.191
1500.54000.206
2000.53000.214
2500.52400.221
4000.51500.233

At Re 150150 that is one period per 972.8972.8 steps (lab C). The known open-air value is St≈0.2\mathrm{St} \approx 0.2 for Re of a few hundred, a little lower near 100100 (from memory). Ours run high and keep rising: the far-field rows are 6D6D apart (blockage 1/61/6 speeds the flow past the cylinder), Ma is 0.170.17, the circle is a 20-node staircase, and by Re 400400 the real wake is three-dimensional. The street itself is right: red (counterclockwise) and blue (clockwise) vortices alternate, 11.6’s opposite-sign vortices in two staggered rows. Each row induces an upstream velocity on the other, as 11.6’s pair pushed itself along, so the street drifts slower than the free stream (from memory).

Why a lattice number applies to a strut. By 11.5, St depends only on nondimensional groups (Re, weakly Ma and blockage), not on whether the cylinder is 2020 nodes or 55 cm of steel.

When to use which

MethodNatural forWeak at
Projection / Stable Fluidsincompressible flow, smoke, real timefree surfaces; diffusive unless refined
Compressible finite volume (11.12)shocks, transonic and supersonic flightlow Mach, where sound sets the step
SPHfree surfaces, splashes, sloshing, impactspressure on bodies, walls, high Re
LBMcomplex geometry (just solid flags), wakes, GPUs (all updates local)high Mach; high Re needs many nodes

For aircraft aerodynamics, grid and finite-volume solvers remain the workhorses (from memory).

Computing it

🐍 PythonLab: kernel normalization (A), the dam break's numbers (B), D2Q9 weights and the sim's settings (C), shedding off a strut and a wire (D)
⌘/Ctrl + Enter

The exercise. Write one D2Q9 collide-and-stream step. The tests run the shear wave at τ=0.6\tau = 0.6 and 0.80.8 on a 32×3232\times32 periodic lattice and require ν\nu within 1%1\% of (τ−12)/3(\tau - \tfrac12)/3 and mass unchanged to 10−910^{-9}.

🧪 Coding exerciseExercise: one lattice Boltzmann collide-and-stream step, checked against nu = (tau - 1/2)/3 and mass conservation
⌘/Ctrl + Enter

The solution measures ν=0.033436\nu = 0.033436 and 0.1002060.100206, with mass changing by about 4×10−114\times10^{-11}. Then run(1.5, 16), run(1.5, 32) and run(1.5, 64) reproduce the convergence check.

Concept checks

✅ Concept check

In lattice units, what relaxation time $\tau$ gives a D2Q9 BGK fluid the kinematic viscosity $\nu = 0.02$?

✅ Concept check

Why does weakly compressible SPH use a speed of sound around 80 m/s for the dam break instead of water's real 1480 m/s?

✅ Concept check

Why does lattice Boltzmann conserve mass to round-off with no continuity equation and no pressure solve?

✅ Concept check

A landing-gear strut of diameter 4 cm is in a 60 m/s airflow. With St = 0.2, at what frequency in Hz does it shed vortices from one side?

Problems

✏️ Pen & paperHalf-life of a shear wave●○○

On a 32×3232\times32 periodic lattice with τ=0.8\tau = 0.8, a shear wave ux=Usin⁡(2πy/32)u_x = U\sin(2\pi y/32) decays. Predict its decay rate per step and the number of steps for its amplitude to halve.

Show worked solution

ν=(0.8−0.5)/3=0.1\nu = (0.8 - 0.5)/3 = 0.1 and k=2π/32=0.19635k = 2\pi/32 = 0.19635, so the rate is νk2=0.1×0.038553=0.0038553\nu k^2 = 0.1\times0.038553 = 0.0038553 per step. It halves after t=ln⁡2/0.0038553=179.8t = \ln2/0.0038553 = 179.8 steps (179.4179.4 with the measured ν=0.100206\nu = 0.100206).

✏️ Pen & paperPlanning a higher-Reynolds-number run●●○

For the cylinder at Re =1000= 1000 with the sim’s U=0.1U = 0.1, D=20D = 20, what is τ\tau? At fixed UU, what DD restores τ=0.524\tau = 0.524 (the sim’s Re 250)? Roughly how much more computing?

Show worked solution

ν=UD/Re=0.002\nu = UD/\mathrm{Re} = 0.002, so τ=0.506\tau = 0.506, very near 12\tfrac12. For τ=0.524\tau = 0.524, ν=0.008\nu = 0.008 and D=Re ν/U=80D = \mathrm{Re}\,\nu/U = 80 nodes. The lattice grows 44 times each way (1616 times the nodes) and a shedding period D/(St U)D/(\mathrm{St}\,U) takes 44 times the steps: about 6464 times the cost. Raising UU instead raises Ma past 0.170.17.

✏️ Pen & paperChoosing c0 and the time step for a smaller tank●●○

An SPH tank holds water H=0.5H = 0.5 m deep, Δx=0.01\Delta x = 0.01 m, h=1.3 Δxh = 1.3\,\Delta x. Take vmax⁡=2gHv_{\max} = 2\sqrt{gH} and c0=10 vmax⁡c_0 = 10\,v_{\max}. Find Δt=0.2h/(c0+vmax⁡)\Delta t = 0.2h/(c_0 + v_{\max}) and the steps for 11 s, and compare with water’s real 14801480 m/s.

Show worked solution

vmax⁡=4.429v_{\max} = 4.429 m/s, c0=44.29c_0 = 44.29 m/s, Δt=0.0026/48.72=5.34×10−5\Delta t = 0.0026/48.72 = 5.34\times10^{-5} s: about 18 70018\,700 steps. With 14801480 m/s, Δt=0.0026/1484.4=1.75×10−6\Delta t = 0.0026/1484.4 = 1.75\times10^{-6} s: 571 000571\,000 steps, 30.530.5 times more.

Key Takeaways

  • SPH turns fields into kernel sums (the cubic spline integrates to 1.0000001.000000); density is ρa=∑mWab\rho_a = \sum m W_{ab}, so mass is exact.
  • Weakly compressible SPH reads pressure from a stiff equation of state with an artificial c0≈10 vmax⁡c_0 \approx 10\,v_{\max} and steps 0.2h/(c0+vmax⁡)0.2h/(c_0 + v_{\max}) by leapfrog.
  • The dam-break front runs at 5.325.32 m/s, 60%60\% of Ritter’s 8.868.86, almost independent of c0c_0. Free surfaces are SPH’s strength; tension, walls and noisy pressure its weaknesses.
  • LBM D2Q9: BGK collision toward feqf^{\text{eq}}, then streaming; ρ\rho and ρu\rho\mathbf u are moments, p=ρ/3p = \rho/3, and mass is conserved to round-off.
  • ν=(τ−12)/3\nu = (\tau - \tfrac12)/3 holds to 0.20.2 to 0.3%0.3\% in shear-wave decay, converging at second order; stability needs τ>12\tau \gt \tfrac12 and small Ma=U3\mathrm{Ma} = U\sqrt3.
  • The lattice cylinder sheds a Kármán street with St =0.191= 0.191 to 0.2330.233 for Re 100100 to 400400; by similarity a 55 cm strut at 5050 m/s sheds at 200200 Hz.
  • Next, Module 12 takes these tools into the air. In 12.1 a wing makes lift from circulation: the Kutta condition fixes how much circulation the sharp trailing edge allows, the starting vortex you saw shed in 11.6 balances it, and the lift is L=ρVΓL = \rho V\Gamma.
Finished this lesson?

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