1Demonstration 1 of 5
Evolve transport with a chosen CFL number
Can exact mass conservation alone certify accuracy?
Advance a periodic profile with an upwind finite-volume update, then compare it with an analytic shift.
Courant number C. 80 periodic cells, velocity 1, twenty steps. At C>1 general monotone stability fails.
Predict first. Can exact mass conservation alone certify accuracy?
Choose an example
Constructed teaching inputs; calculations executed locally. Supported menu choices are precomputed.
Calculated values
- Courant number
- 1
- Steps
- 20
- Initial discrete mass
- 0.124072
- Final discrete mass
- 0.124072
- Minimum value
- 0
The upwind scheme conserves total mass exactly: whatever leaves one cell enters its neighbor. At CFL=1, upwind is an exact grid shift: each step moves the profile one cell, matching the analytic curve.
Use the idea
Use rule 23.2.1 when its stated conditions fit. Compare the calculation with your own decision threshold; retain the relevant error or uncertainty.
Where the conclusion applies
80 periodic cells, velocity 1, twenty steps. At C>1 general monotone stability fails.
Check your understanding: Can exact mass conservation alone certify accuracy?
Book source: Rule 23.2.1: Keep explicit advection CFL near or below one. Demonstration C23-D01. Worked illustration.
2Demonstration 2 of 5
Execute diffusion against a known sine solution
Can one smooth mode look reasonable above the stability limit?
Run an explicit heat solver and compare its final field with the exact sine-decay solution.
Requested diffusion ratio r. 40 intervals, zero endpoints, sine initial data, t=.02. dt is adjusted to end exactly at .02; displayed actual ratio controls the check.
Predict first. Can one smooth mode look reasonable above the stability limit?
Choose an example
Constructed teaching inputs; calculations executed locally. Supported menu choices are precomputed.
Calculated values
- Grid intervals
- 40
- Actual dt/dx²
- 0.4
- RMS error at t=.02
- 8.15353e-05
- Maximum magnitude
- 0.820752
Zero endpoints and a sine initial state provide a known heat solution. The actual ratio is 0.4; the scheme is stable only when it is ≤.5. At or below .5 every mode decays, so the computed curve stays on the exact one.
Use the idea
Use rule 23.2.2 when its stated conditions fit. Compare the calculation with your own decision threshold; retain the relevant error or uncertainty.
Where the conclusion applies
40 intervals, zero endpoints, sine initial data, t=.02. dt is adjusted to end exactly at .02; displayed actual ratio controls the check.
Check your understanding: Can one smooth mode look reasonable above the stability limit?
Book source: Rule 23.2.2: Remember that explicit diffusion steps scale with mesh size squared. Demonstration C23-D02. Worked illustration.
3Demonstration 3 of 5
Measure solution error on successive meshes
Why hold the time-error budget in mind during mesh refinement?
Execute the heat solver on four meshes and estimate observed order from normed errors.
Selected grid intervals. Known sine heat solution, coupled dt≈.4dx²; this checks combined error rather than isolating spatial order.
Predict first. Why hold the time-error budget in mind during mesh refinement?
Choose an example
Constructed teaching inputs; calculations executed locally. Supported menu choices are precomputed.
Calculated values
- Selected intervals
- 40
- RMS error
- 8.15353e-05
- Observed order from previous mesh
- 1.98754
The known sine heat solution checks this finite-difference implementation. Holding dt/dx² near .4 makes temporal error decrease with dx² alongside spatial error. This coupled study does not separately measure time and space orders.
Use the idea
Use rule 23.3.3 when its stated conditions fit. Compare the calculation with your own decision threshold; retain the relevant error or uncertainty.
Where the conclusion applies
Known sine heat solution, coupled dt≈.4dx²; this checks combined error rather than isolating spatial order.
Check your understanding: Why hold the time-error budget in mind during mesh refinement?
Book source: Rule 23.3.3: Estimate PDE order from normed errors on successive meshes. Demonstration C23-D03. Worked illustration.
4Demonstration 4 of 5
See waves drift on a coarse grid
With ten cells per wavelength, is the wave in the right place after five wavelengths?
A centered second-order derivative makes short waves travel too slowly. The lag grows with distance.
Cells per wavelength N. Linear advection, centered second-order space derivative, exact time integration; travel distance 5 wavelengths.
Predict first. With ten cells per wavelength, is the wave in the right place after five wavelengths?
Choose an example
Constructed teaching inputs; calculations executed locally. Supported menu choices are precomputed.
Calculated values
- Cells per wavelength
- 10
- Speed ratio
- 0.935489
- Speed error (%)
- 6.45107
- Phase lag after 5 wavelengths (degrees)
- 116.119
With 10 cells per wavelength the computed wave moves at 93.5% of the true speed. After traveling 5 wavelengths it lags by 116°. The speed looks close, yet the crest is now a third of a wavelength late. Ten cells is a floor for short trips, not long ones. Phase error grows with distance traveled, so long runs need more cells or a higher-order scheme.
Use the idea
Use rule 23.2.3 when its stated conditions fit. Compare the calculation with your own decision threshold; retain the relevant error or uncertainty.
Where the conclusion applies
Linear advection, centered second-order space derivative, exact time integration; travel distance 5 wavelengths.
Check your understanding: With ten cells per wavelength, is the wave in the right place after five wavelengths?
Book source: Rule 23.2.3: Resolve waves with at least about ten cells per wavelength. Demonstration C23-D04. Worked illustration.
5Demonstration 5 of 5
See centered differences wiggle when flow outruns diffusion
The exact solution never goes below zero. Can the centered answer?
Solve steady transport a u′=D u″ on [0,1] with u(0)=0, u(1)=1 on 20 cells using centered differences, and compare with the exact boundary-layer solution.
Cell Peclet number aΔx/D. Uniform grid, a=1, D chosen to set the cell Peclet number; steady one-dimensional model.
Predict first. The exact solution never goes below zero. Can the centered answer?
Choose an example
Constructed teaching inputs; calculations executed locally. Supported menu choices are precomputed.
Calculated values
- Cell Peclet number aΔx/D
- 2
- Cells
- 20
- Minimum computed value
- 0
- Max error
- 0.135335
The flow carries u toward x=1, where it must climb from 0 to 1 in a thin layer. At cell Peclet number 2, the scheme sits exactly on the monotone limit: no wiggles, but the layer is only one cell wide. Keep aΔx/D at or below 2, refine the mesh, or switch to an upwind-biased scheme.
Use the idea
Use rule 23.1.2 when its stated conditions fit. Compare the calculation with your own decision threshold; retain the relevant error or uncertainty.
Where the conclusion applies
Uniform grid, a=1, D chosen to set the cell Peclet number; steady one-dimensional model.
Check your understanding: The exact solution never goes below zero. Can the centered answer?
Book source: Rule 23.1.2: Use cell Peclet number to judge centered convection-diffusion. Demonstration C23-D05. Worked illustration.
Bring the idea to a question of your own
Choose the relationship that answers your question, check its conditions, and compare the result with the accuracy or decision threshold you need.
The chapter skill can adapt these calculations to your inputs. It should name the assumptions, explain what the result supports, and say what still needs evidence. The chapter workbook adds a lab and three exercises with answers.